Using System to read mixed cased environment variables on Windows



On Windows XP Pro 32 bit, if I want to output environment variables
PYTHON or ProgramFiles, I use the set command which output the
following:

C:\set PYTHON
PYTHON=C:\Python24\python.exe
C:\set ProgramFiles
ProgramFiles=C:\Program Files

If I used Perl 5.003_07 and use the system subroutine to show the
environment variables, I get the following. Perl script is:

system("set PYTHON");
system("set ProgramFiles");

Output is:
PYTHON=C:\Python24\python.exe
PROGRAMFILES=C:\Program Files

You'll notice that through system, the environment variable
ProgramFiles is all in upper case. Is there a way to preserve the
mixed case of the environment variable through system(...)?

.



Relevant Pages

  • IDLE Python and Environment Variables
    ... I have many little python applications in different ... enviroment variables in my windows system. ... default windows environment variables remain. ... with Python command line), but I have the next problem: ...
    (comp.lang.python)
  • IDLE Python and Environment Variables
    ... I have many little python applications in different ... enviroment variables in my windows system. ... default windows environment variables remain. ... with Python command line), but I have the next problem: ...
    (comp.lang.python)
  • Re: PYTHONPATH in Windows
    ... that python can find the directories for import statements. ... just be done through the environment variables? ... python install directory, you'll need to tell it how to find your ... django-project, and install django into it.. ...
    (comp.lang.python)
  • A question about IDLE and environment variables
    ... I have many little python applications in different ... enviroment variables in my windows system. ... default windows environment variables remain. ... I can not find in IDLE the way to previously define ...
    (comp.lang.python)
  • Using System to read mixed cased environment variables on Windows
    ... On Windows XP Pro 32 bit, if I want to output environment variables ... PYTHON or ProgramFiles, I use the set command which output the ... If I used Perl 5.003_07 and use the system subroutine to show the ...
    (comp.lang.perl.misc)