Q:

Error opening file - Python 3.3

Possible Duplicate:
IOError when trying to open existing files 

I'm having problems opening a file with open() in python 3.3, any idea why?
I'm trying 
import os

filelist = [ f for f in os.listdir( os.curdir )]
singleFile = filelist[a]
hppfile = open(singleFile, 'r')

And I get 
FileNotFoundError: [Errno 2] No such file or directory: '-file that is actually inside the directory-'

Ideas?
On Windows, I just started this to learn this to write few quick scripts

A:

If you read the documentation for listdir you will see that it returns filenames and not full path.
You will need something like
current_dir_path = os.getcwd()
open(os.path.join(curren_dir_path, file), 'r')

