<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE></TITLE>
<META content="MSHTML 6.00.2800.1400" name=GENERATOR></HEAD>
<BODY text=#000000 bgColor=#ffffff>
<DIV><SPAN class=610152823-17082005><FONT face=Arial color=#0000ff size=2>Not
entirely sure,</FONT></SPAN></DIV>
<DIV><SPAN class=610152823-17082005><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=610152823-17082005><FONT face=Arial color=#0000ff size=2>The
docs say you should modify os.environ directly since it automatically calls
putenv, but as you stated on WinXP and as you say it doesn't seem to
work. I guess putenv may not be supported on WinXP.</FONT></SPAN></DIV>
<DIV><SPAN class=610152823-17082005><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=610152823-17082005><FONT face=Arial color=#0000ff size=2>If you
want a reliable way of modifying the environment on WinXP use the registry
(unfortunately platform specific):</FONT></SPAN></DIV>
<DIV><SPAN class=610152823-17082005><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=610152823-17082005><FONT face=Arial color=#0000ff size=2>System
environment -></FONT></SPAN></DIV>
<DIV><SPAN class=610152823-17082005><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=610152823-17082005><FONT face=Arial color=#0000ff
size=2>HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session
Manager\Environment</FONT></SPAN></DIV>
<DIV><SPAN class=610152823-17082005><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=610152823-17082005><FONT face=Arial color=#0000ff size=2>User
environment -></FONT></SPAN></DIV>
<DIV><SPAN class=610152823-17082005><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=610152823-17082005><FONT face=Arial color=#0000ff
size=2>HKEY_CURRENT_USER\Environment</FONT></SPAN></DIV>
<DIV><SPAN class=610152823-17082005><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=610152823-17082005><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=610152823-17082005><FONT face=Arial color=#0000ff
size=2>Regards,</FONT></SPAN></DIV>
<DIV><SPAN class=610152823-17082005><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=610152823-17082005><FONT face=Arial color=#0000ff size=2>Grant
McDonald</FONT></SPAN></DIV>
<DIV><SPAN class=610152823-17082005><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=610152823-17082005><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<BLOCKQUOTE>
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> python-au-bounces@python.net
[mailto:python-au-bounces@python.net]<B>On Behalf Of </B>Mike
Dewhirst<BR><B>Sent:</B> 17 August 2005 21:28<BR><B>To:</B>
python-au@python.net<BR><B>Subject:</B> [Python-au] Environment
vars<BR><BR></FONT></DIV><FONT size=-1>I'm having difficulty inserting a
couple of vars into the environment from within a script.
<BR><BR>os.putenv(varname, value) doesn't seem do it.<BR><BR></FONT><FONT
size=-1>The code doesn't barf but (in Windows XP) the set command doesn't
indicate it actually happened. I haven't tried it with
Linux.<BR><BR></FONT><FONT size=-1>Is there a trick to
it?<BR><BR>TIA<BR><BR>Mike<BR></BLOCKQUOTE></FONT></BODY><!--[object_id=#infocomp.com#]--><P><FONT face=Arial color=#808080 size=1>Important notice: This message is intended for the individual(s) and entity(s) addressed. The information contained in this transmission and any attached, may be confidential and may also be the subject of legal privilege, public interest immunity or legal professional privilege. Any review, retransmission, dissemination or other use of, taking of any action in reliance upon this information by person or entities other than the recipient is prohibited and requires authorization from the sender. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person) you may not copy or deliver this message to anyone. In such cases you should destroy this message and kindly notify the sender by reply email. </FONT></P>
<P><FONT face=Arial color=#808080 size=1>WARNING: Although Infocomp has taken reasonable precautions so that no viruses are present in this e-mail, the company cannot accept responsibility for any loss or damage arising from the use of e-mail attachments.</FONT></P></HTML>