[EMAIL PROTECTED] wrote:

>> The phrase "in the right place" is a bit too vague for me at the
>> moment. If you can provide more details I can try that.

If you open your spec file with a text editor, you will see that it's made of
Python code. If you built it with --onefile, there should be a call to the
function EXE(), where two keyword arguments are named "console" and "debug".
You can change those to "1". This is identical to re-running Makespec.py
with --console --debug though.

>> Adding --debug and --console results in a traceback complaining that
>> "getopt.GetoptError:  option --console not recognized".

Ah right, sorry, it wasn't present in PyInstaller 1.0. I added it in the trunk
version:

  -w, --windowed, --noconsole
                        use a Windows subsystem executable (Windows only)
  -c, --nowindowed, --console
                        use a console subsystem executable (Windows only)

so I got confused.


>> My guess
>> would be that this is because on Windows --console is the default.

Exactly.


>> However, if I eliminate --console from the command line, no
>> diagnostics appear in the Cmd Prompt window.

Diagnostics should appear when you *run* your packaged applications, not while
building it.

>> Has this been tested
>> on Windows or only on *nix?

Both. I mainly develop PyInstaller under Windows, since it's the main platform
where users have packaging needs (most *nix distribution ships Python by
default, and most Python code made by *nix developers is open source, so
shipping a normal source distribution is the smallest, fastest and most
compatible option for them).


>> What appears in the text output is:
>>
>>
>> W: no module named posix (conditional import by os)
>> W: no module named org (top-level import by copy)
>> W: no module named posix (delayed, conditional import by iu)
>> W: no module named pwd (delayed, conditional import by posixpath)
>> W: no module named win32api (delayed import by iu)
>> W: delayed  __import__ hack detected at line 0 - encodings
>> (C:\Python23\lib\encodings\__init__.pyc)
>> W: delayed conditional __import__ hack detected at line 0 - encodings
>> (C:\Python23\lib\encodings\__init__.pyc)
>> W: __all__ is built strangely at line 0 - re (C:\Python23\lib\re.pyc)
>> W: __all__ is built strangely at line 0 - dis
>> (C:\Python23\lib\dis.pyc) W: delayed  eval hack detected at line 0 -
>> os (C:\Python23\lib\os.pyc)
>> W: __all__ is built strangely at line 0 - tokenize
>> (C:\Python23\lib\tokenize.pyc)
>> W: delayed conditional exec statment detected at line 0 - iu
>> (C:\Tools\pyinstaller\iu.pyc)
>> W: delayed conditional exec statment detected at line 0 - iu
>> (C:\Tools\pyinstaller\iu.pyc)

This is all pretty common stuff. One day, I'll find a way to shut off these
warnings.


>> The batch file I am using to drive this consists of the following two
>> lines:
>>
>> Makespec.py --debug --onefile --out Test --name QtApp
>> TestSrc\application.py
>> Build.py Test\QtApp.spec

This is correct. What happens when you run your application after you built it
like this? You should see a traceback showing the import problem.

Giovanni Bajo

_______________________________________________
PyInstaller mailing list
[email protected]
http://lists.hpcf.upr.edu/mailman/listinfo/pyinstaller

Reply via email to