I wrote a short dragon script to create a file and calculate the time. I tested it on Fedora 10, and Ubuntu 8.x and it worked well. Python version was 2.5.x
I tried to run it on my production server (an old red hat based Linux server), version 2.2.3 of Python. The script does not work and generates a syntax error in class definition.
To define disk writing speed, the script defines a class with methods to create files on the disc. It starts like this:
class TestDiskSpeed (): def __init __ (self, round = 1, speed mode = SPEED_MODE_MEGABYTE):
< P> The definition of class is as error by Python 2.2.3. What are the major changes in Python 2.2.3 that potentially crash my application? I am using these modules: os, sys, time, stat, gc
Update:
By removing I have entered a PHP developer, just Python programming (maybe a month), and that is very useful for th Used in: I searched and found that it was done in python as I used for my I was going to insert all the code here (I'm going to release script as LGPL as well), but the code is more than 150 lines (still in development). and accepting Python Class from class
size = long (size) size! = No more self._size
$ var = (condition)? $ ValueIfTrue: $ valueIfFalse;
size
variable though it does not look like Python 2.2.3 is.
This is strange, because it compiles if you delete )
In class definition, however, it says that the empty feet are fine.
Since you are using a lot of Python 2.5 features, so it will have to work hard to find them all. I recommend reading "what's new in python" for every version between 2.2 and 2.5, then coming up with a list of features that you can do your search, like:
Good luck
x if pyy
) Come on, it should not be difficult for them to grep.
No comments:
Post a Comment