473,668 Members | 2,759 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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

Jun 27 '08 #1
1 1236
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.
Jun 27 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
2508
by: John Underwood | last post by:
Can I use python23_d and python23 to develop an extension for a commercial application uses python22.dll? (Providing that I do not use any new features found only in 2.3.) I would bulld version 2.2 but I am having trouble doing this with Visual Studio .NET Standard. (There is a well documented problem with version 2.2 (involving largeint.h) and VS.NET but none of the solutions that I found have worked.) On the other hand, I have...
2
2713
by: benevilent | last post by:
Hey, I have made a Python build with the flag --with-pydebug. When I try to import modules such as NumPy's multiarray.so, I get errors like the following: File "/usr/lib/python2.3/site-packages/Numeric/Numeric.py", line 91, in ? import multiarray ImportError: /usr/lib/python2.3/site-packages/Numeric/multiarray.so:
0
1747
by: mg | last post by:
First, I compiled Python in DEBUG on Win32 with MSCV.net and the solution distributed in the Python packages. Second, I try to compiled NUMARRAY with my python debug : python_d setup.py build And the compilation crash with the following message : the file python25.lib does not exist (it is normal, because only python25_d.lib exist !)
3
1872
by: DE | last post by:
Hello, I have a problem with python builds since some time. On windows, it is not a good idea to link your debug build to release builds of libs and dlls. But python installer gives you only release builds. So I need to build python myself, no problem, but ....
17
6409
by: OlafMeding | last post by:
Below are 2 files that isolate the problem. Note, both programs hang (stop responding) with hyper-threading turned on (a BIOS setting), but work as expected with hyper-threading turned off. Note, the Windows task manager shows 2 CPUs on the Performance tab with hyper-threading is turned on. Both Python 2.3.5 and 2.4.3 (downloaded from python.org) have this problem. The operating system is MS Windows XP Professional.
2
2827
by: joshusdog | last post by:
The installation of Python 2.5 comes with a bunch of built-in extension modules (.pyd files) under the DLLs directory. I've downloaded the Python source code and am trying to build the debug versions of all of these files. However, some of the projects won't build because they are looking for header files that don't exist anywhere. Specifically, the non-building projects are: _bsddb _sqlite3 _ssl
0
1481
by: Grant Edwards | last post by:
I've got a system where I try to install extensions using /usr/local/bin/python setup.py install But, it fails when it tries to use a non-existant compiler path and specs file. I suspect it's trying to use the compieler that was used to build /usr/bin/python. How do I get it to use the compiler settings that were used for /usr/local/bin/python?
4
3034
by: Colin J. Williams | last post by:
The readme.txt has: All you need to do is open the workspace "pcbuild.sln" in Visual Studio, select the desired combination of configuration and platform and eventually build the solution. Unless you are going to debug a problem in the core or you are going to create an optimized build you want to select "Release" as
3
6783
by: Bev in TX | last post by:
I am a complete newbie at building Python. I am trying to build it under MS Windows Vista (64-bit AMD) with MS VS2005. I'm doing that because I need debug libraries, which I did not see in the standard distribution. I downloaded the source and found the MSVS8 solution/project files. However, when I tried to build it I got the following error: ....\python-2.5.2\modules\_sqlite\connection.h(33) : fatal error C1083: Cannot open include...
0
8462
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8893
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8583
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8656
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7401
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5681
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4205
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2791
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2023
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.