[Bf-committers] stupid little python project

dreblen dreblenj at gmail.com
Tue Jan 15 00:44:43 CET 2008


Hi,
I'm the author of the C patch, and I agree that python is the better 
route to go.
I didn't think to do it in python because I severely prefer C, and I'm 
not as experienced at python.
With that being said (that I'm not that great at python), I don't see 
what really needs to be finished in the python version
other than reopening the file for writing and writing to VERSION (and 
the fact that unkownversion is undefined).
So these are my changes: (not really a diff, but you get the idea)

 if minor and major:
-    print str(major)+"."+minor
+    outfile = open("VERSION", "w")
+    outfile.write(str(major)+"."+minor)
+    outfile.close()
 else:
-    print unkownversion
+    print "Unknown Version"

of course you could keep the "print str(major)+'.'+minor" in there, but 
it doesn't really matter ;)
-Tanner

Kent Mein wrote:
> There is a patch in the tracker to dyanmically create the VERSION
> file used for blender releases using a c file.
> I've rewritten the program in perl, but we should really get it written
> in python so it just works for most users...
> http://www.cs.umn.edu/~mein/blender/getversion.txt
>
> I started porting it to python but my regex python programming is weak.
> anyone want to finish it off?
> http://www.cs.umn.edu/~mein/blender/getversion2.txt
>
> Kent
>   


More information about the Bf-committers mailing list