Py2Exe and the log file...

F

fowlertrainer

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
 
T

Thomas Heller

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,277
Latest member
VytoKetoReview

Latest Threads

Top