Calling external text-files (newb)

Andreas Winkler andiwinkler2004 at yahoo.de
Mon Feb 28 17:00:50 EST 2005


Hi
I tried to have python call an external 'Word'-file,
and the read the whole text into a single string with
the following code:
[CODE]
source = raw_input('file path')

File = open('source', 'r')
S = input.read()

print S
[/CODE]

But when I try to run it, it raises the following
error:

File = open('sorce', 'r')
IOError: [Errno 2] No such file or directory: 'sorce'

Is it something I am mimssing, or does python require
a special form of path?

Thanks in advance
Fred\\


	

	
		
___________________________________________________________ 
Gesendet von Yahoo! Mail - Jetzt mit 250MB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de



More information about the Python-list mailing list