[Tutor] Default Structure of a 640x480 PIL BMP File?

2009-03-31 Thread Wayne Watson
Title: Signature.html See Subject. Does it have a header, DIB,  palette, and data section? -- Wayne Watson (Watson Adventures, Prop., Nevada City, CA) (121.01 Deg. W, 39.26 Deg. N) GMT-8 hr std. time) The Obama Administration plans to double the producti

Re: [Tutor] how are unicode chars represented?

2009-03-31 Thread Mark Tolonen
"Kent Johnson" wrote in message news:1c2a2c590903310357m682e16acr9d94b12b60993...@mail.gmail.com... On Tue, Mar 31, 2009 at 1:52 AM, Mark Tolonen wrote: Unicode is simply code points. How the code points are represented internally is another matter. The below code is from a 16-bit Unicode

Re: [Tutor] Operational Error. --HELP

2009-03-31 Thread David
bijoy franco wrote: I tried following query as well. code: infunction_curs.execute('SELECT * FROM table_book') This also throws the same error Bijoy Why did you try that? -- Powered by Gentoo GNU/LINUX http://www.linuxcrazy.com pgp.mit.edu ___ Tu

Re: [Tutor] range() fractional increment

2009-03-31 Thread Alan Gauld
"james carnell" wrote example: x row = 25 : col = 10 x row = 26 : col = 10.3 x row = 27 : col = 10.6 0x000 row = 28 : col = 11 for col in range(10,12, 0.3): #<- Crash Bang doesn't work 0.3 = zero = infinite loop? If you know the limits (rather than their being variables) you c

[Tutor] Tkinter cursor size?

2009-03-31 Thread Wayne Werner
Hi, Is there a way to resize a tkinter cursor? And if so, how? I'm trying to create a fairly simple drawing program, but I want my cursor to resize with my brush size. TIA, Wayne -- To be considered stupid and to be told so is more painful than being called gluttonous, mendacious, violent, lasc

Re: [Tutor] Operational Error. --HELP

2009-03-31 Thread bijoy franco
I tried following query as well. code: infunction_curs.execute('SELECT * FROM table_book') This also throws the same error Bijoy On Wed, Apr 1, 2009 at 12:42 AM, bob gailer wrote: > bijoy franco wrote: >> >> Hi, >> >> When used in psql interface directly, all Database operation queries >> w

Re: [Tutor] Operational Error. --HELP

2009-03-31 Thread bijoy franco
Hi, When used in psql interface directly, all Database operation queries works perfectly fine. Pls find the full code and error below code: import pgdb __metaclass__=type class addbook:     conn=pgdb.connect(dsn='localhost:secondbooks',user='postgres',password='postgres1')     curs=c

Re: [Tutor] Operational Error. --HELP

2009-03-31 Thread bob gailer
bijoy franco wrote: Hi, When used in psql interface directly, all Database operation queries works perfectly fine. So now we have a different query than the first time! I serioiusly doubt that SELECT book_name FROM table_book WHERE book_name=fgfd works in the interface. Or if it does wor

Re: [Tutor] Operational Error. --HELP

2009-03-31 Thread bob gailer
bijoy franco wrote: > > Hi, > > Python throws OperationalError while trying to do any database operations. I am using pgdb module. > > Code: > > import pgdb > > __metaclass__=type > > class addbook: > > conn=pgdb.connect(dsn='localhost:secondbooks',user='postgres',password='postgres1')

[Tutor] Operational Error. --HELP

2009-03-31 Thread bijoy franco
Hi, Python throws OperationalError while trying to do any database operations. I am using pgdb module. * **Code:*import pgdb __metaclass__=type class addbook: conn=pgdb.connect(dsn='localhost:secondbooks',user='postgres',password='postgres1') curs=conn.cursor() def addBook(sel

Re: [Tutor] Automated function creation / outsourcing code

2009-03-31 Thread Noufal Ibrahim
Oxymoron wrote: I think you're looking for refactoring features, in this particular case, a compose method/function refactor. Generally, generic editors will have trouble doing this right since it requires some inferencing capability on the selected code, your best bet is probably googling Pytho

Re: [Tutor] Automated function creation / outsourcing code

2009-03-31 Thread Eike Welk
On Saturday 28 March 2009, Martin Klimach wrote: > Is there a python editor, that can automatically turn a selection > of code into a function? Matching the input and return variables? > Look at "Rope IDE" it is fairly good at refactoring. It is very ugly and not very comfortable, but it works. Du

Re: [Tutor] Shelve doesn't free up memory

2009-03-31 Thread Emile van Sebille
Timo wrote: Emile van Sebille schreef: Timo wrote: # Results file import shelve def read_result(person): results = [] s = shelve.open(RESULTFILE) try: results = s[person] Maybe passing this out prevents s from being garbage collected? What do you mean by passing out?

Re: [Tutor] incrementing one minute

2009-03-31 Thread pa yo
Hi Dave, Yep - incrementing seems to be working fine now. Now I can access smaller XML files that should allow me to use DOM rather than SAX - which I was struggling to understand. Paul Y On Tue, Mar 31, 2009 at 2:29 PM, Dave Angel wrote: > Sorry for the bad assumption.  But the thread "Caugh

Re: [Tutor] incrementing one minute

2009-03-31 Thread Dave Angel
Sorry for the bad assumption. But the thread "Caught out by daylight saving :-(" on the python-list was very similar, differing mainly by the fact he's incrementing by 5 minutes instead of 1. Did my suggested function replacements work for you? They did here. po yo wrote: I am trying to fi

Re: [Tutor] how are unicode chars represented?

2009-03-31 Thread Kent Johnson
On Tue, Mar 31, 2009 at 1:52 AM, Mark Tolonen wrote: > Unicode is simply code points.  How the code points are represented > internally is another matter.  The below code is from a 16-bit Unicode build > of Python but should look exactly the same on a 32-bit Unicode build; > however, the internal

Re: [Tutor] range() fractional increment

2009-03-31 Thread Ionut Vancea
Hi, On Tue, Mar 31, 2009 at 4:44 AM, james carnell wrote: > 1) I feel dumb for asking this. > 2) I looked for 20 minutes and didn't find an answer > > Trying to make a drawLine function in a 2d array. > > example: > x   row = 25 : col = 10 > x   row = 26 : col = 10.3 > x   row = 27 :

Re: [Tutor] range() fractional increment

2009-03-31 Thread spir
Le Mon, 30 Mar 2009 20:44:28 -0700 (PDT), james carnell s'exprima ainsi: > 1) I feel dumb for asking this. > 2) I looked for 20 minutes and didn't find an answer > > Trying to make a drawLine function in a 2d array. > > example: > x   row = 25 : col = 10 > x   row = 26 : col = 10.3 > x0

Re: [Tutor] Shelve doesn't free up memory

2009-03-31 Thread Timo
Emile van Sebille schreef: Timo wrote: # Results file import shelve def read_result(person): results = [] s = shelve.open(RESULTFILE) try: results = s[person] Maybe passing this out prevents s from being garbage collected? What do you mean by passing out? I also tried