473,387 Members | 1,582 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Py2Exe and the log file...

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
1 3369
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: RJS | last post by:
Hi all, I can't get a py2exe compiled app to run with numarray (numarray-0.5.win32- py2.2). Also wxPythonWIN32-2.3.3.1-Py22 and ActivePython-2.2.1-222. In the sample below, commenting out...
2
by: x-herbert | last post by:
Hi, I have a small test to "compile" al litle script as a WMI-Tester. The script include a wmi-wrapper and "insert" the Win32-modeles. here the code: my "WMI-Tester.py" ----- import wmi
2
by: Stefan Behrens | last post by:
Hi, does anybody know how I can get py2exe to work with wxPython's wxCalendarCtrl? Currently, I have just a "standard" setup.py, and py2exe gives me a syntax error. Do I need to include any...
0
by: Kathleen Kudzma | last post by:
I'm having a problem with py2exe for Python 2.3. I got fixed the Lookuperror no codec search functions registered: can't find encoding by following the instructions on the py2exe page (added...
4
by: bwaha | last post by:
First time trying to create an executable with py2exe. I have a small program which makes use of python23 (2.3.5?), wxpython ('2.6.2.1'), matplotlib ('0.83.2'), win32com (latest?), Numeric...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.