Hello there,
OK, I guess this is an easy one cause I'm quite a noob with PyDev for Eclipse...
How do I use the console for the code I just ran to check the value of variables? Like this little scenario:
In my code there is:
a = 10
I run it. The console terminates.
I want to type "a" in the console and it should answer "10".
If this isn't possible - how do I manage to get the values of my variables at a given point in my program?
Thanks for help, you guys!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
ok, for some reason it wasn't that easy or I just didn't get it.
here is my solution (does exactly what I want it to do):
under Run -> Run Configurations ... -> Python Run - module name -> tab "Arguments"
I inserted an "-i" under VM arguments.
Great! Exactly what I wanted to have... I love PyDev. IDLE sucks on a Mac.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
That's also an option, but it won't give you code-completion/other niceties that the interactive console from pydev ( http://pydev.sourceforge.net/console.html ) has... That's the 'default' interactive console from python (not from pydev).
Cheers,
Fabio
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
That's also an option, but it won't give you code-completion/other niceties that the interactive console from pydev ( http://pydev.sourceforge.net/console.html ) has... That's the 'default' interactive console from python (not from pydev).
Cheers,
Fabio
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Can you report that as a bug? (Is that before the setup? If so, it seems like a race condition: it's trying to access the input stream before it was setup).
Cheers,
Fabio
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello there,
OK, I guess this is an easy one cause I'm quite a noob with PyDev for Eclipse...
How do I use the console for the code I just ran to check the value of variables? Like this little scenario:
In my code there is:
a = 10
I run it. The console terminates.
I want to type "a" in the console and it should answer "10".
If this isn't possible - how do I manage to get the values of my variables at a given point in my program?
Thanks for help, you guys!
For that you need to use the interactive console ( http://pydev.sourceforge.net/console.html and http://fabioz.com/pydev/manual_adv_interactive_console.html ) instead of doing a regular run.
Cheers,
Fabio
alright, thanks! i'll try that... great thing that i can use Python within Eclipse, i love it!
ok, for some reason it wasn't that easy or I just didn't get it.
here is my solution (does exactly what I want it to do):
under Run -> Run Configurations ... -> Python Run - module name -> tab "Arguments"
I inserted an "-i" under VM arguments.
Great! Exactly what I wanted to have... I love PyDev. IDLE sucks on a Mac.
That's also an option, but it won't give you code-completion/other niceties that the interactive console from pydev ( http://pydev.sourceforge.net/console.html ) has... That's the 'default' interactive console from python (not from pydev).
Cheers,
Fabio
That's also an option, but it won't give you code-completion/other niceties that the interactive console from pydev ( http://pydev.sourceforge.net/console.html ) has... That's the 'default' interactive console from python (not from pydev).
Cheers,
Fabio
import sys; print '%s %s' % (sys.executable or sys.platform, sys.version)
Failed to create input stream: Connection reset
import sys; print '%s %s' % (sys.executable or sys.platform, sys.version)
Failed to create input stream: Connection reset>>
>>
>>import sys; print '%s %s' % (sys.executable or sys.platform, sys.version)
C:\Python26\python.exe 2.6.1 (r261:67517, Dec 4 2008, 16:51:00) [MSC v.1500 32 bit (Intel)]
>>
>>
>>
Can you report that as a bug? (Is that before the setup? If so, it seems like a race condition: it's trying to access the input stream before it was setup).
Cheers,
Fabio