I'm in the process of developing an application that will use Python for
a scripting support. In light of the upcoming changes to Python, I was
wondering if it is possible to link to and use two different versions of
Python so that in the future, scripts could be migrated to the new
version, and older scripts would still work as well. If so are there
any code examples of this.
Brian Vanderburg II 6 854
On Sun, 03 Aug 2008 14:01:49 -0400, Allen <br************ ***@yahoo.comwr ote:
I'm in the process of developing an application that will use Python for
a scripting support. In light of the upcoming changes to Python, I was
wondering if it is possible to link to and use two different versions of
Python so that in the future, scripts could be migrated to the new
version, and older scripts would still work as well. If so are there
any code examples of this.
I cannot answer that, sorry.
But if I were you, I'd pick a current, stable Python version for my
application, and stop worrying for now.
If there is a new, incompatible Python version (I assume you're
talking about Py3k?) these things will happen:
- people around the world will decide to migrate
- people will gain experience with migrating Python code
- Python 2.x will start to look obsolete
- things like Linux distributions and web hosting companies will
stop offering Python 2.x
- you will be forced (for practical reasons, or to avoid looking silly)
to migrate your application (and break old scripts)
All this will happen *slowly* -- I believe so slowly that you will
have plenty of time to act later. And your users (or whoever has to
deal with the scripts) will not be alone; lots of people will sit
around migrating old Python code.
(Caveat: I don't know much about the Py3k transition, just about other
cases like that. Killing off an old language dialect takes time!)
/Jorgen
--
// Jorgen Grahn <grahn@ Ph'nglui mglw'nafh Cthulhu
\X/ snipabacken.se R'lyeh wgah'nagl fhtagn!
Allen wrote:
I'm in the process of developing an application that will use Python for
a scripting support. In light of the upcoming changes to Python, I was
wondering if it is possible to link to and use two different versions of
Python so that in the future, scripts could be migrated to the new
version, and older scripts would still work as well. If so are there
any code examples of this.
Brian Vanderburg II
Unlike languages you pay for, Python has on real motivation to "obsolete" old
versions of Python (e.g. to force you to pay of an upgrade). You can still get
version 1.5.2 of Python and it is MANY years old and most could consider quite
obsolete. I just would not worry about it and stick with 2.5/2.6 for
development and begin looking at Python 3.0 so I can learn what's new and exciting.
-Larry
Larry Bates wrote:
Allen wrote:
>I'm in the process of developing an application that will use Python for a scripting support. In light of the upcoming changes to Python, I was wondering if it is possible to link to and use two different versions of Python so that in the future, scripts could be migrated to the new version, and older scripts would still work as well. If so are there any code examples of this.
Brian Vanderburg II
Unlike languages you pay for, Python has on real motivation to
"obsolete" old versions of Python (e.g. to force you to pay of an
upgrade). You can still get version 1.5.2 of Python and it is MANY
years old and most could consider quite obsolete. I just would not
worry about it and stick with 2.5/2.6 for development and begin looking
at Python 3.0 so I can learn what's new and exciting.
-Larry
I agree. I had wanted for scripts of the program to be able to use the
new string format method that is only in py3k, but I'm currently looking
into other template solutions.
Brian Vanderburg II
Allen wrote:
Larry Bates wrote:
>Allen wrote:
>>I'm in the process of developing an application that will use Python for a scripting support. In light of the upcoming changes to Python, I was wondering if it is possible to link to and use two different versions of Python so that in the future, scripts could be migrated to the new version, and older scripts would still work as well. If so are there any code examples of this.
Brian Vanderburg II
Unlike languages you pay for, Python has on real motivation to "obsolete" old versions of Python (e.g. to force you to pay of an upgrade). You can still get version 1.5.2 of Python and it is MANY years old and most could consider quite obsolete. I just would not worry about it and stick with 2.5/2.6 for development and begin looking at Python 3.0 so I can learn what's new and exciting.
-Larry
I agree. I had wanted for scripts of the program to be able to use the
new string format method that is only in py3k, but I'm currently looking
into other template solutions.
Brian Vanderburg II
There are many good ones around that you can look at: http://www.webwareforpython.org/Papers/Templates/
-Larry
On Aug 3, 5:43*pm, Allen <brian_vanderbu ...@yahoo.comwr ote:
Larry Bates wrote:
Allen wrote:
I'm in the process of developing an application that will use Python
for a scripting support. *In light of the upcoming changes to Python,
I was wondering if it is possible to link to and use two different
versions of *Python so that in the future, scripts could be migrated
to the new version, and older scripts would still work as well. *If so
are there any code examples of this.
Brian Vanderburg II
Unlike languages you pay for, Python has on real motivation to
"obsolete" old versions of Python (e.g. to force you to pay of an
upgrade). *You can still get version 1.5.2 of Python and it is MANY
years old and most could consider quite obsolete. *I just would not
worry about it and stick with 2.5/2.6 for development and begin looking
at Python 3.0 so I can learn what's new and exciting.
-Larry
I agree. *I had wanted for scripts of the program to be able to use the
new string format method that is only in py3k, but I'm currently looking
into other template solutions.
That should work in 2.6 (sans bugs).
To answer your original question, no, you can't load more than one
version of python within a single process. The best you can do is
running in a child process.
On Sun, 03 Aug 2008 17:36:40 -0500, Larry Bates <la*********@we bsafe.com`wrote :
Allen wrote:
>I'm in the process of developing an application that will use Python for a scripting support. In light of the upcoming changes to Python, I was wondering if it is possible to link to and use two different versions of Python so that in the future, scripts could be migrated to the new version, and older scripts would still work as well. If so are there any code examples of this.
Brian Vanderburg II
Unlike languages you pay for, Python has on real motivation to "obsolete" old
versions of Python (e.g. to force you to pay of an upgrade). You can still get
version 1.5.2 of Python and it is MANY years old and most could consider quite
obsolete.
Except at some point
- security bug fixes will stop coming for very old Python releases
- people will become used to the new, improved syntax and hate to use
old versions
- new versions of third-party modules will not be compatible with old
releases
So there *is* pressure to upgrade, sooner or later. But the time scale
is several years, not months.
I just would not worry about it and stick with 2.5/2.6 for
development and begin looking at Python 3.0 so I can learn what's new and exciting.
Yeah.
/Jorgen
--
// Jorgen Grahn <grahn@ Ph'nglui mglw'nafh Cthulhu
\X/ snipabacken.se R'lyeh wgah'nagl fhtagn! This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: ForHimself Every Man |
last post by:
What's better about Rattlesnakes than Python. I'm sure there's
something. What is it?
This is not a troll. I'm a snake shooping and I want people's
answers. I don't know beans about Rattlesnakes or have an
preconceived ideas about them. I noticed, however, that everyone I
talk to who are aware of Pythons are also afraid of Rattlesnakes. So
it seems that Rattlesnakes have the potential to compete with and
displace Pythons. I'm...
|
by: f29 |
last post by:
I don't believe that noone has yet spotted that python is becoming
java. Each new version is fully equipped with more garbage than
before. Classes are great, but once there are 1000 of them, inheriting
from each other, I cannot avoid comparing this unpleasant situation to
java.
Python power is in it's syntax, not addons. Let's not copy perl's
experience and one java is already far too much for earth.
f29
|
by: Mathias Panzenboeck |
last post by:
Hi.
I wrote a small hashlib for C. Because I'm new to hashes I looked at pythons implementation and
reused *some* of the code... or more the mathematical "hash-function", not really the code.
In particular I looked at pythons hash and lookup functions, so I came up with this (see the code
underneath).
So, can this code be considered as derived and do I have to put my code under the GPL? I'd like to
publish it under something less...
|
by: Carl J. Van Arsdall |
last post by:
I'm aware of a couple python projects for embedded systems. I am
currently considering using Python on an embedded platform to develop a
simple application as a personal project, mostly to see if it will
work. I was wondering if anyone here was using python for anything of
that nature? For those that are involved in these types of projects,
how does development in python differ for embedded projects versus a
non-embedded project? Is...
|
by: tedpottel |
last post by:
Hi,
I am creating a library of functions. I would like to have them saved
in a sub folder of pythons LIB folder, but I cannot get it to work.
I have a script called test.py
I stored it in LIB folder and typed
Import test, work fine.
I store the script in lib/ted
Then type
| |
by: tedpottel |
last post by:
Hi,
I'm trying to create my own lib of functions, but it seems like I can
only import them if they are in pythons lib folder.
Example
I have a folder called
K:\mypython
Now in the interactive python shell I type
|
by: aha |
last post by:
Hello All,
I have a situation where I can count on a Python installation being
available on a system, but I can't count on it being a version of
Python needed by my application. Since my application has it's own
version of Python installed with it how should I use the system Python
to launch the version of Python that launches my Application. Yes,
this is a convoluted process, but not all Pythons are built the
same :)
Right now I am...
|
by: Ivan Ven Osdel |
last post by:
>Hello All,
Simplest case:
Obviously things can be shortened by adding to the PATH.
Ivan Ven Osdel
Software Engineer
|
by: cnb |
last post by:
>>sys.path
Now I have my personal programs in C:/Python25/Progs/
How do I add so that I can just do "import somefile" from anywhere in
that directory in the interpreter and it can load files from other
folders in that directory.
|
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...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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,...
|
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...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |