I just installed PyDev and I'm testing a simple line of code to test how it works...I get an error from receiving integer input, when I execute the same thing in command it works fine, but PyDev gives me an error:
File "<string>", line 1
66
^
SyntaxError: unexpected EOF while parsing
.......................
PLEASE HELP
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have the same problem. I try to debug the following simple code:
#------------------------------------------------------------------------------
# Name: sleep.py
# Author: Kevin Harris
# Last Modified: 02/13/04
# Description: This Python script demonstrates how to use the sleep()
# function.
#------------------------------------------------------------------------------
from time import sleep
print "We'll start off by sleeping 5 seconds"
sleep( 5 )
print "Ok, time to wake up!"
wait_time = input( "How much longer would you like to sleep? " )
while wait_time > 0:
print "Ok, we'll sleep for " + str(wait_time) + " more seconds..."
sleep( wait_time )
wait_time = input( "How much longer would you like to sleep? " )
print "We're done!"
and get following error message:
Traceback (most recent call last):
File "G:\...\eclipse\plugins\org.python.pydev.debug_1.3.9\pysrc\pydevd.py", line 784, in <module>
debugger.run(setup['file'], None, None)
File "G:\...\eclipse\plugins\org.python.pydev.debug_1.3.9\pysrc\pydevd.py", line 636, in run
execfile(file, globals, locals) #execute the script
File "G:\...\Workplace\python deneme\sleep.py", line 17, in <module>
wait_time = input( "How much longer would you like to sleep? " )
File "<string>", line 1
2
^
SyntaxError: unexpected EOF while parsing
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I just installed PyDev and I'm testing a simple line of code to test how it works...I get an error from receiving integer input, when I execute the same thing in command it works fine, but PyDev gives me an error:
File "<string>", line 1
66
^
SyntaxError: unexpected EOF while parsing
.......................
PLEASE HELP
I have the same problem. Again, it works fine in the command prompt.
I am using EasyEclipse for LAMP just FYI.
John
Hummm... can you give some example on what you're trying to achieve?
Hi,
I have the same problem. I try to debug the following simple code:
#------------------------------------------------------------------------------
# Name: sleep.py
# Author: Kevin Harris
# Last Modified: 02/13/04
# Description: This Python script demonstrates how to use the sleep()
# function.
#------------------------------------------------------------------------------
from time import sleep
print "We'll start off by sleeping 5 seconds"
sleep( 5 )
print "Ok, time to wake up!"
wait_time = input( "How much longer would you like to sleep? " )
while wait_time > 0:
print "Ok, we'll sleep for " + str(wait_time) + " more seconds..."
sleep( wait_time )
wait_time = input( "How much longer would you like to sleep? " )
print "We're done!"
and get following error message:
Traceback (most recent call last):
File "G:\...\eclipse\plugins\org.python.pydev.debug_1.3.9\pysrc\pydevd.py", line 784, in <module>
debugger.run(setup['file'], None, None)
File "G:\...\eclipse\plugins\org.python.pydev.debug_1.3.9\pysrc\pydevd.py", line 636, in run
execfile(file, globals, locals) #execute the script
File "G:\...\Workplace\python deneme\sleep.py", line 17, in <module>
wait_time = input( "How much longer would you like to sleep? " )
File "<string>", line 1
2
^
SyntaxError: unexpected EOF while parsing
Oh... that error...
Check http://pydev.sourceforge.net/faq.html#why_raw_input_input_does_not_work_correctly for details.
Cheers,
Fabio
Thanks Fabio, problem solved :)