[Tutor] code works in windows command but not ubuntu terminal

Tobias Quezada asanch505 at hotmail.com
Fri Jan 24 03:34:18 CET 2014


hello community,i am a newbie to python and program in general.
the script below works in python 2.7.3 on windows but not in the python 2.7.3 ubuntu terminal.

>>>fp=open("prez.dat","r")>>>x=fp.read>>>(print(x)***i used fp for file pointer.I am using windows 7 and it works but on ubuntu 12.04 LTS i get this syntax error:
Traceback (most recent call last):  File "<stdin>", line 1, in <module>IOError: [Errno 2] No such file or directory: 'prez.dat'

Any thoughts?Thanx 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20140123/b81e87d8/attachment.html>


More information about the Tutor mailing list