Re: [Tutor] noise function

2008-12-02 Thread Richard Lovely
There's probably something like what you want within the random module. at the interactive prompt, try: import random help(random) --- Richard Roadie Rich Lovely, part of the JNP|UK Famile www.theJNP.com 2008/12/2 Alan Gauld [EMAIL PROTECTED]: Christopher Spears [EMAIL PROTECTED] wrote

Re: [Tutor] sqlite3 Python25 parameter binding problem with UPDATEplease help

2008-12-02 Thread Alan Gauld
aivars [EMAIL PROTECTED] wrote oCon.execute(UPDATE rezerve SET latusaldo =? where gads =?;,(result, [year])) oCon.commit() it throws me the error: sqlite3.InterfaceError: error binding parameter 1 probably unsupported type I assume its the [year] value it objects to. I'm not sure what you

Re: [Tutor] noise function

2008-12-02 Thread Alan Gauld
Christopher Spears [EMAIL PROTECTED] wrote Does anyone know if python has a noise function? What kind of noise function? What would you expect it to produce? A stream of random numbers perhaps? A single number each time it is called? And which noise profile should it follow? Or would it be

Re: [Tutor] cgi on novell/Appache

2008-12-02 Thread Alan Gauld
Jim Morcombe [EMAIL PROTECTED] wrote running under Novel. I know absolutely nothing about novell. I need to have the first line of the script point to the Python interpretter, I don't think that will do anything under Novell, assuming you mean the Novell network OS and not Novell Linux? If

[Tutor] cgi on novell/Appache

2008-12-02 Thread Jim Morcombe
I have a cgi script that I want to get running on an Apache server running under Novel. I know absolutely nothing about novell. I need to have the first line of the script point to the Python interpretter, but have no idea where it is. (I don't have access to the server to play around on

[Tutor] [Fwd: Python Course]

2008-12-02 Thread Jeff Johnson
This was forwarded to me from one of our user group members: Hi everyone! I just signed up for an online course in Web Development with Python through DePaul University, which I think you might find interesting: http://ipd.cdm.depaul.edu/wdp/Prog_WDP.htm I talked to the folks in the admissions

Re: [Tutor] sqlite3 Python25 parameter binding problem with UPDATEplease help

2008-12-02 Thread aivars
Interestingly, when simply testing like this: import sqlite3, sys sPATH=r'e:\pythonexamples\aivars2.db' oCon=sqlite3.connect(sPATH) cur=oCon.cursor() oCon.execute(UPDATE rezerve SET latusaldo = ? WHERE gads = ? ,(6000.0,'2006')) oCon.commit() it works. Therefore I am stuck since it looks

Re: [Tutor] sqlite3 Python25 parameter binding problem with UPDATEplease help

2008-12-02 Thread aivars
Hello again, Finally I managed to get it working! I had to remove [year] braces from the second argument - year. The reason I used [] was the posts we exchanged recently (7th of November) about CGI script where it was recommended by Kent that I put [] around string argument: Quote The second

[Tutor] importing images and sound

2008-12-02 Thread Daniel J Kramer
Hi I am writing a program based around a pub quiz. I have been able to write the program so it runs through a series of questions and gives users a score at the end. I need to import a specific font, images and sound. Does anyone know a good place to look for tutorials for this? At the

Re: [Tutor] importing images and sound

2008-12-02 Thread Steve Willoughby
On Tue, Dec 02, 2008 at 02:56:33PM -0500, Daniel J Kramer wrote: Hi I am writing a program based around a pub quiz. I have been able to write the program so it runs through a series of questions and gives users a score at the end. I need to import a specific font, images and sound. Does

Re: [Tutor] importing images and sound

2008-12-02 Thread W W
On Tue, Dec 2, 2008 at 2:02 PM, Steve Willoughby [EMAIL PROTECTED] wrote: snip That depends on what GUI toolkit you're using. If you're going to be doing a lot with sound and images, particularly video clips, you might want to look at pymedia or pygame Pyglet is another option. -Wayne

[Tutor] dictionary looping problem

2008-12-02 Thread Jeremiah Jester
Hello, I'm trying to gather a list of files and md5 hash them to do a checksum. I've created a function for each dictionary. However, when i print out the dictionary I don't get all the items. Any ideas? Thanks JJ CODE: #!/usr/bin/python import os import md5 import sys source={} target={}

Re: [Tutor] dictionary looping problem

2008-12-02 Thread Steve Willoughby
On Tue, Dec 02, 2008 at 01:08:09PM -0800, Jeremiah Jester wrote: Hello, I'm trying to gather a list of files and md5 hash them to do a checksum. I've created a function for each dictionary. However, when i print out the dictionary I don't get all the items. Any ideas? Yep. Don't use

Re: [Tutor] dictionary looping problem

2008-12-02 Thread Jeremiah Jester
Thanks for clearing this up for me. On Tue, 2008-12-02 at 13:25 -0800, Steve Willoughby wrote: On Tue, Dec 02, 2008 at 01:08:09PM -0800, Jeremiah Jester wrote: Hello, I'm trying to gather a list of files and md5 hash them to do a checksum. I've created a function for each dictionary.

Re: [Tutor] sqlite3 Python25 parameter binding problem withUPDATEplease help

2008-12-02 Thread Alan Gauld
aivars [EMAIL PROTECTED] wrote Finally I managed to get it working! I had to remove [year] braces from the second argument - year. You really need to do some reading on basicv Python before you go any further, otherwise you will never understand what you are doing. That is what I told you

Re: [Tutor] dictionary looping problem

2008-12-02 Thread Alan Gauld
Jeremiah Jester [EMAIL PROTECTED] wrote I've created a function for each dictionary. However, when i print out the dictionary I don't get all the items. Any ideas? You should only get a very small number indeed! for filename in names: hash=os.system(md5 + filename)

[Tutor] Making a dictionary of dictionaries from csv file

2008-12-02 Thread Judith Flores
Dear Python community, I have been trying to create a dictionary of dictionaries (and more dictionaries) from a csv file. The csv file contains longitudinal data corresponding to names. The following is just a very (very) simple example of how the data looks: NameDayweighttemp name114537