[Python-3000] Unicode and OS strings (original) (raw)

Stephen Hansen apt.shansen at gmail.com
Fri Sep 28 07:00:57 CEST 2007


On 9/27/07, Nicholas Bastin <nick.bastin at gmail.com> wrote:

On 9/22/07, martin at v.loewis.de <martin at v.loewis.de> wrote: > argc/argv does not exist on Windows (that you seem to see it > anyway is an illusion), and if it did exist, it would be characters, > not bytes. Of course it exists on Windows. argc/argv are defined by the C standard, and say what you will about Windows, but it has a conforming implementation. argv exists on Windows exactly the way the C standard requires it - as an array of null terminated "strings". It's left as an exercise to people with more time than I to argue about the definition of the term 'string' in the C standard (since the standard itself is silent on the issue).

The entry point of a Windows application is WinMain, not main; you can create a console-only standard C application if you'd like, but its not a Windows program. Python apps are Windows programs even if they have a console attached. And the WinMain function passes the entire command line as a single char* with no breaking or parsing of any kind.

--S -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/python-3000/attachments/20070927/e9170a20/attachment.htm



More information about the Python-3000 mailing list