Re: Python Documentation (should be better?)
I think Python's doc really rock. It's odd, why do you refer to the tutorial when the lib API is what I'd consider "the docs". If you're using Windows, then the doc browser included is pretty good too... -- http://mail.python.org/mailman/listinfo/python-list
Re: Dose someone have installed python on IRIX ?
Hi, No I have not done it before, but no one is able to help you if you do not post what kind of errors you are getting. Basically if it compiled and linked ok, maybe you specified something in the ./configure script that the plattform does not support... Hugo -- http://mail.python.org/mailman/listinfo/python-list
Re: IOS-style command line interface module?
Hell, this sounds interesting. Do you mean like matching commands when they are not yet complete, like sh tech instead of: show tech-support ? -- http://mail.python.org/mailman/listinfo/python-list
Re: CD Burning
Hi, I used cdrecord, albeit on Linux, to do it. Someone already suggested to use Cygwin for that. I'll just drop a piece of code I wrote for getting the percentage of advance when recording sound, with cdrecord. Here it is (wraps cdrecord): #!/usr/bin/env python """ Canonizer: will open up a program and try to canonize its output. Output is program dependent (different information is needed) but always canonical (messages are one line long, and parsable through splitting) Currently only cdrecord will be implemented, but will be tailored for anything. Usage: canonizer.py """ import re import sys import os track_regexp = re.compile(r"^Track\s+(\d+):\s+(\d+)\s+of\s+(\d+)") total_regexp = re.compile(r"^Total size:\s+(\d+)") fixating_regexp = re.compile(r"^Fixating\.") done_regexp = re.compile(r"^Fixating time") def loop_cdrecord(filep): """Loop over cdrecord's output""" mycharbuf = "" exitstatus = "" burning = 0 #progress in Mbytes progress = 0 newinterval = oldinterval = 0 while True: data = filep.read(1) if not data: return exitstatus mycharbuf+= data if mycharbuf.endswith("\n") or mycharbuf.endswith("\r"): #sys.stdout.write(mycharbuf) #sys.stdout.flush() mycharbuf = mycharbuf[:-1] if not burning: try: totalsize = int(total_regexp.match(mycharbuf).group(1)) burning = 1 except: pass else: if (track_regexp.search(mycharbuf)): reobj = track_regexp.match(mycharbuf) mytrack, mynum, mydem = reobj.group(1, 2, 3) oldinterval = newinterval newinterval = int(mynum) if (oldinterval <= newinterval): progress += newinterval - oldinterval else: oldinterval = 0 print "CAN_PERCENT = %d"%((progress*98)/totalsize) elif (fixating_regexp.search(mycharbuf)): print "CAN_PERCENT = %d"%(98) print "CAN_FIXATING" elif (done_regexp.search(mycharbuf)): progress = 100 print "CAN_PERCENT = %d"%(100) exitstatus = "ok" print "CAN_DONE" sys.stdout.flush() mycharbuf = "" commandline = "" #for i in sys.argv: #print i #Get the intended commandline for i in sys.argv[1:]: commandline += " " + i pipe_filep = os.popen (commandline, "r") exitstatus = loop_cdrecord(pipe_filep) if (exitstatus != "ok"): print "CAN_ERROR" -- http://mail.python.org/mailman/listinfo/python-list
Re: Databases with python
On Apr 13, 1:02 am, Anthony Irwin <[EMAIL PROTECTED]> wrote: > Hi All, > > I am interested in playing with python some more and am looking at > writing an app with data stored in a database. I have experience with > mysql but thought that their may be other better databases that can be > more easily distributed with the program does anyone have any > suggestions here? Specially if your program is going to be multi plattform, check out BuzHug http://buzhug.sourceforge.net/ It is a pure python database. Its performance may not be that high, but it will be very easily distributed with your program. The interface is pythonic, with no SQL to write. -- http://mail.python.org/mailman/listinfo/python-list
Re: Any Pythonistas in Mexico?
On Apr 12, 8:56 am, "Marcpp" <[EMAIL PROTECTED]> wrote: > Yo vivo en España. > Usas el pyqt? Hola! no, no lo he usado, aunque ahorita estoy más bien haciendo mis experimentos con wxPython... Hugo -- http://mail.python.org/mailman/listinfo/python-list
Re: Flat DB seeking speed
Jia Lu skribis: > Hello all > > I see there are lots of flat db or db-like modules in the standard > python modules. > What about the keywords seeking speed of them ? > > (I want to put about 1 articles with 1 IDs, and I can do > searching keywords with them) > > The db-like modules are : > dbm, gdbm, dbhash,anydbm, > pickle(cPickle), shelve, marshal > > Any advice? Thank you. > If you need near DB quality, you should give buzhug a look: it is pure python: http://buzhug.sourceforge.net/ -- http://mail.python.org/mailman/listinfo/python-list