Thanks for the responses. After some more testing I realized the problem is indeed that messages to stdout are not being displayed and not that the command line arguments are not recognized. My program is written to have both a GUI and a command line interface. If I use the command line arguments that cause my program to do useful work, it does that, but if I use the argument to print the help statement to screen, I see nothing. I guess it's too much to ask for both for the Windows executable. I expect most of the people who want to use my program as a command-line utility will be on Linux anyway, where this problem doesn't exist. Those that want to use the command line in Windows, still can, they just won't get any useful messages in return.
Thanks again. On Thursday, September 19, 2013 4:20:33 AM UTC-7, Naib wrote: > > Silly question, but pre-packaged does the commandline work in windows? > I ask because passing argument works for me > > ONE thing that doesn't fully is what is displayed in the terminal in > windows for the packaged (some print statements, some exception errors > etc..) this is for gui and cli applications. > ie from what I have seen is sys.argv is not interfered with BUT stdout > maybe > > On Wednesday, 18 September 2013 20:02:38 UTC+1, JB wrote: >> >> I use pyinstaller to compile a python program for both Windows and Linux. >> I've recently extended my program to accept command line arguments to >> provide the same functionality as the GUI. However, it seems those command >> line arguments are ignored on Windows, even though they work just fine on >> Linux. To be clear, I'm talking about command line arguments being passed >> to the generated executable. I tested that the command line arguments work >> on Windows when I run my program directly with python, before I compile >> with PyInstaller. I'm using the same arguments (--onefile --windowed) on >> both Windows and Linux to create the .spec file. >> >> Has anyone else experienced this behavior before? Does anybody have and >> idea why command line arguments would work for Linux and not for Windows? >> >> Thanks. >> > -- You received this message because you are subscribed to the Google Groups "PyInstaller" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/pyinstaller. For more options, visit https://groups.google.com/groups/opt_out.
