Re: creating a new database with mysqldb

2006-05-17 Thread Jesse Hager
(NULL) indicates no currently selected database. To set the default database: >>>c.execute("USE mysql") 0L Getting the database again: >>>c.execute("SELECT DATABASE()") 1L >>>c.fetchall() (('mysql',),) ^^^ A string indicates that a database is currently selected. Hope this helps. -- Jesse Hager email = "[EMAIL PROTECTED]".decode("rot13") -- http://mail.python.org/mailman/listinfo/python-list

Re: stripping

2006-05-02 Thread Jesse Hager
> but it always give me first 2 lines, ie > abcdefgh > ijklmn > > What can i do to make it print all..? > thanks > Change the 'break' statement to a 'continue'. -- Jesse Hager email = "[EMAIL PROTECTED]".decode("rot13") -- http://mail.python.org/mailman/listinfo/python-list

Re: Multi-Monitor Support

2006-05-02 Thread Jesse Hager
.Display to find out about the displays on the system, it also lets you query and set the current video mode for a display. Hope this helps. -- Jesse Hager email = "[EMAIL PROTECTED]".decode("rot13") -- http://mail.python.org/mailman/listinfo/python-list

Re: midipy.py on linux

2006-04-27 Thread Jesse Hager
Not sure if it uses lists or tuples, since I use it mainly for output and I don't have MIDI input on this machine to test it... Hope this helps. -- Jesse Hager email = "[EMAIL PROTECTED]".decode("rot13") -- http://mail.python.org/mailman/listinfo/python-list

Re: pywin32 : scheduled weakup from standby/hiberate ?

2006-04-18 Thread Jesse Hager
ion so unless a person moves the mouse or keyboard within a minute or two of the wakeup, the system just goes back to sleep. You should be able to call the SetThreadExecutionState function using ctypes. Search for Power Management in the MSDN library for info on these functions. -- Jesse Hager

Re: Sending part of a page as the body of an email

2006-04-16 Thread Jesse Hager
ring_io.truncate(0) #More normal output goes here #Do whatever you want with captured_text here... #When finished with string_io, close it to free up the memory buffers string_io.close() -- Jesse Hager email = "[EMAIL PROTECTED]".decode("rot13") -- http://mail.python.org/mailman/listinfo/python-list

Re: How to Convert a string into binary

2006-04-15 Thread Jesse Hager
; -> ',' To put a separator between digits of the same character, put it between the second set of empty quotes. '.' -> '0.1.0.1.0.1.0.1' This is probably slower than one based on lookup tables like the others are proposing. -- Jesse Hage

Re: Python string.title Function

2006-04-11 Thread Jesse Hager
Try something like: def capwords(words): return ' '.join([x.capitalize() for x in words.split()]) capwords("here's my title!") "Here's My Title!" -- Jesse Hager email = "[EMAIL PROTECTED]".decode("rot13") -- http://mail.python.org/mailman/listinfo/python-list