Toronto Area Python User's Group Meeting

2008-03-12 Thread Mike C. Fletcher
Our regular PyGTA meeting will be occurring for those not at the PyCon sprints. We'll meet at the regular time (7pm) at the regular place (Linux Caffe, on the corner of Grace and Harbord). Topic: Using Core Image (GL-based Mac Graphics Manipulation API) Speaker: Seneca Cunningham

CodeInvestigator-0.7.5

2008-03-12 Thread Martien Friedeman
CodeInvestigator version 0.7.5 was released on March 12. A bug was fixed: - Mac OS X line endings are now supported. Thanks Skip! A usability change was made: - Firefox may be running when CodeInvestigator starts. CodeInvestigator opens inside a new tab (Linux, Windows) or a new window (Mac

SQLObject 0.10.0

2008-03-12 Thread Oleg Broytmann
Hello! I'm pleased to announce version 0.10.0, the first stable release of 0.10 branch of SQLObject. What is SQLObject = SQLObject is an object-relational mapper. Your database tables are described as classes, and rows are instances of those classes. SQLObject is meant to be

[ANN] Python 2.3.7 and 2.4.5 (final)

2008-03-12 Thread Martin v. Löwis
On behalf of the Python development team and the Python community, I'm happy to announce the release of Python 2.4.5 and 2.3.7 (final). Both releases include only security fixes. Python 2.5 is the latest version of Python, we're making this release for people who are still running Python 2.3 or

Berlin Area Python User's Group Meeting

2008-03-12 Thread Stephan Diehl
The next meeting is on Wednesday, the 19th of march at newthinking store, starting 7pm. Details can be found at http://wiki.python.de/User_Group_Berlin See you there Stephan -- http://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation:

RELEASE: Elisa 0.3.5 'Papain'

2008-03-12 Thread philippe
This mail announces the release of Elisa 0.3.5 'Papain'. Elisa is a project to create an open source cross platform media center solution. While our primary development and deployment platform is GNU/Linux and Unix operating systems we also currently support MacOSX and also hope to support

Re: SOAP access to SharePoint

2008-03-12 Thread bryan rasmussen
It's usually not a totally mind destroying process if you hand craft your SOAP messages going off of examples from the service (if you're lucky enough they have ones) and reading their XML Schemas/WSDLs to see what they actually expect. Since it's MS do tests on your hand rolled xml with Microsoft

Re: best way to have enum-like identifiers?

2008-03-12 Thread Ben Finney
[EMAIL PROTECTED] writes: Currently I'm just putting this at the top of the file: py=1 funcpre=2 funcpost=3 ... Slightly better is: py = object() funcpre = object() funcpost = object() Thus, those names are all bound to unique objects, that won't be

base-class call decorator

2008-03-12 Thread castironpi
If you had this, class KType( BaseType ): def __init__( self, *ar, **kwar ): self.setProp= True BaseType.__init__( self, *ar, **kwar ) a lot, and wanted a decorator, what would it be? What are the pros and cons? class KType( BaseType ): @basecall def __init__( self ):

Re: merging intervals repeatedly

2008-03-12 Thread castironpi
Correct. I meant the final should be (1,30), (29,40), (50,100)         Actually, even that is incorrect -- note that ,30 overlaps 29, Actually, given the specification, (overlaps N count), (1,15), (20, 30), (29, 40), (50, 66), (62,100) is right, since 66-62= 4= 5. [1]         Since this

Re: difference b/t dictionary{} and anydbm - they seem the same

2008-03-12 Thread castironpi
Are there any that aren't persistent?         SQLite -- when opening a memory database rather than giving it a physical file. {I'm a tad too busy to look up the format of the memory parameter, but it shouldn't be too difficult to find it} What? If I wanted to code string literals, I'd use

Re: best way to have enum-like identifiers?

2008-03-12 Thread castironpi
[enums snip] Thus, those names are all bound to unique objects, that won't be unexpectedly duplicated by some other value. but I'm curious if there's a better way of doing this, some kind of enum-like thing or somesuch. Please try the 'enum' package in the Cheeseshop: Am I the only one

Re: merging intervals repeatedly

2008-03-12 Thread Magdoll
On Mar 11, 11:01 pm, Dennis Lee Bieber [EMAIL PROTECTED] wrote: On Tue, 11 Mar 2008 15:43:40 -0700 (PDT), Magdoll [EMAIL PROTECTED] declaimed the following in comp.lang.python: Correct. I meant the final should be (1,30), (29,40), (50,100) Actually, even that is incorrect -- note

Re: Problems installing Python Imaging Library

2008-03-12 Thread zutesmog
On Mar 10, 3:06 am, Nick Day [EMAIL PROTECTED] wrote: Hi, I'm trying to install PIL from source on my CentOS 4.5 server. The build summary reports that I have everything installed... PIL 1.1.6 BUILD SUMMARY

Re: wxPython/wxWidgets ok for production use ? (was Re: Quality assurance in Python projects containing C modules)

2008-03-12 Thread Gilles Ganault
On Tue, 11 Mar 2008 11:43:45 +0100, Stef Mientki [EMAIL PROTECTED] wrote: Funny, compared to Delphi-7, I found the grid in wxPython much richer ;-) You haven't tried the better alternatives I had in mind: http://www.x-files.pl http://www.bergsoft.net http://www.tmssoftware.com

Re: unable to install gdal

2008-03-12 Thread luis
On 10 mar, 09:49, luis [EMAIL PROTECTED] wrote: On 9 mar, 16:37, luis [EMAIL PROTECTED] wrote: Hi On Windows xp sp2 and python 2.4 Yesterday I running old versions of gdal, and I try to upgrade I download gdalwin32exe150.zip and gdal-python-13.win32-py2.4.exe I unzip

Re: merging intervals repeatedly

2008-03-12 Thread Robert Bossy
Magdoll wrote: Hi, I have to read through a file that will give me a bunch of intervals. My ultimate goal is to produce a final set of intervals such that not two intervals overlap by more than N, where N is a predetermined length. For example, I could read through this input: (1,10),

Re: Exctract GIF comment from image

2008-03-12 Thread wingi
On 11 Mrz., 18:39, Guilherme Polo [EMAIL PROTECTED] wrote: 2008/3/11, [EMAIL PROTECTED] [EMAIL PROTECTED]: Hi, simple question: ThePILdoes not support reading the optional description in GIF Images. I did a quick thing here, try it and check if it solves the problem for you: Wow -

Re: best way to have enum-like identifiers?

2008-03-12 Thread Peter Otten
[EMAIL PROTECTED] wrote: I currently have a 2-dim hash, indexed by two strings: template['py']['funcpre'] template['py']['funcpost'] ... but I would prefer to have these indexed by constants of some kind, since this seems a bit more natural: template[py][funcpre]

frequency count or number of occurences of a number in an array

2008-03-12 Thread Larry
Dear all, I'm new to Python. I have a file (an image file actually) that I need to read pixel by pixel. It's an 8-bit integer type. I need to get the statistics like mean, standard deviation, etc., which I know a little bit already from reading numpy module. What I want to know is how to get the

Re: Py2exe and Multi Treading problem.

2008-03-12 Thread GHUM
Farsheed Ashouri , Here is my script #** #** import threading import socket def openSocket(portNum): mySocket = socket.socket ( socket.AF_INET,

Re: Creating a file with $SIZE

2008-03-12 Thread Chris
On Mar 12, 12:32 pm, k.i.n.g. [EMAIL PROTECTED] wrote: Hi All, I would like create files of different size, taking size as user input. I need to check the data transfer rates from one network to another . In order to do this I will have to create files of diff size and work out. I am new to

Re: app runs fine with interpreter, but not under py2exe

2008-03-12 Thread GHUM
Doug, File VisionTrainer.py, line 49, in module File SessionController.pyc, line 53, in module File VisionEgg\__init__.pyc, line 42, in module File VisionEgg\ParameterTypes.pyc, line 28, in module File Numeric.pyc, line 93, in module File Precision.pyc, line 26, in module File

Creating a file with $SIZE

2008-03-12 Thread k.i.n.g.
Hi All, I would like create files of different size, taking size as user input. I need to check the data transfer rates from one network to another . In order to do this I will have to create files of diff size and work out. I am new to Python Thanks in advance. KK --

sys.stdout assign to- bug

2008-03-12 Thread castironpi
I'm actually intimidated enough by a few tries I make to say something on Python-Ideas, that I thought I'd run this by youguys first. import sys class ThreadedOut: def __init__( self, old ): self._old= old def write( self, s ): self._old.write( s )

Re: Creating a file with $SIZE

2008-03-12 Thread Chris
On Mar 12, 12:52 pm, Chris [EMAIL PROTECTED] wrote: On Mar 12, 12:32 pm, k.i.n.g. [EMAIL PROTECTED] wrote: Hi All, I would like create files of different size, taking size as user input. I need to check the data transfer rates from one network to another . In order to do this I will

Re: frequency count or number of occurences of a number in an array

2008-03-12 Thread Paul Hankin
On Mar 12, 10:26 am, Larry [EMAIL PROTECTED] wrote: I'm new to Python. I have a file (an image file actually) that I need to read pixel by pixel. It's an 8-bit integer type. I need to get the statistics like mean, standard deviation, etc., which I know a little bit already from reading numpy

Re: How about adding rational fraction to Python?

2008-03-12 Thread Piet van Oostrum
Gabriel Genellina [EMAIL PROTECTED] (GG) wrote: GG En Tue, 04 Mar 2008 11:46:48 -0200, NickC [EMAIL PROTECTED] escribió: A mildly interesting Py3k experiment: Python 3.0a3+ (py3k:61229, Mar 4 2008, 21:38:15) [GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2 Type help,

Re: frequency count or number of occurences of a number in an array

2008-03-12 Thread Bernard
Hey Larry, that one is fairly easy: from array import array array('i', [1, 2, 3, 4, 5, 1, 2]) def count(x, arr): cpt = 0 # declare a counter variable for el in arr: # for each element in the array if el == x: # when it is equal to the 'x' value

Re: Max File Size

2008-03-12 Thread Diez B. Roggisch
xkenneth wrote: Is the max file size a relevant issue in python anymore? I know OS X has a max file size of 8 exabytes and I'm not sure about the latest version of Ubuntu. Does python have an independent file size limit, or is it dependent upon the OS it was compiled on? The latter should be

Re: frequency count or number of occurences of a number in an array

2008-03-12 Thread John Machin
On Mar 12, 10:29 pm, Bernard [EMAIL PROTECTED] wrote: Hey Larry, that one is fairly easy: from array import array array('i', [1, 2, 3, 4, 5, 1, 2]) def count(x, arr): cpt = 0 # declare a counter variable for el in arr: # for each element in the array

Re: Python - CGI - XML - XSD

2008-03-12 Thread Diez B. Roggisch
xkenneth wrote: Hi All, Quick question. I've got an XML schema file (XSD) that I've written, that works fine when my data is present as an XML file. (Served out by apache2.) Now when I call python as a cgi script, and tell it print out all of the same XML, also served up by apache2, the

Re: Creating a file with $SIZE

2008-03-12 Thread k.i.n.g.
I think I am not clear with my question, I am sorry. Here goes the exact requirement. We use dd command in Linux to create a file with of required size. In similar way, on windows I would like to use python to take the size of the file( 50MB, 1GB ) as input from user and create a uncompressed

Is it possible to reload a module from a different file?

2008-03-12 Thread ilochab
I mean ... The main module makes this import: import moduleX later other modules make different import to an other module named moduleX like this: from pack.subdir import moduleX What I want is that the second import of moduleX in some way must be redirected onto the first one. Is

Re: Creating a file with $SIZE

2008-03-12 Thread Robert Bossy
k.i.n.g. wrote: I think I am not clear with my question, I am sorry. Here goes the exact requirement. We use dd command in Linux to create a file with of required size. In similar way, on windows I would like to use python to take the size of the file( 50MB, 1GB ) as input from user and

Re: catching object

2008-03-12 Thread Stargaming
On Wed, 12 Mar 2008 01:05:06 +0100, Igor V. Rafienko wrote: Hi, I was wondering if someone could help me explain this situation: h[1] import inspect h[1] inspect.getmro(ValueError) (type 'exceptions.ValueError', type 'exceptions.StandardError', type 'exceptions.Exception', type

Re: Creating a file with $SIZE

2008-03-12 Thread Matt Nordhoff
Robert Bossy wrote: k.i.n.g. wrote: I think I am not clear with my question, I am sorry. Here goes the exact requirement. We use dd command in Linux to create a file with of required size. In similar way, on windows I would like to use python to take the size of the file( 50MB, 1GB ) as

computer shows

2008-03-12 Thread t3chn0n3rd
are there any computer trade shows in your area? -- http://mail.python.org/mailman/listinfo/python-list

a Roguelike in Python

2008-03-12 Thread Mdonle
Seeing the 7DRL start up recently, i wanted to see what one was made of. Python is the language i'm most familiar with so i searched for some code to look at, but i couldn't find any. Can anyone direct me to the right place? I did some searching on what it would take to write a roguelike in

Re: Why no string return?

2008-03-12 Thread Piet van Oostrum
gargonx [EMAIL PROTECTED] (g) wrote: g Still no return of string. The null testing is not really the deal. g that could be replaced with anything EG: g def ReturnMethod(request, x): g if request is 'random': You shouldn't test with `is' but with `=='. g return x g else:

Re: Creating a file with $SIZE

2008-03-12 Thread Robert Bossy
Matt Nordhoff wrote: Robert Bossy wrote: k.i.n.g. wrote: I think I am not clear with my question, I am sorry. Here goes the exact requirement. We use dd command in Linux to create a file with of required size. In similar way, on windows I would like to use python to take the size

problem with Python 2.5.2 and gcc 4.3

2008-03-12 Thread David P. Riedel
Hi I tried building Python 2.5.2 using gcc 4.3.0. The build completes with no problems but when I run 'make test', I get a segfault part way through the test run. here is the last part of the output from make test test_softspace test_sort test_sqlite test_sqlite skipped -- no sqlite

List Combinations

2008-03-12 Thread Gerdus van Zyl
I have a list that looks like this: [['3'], ['9', '1'], ['5'], ['4'], ['2', '5', '8']] how can I get all the combinations thereof that looks like as follows: 3,9,5,4,2 3,1,5,4,2 3,9,5,4,5 3,1,5,4,5 etc. Thank You, Gerdus -- http://mail.python.org/mailman/listinfo/python-list

Re: image matching algorithms

2008-03-12 Thread Daniel Fetchinson
Thanks for the info! SIFT really looks like a heavy weight solution, but do you think the whole concept can be simplified if all I needed was: given a photo, find similar ones? I mean SIFT first detects objects on the image and find similarities, but I don't need the detection part at

Re: a Roguelike in Python

2008-03-12 Thread Gustavo DiPietro
[EMAIL PROTECTED] ha scritto: Seeing the 7DRL start up recently, i wanted to see what one was made of. Python is the language i'm most familiar with so i searched for some code to look at, but i couldn't find any. Can anyone direct me to the right place? I did some searching on what it

Re: List Combinations

2008-03-12 Thread Michael Wieher
2008/3/12, Gerdus van Zyl [EMAIL PROTECTED]: I have a list that looks like this: [['3'], ['9', '1'], ['5'], ['4'], ['2', '5', '8']] how can I get all the combinations thereof that looks like as follows: 3,9,5,4,2 3,1,5,4,2 3,9,5,4,5 3,1,5,4,5 etc. Thank You, Gerdus -- list =

agg (effbot)

2008-03-12 Thread [EMAIL PROTECTED]
Downloaded to Knoppix 5.1: : aggdraw-1.2a3-20060212.tar.gz Followed README. Wouldn't compile. Couldn't find way of contacting Effbot directly. PIL stuff comes with Knoppix, but specs on agg seem better. vtk is on Knoppix too, but has a steep learning curve. TIA for help. --

Re: List Combinations

2008-03-12 Thread Shane Geiger
Michael Wieher wrote: 2008/3/12, Gerdus van Zyl [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]: I have a list that looks like this: [['3'], ['9', '1'], ['5'], ['4'], ['2', '5', '8']] how can I get all the combinations thereof that looks like as follows: 3,9,5,4,2

Mutagen File Problem

2008-03-12 Thread aiwarrior
Hi i'm having a IO error saying a file does not exist even though i perform a isFile() check. Can you help me out figuring what is wrong? Thanks in advance from mutagen.easyid3 import EasyID3 from mutagen.mp3 import MP3 for root, dirs, files in os.walk('''C:\\Documents and Settings\\pneves\

Re: List Combinations

2008-03-12 Thread George Sakkis
On Mar 12, 10:18 am, Gerdus van Zyl [EMAIL PROTECTED] wrote: I have a list that looks like this: [['3'], ['9', '1'], ['5'], ['4'], ['2', '5', '8']] how can I get all the combinations thereof that looks like as follows: 3,9,5,4,2 3,1,5,4,2 3,9,5,4,5 3,1,5,4,5 etc. Thank You, Gerdus

Re: agg (effbot)

2008-03-12 Thread Gerhard Häring
[EMAIL PROTECTED] wrote: Downloaded to Knoppix 5.1: : aggdraw-1.2a3-20060212.tar.gz Followed README. Wouldn't compile. [...] Try shegabittling the frotz first. If that doesn't help, please post the output of the compile command that threw the error. -- Gerhard --

RE: MySQL DB-Api

2008-03-12 Thread Robert Rawlins
Hello guys, sorry for dragging this to the top of the list again but I really am intrigued to get your feedback. I'm looking for a clean and efficient way to implement the DB-API into my application without having to create database connections for every instance of objects which require it.

Re: agg (effbot)

2008-03-12 Thread Tim Chase
Gerhard Häring wrote: [EMAIL PROTECTED] wrote: aggdraw-1.2a3-20060212.tar.gz Try shegabittling the frotz first. If that doesn't help, please post the output of the compile command that threw the error. Maynard: He who is valiant and pure of spirit may find the compiling instructions in

RE: Obtaining the PyObject * of a class

2008-03-12 Thread Bronner, Gregory
The short answer is that you don't need to: Anything that has a 'handle' attribute that is an int should be fine to pass into the function, and your typemap will be fine (with some additional checking) If you really insist on absolute type safety, however, you'll need an instance of the Pin

RE: agg (effbot)

2008-03-12 Thread Robert Rawlins
Haha, Tim, that cracks me up! lol Bring forth the Holy Hand Grenade of Antioch Rob -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tim Chase Sent: 12 March 2008 15:04 To: python-list@python.org Subject: Re: agg (effbot) Importance: Low Gerhard Häring

ValueError in pickle module during unpickling a infinite float (python 2.5.2)

2008-03-12 Thread rehn
Unpickling an infinite float caused a ValueError in the pickle module. I need to pickle and load infinite floats in my project. Do you have any suggestions how to solve the issue? # code describing the issue: # define float constants with double-precision: # copied from fpconst module:

Re: List Combinations

2008-03-12 Thread Mark Dickinson
On Mar 12, 10:18 am, Gerdus van Zyl [EMAIL PROTECTED] wrote: I have a list that looks like this: [['3'], ['9', '1'], ['5'], ['4'], ['2', '5', '8']] how can I get all the combinations thereof that looks like as follows: You could wait for Python 2.6, or download the current alpha: Python

Re: Creating a file with $SIZE

2008-03-12 Thread cokofreedom
On Mar 12, 2:44 pm, Robert Bossy [EMAIL PROTECTED] wrote: Matt Nordhoff wrote: Robert Bossy wrote: k.i.n.g. wrote: I think I am not clear with my question, I am sorry. Here goes the exact requirement. We use dd command in Linux to create a file with of required size. In similar

Re: List Combinations

2008-03-12 Thread Mel
Gerdus van Zyl wrote: I have a list that looks like this: [['3'], ['9', '1'], ['5'], ['4'], ['2', '5', '8']] how can I get all the combinations thereof that looks like as follows: 3,9,5,4,2 3,1,5,4,2 3,9,5,4,5 3,1,5,4,5 etc. Thank You, Gerdus What they said, or, if you want to see

C extensions question

2008-03-12 Thread vvangelovski
Let's say I write a simple extension in c only for the windows version of my script. Can I just put this compiled dll in the root directory of my application along with the other py files and distribute it like that without the need of an installation script? --

RE: List Combinations

2008-03-12 Thread Reedick, Andrew
-Original Message- From: [EMAIL PROTECTED] [mailto:python- [EMAIL PROTECTED] On Behalf Of Shane Geiger Sent: Wednesday, March 12, 2008 10:33 AM To: Michael Wieher Cc: python-list@python.org Subject: Re: List Combinations def gen(lists): out = '[' + ','.join([v%s % i

Re: access to base class __init__

2008-03-12 Thread Sam
Dennis Lee Bieber wrote: On Thu, 06 Mar 2008 22:35:18 -0500, Sam [EMAIL PROTECTED] declaimed the following in comp.lang.python: ['line 1', 'line 2', 'embedded', 'line', 'something'] sample=line 1\rline 2\rembedded\nline\rsomething\r sample.splitlines() ['line 1', 'line 2', 'embedded',

Re: How about adding rational fraction to Python?

2008-03-12 Thread Mark Dickinson
On Mar 12, 7:20 am, Piet van Oostrum [EMAIL PROTECTED] wrote: But if the answer is incorrect (in the float calculation) the error is limited. IEEE 754 prescribes that the error should be at most 1 LSB, IIRC. And then the number of errors is the proper measure. There are two operations here,

Re: Mutagen File Problem

2008-03-12 Thread Max Erickson
aiwarrior [EMAIL PROTECTED] wrote: Hi i'm having a IO error saying a file does not exist even though i perform a isFile() check. Can you help me out figuring what is wrong? Thanks in advance from mutagen.easyid3 import EasyID3 from mutagen.mp3 import MP3 for root, dirs, files in

Unable to handle File Open dialog (using Pamie)

2008-03-12 Thread Oltmans
Hi all, I'm new to Python and am automating few tasks using Pamie. Everything worked well until I had to handle the File Open Dialog. I mean I'm trying to automate the file upload process using Pamie. Basically I just want to automate the process of file upload. I want to automatically hit the

Does __import__ require a module to have a .py suffix?

2008-03-12 Thread mrstephengross
Hi all. I've got a python file called 'foo' (no extension). I want to be able to load it as a module, like so: m = __import__('foo') However, the interpreter tells me No module named foo. If I rename it foo.py, I can indeed import it. Is the extension required? Is there any way to override

Re: a Roguelike in Python

2008-03-12 Thread Carl Banks
On Mar 12, 9:25 am, [EMAIL PROTECTED] wrote: Seeing the 7DRL start up recently, i wanted to see what one was made of. Python is the language i'm most familiar with so i searched for some code to look at, but i couldn't find any. Can anyone direct me to the right place? I did some searching

Re: Python - CGI - XML - XSD

2008-03-12 Thread xkenneth
On Mar 12, 6:32 am, Diez B. Roggisch [EMAIL PROTECTED] wrote: xkenneth wrote: Hi All,    Quick question. I've got an XML schema file (XSD) that I've written, that works fine when my data is present as an XML file. (Served out by apache2.) Now when I call python as a cgi script, and

Re: Does __import__ require a module to have a .py suffix?

2008-03-12 Thread Michael Wieher
2008/3/12, mrstephengross [EMAIL PROTECTED]: Hi all. I've got a python file called 'foo' (no extension). I want to be able to load it as a module, like so: m = __import__('foo') However, the interpreter tells me No module named foo. If I rename it foo.py, I can indeed import it. Is the

Re: Py2exe and Multi Treading problem.

2008-03-12 Thread Farsheed Ashouri
NO it dont work. If I remove threading part, it works like a charm. Any Idea? -- http://mail.python.org/mailman/listinfo/python-list

Re: merging intervals repeatedly

2008-03-12 Thread Magdoll
Hi, The problem, as stated here, may have several solutions. For instance the following set of intervals also satisfies the constraint: (1,15), (20,40), (50,100) One question you should ask yourself is: do you want all solutions? or just one? If you want just one, there's another

Re: Creating a file with $SIZE

2008-03-12 Thread Marco Mariani
Robert Bossy wrote: Indeed! Maybe the best choice for chunksize would be the file's buffer size... I won't search the doc how to get the file's buffer size because I'm too cool to use that function and prefer the seek() option since it's lighning fast regardless the size of the file and it

Problem with subprocess in threaded enviroment

2008-03-12 Thread Ningyu Shi
I'm trying to write a multi-task downloader to download files from a website using multi-threading. I have one thread to analyze the webpage, get the addresses of the files to be downloaded and put these in a Queue. Then the main thread will start some threads to get the address from the queue and

Get cgi script to begin execution of another script...

2008-03-12 Thread sophie_newbie
I've posted something similar to this already, but now I'm more sure of what I'm asking. Basically I've a CGI script, that when executed by the user, I want to call another script that does a very long running task (10 hours +) and print a message on the screen saying that the user will be

Re: Python - CGI - XML - XSD

2008-03-12 Thread Stefan Behnel
xkenneth wrote: On Mar 12, 6:32 am, Diez B. Roggisch [EMAIL PROTECTED] wrote: xkenneth wrote: Hi All, Quick question. I've got an XML schema file (XSD) that I've written, that works fine when my data is present as an XML file. (Served out by apache2.) Now when I call python as a cgi

Re: ValueError in pickle module during unpickling a infinite float (python 2.5.2)

2008-03-12 Thread Mark Dickinson
On Mar 12, 11:22 am, [EMAIL PROTECTED] wrote: Unpickling an infinite float caused a ValueError in the pickle module. I need to pickle and load infinite floats in my project. Do you have any suggestions how to solve the issue? Have you tried this on the recent 2.6 alpha (Python2.6a1)? It's

Re: best way to have enum-like identifiers?

2008-03-12 Thread Pete Forman
[EMAIL PROTECTED] writes: Currently I'm just putting this at the top of the file: py=1 funcpre=2 funcpost=3 ... That can be done more compactly with py, funcpre, funcpost = range(3) give or take 1. but I'm curious if there's a better way of doing this,

Different results when running script from IDLE versus Command Line

2008-03-12 Thread Casey T
Hi, I'm new to Python and I'm having some problems with getting different results from my script when I run it from IDLE versus just double- clicking the .py file and having it run through the command line. Basically, my script reads some CSV files, assembles a text files, then uploads that test

Re: Python - CGI - XML - XSD

2008-03-12 Thread xkenneth
On Mar 12, 11:58 am, Stefan Behnel [EMAIL PROTECTED] wrote: xkenneth wrote: On Mar 12, 6:32 am, Diez B. Roggisch [EMAIL PROTECTED] wrote: xkenneth wrote: Hi All,    Quick question. I've got an XML schema file (XSD) that I've written, that works fine when my data is present as an XML

Re: Does __import__ require a module to have a .py suffix?

2008-03-12 Thread Rick Dooling
On Mar 12, 11:22 am, mrstephengross [EMAIL PROTECTED] wrote: Hi all. I've got a python file called 'foo' (no extension). I want to be able to load it as a module, like so: m = __import__('foo') However, the interpreter tells me No module named foo. If I rename it foo.py, I can indeed

Is there Python equivalent to Perl BEGIN{} block?

2008-03-12 Thread Alex
Hi all, The subject says pretty much all, i would very appreciate an answer. I tried to search the various forums and groups, but didn't find any specific answer... Thanks, Alex. -- http://mail.python.org/mailman/listinfo/python-list

Re: ValueError in pickle module during unpickling a infinite float (python 2.5.2)

2008-03-12 Thread Peter Otten
[EMAIL PROTECTED] wrote: Unpickling an infinite float caused a ValueError in the pickle module. I need to pickle and load infinite floats in my project. Do you have any suggestions how to solve the issue? You could try another protocol. Does inf = 1e1000 pickle.loads(pickle.dumps(inf,

Re: Is there Python equivalent to Perl BEGIN{} block?

2008-03-12 Thread Paddy
On Mar 12, 6:19 pm, Alex [EMAIL PROTECTED] wrote: Hi all, The subject says pretty much all, i would very appreciate an answer. I tried to search the various forums and groups, but didn't find any specific answer... Thanks, Alex. No not really. There are lots of other ways to structure a

Re: Is there Python equivalent to Perl BEGIN{} block?

2008-03-12 Thread Carl Banks
On Mar 12, 2:19 pm, Alex [EMAIL PROTECTED] wrote: Hi all, The subject says pretty much all, i would very appreciate an answer. I tried to search the various forums and groups, but didn't find any specific answer... Python technically has no equivalent: you can't run code at compile time.

Re: Is there Python equivalent to Perl BEGIN{} block?

2008-03-12 Thread Tim Chase
The subject says pretty much all, Given what I understand about the BEGIN block[1], this is how Python works automatically: bash$ cat a.py print 'a1' import b print 'a2' bash$ cat b.py print 'b' bash$ python a.py a1 b a2 However, the first import does win and

Re: tcp client socket bind problem

2008-03-12 Thread castironpi
On Mar 11, 2:19 am, Tim Roberts [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: On Mar 10, 9:40 am, Marc Christiansen [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: I have a linux box with multiple ip addresses. I want to make my python client connect from one of the ip addresses.

Re: enums and PEP 3132

2008-03-12 Thread Tim Chase
Currently I'm just putting this at the top of the file: py=1 funcpre=2 funcpost=3 ... That can be done more compactly with py, funcpre, funcpost = range(3) I've harbored a hope that a combination of PEP 3132[1] (Extended Iterable unpacking) and

Make Money Using Paypal Get Paid Instantly

2008-03-12 Thread ayt46g6b
Make Money Using Paypal Get Paid Instantly Make 1k-5k every week without leaving the comfort of your own home Click Here to Make Money Using Paypal and Get Paid Instantly http://freetrafficbuzz.com/recommends/cashdirectly -- http://mail.python.org/mailman/listinfo/python-list

Re: for-else

2008-03-12 Thread castironpi
On Mar 11, 4:43 am, NickC [EMAIL PROTECTED] wrote: On Mar 4, 11:27 pm, [EMAIL PROTECTED] wrote: The meaning is explicit. While else seems to mean little there. So I may like something similar for Python 3.x (or the removal of the else). Consider a loop with the following form: while

Re: Does __import__ require a module to have a .py suffix?

2008-03-12 Thread John Krukoff
On Wed, 2008-03-12 at 09:22 -0700, mrstephengross wrote: Hi all. I've got a python file called 'foo' (no extension). I want to be able to load it as a module, like so: m = __import__('foo') However, the interpreter tells me No module named foo. If I rename it foo.py, I can indeed import

Re: Py2exe and Multi Treading problem.

2008-03-12 Thread Thin Myrna
Farsheed Ashouri wrote: NO it dont work. If I remove threading part, it works like a charm. Any Idea? Of course it does then. Try to join the thread or do something else to prevent the non-threading part to exit prematurely. HTH Thin -- http://mail.python.org/mailman/listinfo/python-list

Re: Does __import__ require a module to have a .py suffix?

2008-03-12 Thread George Sakkis
On Mar 12, 12:22 pm, mrstephengross [EMAIL PROTECTED] wrote: Hi all. I've got a python file called 'foo' (no extension). I want to be able to load it as a module, like so: m = __import__('foo') However, the interpreter tells me No module named foo. If I rename it foo.py, I can indeed

Re: Does __import__ require a module to have a .py suffix?

2008-03-12 Thread Jean-Paul Calderone
On Wed, 12 Mar 2008 12:58:33 -0700 (PDT), George Sakkis [EMAIL PROTECTED] wrote: On Mar 12, 12:22 pm, mrstephengross [EMAIL PROTECTED] wrote: Hi all. I've got a python file called 'foo' (no extension). I want to be able to load it as a module, like so: m = __import__('foo') However, the

string / split method on ASCII code?

2008-03-12 Thread Michael Wieher
Hey all, I have these annoying textilfes that are delimited by the ASCII char for (only its a single character) and (again a single character) Their codes are 174 and 175, respectively. My datafiles are in the moronic form XYZ I need to split on those freaking characters. Any tips on how

Re: Time Zone application after strptime?

2008-03-12 Thread M.-A. Lemburg
Jim Carroll wrote: M.-A. Lemburg mal at egenix.com writes: On 2008-03-07 22:24, Jim Carroll wrote: It's taken me a couple of hours to give up on strptime with %Z for recognizing time zones... but that still leaves me in the wrong zone: How can I use the PST (or any other time zone name)

Re: string / split method on ASCII code?

2008-03-12 Thread Carsten Haese
On Wed, 2008-03-12 at 15:29 -0500, Michael Wieher wrote: Hey all, I have these annoying textilfes that are delimited by the ASCII char for (only its a single character) and (again a single character) Their codes are 174 and 175, respectively. My datafiles are in the moronic form

no more comparisons

2008-03-12 Thread Alan Isaac
I was surprised to see that comparison is slated for death in Python 3000. For example: http://www.python.org/dev/peps/pep-3100/ list.sort() and builtin.sorted() methods: eliminate cmp parameter [27] [done] But there is a rumor of a PEP to restore comparisons.

Re: string / split method on ASCII code?

2008-03-12 Thread Tim Chase
I have these annoying textilfes that are delimited by the ASCII char for (only its a single character) and (again a single character) Their codes are 174 and 175, respectively. My datafiles are in the moronic form XYZ I need to split on those freaking characters. Any tips on how

Re: Different results when running script from IDLE versus Command Line

2008-03-12 Thread Chris
On Mar 12, 8:10 pm, Casey T [EMAIL PROTECTED] wrote: Hi, I'm new to Python and I'm having some problems with getting different results from my script when I run it from IDLE versus just double- clicking the .py file and having it run through the command line. Basically, my script reads some

Re: no more comparisons

2008-03-12 Thread Carl Banks
On Mar 12, 4:51 pm, Alan Isaac [EMAIL PROTECTED] wrote: I was surprised to see that comparison is slated for death in Python 3000. For example:http://www.python.org/dev/peps/pep-3100/ list.sort() and builtin.sorted() methods: eliminate cmp parameter [27] [done] Hmm, wasn't aware

  1   2   >