Re: dependency algorithm

2007-11-14 Thread Robert Kern
Tom Jones wrote: > Hi, > > Consider tuples of the above numbers in the form: >(a,b) > > Suppose this relation means: >a depends on b > > Given a list of tuples, I would like an algorithm to return the proper > ordering of the elements...and if the ordering has a loop (which in this > c

os.system() not returning

2007-11-14 Thread Yang
I have a Python program that does the following (pseudo-code): while True: is_downloading = True use ftplib to download any new files from a server is_downloading = False os.system('make') sleep(60) To deal with intermittent connectivity/failures (this is running on a mobile device), /e

Embedded Python - Blocking Python Function

2007-11-14 Thread andy
I embed multiple interpreters. I create the interpreter and modules in the primary thread of my application: PyEval_AcquireLock(); thread = Py_NewInterpreter(); PyThreadState_Swap(thread); ...initialize modules, etc PyThreadState_Swap(maininterpreter); PyEval_ReleaseLock(); Then I create a

Re: cross-platform c questions

2007-11-14 Thread Martin v. Löwis
> Is there any rules/criteria to decide when to use Py_ssize_t, int, or > long? I've seen them somewhat mixed and don't know when exactly to use > Py_ssize_t. You should use Py_ssize_t when you are counting things, and when there is no small limit (e.g. 66536) to the maximum number of things you c

Re: How to use the evaluate the code object returned by PyParser_Simp leParseString function?

2007-11-14 Thread Gabriel Genellina
En Wed, 14 Nov 2007 06:48:41 -0300, Borse, Ganesh <[EMAIL PROTECTED]> escribió: > `struct _node* PyParser_SimpleParseString(char *str, int start)' > Parse Python source code from STR using the start token START. The > result can be used to create a code object which can be evaluated > e

Re: dependency algorithm

2007-11-14 Thread Henry
Hi - You want to linearise a dependency graph. The standard way to do this is to do a depth first search on the graph and output the nodes in reverse order of their finishing times (although your example looks like you want them in the reverse order, that is starting with the node on which nothing

Unicode: matching a

2007-11-14 Thread Jeremie Le Hen
Hi list, (Please Cc: me when replying, as I'm not subscribed to this list.) I'm working with Unicode strings to handle accented characters but I'm experiencing a few problem. The first one is with regular expression. If I want to match a word composed of characters only. One can easily use '[a

Unicode: matching a word and unaccenting characters

2007-11-14 Thread Jeremie Le Hen
(Mail resent with the proper subject. Hi list, (Please Cc: me when replying, as I'm not subscribed to this list.) I'm working with Unicode strings to handle accented characters but I'm experiencing a few problem. The first one is with regular expression. If I want to match a word composed of c

Re: webbrowser

2007-11-14 Thread Antonio Ceballos
Dennis, Cameron, You are absolutely right. I was not aware that the cgi was trying to open the new browser on the server -I am a beginner with cgi, python and javascript. This simple javascript does the job perfectly: window.open("http://www.google.com";); Thanks a lot, Antonio "Antonio Ceb

Re: making a typing speed tester

2007-11-14 Thread Gabriel Genellina
En Wed, 14 Nov 2007 14:56:25 -0300, <[EMAIL PROTECTED]> escribió: >> I'm trying to write a program to test someones typing speed and show >> them their mistakes. However I'm getting weird results when looking >> for the differences in longer (than 100 chars) strings: >> >> import difflib >> >> # a

Re: cross-platform c questions

2007-11-14 Thread Gabriel Genellina
En Wed, 14 Nov 2007 20:49:35 -0300, Martin v. Löwis <[EMAIL PROTECTED]> escribió: >> Is there any rules/criteria to decide when to use Py_ssize_t, int, or >> long? I've seen them somewhat mixed and don't know when exactly to use >> Py_ssize_t. > > You should use Py_ssize_t when you are counting

problem calling ElementTree._ElementInterface.find with PyObject_CallObject

2007-11-14 Thread sndive
I have a weid problem. If i do this: import elementtree.ElementTree as ET ... tree = ET.parse("whatever") root = tree.getroot() r = root.find('last') print r return root where last is not an immediate child of root node i get back None. However if i comment the r = root.find('la

Re: Unicode: matching a word and unaccenting characters

2007-11-14 Thread Gabriel Genellina
En Wed, 14 Nov 2007 21:21:55 -0300, Jeremie Le Hen <[EMAIL PROTECTED]> escribió: > (Please Cc: me when replying, as I'm not subscribed to this list.) Not a good thing. *I* may CC you now, but any further replies and comments from other people may leave the CC out. You can always browse this

Re: Unicode: matching a word and unaccenting characters

2007-11-14 Thread rndblnch
On Nov 15, 1:21 am, Jeremie Le Hen <[EMAIL PROTECTED]> wrote: > (Mail resent with the proper subject. > > Hi list, > > (Please Cc: me when replying, as I'm not subscribed to this list.) Don't know your mail, hope you will come back to look at the list archive... > I'm working with Unicode strings

Re: pyopenglcontext binaries for 2.5 on win32

2007-11-14 Thread kyosohma
On Nov 13, 12:03 am, gz <[EMAIL PROTECTED]> wrote: > no, I don't have them... I need them :) > > I'd like to thank Giovanni Bajo for providing binaries for the various > package dependencies, and geting me going with pyopengl. > > Unfortunately I only menaged to run a basic example, where there's n

Re: SPAM

2007-11-14 Thread Arne Vajhøj
Lew wrote: > Yes, but it's not SPAM. > > SPAM is a registered trademark of Hormel Foods Corporation for a canned > pork product. > > Spam is unwanted messages or email. It should be rather obvious what is was. Why not leave it to Hormel to complain ? Arne -- http://mail.python.org/mailman/li

RE: How to evaluate the code object returned by PyParser_SimplePa rseString function?

2007-11-14 Thread Borse, Ganesh
Hi, Thanks for this information. I would like to know few more things. Py_CompileString takes the source code from file, isn't it? As can be seen from the syntax of this function: PyObject* Py_CompileString(char *str, char *filename, int start) I want to parse the code which is in memory - loa

Magic class member variable initialization with lists

2007-11-14 Thread neoone
Hi, I reported a bug to the bugtracker (issue 1443), but it was rejected with the comment: "Go ask on c.l.py why this is not a bug" After decrypting c.l.py to the name of this group, I'll do as I was told so nicely, because I really think it is a misconcept, and cost me two days because I couldn'

no __len__ attribute in NodeList or the list base?

2007-11-14 Thread sndive
i extract class object from an instance of NodeList (minicompat.py) like so PyObject *pclass = PyObject_GetAttrString( nodelistinsance, "__class__"); but PyObject_GetAttrString(pclass, "__len__") returns NULL. i naively added __len__ = _get_length to NodeList but that ends up in endless r

Re: Magic class member variable initialization with lists

2007-11-14 Thread marek . rocki
This is the expected behaviour. The reference on classes (http:// docs.python.org/ref/class.html) says: > Variables defined in the class definition are class variables; > they are shared by all instances. To define instance variables, > they must be given a value in the __init__() method or in > a

Re: SPAM

2007-11-14 Thread Ben Finney
Arne Vajhøj <[EMAIL PROTECTED]> writes: > Lew wrote: > > SPAM is a registered trademark of Hormel Foods Corporation for a > > canned pork product. > > > > Spam is unwanted messages or email. > > Why not leave it to Hormel to complain ? Because it's better to deal with incorrect terminology at a s

Re: How to evaluate the code object returned by PyParser_SimplePa rseString function?

2007-11-14 Thread Gabriel Genellina
En Wed, 14 Nov 2007 23:20:14 -0300, Borse, Ganesh <[EMAIL PROTECTED]> escribió: > Py_CompileString takes the source code from file, isn't it? > As can be seen from the syntax of this function: PyObject* > Py_CompileString(char *str, char *filename, int start) > > I want to parse the code which

Seeking Python Developer

2007-11-14 Thread sbix
Hi, I work for an IT company in Phoenix, AZ and am trying to find an experienced python developer in the area. Can anyone help? -- http://mail.python.org/mailman/listinfo/python-list

computer language python

2007-11-14 Thread balu
computer language python http://www.bidvertiser.com http://bigchurch.com/go/g906803-pmem http://indianfriendfinder.com/go/g906803-pmem -- http://mail.python.org/mailman/listinfo/python-list

<    1   2