IDLE

R

Russ P.

I've been programming in python for a few years using XEmacs on
Solaris and Linux. I've been thinking about trying IDLE for a long
time, but either it wasn't available on my system or I procrastinated.
I finally have it available, and I gave it a try.

I immediately encountered a basic problem for which I could not find a
solution in the intro docs. I want to run a script in one directory
that reads input from a file in another directory. Maybe I'm just not
very smart, but I couldn't figure out how to do it. Will someone
please give me a clue?

More generally, I don't see much discussion of IDLE on this newsgroup.
Are many python programmers using it? I see that some of the intro and
tutorial docs have not been updated for several years. Is IDLE still
actively supported? Or would I be better off just going directly to a
commercially supported IDE such as Wing? Thanks.
 
L

Larry Bates

Russ said:
I've been programming in python for a few years using XEmacs on
Solaris and Linux. I've been thinking about trying IDLE for a long
time, but either it wasn't available on my system or I procrastinated.
I finally have it available, and I gave it a try.

I immediately encountered a basic problem for which I could not find a
solution in the intro docs. I want to run a script in one directory
that reads input from a file in another directory. Maybe I'm just not
very smart, but I couldn't figure out how to do it. Will someone
please give me a clue?

More generally, I don't see much discussion of IDLE on this newsgroup.
Are many python programmers using it? I see that some of the intro and
tutorial docs have not been updated for several years. Is IDLE still
actively supported? Or would I be better off just going directly to a
commercially supported IDE such as Wing? Thanks.

You can read a file from another directory either by specifying the entire path
to the file or by using os.curdir() function to make it the current directory
before opening/reading from it.

Lots of discussions on this have been posted try looking into history of this
list. Everything from vi to Eclipse to Wing.

-Larry
 
A

annonymous

I've been programming in python for a few years using XEmacs on
Solaris and Linux. I've been thinking about trying IDLE for a long
time, but either it wasn't available on my system or I procrastinated.
I finally have it available, and I gave it a try.

I immediately encountered a basic problem for which I could not find a
solution in the intro docs. I want to run a script in one directory
that reads input from a file in another directory. Maybe I'm just not
very smart, but I couldn't figure out how to do it. Will someone
please give me a clue?

More generally, I don't see much discussion of IDLE on this newsgroup.
Are many python programmers using it? I see that some of the intro and
tutorial docs have not been updated for several years. Is IDLE still
actively supported? Or would I be better off just going directly to a
commercially supported IDE such as Wing? Thanks.

I used IDLE a year ago and later I changed to the commercial IDE of
Komodo, i found it quite rewarding.. if u r doing massive code, i
suggest u to try some of those commercial packages! they would save u a
lot of pain!
 
T

Tal Einat

I've been programming in python for a few years using XEmacs on
Solaris and Linux. I've been thinking about trying IDLE for a long
time, but either it wasn't available on my system or I procrastinated.
I finally have it available, and I gave it a try.

I immediately encountered a basic problem for which I could not find a
solution in the intro docs. I want to run a script in one directory
that reads input from a file in another directory. Maybe I'm just not
very smart, but I couldn't figure out how to do it. Will someone
please give me a clue?

More generally, I don't see much discussion of IDLE on this newsgroup.
Are many python programmers using it? I see that some of the intro and
tutorial docs have not been updated for several years. Is IDLE still
actively supported? Or would I be better off just going directly to a
commercially supported IDE such as Wing? Thanks.

I've been programming in python for a few years using XEmacs on
Solaris and Linux. I've been thinking about trying IDLE for a long
time, but either it wasn't available on my system or I procrastinated.
I finally have it available, and I gave it a try.

I immediately encountered a basic problem for which I could not find a
solution in the intro docs. I want to run a script in one directory
that reads input from a file in another directory. Maybe I'm just not
very smart, but I couldn't figure out how to do it. Will someone
please give me a clue?

More generally, I don't see much discussion of IDLE on this newsgroup.
Are many python programmers using it? I see that some of the intro and
tutorial docs have not been updated for several years. Is IDLE still
actively supported? Or would I be better off just going directly to a
commercially supported IDE such as Wing? Thanks.

Hi Russ,

IDLE is still actively supported on the groups and mailing lists,
maintained, and even developed. True, the amount of developer time
going into it isn't what it used to be; that's why the tutorial and
docs are so outdated. Much of the discussion about it (including some
questions) goes on in the idle-dev _at_ python.org mailing list.

Which IDE to use is mostly a matter of personal preference. I like
IDLE very much because it is clean and uncluttered, but AFAIK most
Python developers move on to more feature-rich IDEs. Even if you don't
end up using it in the long term, IDLE is really awesome for learning
Python (though perhaps you are beyond that stage?).

It is admittedly not as powerful an editor as some other IDEs out
there, or on the other end of the map, it isn't nearly as powerful as
Emacs/Vi. But even if you don't use it for editing, it is IMO the best
Python shell out there.


As for your question, I couldn't quite understand what you're trying
to do. In general, you can have the script use os.chdir() to go to the
relevant directory and then open() the file, or you can use open()
directly with a relative/full path to it. (This question isn't IDLE
specific in any way, unless I misunderstood...)

(If you're trying to run a script and "pipe" input to it via stdin,
IDLE doesn't support that - I don't know of any Python shell that
does.)

- Tal
reduce(lambda m,x:[m+s[-1] for i,s in enumerate(sorted(m))],
[[chr(154-ord(c)) for c in '.&-&,l.Z95193+179-']]*18)[3]
 
R

rustompmody

Just curious: What makes you wish to move from emacs to idle?

Admission: I used to be a dyed-in-the-wool emacs guy but Ive been
having trouble with it lately. eg Yesterday when editing a largish
file (I think it was setup.py) it kept going to sleep and when I
killed emacs it said LALR parsing..... and made me wait for nearly a
minute!

So just wondering what trouble others are having with emacs and python.
 
R

Russ P.

Just curious: What makes you wish to move from emacs to idle?

I don't necessarily want to move from xemacs to idle. I'm just getting
tired of using print statements to debug, and I figure I'm well past
the stage where I should still be doing that. If I can use xemacs
*with* idle, I'll try that. Then again, if gdb works with python,
maybe I should be using that with xemacs.

The local Python interest group had a meeting to discuss these
development environments, but unfortunately I missed it. I hope they
do another one soon.
 
R

Russ P.

Thanks for the information on IDLE.
As for your question, I couldn't quite understand what you're trying
to do. In general, you can have the script use os.chdir() to go to the
relevant directory and then open() the file, or you can use open()
directly with a relative/full path to it. (This question isn't IDLE
specific in any way, unless I misunderstood...)

I should have been clearer about what I'm trying to do. I have
approximately 100 directories, each corresponding to an "incident" (I
won't say what type of "incident" here). Each directory has many data
files on the incident, and the structure of all the directories is the
same (i.e., each has files of the same name). One of those files in an
input file that I wish to "replay" through my program, then the
results are recorded in an output data file.

To replay one incident, I would normally go to the directory for that
case and execute my program. I can specify the input and output files
explicitly, but I virtually never need to do so because they default
to the same file name in each directory. I also have a script that can
replay all 100 cases automatically.

I would like to do the same sort of thing with IDLE. I don't want to
have to specify the input and output files explicitly using absolute
pathnames from outside the directory for the incident. That would be
horrendously cumbersome after a few times.

I want to just cd to a directory and execute my program. But in my
first few tries, it seems that I need to be in the directory that
contains the source code -- not the directory that contains the data.
Am I missing something? Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,066
Latest member
VytoKetoReviews

Latest Threads

Top