top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Conflict between Python 2.5 and 2.7 (Python for Delphi)

+2 votes
358 views

I look after a Delphi program that uses Python 2.5 (via Python for Delphi). A customer who uses a modeling program that requires Python 2.7 experiences a Python conflict when trying to run the Delphi program. I have installed both Python 2.5 and 2.7 on a test-bed computer and can run the Delphi program. I have searched the FAQ, and have found some mention of being able to set a default Python version when installing, which I presume has occurred when the customer installed Python 2.7, so that the Delphi program is being directed to Python 2.7.

However, I do not see this option when I install Python 2.7, and I do not see how to remove this option so I can advise the customer what to do. The programs are running under Windows 7 - 32-bit. Any assistance gratefully received.

posted Sep 4, 2013 by Luv Kumar

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button

Similar Questions
0 votes

On building Python 2.7.5 I got the following message:

Python build finished, but the necessary bits to build these modules were not found:
dl imageop linuxaudiodev 
spwd sunaudiodev 
To find the necessary bits, look in setup.py in detect_modules()  for the module's name.

It carried on with the installation OK, but I don't understand the last sentence in the message. How can I find out exactly what modules are missing, and what I need to do to make sure they are built next time?

+3 votes

I'm new to Python. I downloaded the 64-bit build of Python 2.7.10 from www.python.org/downloads/release/python-2710. I run Windows 7 Pro on a Dell PC.

I find that the installation package creates a folder called "Python 2.7" in my Start menu, with both a command prompt and IDLE GUI options.

I hold my scripts in another directory that is parallel to but not under the one where Python 2.7 resides, so I set the Environment Variable PYTHONPATH to include the directory where my scripts reside. Unfortunately, I am unable to reach them in either the IDLE GUI or the "Python command line" in that folder in my start menu. The only way I have managed to run Python scripts is to open an ordinary command prompt from Accessories, navigate to the directory with the scripts, and run python from the command prompt in that directory.

Can anyone let me know what I'm not doing that I should be doing to run Python and my scripts from the parallel directory under the GUI or the command line from the start menu folder ?

0 votes

Is print thread safe? That is, if I have two threads that each call print, say:

print "spam spam spam" # thread 1
print "eggs eggs eggs" # thread 2

I don't care which line prints first, but I do care if the two lines are mixed in together, something like this:

spam spaeggs eggs m seggspams

Does print perform its own locking to prevent this?

...