[python-win32] WMI troubles!

Alex Hall mehgcap at gmail.com
Fri Jan 15 19:26:00 CET 2010


What is the syntax to write the traceback to a text file? I have the file 
object and I can open and close the file, I just need the command, like 
"f.write(StackTrace())" or whatever the command is. I will try the alt-space 
idea as well.


Have a great day,
Alex
Email: mehgcap at gmail.com
----- Original Message ----- 
From: "Aahz" <aahz at pythoncraft.com>
To: "Alex Hall" <mehgcap at gmail.com>
Cc: <python-win32 at python.org>
Sent: Friday, January 15, 2010 13:18
Subject: Re: [python-win32] WMI troubles!


> On Fri, Jan 15, 2010, Alex Hall wrote:
>>
>> I am trying to put the stack trace into a file, since I cannot copy and
>> paste from the cmd line output. Is there a way to do this? Also, if you
>> run the file (assuming you have all the dependencies) the error happens
>> as soon as you press windows-`. You can change "speaker.say" to "print"
>> and comment out the line creating the speaker object so that you do not
>> have to install sayTools.
>
> You probably will have difficulty doing this, but yes, you can
> copy/paste command-line output using a mouse to select a screen area.
>
> Actually, I just looked in my Windows virtual machine and you can do
> alt-space, edit, select all, enter
>
> You can also use try/except and the traceback module to capture an
> exception and write it to a file.
> -- 
> Aahz (aahz at pythoncraft.com)           <*> 
> http://www.pythoncraft.com/
>
> "If you think it's expensive to hire a professional to do the job, wait
> until you hire an amateur."  --Red Adair 



More information about the python-win32 mailing list