472,125 Members | 1,452 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,125 software developers and data experts.

Eclipse/PyDev question

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
4 1778
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
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
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
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.

Similar topics

1 post views Thread by Steve Jorgensen | last post: by
reply views Thread by Kenneth McDonald | last post: by
29 posts views Thread by seberino | last post: by
4 posts views Thread by Chuck | last post: by
2 posts views Thread by kilnhead | last post: by
5 posts views Thread by John Henry | last post: by
9 posts views Thread by king kikapu | last post: by
6 posts views Thread by king kikapu | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.