Antoon, I tested the batch file :-)
The one line batchfile does prove it because it prints out <backslash><n> and not <newline>. See other post, decode is exactly what was needed to fix the problem. Regards, Joe "Antoon Pardon" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Op 2005-03-02, Joe schreef <[EMAIL PROTECTED]>: >> I'm using Python 2.4 on Windows XP SP2. >> >> I'm trying to receive a command line argument that is a newline (\n) >> >> Here is the command line to use >> >> sample.py "\n" > > Are you sure this supplies a newline and not the string <backslach> <n> > >> Here is a sample.py script >> >> import sys >> >> c = sys.argv[1] >> >> # when run c is set to \\n instead of \n. >> >> I created a test batch file >> >> echo %1 >> >> to confirm that it was not the cmd.exe command processor causing the >> issue. > > I'm not sure this confirms anything. IMO it is possible that echo > will translate <backslach> <n> to <newline>, giving you the > impression that you have provideded a newline on the command line > while in fact you have not. > > -- > Antoon Pardon -- http://mail.python.org/mailman/listinfo/python-list