Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > how do I know if I'm using a debug build of python

Reply
Thread Tools

how do I know if I'm using a debug build of python

 
 
Tim Mitchell
Guest
Posts: n/a
 
      04-17-2008
Hi,

A quick question:
Is there any way for a python script to know if it's being executed by a
debug build of python (python_d.exe) instead of python?

Thanks
Tim

 
Reply With Quote
 
 
 
 
bgeddy
Guest
Posts: n/a
 
      04-18-2008
Tim Mitchell wrote:
> Hi,
>
> A quick question:
> Is there any way for a python script to know if it's being executed by a
> debug build of python (python_d.exe) instead of python?
>
> Thanks
> Tim
>

Not sure what this returns in Windows as I run Linux but this returns to
namer of the python executable for my setup - maybe its what you want.

import sys
print sys.executable

- will print out the name of the python executable.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
How do I build python with debug info? (and python module load questions) sndive@gmail.com Python 0 01-26-2007 02:30 AM
SWsoft Acronis Disk Director Suite 9.0 Build 508, Acronis OS Selector 8.0 Build 917, Acronis Partition Expert 2003 Build 292, Acronis Power Utilities 2004 Build 502, F-SECURE.ANTI vIRUS.PROXY v1.10.17.WINALL, F-SECURE.ANTI vIRUS v5.50.10260 for CITRI vvcd Computer Support 0 09-25-2004 01:38 AM
I know, I know, I don't know Andries Perl Misc 3 04-23-2004 02:17 AM
[Howto] Compiling debug Python extensions for non-debug Python Mike C. Fletcher Python 3 10-12-2003 09:37 PM



Advertisments