Re: IDLE



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.

.



Relevant Pages

  • Re: Argentina - England [R]
    ... > Neither team protested over any incident in the match. ... The English media gave the impression he would start. ... > I don't recall seeing a replay during the match because as you said Owen ... >> Real Madrid and Barcelona rejects sure can play football. ...
    (rec.sport.soccer)
  • Re: Anyone have script to calculate dates?
    ... It can be done using a java applet. ... The time and date are entered via a parameter list in the html document. ... > Your not likely to find a free copy and paste script for the task as you> described it as the progam logic required will be entirely dependent on how> and where the time of the incident is recorded, what date and time format> was used to record the initial incident and so on. ...
    (microsoft.public.frontpage.client)
  • JMS: Early stuff?
    ... Murder, She Wrote script ("Incident in Lot 7") and the November 1985 Amazing ... never managed to latch onto any of those except "Snow White"...possibly because ...
    (rec.arts.sf.tv.babylon5.moderated)
  • Re: Incident Response
    ... I wouldn't recommend writing a script to 'automatically scan them back', ... Naturally there are several other moral and legal reasons for not ... Reporting of incidents can take quite a lot of effort. ... Subject: Incident Response ...
    (Security-Basics)
  • Re: JMS: Early stuff?
    ... Murder, She Wrote script ("Incident in Lot 7") and the November 1985 Amazing ... never managed to latch onto any of those except "Snow White"...possibly because ...
    (rec.arts.sf.tv.babylon5.moderated)