About a month until PSF call for test trackers closes!

2006-07-05 Thread Brett Cannon
Back at the beginning of June, the Python Software Foundation's Infrastructure committee sent out an email requesting people to help us find a replacement tracker for SourceForge (the original announcement can be found at http://wiki.python.org/moin/CallForTrackers ). We asked that people put

Re: python - regex handling

2006-07-05 Thread Paolo Pantaleo
2006/7/4, bruce [EMAIL PROTECTED]: hi... does python provide regex handling similar to perl. can't find anything in the docs i've seen to indicate it does... -bruce -- http://mail.python.org/mailman/listinfo/python-list http://python.org/doc/2.4.1/lib/module-re.html Here is the

PyList_Append requires explicit Py_INCREF after?

2006-07-05 Thread [EMAIL PROTECTED]
PyList_Append requires explicit Py_INCREF after? (I didn't see in docs where it said if appends a new reference or a borrowed reference like other APIs.) thanks! Chris -- http://mail.python.org/mailman/listinfo/python-list

Re: PyList_Append requires explicit Py_INCREF after?

2006-07-05 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: PyList_Append requires explicit Py_INCREF after? (I didn't see in docs where it said if appends a new reference or a borrowed reference like other APIs.) if successful, PyList_Append(seq, item) increments the reference count for item. /F --

compressed file ended before the logical end-of-stream was detected

2006-07-05 Thread Ritesh Raj Sarraf
Hi, The program downloads the files from the internet and compresses them to a single zip archive using compress_the_file(). Upon running syncer() which calls the decompress_the_file(), the first iteration succeeds. But upon second iteration, I get an IOError exception with the message:

Re: defining multi dimensional array

2006-07-05 Thread Nick Craig-Wood
bruce [EMAIL PROTECTED] wrote: i need a multi dimensional array of lists... ie [q,a,d] [q1,a1,d1] [q2,a2,d2] [q3,a3,d3] which would be a (3,4) array... Multi-dimensional arrays aren't a built in feature of python. You can simulate them two ways 1) with a list of

Re: converting file formats to txt

2006-07-05 Thread Gaurav Agarwal
Hi All, Thanks for the advise. Am trying to play around with InfoCon, part of from Dspace project. It does file conversions. But it is written in java and uses open office plugin. Regards, Gaurav Agarwal BartlebyScrivener wrote: I suspect you will have to process those formats separately. But

Re: request for advice - possible ElementTree nexus

2006-07-05 Thread Gerard Flanagan
[EMAIL PROTECTED] wrote: Situation is this: 1) I have inherited some python code that accepts a string object, the contents of which is an XML document, and produces a data structure that represents some of the content of the XML document 2) The inherited code is somewhat 'brittle' in that

Re: defining multi dimensional array

2006-07-05 Thread Fredrik Lundh
bruce wrote: basic question.. which means that it can usually be answered by reading the tutorial, the FAQ, or by googling for python plus your subject line... how do i define a multi dimensional array a[10][10] is there a kind of a = array(10,10)

Re: List Manipulation

2006-07-05 Thread Iain King
Mike Kent wrote: Roman wrote: Thanks for your help My intention is to create matrix based on parsed csv file. So, I would like to have a list of columns (which are also lists). I have made the following changes and it still doesn't work. cnt = 0 p=[[], [], [], [], [], [],

Re: Easier way to save result of a function?

2006-07-05 Thread Ant
Thanks, that's awesome! Definitely not something I'd have ever been able to work out myself - I think I need to learn more about nested functions and introspection. I've recently found nested functions incredibly useful in many places in my code, particularly as a way of producing functions

Re: List Manipulation

2006-07-05 Thread Bruno Desthuilliers
Mike Kent wrote: (snip) p[j] does not give you a reference to an element inside p. Yes it does: a = ['a'] b = ['b'] c = ['c'] p = [a, b, c] p[0] is a True p[1] is b True p[2] is c True p[0].append('z') a ['a', 'z'] It gives you a new sublist containing one element from p. Plain

Re: use var to form name of object

2006-07-05 Thread Bruno Desthuilliers
gel wrote: gel wrote: Hi I would like to pass a variable in and use it as part of a name of an object, something like below, where I pass the variable software into the function and use it as part of the name of the object so that I can append to it using the other vairables. Any

Re: compressed file ended before the logical end-of-stream was detected

2006-07-05 Thread Marc 'BlackJack' Rintsch
In [EMAIL PROTECTED], Ritesh Raj Sarraf wrote: I have some remarks on exception handling. 1) compress_the_file() - This function takes files as an argument to it and put all of them into a zip archive def compress_the_file(zip_file_name, files_to_compress, sSourceDir): '''Condenses all

Re: Code design for a sub-class of built-ins

2006-07-05 Thread Bruno Desthuilliers
Steven D'Aprano wrote: On Tue, 04 Jul 2006 19:26:36 +0200, Bruno Desthuilliers wrote: Steven D'Aprano wrote: I'm having problems with sub-classes of built-in types. Here is a contrived example of my subclass. It isn't supposed to be practical, useful code, but it illustrates my problem.

Re: Illegal instruction or undefined symbol from import

2006-07-05 Thread Mathias Waack
Continuing my monologe;) Mathias Waack wrote: I've embedded python into a legacy application. It works - most of the time. In some special situations the app crashes executing the import random. There are two different situations: 1. the sources compiled with gcc 4.1.2 crash with illegal

Re: Illegal instruction or undefined symbol from import

2006-07-05 Thread Richard Brodie
Mathias Waack [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] BTW, does anybody know why the c-lib offers both log and log1p? So you can get a sensible answer computing log(1 + 10 ^ -30). There's a lot of somewhat obscure mathematical stuff that got into the standard C lib. How

Re: Illegal instruction or undefined symbol from import

2006-07-05 Thread Mathias Waack
Richard Brodie wrote: Mathias Waack [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] BTW, does anybody know why the c-lib offers both log and log1p? So you can get a sensible answer computing log(1 + 10 ^ -30). Ok, that make sense to me. There's a lot of somewhat obscure

Re: Illegal instruction or undefined symbol from import

2006-07-05 Thread Nick Maclaren
In article [EMAIL PROTECTED], Mathias Waack [EMAIL PROTECTED] writes: | | There's | a lot of somewhat obscure mathematical stuff that got into the standard | C lib. How often do you need Bessel functions? | | Maybe each day. What is a Bessel function?;) Some people use them all the time;

Python traverse

2006-07-05 Thread Namenick
Hello, I am completely new to Python, would u please tell me something about Python compiler traversing techniques ? or please direct me to some document if available on the net for reference ? Thanks -- http://mail.python.org/mailman/listinfo/python-list

Generating multiple lists from one list

2006-07-05 Thread Girish Sahani
hello ppl, Consider a list like ['a.1','b.3','b.4','c.2']. Here 'a','b','c' are objects and 1,3,4,2 are their instance ids and they are unique e.g. a.1 and b.1 cannot exist together. From this list i want to generate multiple lists such that each list must have one and only one instance of

Re: [Mailman-Developers] Parsing and Rendering rfc8222

2006-07-05 Thread Ian Eiloart
* Need to convert rfc8222 to xml/html I haven't found anything substantial via searching. My next step is to go spelunking in MailManager code and other python-webmail packages. If anyone knows good trees in this forest, please clue me in. Do you mean 2822? or 822? 8222 doesn't exist. Any

gettext newbie frustration

2006-07-05 Thread akbar
Hi, I try to learn gettext and python. This is the simple program #simplehello.py import locale import gettext APP = 'simplehello' DIR = 'locale' locale.setlocale(locale.LC_ALL, '') gettext.bindtextdomain(APP, DIR) gettext.textdomain(APP) _ = gettext.gettext print _('Hello World') After that I

Re: handling unicode data

2006-07-05 Thread Filipe
Martin v. Löwis wrote: Filipe wrote: term = row[1] print repr(term) output I got in Pyscripter's interpreter window: 'Fran\x87a' output I got in the command line: 'Fran\xd8a' I'd expect print to behave differently according with the console's encoding, but does this mean

RE: Illegal instruction or undefined symbol from import

2006-07-05 Thread Kerry, Richard
The only use I now for them is when you need to plot the sine of a sine. Or possibly to calculate the frequency spectrum of this. Ie x = a.sin( b.sin( y ) ) This is fundamental to Frequency Modulation. I don't know if they apply anywhere else ? Unhelpfully, Richard. -Original

Confusion with resource.setrlimit() and subprocesses

2006-07-05 Thread Mitja Trampus
I am trying to run a subprocess within given time and memory restrictions. The resource module kind of works for me, but I do not understand why and am seeking an explanation. Also, the signal module is not behaving as I'd expect it to. Demo code with questions: == import subprocess as

Re: Python traverse

2006-07-05 Thread Fredrik Lundh
Namenick wrote: Hello, I am completely new to Python, would u please tell me something about Python compiler traversing techniques ? or please direct me to some document if available on the net for reference ? compiler traversing techniques generates zero google hits, so maybe you could

Re: request for advice - possible ElementTree nexus

2006-07-05 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: c) If I want to leave the xmlns information in the string that gets fed to ElementTree.XML, and I want to remove the {whatever} from the tag before building the data structure, what is the best way to find {whatever} from the tag property...is this another case where

Re: List Manipulation

2006-07-05 Thread Gerard Flanagan
Roman wrote: Dennis Lee Bieber wrote: On 4 Jul 2006 07:01:55 -0700, Roman [EMAIL PROTECTED] declaimed the following in comp.lang.python: I would appreciate it if somebody could tell me where I went wrong in the following snipet: It would help if you gave a sample of the

RegEx conditional search and replace

2006-07-05 Thread Martin Evans
Sorry, yet another REGEX question. I've been struggling with trying to get a regular expression to do the following example in Python: Search and replace all instances of sleeping with dead. This parrot is sleeping. Really, it is sleeping. to This parrot is dead. Really, it is dead. But not

Detupleize a tuple for argument list

2006-07-05 Thread Marco Wahl
Hi, I want to give a tuple to a function where the function expects the respective tuple-size number of arguments. The following session illustrates what I want to do and the respective failure. Python 2.4.1 (#7, Aug 3 2005, 14:55:58) [GCC 3.3.1 (SuSE Linux)] on linux2 Type help,

Troubles with SQLDict

2006-07-05 Thread Rony Steelandt
I would like to use SQLDict against a MS SQL server database, but got stuck at the very beginning import pymssql import SQLDict # Connect to database c=pymssql.connect('192.168.1.13:dblisamaster:sa') db = SQLDict.SQLDict(c) class VAT(SQLDict.ObjectBuilder): table = 'TBLVat'

Re: Detupleize a tuple for argument list

2006-07-05 Thread Luke Plant
Marco Wahl wrote: Hi, I want to give a tuple to a function where the function expects the respective tuple-size number of arguments. ... One way to do what I want is--of course--to call foo(t[0], t[1]). My actual question is if there is a smarter way to do it. Yes, just this: foo(*t)

Re: Detupleize a tuple for argument list

2006-07-05 Thread Steven D'Aprano
On Wed, 05 Jul 2006 14:01:27 +0200, Marco Wahl wrote: Hi, I want to give a tuple to a function where the function expects the respective tuple-size number of arguments. The following session illustrates what I want to do and the respective failure. Python 2.4.1 (#7, Aug 3 2005,

Re: Code design for a sub-class of built-ins

2006-07-05 Thread Steven D'Aprano
On Tue, 04 Jul 2006 16:41:38 -0700, Alex Martelli wrote: As others already suggested, automating such decoration is pretty easy; you can do it with either a custom metaclass or a simple post-processing of your class in a loop. Untested details below, but the general idea would be something

Re: Python traverse

2006-07-05 Thread Stewart Aitken
Namenick wrote: Hello, I am completely new to Python, would u please tell me something about Python compiler traversing techniques ? or please direct me to some document if available on the net for reference ? compiler traversing techniques generates zero google hits, so maybe you could

Re: Code design for a sub-class of built-ins

2006-07-05 Thread Steven D'Aprano
On Wed, 05 Jul 2006 11:41:47 +0200, Bruno Desthuilliers wrote: Steven D'Aprano wrote: On Tue, 04 Jul 2006 19:26:36 +0200, Bruno Desthuilliers wrote: Steven D'Aprano wrote: I'm having problems with sub-classes of built-in types. Here is a contrived example of my subclass. It isn't supposed

Re: Detupleize a tuple for argument list

2006-07-05 Thread Marco Wahl
Marco Wahl enlightened us with: foo(t) Traceback (most recent call last): File stdin, line 1, in ? TypeError: foo() takes exactly 2 arguments (1 given) Call foo(*t) Thank you very much Luke Plant, Steven D'Aprano and Sybren Stuvel. This was exactly what I was looking for. I'm

socket buffer flush question

2006-07-05 Thread Kiran
Hello Everybody! I am writing a networking application in python for a small piece of hardware, in which there could sometimes be timeouts. I am using sockets to communicate to this device. Data that is sent to the device is instructions for that piece of hardware, and data recieved is just

Re: Nested scopes, and augmented assignment

2006-07-05 Thread Antoon Pardon
On 2006-07-04, Diez B. Roggisch [EMAIL PROTECTED] wrote: Tim N. van der Leeuw wrote: Hi, The following might be documented somewhere, but it hit me unexpectedly and I couldn't exactly find this in the manual either. Problem is, that I cannot use augmented assignment operators in a

Re: Nested scopes, and augmented assignment

2006-07-05 Thread Bruno Desthuilliers
Antoon Pardon wrote: (snip) Well no matter what explanation you give to it, and I understand how it works, I'm not sure of this. I keep finding it strange that something like k = [0] def f(i): k[0] += i f(2) works but the following doesn't k = 0 def f(i): k +=

python list/array question...

2006-07-05 Thread bruce
hi... i'm trying to deal with multi-dimension lists/arrays i'd like to define a multi-dimension string list, and then manipulate the list as i need... primarily to add lists/information to the 'list/array' and to compare the existing list information to new lists i'm not sure if i need to

Re: Detupleize a tuple for argument list

2006-07-05 Thread Bruno Desthuilliers
Marco Wahl wrote: Marco Wahl enlightened us with: foo(t) Traceback (most recent call last): File stdin, line 1, in ? TypeError: foo() takes exactly 2 arguments (1 given) Call foo(*t) Thank you very much Luke Plant, Steven D'Aprano and Sybren Stuvel. This was exactly what I was

Re: socket buffer flush question

2006-07-05 Thread Laszlo Nagy
Kiran i'rta: Hello Everybody! I am writing a networking application in python for a small piece of hardware, in which there could sometimes be timeouts. I am using sockets to communicate to this device. Data that is sent to the device is instructions for that piece of hardware, and data

Re: python function defs/declarations

2006-07-05 Thread John Salerno
bruce wrote: the docs state that the following is valid... print i = i Is this a typo or is that really in the docs? -- http://mail.python.org/mailman/listinfo/python-list

EuroPython 2006 and Py3.0

2006-07-05 Thread bearophileHUGS
From this interesting blog entry by Lawrence Oluyede: http://www.oluyede.org/blog/2006/07/05/europython-day-2/ and the Py3.0 PEPs, I think the people working on Py3.0 are doing a good job, I am not expert enough (so I don't post this on the Py3.0 mailing list), but I agree with most of the things

Re: python list/array question...

2006-07-05 Thread Bruno Desthuilliers
bruce wrote: hi... i'm trying to deal with multi-dimension lists/arrays Python has lists (which AFAIK really are arrays not linked lists, but they are called 'lists'). FWIW, this is in the fine manual. i'd like to define a multi-dimension string list, and then manipulate the list as i

Re: python function defs/declarations

2006-07-05 Thread bearophileHUGS
bruce: is there a way for me to do this.. print hello foo() def foo(): i = 2 print i = i ie, to use 'foo' prior to the declaration of 'foo' Generally no you can't, you have to define a name before using it. Why do you want to do that? Bye, bearophile --

Re: Nested scopes, and augmented assignment

2006-07-05 Thread Fredrik Lundh
Bruno Desthuilliers wrote: It's not about finding a name/identifier, it's about the difference between (re)binding a name and mutating an object. the difference between binding and performing an operation on an object (mutating or not), in fact. this is Python 101. /F --

Re: socket buffer flush question

2006-07-05 Thread Jim Segrave
In article [EMAIL PROTECTED], Kiran [EMAIL PROTECTED] wrote: Hello Everybody! I am writing a networking application in python for a small piece of hardware, in which there could sometimes be timeouts. I am using sockets to communicate to this device. Data that is sent to the device is

Re: Nested scopes, and augmented assignment

2006-07-05 Thread Antoon Pardon
On 2006-07-05, Bruno Desthuilliers [EMAIL PROTECTED] wrote: Antoon Pardon wrote: (snip) Well no matter what explanation you give to it, and I understand how it works, I'm not sure of this. Should I care about that? I keep finding it strange that something like k = [0] def f(i):

Re: Easier way to save result of a function?

2006-07-05 Thread Alex Martelli
Ant [EMAIL PROTECTED] wrote: Thanks, that's awesome! Definitely not something I'd have ever been able to work out myself - I think I need to learn more about nested functions and introspection. I've recently found nested functions incredibly useful in many places in my code,

Numeric import_array() problem - OS X 10.4

2006-07-05 Thread Paul Miller
I had some code that used to work that now doesn't. It's an embedded Python interpreter that uses numpy internally. The code calls import_array(), which now fails (and generates a ImportError: No module named _numpy error). This is on the latest OS X 10.4 release. I have Numeric installed in

Re: python list/array question...

2006-07-05 Thread Diez B. Roggisch
Sybren Stuvel wrote: Bruno Desthuilliers enlightened us with: Python has lists (which AFAIK really are arrays not linked lists, but they are called 'lists'). An array is generally understood as a list of items of the same type, hence Python lists aren't arrays. Only in the same sense as

cookielib incorrectly escapes cookie

2006-07-05 Thread BJörn Lindqvist
Hello, I have some very serious trouble getting cookes to work. After a lot of work (urllib2 is severly underdocumented, arcane and overengineerd btw) I'm finally able to accept cookes from a server. But I'm still unable to return them to a server. Specifically the script im trying to do logs on

Re: Nested scopes, and augmented assignment

2006-07-05 Thread Fredrik Lundh
Antoon Pardon wrote: Python could have chosen an approach with a nested keyword sure, and Python could also have been invented by aliens, powered by space potatoes, and been illegal to inhale in Belgium. have any of your my mental model of how Python works is more important than how it

Re: python list/array question...

2006-07-05 Thread Alex Martelli
Sybren Stuvel [EMAIL PROTECTED] wrote: Bruno Desthuilliers enlightened us with: Python has lists (which AFAIK really are arrays not linked lists, but they are called 'lists'). An array is generally understood as a list of items of the same type, hence Python lists aren't arrays. Hmmm...

Re: [Mailman-Developers] Parsing and Rendering rfc8222

2006-07-05 Thread John Dennis
On Tue, 2006-07-04 at 15:44 -0400, emf wrote: In order to provide interfaces to archives, I believe I must perform some intermediary manipulation; my goal is to get the information contained within the .mbox files mailman generates into ElementTrees and other objects so as to represent them

EnhancedObject: Yet Another Python ORM (an RFC)

2006-07-05 Thread [EMAIL PROTECTED]
I have some ideas about a ORM design, but have no time to start its development. I used SQLObject, Django's Model, and looked at SQLAlchemy and Dejavu, an readed some thread in the last year or so. Here is an example: #from EnhancedOcject.all import * from EnhancedObject.core import EObject,

Re: EnhancedObject: Yet Another Python ORM (a RFC)

2006-07-05 Thread [EMAIL PROTECTED]
Ops, sorry about my ugly english. I have some ideas about an ORM design, but have no time to start its development. I used SQLObject, Django's Model, and looked at SQLAlchemy and Dejavu, and readed some threads in the last year or so. -- http://mail.python.org/mailman/listinfo/python-list

Re: EuroPython 2006 and Py3.0

2006-07-05 Thread bearophileHUGS
Sybren Stuvel: But you can put a set in a dict... Only as values, not as keys, because sets are mutable. Bye, bearophile -- http://mail.python.org/mailman/listinfo/python-list

Re: Nested scopes, and augmented assignment

2006-07-05 Thread Piet van Oostrum
Antoon Pardon [EMAIL PROTECTED] (AP) wrote: AP On 2006-07-05, Bruno Desthuilliers [EMAIL PROTECTED] wrote: Antoon Pardon wrote: (snip) Well no matter what explanation you give to it, and I understand how it works, I'm not sure of this. AP Should I care about that? Yes, because as long

How to save an image created from multiple images?

2006-07-05 Thread Gerald Marie Nelly
Did u get the answer to that question??? To find out more about Reuters visit www.about.reuters.com Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Reuters Ltd. --

SWIG, C++, and Mac OS X

2006-07-05 Thread Siddartha Krishnan
Hi, I'm new to using python and SWIG. I am running Mac OS X 10.4. I have a C++ class which I want to access from python, however I am unable to compile it as a shared module in Mac OS X. I have tried using Distutils and have successfully created a C extension module, however I am unable to

Re: EnhancedObject: Yet Another Python ORM (an RFC)

2006-07-05 Thread fumanchu
[EMAIL PROTECTED] wrote: I have some ideas about a ORM design, but have no time to start its development. So why tell us? What are your ideas? What does your design do that the others don't? Robert Brewer System Architect Amor Ministries [EMAIL PROTECTED] --

Re: python list/array question...

2006-07-05 Thread Bruno Desthuilliers
Sybren Stuvel wrote: Bruno Desthuilliers enlightened us with: Python has lists (which AFAIK really are arrays not linked lists, but they are called 'lists'). An array is generally understood as a list of items of the same type, hence Python lists aren't arrays. A list is generally

Re: EnhancedObject: Yet Another Python ORM (an RFC)

2006-07-05 Thread Bruno Desthuilliers
[EMAIL PROTECTED] wrote: I have some ideas about a ORM design, but have no time to start its development. I used SQLObject, Django's Model, and looked at SQLAlchemy and Dejavu, an readed some thread in the last year or so. Wouldn't it be better to try and make the relationel model directly

XML-RPC server-client communication

2006-07-05 Thread Stefka
Hi all, I try to implement a python xml-rpc server and call it from a php client. If the server and the client are on the same machine (localhost) the communication between them is just fine. When I start the server on a different host I don't get an answer. What is missing there?? I tried also

Re: XML-RPC server-client communication

2006-07-05 Thread Laszlo Nagy
Stefka írta: Hi all, I try to implement a python xml-rpc server and call it from a php client. If the server and the client are on the same machine (localhost) the communication between them is just fine. When I start the server on a different host I don't get an answer. Please go to the

Very practical question

2006-07-05 Thread madpython
I've been doing an application with Tkinter widgets. Nothing really fancy just routine stuff. Though I have no problems with it by now I guess it would be reasonable to ask about a thing that's been bothering me a bit. Look at this piece of code: class A(object): def a(self): return a

Fork You.. Forking and threading..

2006-07-05 Thread rh0dium
Hi all, I have a problem with putting a job in the background. Here is my (ugly) script which I am having problems getting to background. There are threads about doing python script.py and others nohup python script.py and yet others ( python script.py /dev/null )

Re: Fork You.. Forking and threading..

2006-07-05 Thread Grant Edwards
On 2006-07-05, rh0dium [EMAIL PROTECTED] wrote: Hi all, I have a problem with putting a job in the background. Here is my (ugly) script which I am having problems getting to background. There are threads about doing python script.py and others nohup python script.py and

XML-RPC + SimpleHTTPServer question

2006-07-05 Thread jbrewer
I'm currently implementing an XML-RPC service in Python where binary data is sent to the server via URLs. However, some clients that need to access the server may not have access to a web server, and I need to find a solution. I came up with the idea of embedding a simple HTTP server in the

Re: Very practical question

2006-07-05 Thread Fredrik Lundh
madpython wrote: What is another way to get data from method of another instance of a class? Or maybe print globals()['c'].__dict__['a'].a() is perfectly normal. I'd say it's a fireable offense. /F -- http://mail.python.org/mailman/listinfo/python-list

Re: Very practical question

2006-07-05 Thread Marc 'BlackJack' Rintsch
In [EMAIL PROTECTED], madpython wrote: I've been doing an application with Tkinter widgets. Nothing really fancy just routine stuff. Though I have no problems with it by now I guess it would be reasonable to ask about a thing that's been bothering me a bit. Look at this piece of code:

Re: EuroPython 2006 and Py3.0

2006-07-05 Thread Kay Schluehr
[EMAIL PROTECTED] wrote: From this interesting blog entry by Lawrence Oluyede: http://www.oluyede.org/blog/2006/07/05/europython-day-2/ and the Py3.0 PEPs, I think the people working on Py3.0 are doing a good job, I am not expert enough (so I don't post this on the Py3.0 mailing list), but I

iterate over a series of nodes in an XML file

2006-07-05 Thread rajarshi . guha
Hi, I have an XML file which contains entries of the form: idlist myID1/myID myID2/myID myID1/myID /idlist Currently, I have written a SAX based handler that will read in all the myID/myID entries and return a list of the contents of these entries. However this is not scalable and

Re: Fork You.. Forking and threading..

2006-07-05 Thread Jon Ribbens
In article [EMAIL PROTECTED], rh0dium wrote: if os.fork() == 0: os.setsid sys.stdout = open(/dev/null, 'w') sys.stdin = open(/dev/null, 'r') I don't know if it's the cause of your problem, but you're not doing the backgrounding right, it should be: if os.fork():

Re: languages with full unicode support

2006-07-05 Thread Dale King
Tim Roberts wrote: Xah Lee [EMAIL PROTECTED] wrote: Languages with Full Unicode Support As far as i know, Java and JavaScript are languages with full, complete unicode support. That is, they allow names to be defined using unicode. (the JavaScript engine used by FireFox support this) As

Re: iterate over a series of nodes in an XML file

2006-07-05 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: Hi, I have an XML file which contains entries of the form: idlist myID1/myID myID2/myID myID1/myID /idlist Currently, I have written a SAX based handler that will read in all the myID/myID entries and return a list of the contents of these

Re: List Manipulation

2006-07-05 Thread Gerard Flanagan
Dennis Lee Bieber wrote: On 5 Jul 2006 04:37:46 -0700, Gerard Flanagan [EMAIL PROTECTED] declaimed the following in comp.lang.python: You can use a class rather than have lists of lists: Are you sure you want to introduce classes into the mix, when simple basics are still

Re: Generating multiple lists from one list

2006-07-05 Thread Pierre Quentel
# first step : build a dictionary mapping the objects # to all possible ids alist = ['a.1','b.3','b.4','c.2','c.6','d.3'] elts = {} for item in alist: obj=item.split('.')[0] if elts.has_key(obj): elts[obj].append(item) else: elts[obj] = [item] # then build the Python

Re: EuroPython 2006 and Py3.0

2006-07-05 Thread bearophileHUGS
Kay Schluehr: there is nothing really new or interesting or challenging. Micro-optimizations and shape lifting. I see. Maybe Python is becoming a commodity used by more than 10e6 persons, so changellenges aren't much fit anymore. Guido has tried to avoid the problems of Perl6, making Py3.0 a

Re: XML-RPC + SimpleHTTPServer question

2006-07-05 Thread Fredrik Lundh
jbrewer wrote: I'm currently implementing an XML-RPC service in Python where binary data is sent to the server via URLs. However, some clients that need to access the server may not have access to a web server, and I need to find a solution. I came up with the idea of embedding a simple

Re: Fork You.. Forking and threading..

2006-07-05 Thread Nick Craig-Wood
rh0dium [EMAIL PROTECTED] wrote: I have a problem with putting a job in the background. Here is my (ugly) script which I am having problems getting to background. There are threads about doing python script.py and others nohup python script.py and yet others

Re: Very practical question

2006-07-05 Thread Bruno Desthuilliers
madpython a écrit : I've been doing an application with Tkinter widgets. Nothing really fancy just routine stuff. Though I have no problems with it by now I guess it would be reasonable to ask about a thing that's been bothering me a bit. Look at this piece of code: class A(object):

Re: RegEx conditional search and replace

2006-07-05 Thread Juho Schultz
Martin Evans wrote: Sorry, yet another REGEX question. I've been struggling with trying to get a regular expression to do the following example in Python: Search and replace all instances of sleeping with dead. This parrot is sleeping. Really, it is sleeping. to This parrot is dead.

Re: handling unicode data

2006-07-05 Thread Martin v. Löwis
Filipe wrote: They do, in fact, output different values. The value outputed by pyscripter was 135 (x87) while the value outputed in the command line was 216 (xd8). I can't understand why though, because the script being run is precisely the same on both environments. That's indeed surprising,

Re: XML-RPC server-client communication

2006-07-05 Thread Stefka
Hi, thanx for the hint :)! I ran a port scan and it turned out, that the port was realy closed. Thanx again! greetz, Stefka Laszlo Nagy wrote: Please go to the machine where you php program resides, and check if the server is not blocked by firewall rules. For example, do telnet

Re: XML-RPC + SimpleHTTPServer question

2006-07-05 Thread jbrewer
Fredrik Lundh wrote: why not just use an ordinary HTTP POST request ? Sorry for such a simple question, but how would I do this? XML-RPC runs on top of HTTP, so can I do a POST without running a separate HTTP server? Jeremy -- http://mail.python.org/mailman/listinfo/python-list

Re: XML-RPC + SimpleHTTPServer question

2006-07-05 Thread Fredrik Lundh
jbrewer wrote: Sorry for such a simple question, but how would I do this? XML-RPC runs on top of HTTP, so can I do a POST without running a separate HTTP server? the XML-RPC protocol uses HTTP POST, so if you can handle XML-RPC, you should be able to handle any POST request. what server

Re: EnhancedObject: Yet Another Python ORM (an RFC)

2006-07-05 Thread [EMAIL PROTECTED]
So why tell us? What are your ideas? What does your design do that the others don't? Basically, the API I exemplificated in the first exemple. My initial idea was to have a way of turn alread designed objects into persistent ones. This is not the goal of SQLObject, for example. Other litle

Re: XML-RPC + SimpleHTTPServer question

2006-07-05 Thread jbrewer
What server are you using? Just SimpleXMLRPCServer from the standard library. -- http://mail.python.org/mailman/listinfo/python-list

Re: iterate over a series of nodes in an XML file

2006-07-05 Thread Stefan Behnel
[EMAIL PROTECTED] wrote: I have an XML file which contains entries of the form: idlist myID1/myID myID2/myID myID1/myID /idlist Currently, I have written a SAX based handler that will read in all the myID/myID entries and return a list of the contents of these entries.

Re: XML-RPC + SimpleHTTPServer question

2006-07-05 Thread Fredrik Lundh
jbrewer wrote: Just SimpleXMLRPCServer from the standard library. which means that you should be able to do something like from SimpleXMLRPCServer import SimpleXMLRPCServer,\ SimpleXMLRPCRequestHandler class MyRequestHandler(SimpleXMLRPCRequestHandler): def do_POST(self):

Re: iterate over a series of nodes in an XML file

2006-07-05 Thread rajarshi . guha
Stefan Behnel wrote: [EMAIL PROTECTED] wrote: I have an XML file which contains entries of the form: idlist myID1/myID myID2/myID myID1/myID /idlist Thanks to everybody for the pointers. ElementTree is what I ended up using and my looks like this (based on the

Re: Very practical question

2006-07-05 Thread madpython
Marc 'BlackJack' Rintsch wrote: In [EMAIL PROTECTED], madpython wrote: No it's not the normal way. Why don't you give `c` as argument to the `interClassCall()`? class B(object): def interClassCall(self, c): print c.a.a() class C(object): def __init__(self):

Re: XML-RPC + SimpleHTTPServer question

2006-07-05 Thread jbrewer
Fredrik Lundh wrote: the XML-RPC protocol uses HTTP POST, so if you can handle XML-RPC, you should be able to handle any POST request. what server are you using ? I need some clarification of your suggestion. Instead of sending URLs, I could read the file as a string, create a Binary object,

Module for creating a screenshot of a web page given a URL?

2006-07-05 Thread dananrg
Is there a Python module that, given a URL, will grab a screenshot of the web page it goes to? I'd like to be able to feed such a module a list of URLs from a file. Thanks very much. -- http://mail.python.org/mailman/listinfo/python-list

cas in python

2006-07-05 Thread ondrej . certik
Hello, from time to time, people here are asking about the computer algebra system (cas) in python. I wonder, is there a demand for such a thing? I would be interested in functionality of at least ginac, but something, which could easily be extended. Ginac (pyginac or swiginac) are fine, but it

  1   2   >