By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,715 Members | 768 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,715 IT Pros & Developers. It's quick & easy.

Eclipse/PyDev question

P: n/a
Hi,

i am using Eclipse (Platform Runtime binary) with PyDev and i was
wondering if someone can help me with this:

1. I set breakpoints to a .py file and i have told Eclipse to open the
Debug perspective when it sees that some .py file(s) of my project
indeed contains breakpoints. So, i press F9, Eclipse starts, Debug
perspective opens and i can use the debugger just fine. But when the
app terminates, how can i tell Eclipse to switch automatically to the
PyDev perspective and not remain in the Debug one ?

2. Let's say we have a project that consists of some .py files. I want
to press F9 when the editor displays anyone of these files but make
Eclipse to run the whole project (that has another .py as "default")
and not the script that i am currently working on, is that possible ??
Thanks a lot for any help

Aug 13 '07 #1
Share this Question
Share on Google+
4 Replies


P: n/a
On Aug 13, 11:48 am, king kikapu <aboudou...@panafonet.grwrote:
Hi,

i am using Eclipse (Platform Runtime binary) with PyDev and i was
wondering if someone can help me with this:

1. I set breakpoints to a .py file and i have told Eclipse to open the
Debug perspective when it sees that some .py file(s) of my project
indeed contains breakpoints. So, i press F9, Eclipse starts, Debug
perspective opens and i can use the debugger just fine. But when the
app terminates, how can i tell Eclipse to switch automatically to the
PyDev perspective and not remain in the Debug one ?
You don't, Eclipse keeps the same perspective because for what it
knows you might want to debug some more and it correctly avoids to
decide what is good for you. Switching to the debug perspective when
you issue a debug command is an exception to the normal switching of
perspectives with the respective big buttons and the menu.
If you wish to switch perspective to edit code before debugging again,
putting editors and appropriate accessory views in the debug
perspective might be good enough.
2. Let's say we have a project that consists of some .py files. I want
to press F9 when the editor displays anyone of these files but make
Eclipse to run the whole project (that has another .py as "default")
and not the script that i am currently working on, is that possible ??
Executing the current file is a bad habit, Eclipse remembers a list of
execution/debug configurations that can be selected from a dropdown
list in the toolbar and edited with a dialog box; after you setup
entry points for a project you can use and edit them as needed.
I'm using Eclipse for Java and my entry points include remote
debugging of a GUI application, about 6 JUnit tests, about 3 command
line tools with many complex parameter sets each, and some Ant builds;
it would take about one hour of trial and error to reconstruct the
command lines, classpaths and JVM options. I only run the current file
as a draft for an edited configuration.

Regards,
Lorenzo Gatti

Aug 13 '07 #2

P: n/a
On Aug 13, 1:44 pm, ga...@dsdata.it wrote:
On Aug 13, 11:48 am, king kikapu <aboudou...@panafonet.grwrote:
Hi,
i am using Eclipse (Platform Runtime binary) with PyDev and i was
wondering if someone can help me with this:
1. I set breakpoints to a .py file and i have told Eclipse to open the
Debug perspective when it sees that some .py file(s) of my project
indeed contains breakpoints. So, i press F9, Eclipse starts, Debug
perspective opens and i can use the debugger just fine. But when the
app terminates, how can i tell Eclipse to switch automatically to the
PyDev perspective and not remain in the Debug one ?

You don't, Eclipse keeps the same perspective because for what it
knows you might want to debug some more and it correctly avoids to
decide what is good for you. Switching to the debug perspective when
you issue a debug command is an exception to the normal switching of
perspectives with the respective big buttons and the menu.
If you wish to switch perspective to edit code before debugging again,
putting editors and appropriate accessory views in the debug
perspective might be good enough.
2. Let's say we have a project that consists of some .py files. I want
to press F9 when the editor displays anyone of these files but make
Eclipse to run the whole project (that has another .py as "default")
and not the script that i am currently working on, is that possible ??

Executing the current file is a bad habit, Eclipse remembers a list of
execution/debug configurations that can be selected from a dropdown
list in the toolbar and edited with a dialog box; after you setup
entry points for a project you can use and edit them as needed.
I'm using Eclipse for Java and my entry points include remote
debugging of a GUI application, about 6 JUnit tests, about 3 command
line tools with many complex parameter sets each, and some Ant builds;
it would take about one hour of trial and error to reconstruct the
command lines, classpaths and JVM options. I only run the current file
as a draft for an edited configuration.

Regards,
Lorenzo Gatti
Hey Lorenzo,

thanks for the help!

I understood that with the Debug perspective. Ok, i will, as
currently, have to swtick manually to PyDev.

But i cannot figgre out how i can tell Eclipse to run the whole
Project and not the currently active script that i work on...

Aug 13 '07 #3

P: n/a
Ah, i forgot another one:

as any project evolves, you need to organize it in directories. So, i
have a project named "Dev" and Eclipse has provided me (in Navigator)
with "Dev" and "Src". Inside Src i put my .py files. Let's say that i
want to create a directory there (will i make it in "Src" or in "Dev")
to put other .py files. I tried adding a "Folder", i also tried to add
a "Pydev Source Folder", either way i cannot refer to these files from
a .py located in Src directory with the usual "from folderA
import"...It does not understand the folder structure and i am pretty
sure i am missing something obvious here...

Aug 13 '07 #4

P: n/a
Fabio,

thanks for the reply!

Anyway, i saw that i cannot import anything if i use "Source Folders"
in Eclipse/PyDev. The only way i can accomplish that is by using
"PyDev Packages". Thus, i can import whatever i want ant intellisense
is working great! I just cannot understand the usefulness of "PyDev
Source Folders"...

Aug 14 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.