[Tutor] this module

2009-08-07 Thread Mark Young
Hi, I was reading a tutorial, and it mentioned the "import this" easter egg. I was curious, and looked up the contents of the module, and dscovered that it had attributes c, d, i, and s. I was wondering if anyone had any clue what these attributes were supposed to mean. I think (this.s) is the zen

[Tutor] Overriding MySQLdb.cursors.DictCursor.execute()

2009-08-07 Thread Tim Johnson
Hello: I am currently using python 2.5 and do a lot of database programming with MySQLdb. I have developed a wrapper class that uses two cursors: 1)a MySQLdb.cursors.DictCursor object 2)a MySQLdb.cursors.Cursor object #1 returning a dictionary from query results, #2 returning a tuple from query res

[Tutor] building database with sqlite3 and matplotlib

2009-08-07 Thread David Kim
Hello everyone, I've been learning python in a vacuum for the past few months and I was wondering whether anyone would be willing to take a look at some code? I've been messing around with sqlite and matplotlib, but I couldn't get all the string substitution (using ?s). I ended up getting the scri

Re: [Tutor] Configuaration files and paths?

2009-08-07 Thread Allen Fowler
> > > > FWIW: > > > > When using relative paths I got extra ../../ terms, so I changed > join_relative() to: > > > > def join_relative(base, path): > > return os.path.normpath(os.path.join(script_dir(base), path)) > > > > > > Seems to work... > > > Yeah, good catch ... looks great,

Re: [Tutor] monitor number of files in a folder

2009-08-07 Thread pedro
On 2009-08-06 17:25:50 -0400, Νικόλαος Ράπτης said: Well, os.listdir doesn't include "." or ".." anyway as you can see here On my machine (a Mac), os.listdir does include files that begin with "." Having the while loop timeout after 10 or 20 times through as was suggested a couple posts bac

Re: [Tutor] regex problem with colon

2009-08-07 Thread Kent Johnson
On Thu, Aug 6, 2009 at 11:37 PM, Tim Johnson wrote: >  Yes. You nailed it Kent. >  I had grokked the logic but not entirely the syntax. >  I'm looking thru docs now. Just curious .. is there a flag that >  enables adding a ':' to the internal list of "word" characters? No. The list is affected by