Re: Projects anyone?

2007-01-18 Thread [EMAIL PROTECTED]
I have a project available if you are intrested. It is a music package that includes everything from tracker style editing to code generators for fltk(generates csound and python code) and dot code generation.. There is a huge range of possible projects and a little debugging so you can even have

Re: cannot import libxml2 python module on windoze using activePerl or Python IDLE

2007-01-18 Thread Andrew Marlow
On Wed, 17 Jan 2007 18:34:38 +, Dennis Lee Bieber wrote: >> I am not sure how python packages get installed on windoze. >> Please can anyone help? > > http://www.google.com/search?hl=en&q=libxml2+python&btnG=Google+Search > http://users.skynet.be/sbi/libxml-python/ Thanks very much! -Andrew

Re: question about module resolution

2007-01-18 Thread Peter Otten
Emin wrote: > On Jan 17, 11:20 am, Peter Otten <[EMAIL PROTECTED]> wrote: >> Emin wrote: >> > I often find myself wanting to have a child module get some parameters >> > defined in a parent module. For example, imagine I have the following >> > directory structure and want something in baz.py to

urllib2 and transfer-encoding = chunked

2007-01-18 Thread jdvolz
I am having errors which appear to be linked to a previous bug in urllib2 (and urllib) for v2.4 and v2.5 of Python. Has this been fixed? Has anyone established a standard workaround? I keep finding old posts about it, that basically give up and say "well it's a known bug." Any help would be gre

Re: predefined empty base class ??

2007-01-18 Thread robert
Gabriel Genellina wrote: > At Wednesday 17/1/2007 15:34, Dennis Lee Bieber wrote: > >> > is there an predefined empty base class >> > which I can instanziate to have an >> > container i can copy attributes in? >> >> I think that's a two-liner... >> >> >>> class EmptyBase(object): >> ...

Re: Making a simple script standalone

2007-01-18 Thread robert
Gabriel Genellina wrote: > At Wednesday 17/1/2007 16:05, Rikishi 42 wrote: > >> >>What I want to do is to compile/bundle/prepare/whatever_term a simple >> >>Python script for deployment on a Windows machine. Installing Python >> >>itself on that machine, is not an option. Ideally I would like to

One more regular expressions question

2007-01-18 Thread Victor Polukcht
I have a couple of strings like: Unassigned Number (1)32 No Route To Destination (3) 12 Normal call clearing (16) 2654 User busy (17) 630 No user respo

Re: Class data members in C

2007-01-18 Thread Nick Maclaren
In article <[EMAIL PROTECTED]>, "Hendrik van Rooyen" <[EMAIL PROTECTED]> writes: |> |> > Oh, one of the first two - I am not bonkers! Changing a class after |> > instance creation is guaranteed to cause confusion, if nothing else. |> > |> *grin* - its also just about impossible to do, if you tr

Re: Would a Dutch speaker please check this wiki page please?

2007-01-18 Thread Martin P. Hellwig
Stef Mientki wrote: > [EMAIL PROTECTED] wrote: >> Got a note about a new page on the Python Wiki: >> >>> "Wade" == Wade McDaniel <[EMAIL PROTECTED]> writes: >> >> http://wiki.python.org/moin/Selcuk_Altun >> >> I suspect it's junk since it doesn't seem to mention Python and the >> website >

DOTALL not working as expected

2007-01-18 Thread Stefan Palme
Hi all, using the "re" module of Python (2.3 and 2.4), I tried the following: import re print re.sub('X.*?Y', 'Z', 'Xab\ncdY', re.DOTALL) I wanted to replace Xab cdY by a single "Z", but the "." in the pattern does not match the included "\n". When using the pattern "X(.|\n)*?Y" (ex

Re: *POLL* How many sheeple believe in the 911 fairy tale and willing to accept an Orwellian doublespeak and enslavement world ?

2007-01-18 Thread schoenfeld . one
[EMAIL PROTECTED] wrote: [...] Ask yourself, how can all these people, supposed physicists, engineers, software developers, people of supposed intelligence be incapable of understanding that fire cannot make buildings free fall? How can they not understand that a free falling WTC 7 means it was a

Re: DOTALL not working as expected

2007-01-18 Thread Stefan Palme
Just noticed, that it works when *compiling* the pattern: import re p = re.compile('X.*?Y', re.DOTALL) print re.sub(p, 'Z', 'Xab\ncdY') Still the question - my fault or a bug? Best regards -stefan- On Thu, 18 Jan 2007 11:10:08 +0100, Stefan Palme wrote: > > Hi all, > > using the "re"

Re: One more regular expressions question

2007-01-18 Thread Roberto Bonvallet
Victor Polukcht wrote: > My actual problem is i can't get how to include space, comma, slash. Post here what you have written already, so we can tell you what the problem is. -- Roberto Bonvallet -- http://mail.python.org/mailman/listinfo/python-list

PyODBC Stored proc calling

2007-01-18 Thread king kikapu
Hi to all, can anyone give me a jump-start about how to call Stored Procedures from PyODBC ?? I want to execute a very simple testing Stored Procedure on an Sql Server database. I started using PyODBC and code like the following cnxn = pyodbc.connect('DRIVER={SQL Server};SERVER=hercules;DATABASE

Re: Distributed computation of jobs

2007-01-18 Thread Paul Boddie
robert wrote: > > as many libs are restriced to certain OS'es, and/or need/rely on > extension modules, few tags would probably improve: OS'es, > pure-python, dependeniess I've added some platform notes, although the library dependencies of various MPI and PVM solutions are sort of obvious, but I'

Re: DOTALL not working as expected

2007-01-18 Thread Roberto Bonvallet
Stefan Palme wrote: >> using the "re" module of Python (2.3 and 2.4), I tried the following: >> >> import re >> print re.sub('X.*?Y', 'Z', 'Xab\ncdY', re.DOTALL) >> > Just noticed, that it works when *compiling* the pattern: > > import re > p = re.compile('X.*?Y', re.DOTALL) > print re.su

Re: One more regular expressions question

2007-01-18 Thread Peter Otten
Victor Polukcht wrote: > I have a couple of strings like: > > Unassigned Number (1)32 > No Route To Destination (3) 12 > Normal call clearing (16) 2654 > User busy (17)

Re: A note on heapq module

2007-01-18 Thread bearophileHUGS
Steven Bethard: > Antoon Pardon: > > For me, your class has the same drawback as the heappush, heappop > > procedurers: no way to specify a comparision function. > > Agreed. I'd love to see something like ``Heap(key=my_key_func)``. It can be done, but the code becomes more complex and hairy: http

Re: One more regular expressions question

2007-01-18 Thread Victor Polukcht
My pattern now is: (?P[^(]+)(?P\d+)\)\s+(?P\d+) And i expect to get: var1 = "Unassigned Number " var2 = "1" var3 = "32" I'm sure my regexp is incorrect, but can't understand where exactly. Regex.debug shows that even the first block is incorrect. Thanks in advance. On Jan 18, 1:15 pm, Robert

Re: DOTALL not working as expected

2007-01-18 Thread Stefan Palme
arghh. Thanks for removing my blindness :) -stefan- On Thu, 18 Jan 2007 10:38:35 +, Roberto Bonvallet wrote: > Stefan Palme wrote: >>> using the "re" module of Python (2.3 and 2.4), I tried the following: >>> >>> import re >>> print re.sub('X.*?Y', 'Z', 'Xab\ncdY', re.DOTALL) >>> >> Jus

Re: A note on heapq module

2007-01-18 Thread bearophileHUGS
Neil Cerutti: > One more idea, cribbed from the linked list thread elsewhere: it > might be nice if your Heap could optionally use an underlying > collections.deque instead of a list. > I don't know how excellent Python's deque is, but it's possible a > deque would provide a faster heap than a cont

Re: arguments of a function/metaclass

2007-01-18 Thread rubbishemail
thank you! -- http://mail.python.org/mailman/listinfo/python-list

Re: One more regular expressions question

2007-01-18 Thread Daniele Varrazzo
Victor Polukcht wrote: > I have a couple of strings like: > > Unassigned Number (1)32 [...] > Interworking, unspecified (127) 5 > > I need to get: > Error code (value in brackets) - Value - Message. > > My actual problem is i can't get ho

Re: One more regular expressions question

2007-01-18 Thread harvey . thomas
Victor Polukcht wrote: > My pattern now is: > > (?P[^(]+)(?P\d+)\)\s+(?P\d+) > > And i expect to get: > > var1 = "Unassigned Number " > var2 = "1" > var3 = "32" > > I'm sure my regexp is incorrect, but can't understand where exactly. > > Regex.debug shows that even the first block is incorrect. >

classes: need for an explanation

2007-01-18 Thread 0k-
hello! i started to write a game in python in which i want to implement "dynamically attachable" attributes. my intention is to generalise this and moreover these attributes can be complex, so i'm creating classes to represent these attributes. but somehow i cannot instantiate these attribute clas

Re: One more regular expressions question

2007-01-18 Thread Victor Polukcht
Great thanks. You post helped me so much! My resulting regexp is: "(?P^(.*)\s*)\(((?P\d+))\)\s+((?P\d+))" On Jan 18, 2:38 pm, "Daniele Varrazzo" <[EMAIL PROTECTED]> wrote: > Victor Polukcht wrote: > > I have a couple of strings like: > > > Unassigned Number (1)

Re: generate tuples from sequence

2007-01-18 Thread Duncan Booth
Peter Otten <[EMAIL PROTECTED]> wrote: > But still, to help my lack of fantasy -- what would a sane zip() > implementation look like that does not guarantee the above output? > Hypothetically? The code in zip which builds the result tuples looks (ignoring error handling) like: // inside a loop

Re: One more regular expressions question

2007-01-18 Thread Jussi Salmela
Victor Polukcht kirjoitti: > Great thanks. > > You post helped me so much! > > My resulting regexp is: > "(?P^(.*)\s*)\(((?P\d+))\)\s+((?P\d+))" > If it doesn't have to be a regex: #=== s = '''\ Unassigned Number (1)

Re: classes: need for an explanation

2007-01-18 Thread 0k-
oops, i forgot to mention i'm using interpreter version 2.4.3 -- http://mail.python.org/mailman/listinfo/python-list

Re: classes: need for an explanation

2007-01-18 Thread Peter Otten
0k- wrote: > class Thing(object): > props = {} > def __init__(self): > self.props["text"] = TxtAttr("something important") > > t1 = Thing() > t2 = Thing() > > t2.props["text"].value = "another string" > > print "t1: %s\nt2: %s" % (t1.props["text"].value, > t2.props["text"].value

Re: classes: need for an explanation

2007-01-18 Thread 0k-
thanks for the quick reply, Peter! :) -- http://mail.python.org/mailman/listinfo/python-list

closing a "forever" Server Socket

2007-01-18 Thread alessandro
Hi all, This is my framework for create TCP server listening forever on a port and supporting threads: import SocketServer port = ip = "192.168.0.4" server_address = (ip, port) class ThreadingTCPServer(SocketServer.ThreadingMixIn, SocketServer.TCPServer): pass class Handler(SocketServer.

Shed Skin Python-to-C++ Compiler

2007-01-18 Thread Mark Dufour
hi all, I have just released Shed Skin 0.0.18. besides many fixes and optimizations, this release should work on OSX and 64-bit systems (thanks john, larry, gustavo and denis!) more interestingly, I collected 25 'largish' programs (at a total of more than 6,000 lines!) that work fine with Shed Sk

Re: classes: need for an explanation

2007-01-18 Thread Steven D'Aprano
On Thu, 18 Jan 2007 03:58:22 -0800, 0k- wrote: > hello! > > i started to write a game in python in which i want to implement > "dynamically attachable" attributes. All attributes in Python are dynamically attachable. >>> class Parrot: ... pass ... >>> p = Parrot() >>> hasattr(p, "plumage")

Re: generate tuples from sequence

2007-01-18 Thread Peter Otten
Duncan Booth wrote: > Peter Otten <[EMAIL PROTECTED]> wrote: >> But still, to help my lack of fantasy -- what would a sane zip() >> implementation look like that does not guarantee the above output? >> > Hypothetically? > > The code in zip which builds the result tuples looks (ignoring error > h

Is it possible to fasten the import of cgi?

2007-01-18 Thread Cecil Westerhof
I have a cgi-script dat uses the modules cgi, os, sys and time. Offcourse I can not time the time used to import time, but os and sys do not take more as a millisecond. My script itself takes 3 or 4 milliseconds. But importing cgi takes 95 milliseconds. (This is on my test system a PII 300 MHz. Is

Re: How can I create a linked list in Python?

2007-01-18 Thread Jorgen Grahn
On Wed, 17 Jan 2007 10:11:40 +0100, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > In <[EMAIL PROTECTED]>, bearophileHUGS > wrote: > >> In CPython they are dynamic arrays, they aren't lists. Try adding >> elements at the beginning of a list compared to adding elements at the >> beginning or

Re: One more regular expressions question

2007-01-18 Thread Daniele Varrazzo
Victor Polukcht wrote: > Great thanks. > > You post helped me so much! > > My resulting regexp is: > "(?P^(.*)\s*)\(((?P\d+))\)\s+((?P\d+))" Notice that this way you are including trailing whitespaces in the var1 group. You may want to put the "\s*" outside the parenthesis. mmm... in this case yo

Re: Is it possible to fasten the import of cgi?

2007-01-18 Thread Daniele Varrazzo
Cecil Westerhof wrote: > I have a cgi-script dat uses the modules cgi, os, sys and time. Offcourse I > can not time the time used to import time, but os and sys do not take more > as a millisecond. My script itself takes 3 or 4 milliseconds. But importing > cgi takes 95 milliseconds. (This is on my

Re: Is it possible to fasten the import of cgi?

2007-01-18 Thread Cecil Westerhof
Daniele Varrazzo wrote: > Cecil Westerhof wrote: >> I have a cgi-script dat uses the modules cgi, os, sys and time. Offcourse >> I can not time the time used to import time, but os and sys do not take >> more as a millisecond. My script itself takes 3 or 4 milliseconds. But >> importing cgi takes

python embedding and threads

2007-01-18 Thread Sven Rech
Hi, I'm the author of an application written in C, which should now be extended with a python plugin system. It already works very good, but I now have a problem: Threading functionality within the python modules, that my C app loads and calls, doesn't work. This means, the threads do not run (t

what can be used in a signal handler

2007-01-18 Thread hg
Hi, I posted an equivalent question earlier ... but am still not sure: I currently (under Linux) have a program that uses Queue.put (raw_input('')) in a signal handler and Queue.get() in the main/only thread. It works but I want to know if it is legal / what type of synchro API I have the right

Re: generate tuples from sequence

2007-01-18 Thread Duncan Booth
Peter Otten <[EMAIL PROTECTED]> wrote: > Let's see if I understand the above: In C a call > > f(g(), g()) > > may result in machine code equivalent to either > > x = g() > y = g() > f(x, y) > > or > > y = g() > x = g() > f(x, y) > > Is that it? > Yes, or changing one of the calls to h() an

Re: what can be used in a signal handler

2007-01-18 Thread Nick Maclaren
In article <[EMAIL PROTECTED]>, hg <[EMAIL PROTECTED]> writes: |> |> I posted an equivalent question earlier ... but am still not sure: |> |> I currently (under Linux) have a program that uses Queue.put (raw_input('')) |> in a signal handler and Queue.get() in the main/only thread. |> |> It wor

Catching wx events

2007-01-18 Thread Cruelemort
Hello all, I am new to this group (and new to Python) and was hoping someone would be able to help me with something, it is not so much a problem it is more of a general interest query about something i have a solution too but am not sure it is the correct one. I have a class that contains a stri

Re: A note on heapq module

2007-01-18 Thread Neil Cerutti
On 2007-01-18, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Neil Cerutti: >> One more idea, cribbed from the linked list thread elsewhere: >> it might be nice if your Heap could optionally use an >> underlying collections.deque instead of a list. I don't know >> how excellent Python's deque is, b

Re: Would a Dutch speaker please check this wiki page please?

2007-01-18 Thread skip
Martin> Could be Afrikaans too, but the page is gone now so I can't Martin> check. Actually, you can... ;-) Even though it's a nonexistent page, its history still exists. Poke the "Get Info" link and view the first revision of the file. Skip -- http://mail.python.org/mailman/listinfo/

Re: Is it possible to fasten the import of cgi?

2007-01-18 Thread Gabriel Genellina
"Cecil Westerhof" <[EMAIL PROTECTED]> escribió en el mensaje news:[EMAIL PROTECTED] >I have a cgi-script dat uses the modules cgi, os, sys and time. Offcourse I > can not time the time used to import time, but os and sys do not take more > as a millisecond. My script itself takes 3 or 4 milliseco

Re: One more regular expressions question

2007-01-18 Thread Neil Cerutti
On 2007-01-18, Victor Polukcht <[EMAIL PROTECTED]> wrote: > My pattern now is: > > (?P[^(]+)(?P\d+)\)\s+(?P\d+) > > And i expect to get: > > var1 = "Unassigned Number " > var2 = "1" > var3 = "32" > > I'm sure my regexp is incorrect, but can't understand where > exactly. Break it up using verbose n

Re: urllib2 and transfer-encoding = chunked

2007-01-18 Thread Gabriel Genellina
<[EMAIL PROTECTED]> escribió en el mensaje news:[EMAIL PROTECTED] >I am having errors which appear to be linked to a previous bug in > urllib2 (and urllib) for v2.4 and v2.5 of Python. Has this been fixed? > Has anyone established a standard workaround? I keep finding old > posts about it, that

PythonTidy 1.10

2007-01-18 Thread Chuck Rhode
PythonTidy cleans up, regularizes, and reformats the text of Python scripts. It is released under the GNU General Public License. Python scripts are usually so good looking that no beautification is required. However, from time to time, it may be necessary to alter the style to conform to chan

Re: import vs. subdirectory search

2007-01-18 Thread Gabriel Genellina
"John Nagle" <[EMAIL PROTECTED]> escribió en el mensaje news:[EMAIL PROTECTED] >I'm running Python 2.3.4 from a CGI script on a shared hosting Linux > system. > The CGI program is being executed from Apache, as "nobody". I have some > local modules installed in "~myname/lib/python"; these i

Re: Asyncore select statement problem

2007-01-18 Thread Gabriel Genellina
"JamesHoward" <[EMAIL PROTECTED]> escribió en el mensaje news:[EMAIL PROTECTED] >I have a problem with python's asyncore module throwing a bad file > descriptor error. The code might be difficult to copy here, but the > problem is essentially: > > The server wants to sever the connection of an o

Re: Catching wx events

2007-01-18 Thread Chris Mellon
On 18 Jan 2007 06:12:17 -0800, Cruelemort <[EMAIL PROTECTED]> wrote: > Hello all, > > I am new to this group (and new to Python) and was hoping someone would > be able to help me with something, it is not so much a problem it is > more of a general interest query about something i have a solution t

Re: Would a Dutch speaker please check this wiki page please?

2007-01-18 Thread Martin P. Hellwig
Stef Mientki wrote: > [EMAIL PROTECTED] wrote: >> Got a note about a new page on the Python Wiki: >> >>> "Wade" == Wade McDaniel <[EMAIL PROTECTED]> writes: >> >> http://wiki.python.org/moin/Selcuk_Altun >> >> I suspect it's junk since it doesn't seem to mention Python and the >> website >

Re: Is it possible to fasten the import of cgi?

2007-01-18 Thread Cecil Westerhof
Gabriel Genellina wrote: > "Cecil Westerhof" <[EMAIL PROTECTED]> escribió en el mensaje > news:[EMAIL PROTECTED] > >>I have a cgi-script dat uses the modules cgi, os, sys and time. Offcourse >>I >> can not time the time used to import time, but os and sys do not take >> more as a millisecond. My

variable scope

2007-01-18 Thread gonzlobo
Greetings, I've been using Python to successfully parse files. When the entire program was smaller, the variable firstMsg worked fine, but now doesn't because it's used in function PID_MinMax. I know it's a result of variables and their scope. I declare the variable 'firstMsg = 0' in the main loop

Re: Would a Dutch speaker please check this wiki page please?

2007-01-18 Thread Paul Rubin
"Martin P. Hellwig" <[EMAIL PROTECTED]> writes: > Indeed it's not Afrikaans but just incorrect use of Dutch and not > related to python. It was apparently posted by someone with a .be address, so I'll guess it was written a Belgian French speaker who knows some Dutch. The "me" vs "mijn" error sou

Re: The proper use of QSignalMapper

2007-01-18 Thread David Boddie
borntonetwork wrote: > Thanks, David, for you help. > > When I change the slot function to what you show in your second > example, I get the same results: nothing. This may be due to something I missed in your code. When you connect the signal from the signal mapper to your class, you need to spec

Module name to filename and back?

2007-01-18 Thread Ron Adam
Is there a function to find a filename from a dotted module (or package) name without importing it? The imp function find_module() doesn't work with dotted file names. And it looks like it may import the file as it raises an ImportError error exception if it can't find the module. (Shouldn

Re: variable scope

2007-01-18 Thread Bruno Desthuilliers
gonzlobo a écrit : > Greetings, > I've been using Python to successfully parse files. When the entire > program was smaller, the variable firstMsg worked fine, but now > doesn't because it's used in function PID_MinMax. I know it's a result > of variables and their scope. > > I declare the variabl

How to read and write huge binary files

2007-01-18 Thread Lad
What is a good way to read binary data from HUGE file and write it to another file? Thanks for help La. -- http://mail.python.org/mailman/listinfo/python-list

How to find out if another process is using a file

2007-01-18 Thread Tom Wright
I'm writing a program which reads a series of data files as they are dumped into a directory by another process. At the moment, it gets sporadic bugs when it tries to read files which are only partially written. I'm looking for a function which will tell me if a file is opened in write-mode by an

Re: urllib2 and transfer-encoding = chunked

2007-01-18 Thread jdvolz
Haha! My mistake. The error is that when a web server is chunking a web page only the first chunk appears to be acquired by the urllib2.urlopen call. If you check the headers, there is no 'Content-length' (as expected) and instead there is 'transfer-encoding' = 'chunked'. I am getting about the

nsis and command-line argument

2007-01-18 Thread manouchk
Hi, is there a standart way to prepare a single exe with nsis that pass the command line to an exe created by py2exe on windows? py2exe allows to prepare an exe that get the command-line but needs some lib file so that it is not so elegant to ditribute. I tried a simple setup.nsis script to prepa

Re: How to find out if another process is using a file

2007-01-18 Thread js
How about using lock? Let writing process locks the files before writing, and unlock after the job's done. I think it'd work file in most environment. On 1/19/07, Tom Wright <[EMAIL PROTECTED]> wrote: > I'm writing a program which reads a series of data files as they are dumped > into a director

Re: connection to server not accepted (but no error) only after several hours

2007-01-18 Thread seb
Hi Dennis, I think I have some new informations. My system is "blocked" now but the following change make it work again !!! I will test it for tonight to be sure of the improvements. I changed : service.bind(("", self.PORT)) to service.bind((socket.gethostname(), se

Re: How to read and write huge binary files

2007-01-18 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Lad wrote: > What is a good way to read binary data from HUGE file and write it > to another file? What about `shutil.copy()`? Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: A note on heapq module

2007-01-18 Thread Neil Cerutti
On 2007-01-18, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Neil Cerutti: >> One more idea, cribbed from the linked list thread elsewhere: >> it might be nice if your Heap could optionally use an >> underlying collections.deque instead of a list. I don't know >> how excellent Python's deque is, b

Re: Catching wx events

2007-01-18 Thread Cruelemort
Chris Mellon wrote: > On 18 Jan 2007 06:12:17 -0800, Cruelemort <[EMAIL PROTECTED]> wrote: > > Hello all, > > > > I am new to this group (and new to Python) and was hoping someone would > > be able to help me with something, it is not so much a problem it is > > more of a general interest query a

Re: Would a Dutch speaker please check this wiki page please?

2007-01-18 Thread Roel Schroeven
Paul Rubin schreef: > "Martin P. Hellwig" <[EMAIL PROTECTED]> writes: >> Indeed it's not Afrikaans but just incorrect use of Dutch and not >> related to python. > > It was apparently posted by someone with a .be address, so I'll guess > it was written a Belgian French speaker who knows some Dutch.

Re: Is it possible to fasten the import of cgi?

2007-01-18 Thread Gabriel Genellina
"Cecil Westerhof" <[EMAIL PROTECTED]> escribió en el mensaje news:[EMAIL PROTECTED] > Gabriel Genellina wrote: > >> "Cecil Westerhof" <[EMAIL PROTECTED]> escribió en el mensaje >> news:[EMAIL PROTECTED] >> >>>I have a cgi-script dat uses the modules cgi, os, sys and time. Offcourse >>>I >>> can no

Re: How to read and write huge binary files

2007-01-18 Thread Gabriel Genellina
"Lad" <[EMAIL PROTECTED]> escribió en el mensaje news:[EMAIL PROTECTED] > What is a good way to read binary data from HUGE file and write it > to another file? Without processing the data read? shutil.copy2 or similar Else, a lot of applications can follow the pattern read-process-write: read

Traversing the properties of a Class

2007-01-18 Thread EdG
I'm using Python version 2.4 and I created a class with some properties like: def GetCallAmount(self): return somedata def GetCallCurrency(self): return somemoredata moredefs..etc. CallAmount = property(GetCallAmount,None,None,None) CallCurrency = property(Get

Re: How to find out if another process is using a file

2007-01-18 Thread Gabriel Genellina
"Tom Wright" <[EMAIL PROTECTED]> escribió en el mensaje news:[EMAIL PROTECTED] > I'm writing a program which reads a series of data files as they are > dumped > into a directory by another process. At the moment, it gets sporadic bugs > when it tries to read files which are only partially writt

Re: How to find out if another process is using a file

2007-01-18 Thread Jean-Paul Calderone
On Thu, 18 Jan 2007 14:34:52 -0300, Gabriel Genellina <[EMAIL PROTECTED]> wrote: >"Tom Wright" <[EMAIL PROTECTED]> escribió en el mensaje >news:[EMAIL PROTECTED] > >> I'm writing a program which reads a series of data files as they are >> dumped >> into a directory by another process. At the momen

spidering script

2007-01-18 Thread David Waizer
Hello.. I'm looking for a script (perl, python, sh...)or program (such as wget) that will help me get a list of ALL the links on a website. For example ./magicscript.pl www.yahoo.com and outputs it to a file, it would be kind of like a spidering software.. Any suggestions would be appreciated

Re: closing a "forever" Server Socket

2007-01-18 Thread Matimus
> I want to ask if someone knows a better way for closing a "forever > server" or if there is a lack in my design. Generally you don't create a 'forever server'. You create an 'until I say stop' server. I would do this by looking at the 'serve_forever' method, and implementing my own 'serve_until_

Memory Management in Embedded Python

2007-01-18 Thread Huayang Xia
Hi there, I have a piece of code like this: void funct(PyObject* pyobj) { char str[128]; strncpy(str, "just a test string", sizeof(str)); PyObject* pydata = PyObject_CallMethod(pyobj, "method_x", "s", str); Py_DECREF(pydata); } After the fu

Re: Memory Management in Embedded Python

2007-01-18 Thread Martin v. Löwis
Huayang Xia schrieb: > I have a piece of code like this: > > void funct(PyObject* pyobj) > { > char str[128]; > strncpy(str, "just a test string", sizeof(str)); > PyObject* pydata = PyObject_CallMethod(pyobj, "method_x", > "s", str); > Py_DECREF(py

Re: Traversing the properties of a Class

2007-01-18 Thread Daniel Nogradi
> I'm using Python version 2.4 and I created a class with some properties > like: > > def GetCallAmount(self): > return somedata > > def GetCallCurrency(self): > return somemoredata > > moredefs..etc. > > CallAmount = property(GetCallAmount,None,None,None) > CallCurrency

Re: spidering script

2007-01-18 Thread Jonathan Curran
On Thursday 18 January 2007 11:57, David Waizer wrote: > Hello.. > > I'm looking for a script (perl, python, sh...)or program (such as wget) > that will help me get a list of ALL the links on a website. > > For example ./magicscript.pl www.yahoo.com and outputs it to a file, it > would be kind of

Re: Traversing the properties of a Class

2007-01-18 Thread Neil Cerutti
On 2007-01-18, EdG <[EMAIL PROTECTED]> wrote: > For debugging purposes, I would like to traverse the class > listing out all the properties. This is the first thing that came to mind. def show_properties(cls): for attr in dir(cls): if isinstance(getattr(cls, attr), property): print at

Re: Traversing the properties of a Class

2007-01-18 Thread EdG
Thanks. Neil Cerutti wrote: > On 2007-01-18, EdG <[EMAIL PROTECTED]> wrote: > > For debugging purposes, I would like to traverse the class > > listing out all the properties. > > This is the first thing that came to mind. > > def show_properties(cls): > for attr in dir(cls): > if isinstance(

Re: Traversing the properties of a Class

2007-01-18 Thread EdG
Thanks. Daniel Nogradi wrote: > > I'm using Python version 2.4 and I created a class with some properties > > like: > > > > def GetCallAmount(self): > > return somedata > > > > def GetCallCurrency(self): > > return somemoredata > > > > moredefs..etc. > > > > CallAmount =

Re: How can I create a linked list in Python?

2007-01-18 Thread sturlamolden
Paul Rubin wrote: > But that's what Lisp does too. Ok, I may have to reread Paul Graham's book on ANSI Common Lisp then. -- http://mail.python.org/mailman/listinfo/python-list

Re: spidering script

2007-01-18 Thread dubs
Check out the quick start section in the documentation at Beautiful Soup http://www.crummy.com/software/BeautifulSoup/ Wes Jonathan Curran wrote: > On Thursday 18 January 2007 11:57, David Waizer wrote: > > Hello.. > > > > I'm looking for a script (perl, python, sh...)or program (such as wget)

Re: Python Web Frameworks

2007-01-18 Thread Ximo Nadal
Shortash wrote: > Hi Gurus, > > I want to build a Python web app but im not sure which one to go for. I > prefer something like asp.Net , which would allow me to fully seperate > the presentation layer from the logic. Please advise? > > thanks, > > "Shortash' > Hi, Look at

Re: How to find out if another process is using a file

2007-01-18 Thread Donn Cave
In article <[EMAIL PROTECTED]>, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > "Tom Wright" <[EMAIL PROTECTED]> escribió en el mensaje > news:[EMAIL PROTECTED] > > > I'm writing a program which reads a series of data files as they are > > dumped > > into a directory by another process. At t

Re: Traversing the properties of a Class

2007-01-18 Thread Bruno Desthuilliers
EdG a écrit : > I'm using Python version 2.4 and I created a class with some properties > like: > > def GetCallAmount(self): > return somedata The recommended naming convention is all_lower,ie: def get_call_amount(self): And FWIW, there are idioms to avoid polluting the class namespace

Re: PyMeld for html templates?

2007-01-18 Thread Bruno Desthuilliers
Sean Schertell a écrit : > I'm trying to decide which template system to get married to. I think > I've narrowed it down to PyMeld, Cheetah, or Jinja but leaning heavily > toward PyMeld because I love the idea that your templates are *totally* > clean and that get manipulated from behind the

Re: How to find out if another process is using a file

2007-01-18 Thread Nick Maclaren
In article <[EMAIL PROTECTED]>, Donn Cave <[EMAIL PROTECTED]> writes: |> In article <[EMAIL PROTECTED]>, |> "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: |> > "Tom Wright" <[EMAIL PROTECTED]> escribió en el mensaje |> > news:[EMAIL PROTECTED] |> > |> > > I'm writing a program which reads a ser

Zope 3 Boot Camp and Sprint registration open

2007-01-18 Thread Chris Calloway
The Triangle (NC) Zope and Python Users Group invites you to register for Camp 5 and the BBQ Sprint: http://trizpug.org/boot-camp/camp5/ This is a Zope 3 boot camp followed by a Plone 3 sprint. The boot camp is taught by Philipp von Weitershausen, author of Web Component Development with Zope

Re: How can I create a linked list in Python?

2007-01-18 Thread Neil Cerutti
On 2007-01-18, sturlamolden <[EMAIL PROTECTED]> wrote: > > Paul Rubin wrote: > >> But that's what Lisp does too. > > Ok, I may have to reread Paul Graham's book on ANSI Common Lisp > then. Here's something silly I whipped up to play with. r""" Lisp style singly-linked lists called llist. """ d

Re: Traversing the properties of a Class

2007-01-18 Thread EdG
This works great. I have one more question. Now that I have the name of the property, how do I get it's value? I want to print '%s = %s' % (attr,theattributesvalue) Thanks. Neil Cerutti wrote: > On 2007-01-18, EdG <[EMAIL PROTECTED]> wrote: > > For debugging purposes, I would like to traverse

Re: [Python-Dev] Deletion order when leaving a scope?

2007-01-18 Thread Terry Reedy
"Paul McGuire" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | "Calvin Spealman" <[EMAIL PROTECTED]> wrote in message | news:[EMAIL PROTECTED] | > Absolutely an irrelevent side effect, especially when you take into | > consideration the 4 and counting alternative implementations of

Re: More M2Crypto issues

2007-01-18 Thread John Nagle
Upgraded to Python 2.5 on the Linux system, rebuild M2Crypto, and it stil fails, but the last line of the error message changed to: ValueError: invalid literal for long() with base 10: '_40f91a08_p_SSL_CTX' Others have encountered this problem, from a Google search. Is "long" suppose

distutils data file difficulties

2007-01-18 Thread Brian L. Troutwine
I am new to the use of distutils and am having difficulty getting distutils recognize and install data files. Here are the relevant parts of my source directory: ExampleTree/ |-- __init__.py |-- data | |-- Example1.txt | |-- Example2.txt | `-- __init__.py |-- subPackage1 | |-- (...) `-- su

Re: Traversing the properties of a Class

2007-01-18 Thread Bruno Desthuilliers
EdG a écrit : (top-post corrected) > > Neil Cerutti wrote: > >>On 2007-01-18, EdG <[EMAIL PROTECTED]> wrote: >> >>>For debugging purposes, I would like to traverse the class >>>listing out all the properties. >> >>This is the first thing that came to mind. >> >>def show_properties(cls): >> for a

Tiling and Spacefilling

2007-01-18 Thread [EMAIL PROTECTED]
[ slightly improved over Math Forum draft ] Probably a fault line or cultural divide between acutely differing schools of thought, is in this area of tiling or mosaic making. Some schools consider this a stupid waste of time, others a core topic, whereas a 3rd group stays more neutral on the issue

  1   2   >