f



from python1.5.2 to python2.2.2 #2

Hi,
I have a lot of scripts written in python1.5.2 that I want to bring in
python2.2.2.
Someone could give me some informations about the sintax difference
between this 2 version? 
Where can I get documents about it?
Are there some available tools to do this automatically?

thanks
Alberto
0
11/5/2003 11:46:10 AM
comp.lang.python 77058 articles. 6 followers. Post Follow

1 Replies
1563 Views

Similar Articles

[PageSpeed] 51

In article <3ef166ac.3608218@news.marelli.it>,
Alberto Mantovani <alberto.mantovaniNOSPAM@bologna.marelli.it> wrote:
>
>I have a lot of scripts written in python1.5.2 that I want to bring in
>python2.2.2.  Someone could give me some informations about the sintax
>difference between this 2 version?

If you want to upgrade your scripts to use new features, you've got a lot
of work ahead.  If you simply want to run them unaltered in 2.2.2, go
ahead and try it!  One of Python's primary goals is maintaining backward
compatibility; you should have very little difficulty.

Note: I'd recommend using 2.2.3 if possible; there are a few more bugs
fixed in it.
-- 
Aahz (aahz@pythoncraft.com)           <*>         http://www.pythoncraft.com/

"It is easier to optimize correct code than to correct optimized code."
--Bill Harlan
0
aahz (2032)
11/5/2003 3:41:04 PM
Reply:

Similar Artilces:

Difference between Python 2.2.2 and Python 2.5
I am developing for PyS60 1.4.4 which supports Python 2.2.2 while what I know is Python 2.5 . Can you please tell me differences between the two so that I can save myself from incompatible code. On Sun, 18 Jan 2009 07:30:52 -0800, Ravi wrote: > I am developing for PyS60 1.4.4 which supports Python 2.2.2 while what I > know is Python 2.5 . > > Can you please tell me differences between the two so that I can save > myself from incompatible code. Everything new mentioned here: http://www.python.org/doc/2.5/whatsnew/whatsnew25.html http://www.python.org/doc/2.4/whatsnew/what...

from python1.5.2 to python2.2.2
Hi, I have a lot of scripts written in python1.5.2 that I want to bring in python2.2.2. Someone could give me some informations about the sintax difference between this 2 version? Where can I get documents about it? Are there some available tools to do this automatically? thanks Alberto ...

linspace(2,2,2) returns [2 2] ??
May be the help for linspace should change? It says: "LINSPACE(X1, X2, N) generates N points between X1 and X2." Notice, it says BETWEEN. But when I ask for 2 points, between 2 and 2: ---------------- EDU>> linspace(2,2,2) ans = 2 2 --------------- May be mathematically this is ok? i.e. there are infinite points between the point and itself? (on the real line), but from programming point of view, it is confusing. no? --Nasser Maybe it should say "generates N points between X1 and X2, inclusive." What did you expect to...

2**2**2**2**2 wrong? Bug?
In Python 2.5 on intel, the statement 2**2**2**2**2 evaluates to >>> 2**2**2**2**2 20035299304068464649790723515602557504478254755697514192650169737108940595563114 53089506130880933348101038234342907263181822949382118812668869506364761547029165 04187191635158796634721944293092798208430910485599057015931895963952486337236720 30029169695921561087649488892540908059114570376752085002066715637023661263597471 44807111774815880914135742720967190151836282560618091458852699826141425030123391 10827360384376787644904320596037912449090570756031403507616256247603186379312648 4703743782954975613770...

2 * 2 * 2 * 2 or pow(2, 4)?
Hi , I hope this isn't too trivial to ask, but I'm evaluating a polynomial that involve lots of terms like x^2y^2z^3, and although I can use the power function pow(a, b), I wonder if just writing x*x*y*y*z*z*z for example wouldn't be more efficient than pow(x, 2)*pow(y, 2)*pow(z,3). Or is it all the same? Thanks, - Olumide Olumide wrote: > I hope this isn't too trivial to ask, but I'm evaluating a polynomial > that involve lots of terms like x^2y^2z^3, and although I can use the > power function pow(a, b), I wonder if just writing x*x*y*y*z*z*z for > exam...

Printing 2^1, 2^2, 2^3, 2^4 and 2^5
Hi, When I use a while loop, the output is: 2 4 8 16 32, as desired: <?php $c=1; while($c<=5) { $d = newpow(2, $c); print "$d "; $c++; } function newpow($base, $power) { // statements... } ?> The But when I use a for loop, the output is: 64: <?php for($c=1; $c<=5; $c++); { $d = newpow(2, $c); print "$d "; } function newpow($base, $power) { // statements... } ?> Why is this?? Many thanks, Michael mejpark wrote: > When I use a while loop, the output is: 2 4 8 16 32, as desired: [...] > The But when I use a for loop, the output is: 64...

from python1.5.2 to pytghon2.2.2
Hi, I have a lot of scripts written in python1.5.2 that I have to bring in python2.2.2 , someone could give me some informations about the sintax differences between the two versions?. Are there some tools that can do this automatically? thanks Alberto Alberto Mantovani wrote: > > I have a lot of scripts written in python1.5.2 that I have to bring in > python2.2.2 , someone could give me some informations about the sintax > differences between the two versions?. > Are there some tools that can do this automatically? It's probably adequate to read in detail each of the ...

Blender 2.34 and Python 2.1, 2.2, 2.3
If you can run python scripts in blender 2.3x, I'll be glad to know which versions did you install. Checking at blender.org, I found that blender 2.34 is built with python 2.3. However, I don't want to perform an installation of python 2.3 if I'm not sure that it fixes my problem (I found some people saying that this problem is fixed by downgrading from python 2.3 to 2.2, and also the freeware.sgi.com python is still at 2.1.1, so I've no idea on the best option). Before playing with a custom installation of python, I'm posting the problem here with the hope that s...

Upgrade from VO 1 - 2 - 2..1 -2.2 - 2.3 -2.4 - 2.5 - 2.6 - 2.7
About upgrade 2.5 - 2.7 at $ 384.00 For most products I'm using - the updates (2.0 - 2.1 - 2.7) are free... 2.0 to 3.0 might be worth + 10-30% of the original price? VO is + full price again & again - Full program price for every minor upgrade/bug-fix? I dropped out of the money/bugs [VO] at 2.5 after starting at 1.0 more than 10 years ago. Certainly whoever is making VO have to make a living; earning moneys: - that is OK! A 10 years old VO site; - 10 years later, how much have changed? http://www.yi.com/prany/cavo/cavofront.htm Even MS is not ...

Compiling Python 2.5.2 on AIX 5.2
I'm investigating the possible use of Mecurial SCM as a replacement for CVS. Mecurial is written in Python. I have a background in GNU/ Linux, Solaris, sparc and Perl. However AIX, powerpc and Python are new to me. --uname output-- $ uname -rvp 2 5 powerpc --end uname output-- I used this script to compile Python: --script-- export PATH=/usr/bin:/usr/vacpp/bin export CC=xlC_r export OBJECT_MODE=32 gunzip -c Python-2.5.2.tar.gz | tar xvf - cd Python-2.5.2 ../configure --with-gcc="xlc_r" --with-cxx="xlC_r" \ --disable-ipv6 AR="ar" --prefix=$HOME...

Python 2.0 / Python 2.2
Hallo newsgroup, I have some questions concerning Python 2.2. First question: I try to port source code from Python 2.0 to Python 2.2.The following source code works with Python 2.0. If I compile it with Python 2.2, the modul "tci" is not imported. "tci" is a python module written by us. How can I change the source code to get it working with Python 2.2.? Py_Initialize(); PyStr = Py_BuildValue("s", TCIHome); PyModule = PyImport_ImportModule("sys"); PyList = PyObject_GetAttrString(PyModule, "path"); PyList_Insert(PyList, 0, PyStr); if (PyEr...

Both Python 2.5.2 and 2.7.2 flop the same way under Win 7
Months ago 2.5.2 stopped functioning on my Win7 PC, so a few days ago I uninstalled and installed. Same problem. If one right-clicks on a py file, IDLE is not shown in the menu as Edit with IDLE. After playing with matters I gave up, and uninstalled 2.5.2 and turned to 2.7.2. Same results. If I look at a 2.4 install on my laptop, I get the desired reference to Edit with IDLE. My guess is that Win 7 is behind this. If so, it's good-bye Python. Comments? On 17 Nov, 18:55, "W. eWatson" <wolftra...@invalid.com> wrote: > Months ago 2.5.2 stopped functioning on my Win...

python 2.1 and 2.2
This is a multi-part message in MIME format. --------------090608080807070903010708 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Hi, I remembered reading somewhere that Guido had demonstrated a significant speed increase from python 2.1 to python 2.2 (or something like that). Anyone knows how is the test done? Is it using pystone.py? Thanks maurice --------------090608080807070903010708 Content-Type: text/x-vcard; charset=utf-8; name="mauriceling.vcf" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="m...

MySQLdb 1.2.2 + python 2.6.2
Hi all, Are MySQLdb 1.2.2 and python 2.6.2 compatible? I went to http://sourceforge.net/project/showfiles.php?group_id=22307, it doesn't say it is compatible or not. When trying to install MySQLdb 1.2.2 on my machine which is running python 2.6.2 and windows XP, I get this error below. I am able to install MySQLdb 1.2.2 successfully on another machine which is running python 2.5.4 and windows XP. Please help if you have any idea. C:\temp>easy_install MySQL_python-1.2.2-py2.5-win32.egg Processing MySQL_python-1.2.2-py2.5-win32.egg Removing c:\python26\lib\site-packages\MySQL_python-...

Web resources about - from python1.5.2 to python2.2.2 #2 - comp.lang.python

Python Dev Center - Azure
Get the tools, documentation, sample code and other resources you need to build powerful Python applications on Azure.

Copyright
All text on this site is copyrighted, and cannot be republishedor otherwise used without explicit permission by the author. Unless otherwise ...

Resources last updated: 2/3/2016 9:22:19 PM