Saving parameters between Python applications?

Steve Holden steve at holdenweb.com
Tue Sep 18 17:48:23 CEST 2007


Stodge wrote:
> os.path.expanduser isn't an option; I need each console/window to
> maintain different values which I wouldn't get from saving to a user's
> home directory. Unless I used a different file for each console/window
> but that just gets me into the same situation I'm already in. I think
> the only option is to set environment variables using another script.
> I'm really surprised and disapponited by this.
> 
That's a sign of your inexperience, then. As someone has already pointed 
out, this is nothing to do with Python.

Under UNIX/Linux you could use the $$ variable to construct a filename 
specific to a particular shell process and put it in the environment, 
but I'm not aware of a similar feature in Windows. This is probably a 
sign of *my* inexperience :-)

> One option I thought of but haven't investigated, is the ability to
> get the parent (i.e. console's) process id and use that to create a
> file somewhere. Not sure if this is even possible.
> 
You might be able to write a Python program to access it :-)

regards
  Steve
-- 
Steve Holden        +1 571 484 6266   +1 800 494 3119
Holden Web LLC/Ltd           http://www.holdenweb.com
Skype: holdenweb      http://del.icio.us/steve.holden

Sorry, the dog ate my .sigline




More information about the Python-list mailing list