Re: Py2Exe and the log file...



"fowlertrainer@xxxxxxxxx" <fowlertrainer@xxxxxxxxx> 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
.



Relevant Pages

  • Re: problem with file creation time stamp
    ... Actually I have installed PCSA on my VAX system that creates log file ... I have seen the command file in PCSA & found that those command files ... Data is data and writable storage is writable storage, ... noticed that the File creation time stamp has changed to today's date & ...
    (comp.os.vms)
  • Re: unix shell script ignores exit when in function that is piped to tee
    ... > I thought calling a function within a script did NOT create sub-shells. ... is going to be able to alter the log file to cover up any inappropriate ... entry in the log to the previous entry. ... The easiest way to use crypt to ...
    (comp.unix.shell)
  • The necessity of Setting Objects to Nothing
    ... But what happens when you've got a script that is running as ... Dim Servers, List, strComputer ... Set Folder = objFSO.GetFolder ... '~~~ Write the results of the number of users query to a log file. ...
    (microsoft.public.scripting.vbscript)
  • Re: CSVDE Importing
    ... > specify the log file path via the -j option. ... CSVDE imports can only be used to create new users ... Unfortunately, the syntax is a bit more involved than a simple csv file, ... which makes it a little more difficult to manage its content via script. ...
    (microsoft.public.windows.server.scripting)
  • Re: CSVDE Importing
    ... > specify the log file path via the -j option. ... CSVDE imports can only be used to create new users ... Unfortunately, the syntax is a bit more involved than a simple csv file, ... which makes it a little more difficult to manage its content via script. ...
    (microsoft.public.windows.server.active_directory)