By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
439,941 Members | 1,766 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 439,941 IT Pros & Developers. It's quick & easy.

Py2Exe and the log file...

P: n/a
Hi !

1. Thanx for your answer in the theme of Unicode, and other things.
2. The problem:
I need to create an application that not need Python libs to install.
Py2Exe is good for that, but I need to copy the "dist" to the network
drive what mapped readonly.
This is a protection.

So: in this time I have been use same applications, but they are created
by Delphi.
These apps make logs into user's temp to avoid the log merging, and log
creation problems (in readonly drive).

Py2Exe have an exception catcher "module", that log the errors in the
log file that created in app dir.
This is problem, because the log file creation have been failed in RO drive.

How to I redirect this log file, or can I do anything to aviod the log
file creation error ?

Thanx for your help: ft

Jul 21 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
"fo***********@anonym.hu" <fo***********@anonym.hu> writes:
Hi !

1. Thanx for your answer in the theme of Unicode, and other things.
2. The problem:
I need to create an application that not need Python libs to install.
Py2Exe is good for that, but I need to copy the "dist" to the network
drive what mapped readonly.
This is a protection.

So: in this time I have been use same applications, but they are
created by Delphi.
These apps make logs into user's temp to avoid the log merging, and
log creation problems (in readonly drive).

Py2Exe have an exception catcher "module", that log the errors in the
log file that created in app dir.
This is problem, because the log file creation have been failed in RO drive.

How to I redirect this log file, or can I do anything to aviod the log
file creation error ?

Thanx for your help: ft


The code that creates the logfile is in "Lib/site-packages/py2exe/boot_common.py".
This code is executed before the main script is started.

You can override it by assigning another object to sys.stderr, at the
start of your main script, which has a write method doing what YOU want.

Thomas
Jul 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.