Differences between revisions 5 and 7 (spanning 2 versions)
Revision 5 as of 2004-06-16 12:46:52
Size: 1997
Editor: www
Comment: Remove spam
Revision 7 as of 2008-07-08 11:27:43
Size: 748
Editor: localhost
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 11: Line 11:
= No Solution = = A Workaround =
Line 13: Line 13:
(grapped from Graham Fawcett, improvment by Oleg Broytmann, patched together by me) PTL files can be converted into .py format so that they can be included in a py2exe app. Be sure not to call the quixote.enable_ptl() function anywhere in your app, or you'll cause problems with py2exe's import mechanism!
Line 15: Line 15:
Here's a cheap trick to get it working. You're not going to like it,
though. ;-)

-- copy all your PTL files and .ptlc files to the program directory,
using the data_files parameter of your setup() call. You'll also need to
include __init__.py files, if your PTL files are in packages
(subdirectories). This implies that you have precompiled all of your
.ptlc files (see below). This is prone to error, just be careful to get
your data_files dictionary correct.

-- To the top of your driver script (the one that will become your EXE),
add these two lines:

{{{
#!python
import sys, os
sys.path.append(os.path.abspath('.'))

}}}

This will let your py2exe-packaged interpreter look in the program
directory for importable modules.

Get the idea? Basically, you're not including your PTL data in the
py2exe zipfile at all. You're just putting them in your pgoram
directory, and telling your interpreter that it can look there when
trying to import modules.

Why include the .ptlc files? If you don't, then Quixote will try to
compile your .ptl files at runtime, and will attempt to write the .ptlc
files to the program directory. But your users may not have write
permissions on the program directory, and this will fail.


'''but this is not the only problem'''
calling enable_ptl() severly screws up the input-logic in the py2exe generated file. Nothing works as it did before.

So ... the easiest way: convert all .ptl to py
HAM20040602-2345
See
http://mail.mems-exchange.org/pipermail/quixote-users/2005-January/004096.html
for more information.

The Problem

Quixote may use a Page Template Language - PTL.

PTL ist stored in files with ending ".ptl"; and py2exe can not find these files.

Further possibilites

The quixote-guys do recognize that. So there is qx_distutils, which creates an own build-class. But... py2exe also does this. So ... both do not work together. Maybe we should create some qx2exe_distutils....

A Workaround

PTL files can be converted into .py format so that they can be included in a py2exe app. Be sure not to call the quixote.enable_ptl() function anywhere in your app, or you'll cause problems with py2exe's import mechanism!

See http://mail.mems-exchange.org/pipermail/quixote-users/2005-January/004096.html for more information.

py2exeAndQuixote (last edited 2008-07-08 11:27:43 by localhost)