Re: Question about extending the interperter

2005-05-10 Thread Eli
Thanks for the answer; I should better explain my problem. My organization already has a DOS command line tool which I would like to transffer to Python. Every function this DOS command line too can execute has a definition entry in an array: {"function name", function address, other info... }, W

Re: sync dir's

2005-05-10 Thread Fredrik Lundh
Timothy Smith wrote: > what would be the best tool to use to sync my local dir with a remote > one, say off a http resorce (although i'm open to other options there) i rsync? wget --mirror? -- http://mail.python.org/mailman/listinfo/python-list

Re: M2Crypto SSL memory leaks - fixes or alternatives ??

2005-05-10 Thread Roger Binns
> I notice that M2Crypto (a python wrap of OpenSSL) leaks (haemorrhages) > memory significantly and affects my long running app very badly. > > Does anyone know of fixes to this problem? > > Does anyone recommmend alternatives to M2C ? e.g pyopenssl. If you control both ends of the connection then

Re: sync dir's

2005-05-10 Thread Timothy Smith
Fredrik Lundh wrote: >Timothy Smith wrote: > > > >>what would be the best tool to use to sync my local dir with a remote >>one, say off a http resorce (although i'm open to other options there) i >> >> > >rsync? wget --mirror? > > > > > > > i need something which has a python library, so

Re: Unique Elements in a List

2005-05-10 Thread Fredrik Lundh
Paul Rubin wrote: > > Is there an easy way to grab the Unique elements from a list? > > For Example: > > data = [0.1,0.5,0.6,0.4,0.1,0.5,0.6,0.9] > > Untested: here's an iterator that gives you the index and value, > without reordering. Uses dicts instead of sets for backwards compatibility. > >

Re: Exception in Python 2.3.3 Interpreter

2005-05-10 Thread Saravanan D
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > "Saravanan D" wrote: > > > > > 03 023ffaa4 1e013182 055b1250 00637470 python23!cmp_outcome(int > > op > > > > = 88026108, struct _object * v = 0x0001, struct _object * w = > > > > 0x)+0xa9 [F:\Python

Re: Unique Elements in a List

2005-05-10 Thread Edvard Majakari
James Stroud <[EMAIL PROTECTED]> writes: > from sets import Set > > data = [0.1,0.5,0.6,0.4,0.1,0.5,0.6,0.9] > > [x for x in Set(data) if data.count(x) == 1] Um. ...I must have missed something, but I'll post nevertheless: wouldn't just [x for x in data if data.count(x) == 1] suffice? it is a

Re: Unique Elements in a List

2005-05-10 Thread Max M
Fredrik Lundh wrote: > depending on the data, it might be more efficient to store the > "last seen index" in a dictionary, and sort the result on the way > out (if necessary). something like form sets import Set data = list(Set([0.1,0.5,0.6,0.4,0.1,0.5,0.6,0.9])) -- hilsen/regards Max M, D

Re: Trouble saving unicode text to file

2005-05-10 Thread Thomas Bellman
John Machin <[EMAIL PROTECTED]> writes: > Which raises a question: who or what is going to read your file? If a > Unicode-aware application, and never a human, you might like to > consider encoding the text as utf-16. Why would one want to use an encoding that is neither semi-compatible with ASCI

extra a column from a 2-D array?

2005-05-10 Thread Joe Wong
Hello,    Suppose I have a python array as follow:       s=[ [1,3,5],   [2,4,6],       [9,8,7]]   what is the quickest way to extract the second colum from all rows? That is: [3,4,8] in this example.   Best regards,   - Joe No virus found in this outgoing message. Checked by AVG A

Re: extra a column from a 2-D array?

2005-05-10 Thread Robert Kern
Joe Wong wrote: > Hello, > > Suppose I have a python array as follow: > > s=[ [1,3,5], > [2,4,6], > [9,8,7]] > > what is the quickest way to extract the second colum from all rows? That > is: [3,4,8] in this example. Use Numeric. http://numeric.scipy.org from Numer

Re: Unique Elements in a List

2005-05-10 Thread Edvard Majakari
"Michael J. Fromberger" <[EMAIL PROTECTED]> writes: > One reasonable solution might be as follows: > > def unique_elts(seq): > elts = {} > for pos, elt in enumerate(seq): > elts.setdefault(elt, []).append(pos) > > return [ (x, p[0]) for (x, p) in elts.iteritems() >

Re: Strip white spaces from source

2005-05-10 Thread Richie Hindle
[qwweeeit] > If someone is interested (I think nobody...) I can give my solution. I'd be interested to see it, certainly. It's always a good idea to post your solution, if only for future reference. It's frustrating to do a Google Groups search for a problem and find that someone else has solved

Does TKinter Have A Grid ?

2005-05-10 Thread Peter Moscatt
Does TKinter have a Grid widget ? If not (as I assume), what is the alternative ? Pete -- http://mail.python.org/mailman/listinfo/python-list

Re: Advice needed on __del__

2005-05-10 Thread stasz
On Mon, 09 May 2005 22:49:06 -0300, André Roberge wrote: > Scott David Daniels wrote: >> André Roberge wrote: >> >>>... Each time I refresh the screen, I could >>>force that call, then check to see if Evil has been >>>destroyed by Python, which would give me the information >>>I need to destroy

Re: sync dir's

2005-05-10 Thread Gerhard Haering
On Tue, May 10, 2005 at 05:21:30PM +1000, Timothy Smith wrote: > i need something which has a python library, so far i haven't seen > anything like that for rsync. i'll check out the others but http://osx.freshmeat.net/projects/pysync/ """ Pysync has both a demonstration implementation o

Re: Does TKinter Have A Grid ?

2005-05-10 Thread Martin Franklin
Peter Moscatt wrote: > Does TKinter have a Grid widget ? > If not (as I assume), what is the alternative ? > > Pete > Pete, If by grid you mean Table widget or Spreadsheet type widget then no Tk does not have one (therefore nor does Tkinter) However as luck would have it there are a couple of

Re: Does TKinter Have A Grid ?

2005-05-10 Thread Harlin Seritt
Not a grid widget necessarilly but a 'grid' method you can use instead of pack(). Take a look at http://www.pythonware.com/library/tkinter/introduction/grid.htm. If this isn't what you mean, come back. Harlin Seritt -- http://mail.python.org/mailman/listinfo/python-list

Re: pyvm -- faster python

2005-05-10 Thread Stelios Xanthakis
Kay Schluehr wrote: > > could You tell us a bit more about Your motivation to create an > alternative C-Python interpreter? There is AFAIK no such ambitious > project that has ever survived. The last one I remember died shortly > after it was born: > The motivation is that I just needed some byt

Re: pyvm -- faster python

2005-05-10 Thread Stelios Xanthakis
[EMAIL PROTECTED] wrote: > This project is probably a LOT of work; maybe people can tell us about > such efforts *before* doing so much work, so we can discuss it, and > avoid wasting time. > It is a lot of work indeed. Usually, when people announce "we shall create X", it doesn't happen. And yo

Re: pyvm -- faster python

2005-05-10 Thread Stelios Xanthakis
Roger Binns wrote: >>could You tell us a bit more about Your motivation to create an >>alternative C-Python interpreter? > > > I'd also be curious to know if the performance gains would remain > once it gets fleshed out with things like closures, long numbers, > new style classes and a C library

Module on Getting the Date & Time

2005-05-10 Thread Sara Khalatbari
Is there a Modules in Python that returns the time & date of today when ran? __ Do you Yahoo!? Yahoo! Mail - You care about security. So do we. http://promotions.yahoo.com/new_mail -- http://mail.python.org/mailman/listinfo/pytho

Re: [ANN] new version of rur-ple (0.8.5)

2005-05-10 Thread Marco Aschwanden
On Tue, 10 May 2005 00:49:40 -0300, André Roberge <[EMAIL PROTECTED]> wrote: > Learning to program computer should be fun, for adults and children > alike. RUR-PLE is an environment designed to help you learn computer > programming using the language Python. To use RUR-PLE, you need > wxPython.

A Module on Time & Date

2005-05-10 Thread Sara Khalatbari
Is there a Module in Python that gives you the time & date of today??? __ Do you Yahoo!? Make Yahoo! your home page http://www.yahoo.com/r/hs -- http://mail.python.org/mailman/listinfo/python-list

Re: A Module on Time & Date

2005-05-10 Thread Michele Simionato
You should read the documentation and this: http://www.catb.org/~esr/faqs/smart-questions.html Michele Simionato -- http://mail.python.org/mailman/listinfo/python-list

Re: A Module on Time & Date

2005-05-10 Thread John Abel
Sara Khalatbari wrote: >Is there a Module in Python that gives you the time & >date of today??? > > > > >__ >Do you Yahoo!? >Make Yahoo! your home page >http://www.yahoo.com/r/hs > > time - http://docs.python.org/lib/module-time.html datetime - h

Re: Unique Elements in a List

2005-05-10 Thread Fredrik Lundh
Max M wrote: >> depending on the data, it might be more efficient to store the >> "last seen index" in a dictionary, and sort the result on the way >> out (if necessary). something like > > form sets import Set > > data = list(Set([0.1,0.5,0.6,0.4,0.1,0.5,0.6,0.9])) read the OP's spec again.

why this happend using model random?

2005-05-10 Thread flyaflya
from random import * col = [0 for i in range(10)] a = [col for i in range(10)] seed() for i in range(10): for j in range(10): a[i][j] = randint(0, 100) print a the result is: [[78, 65, 35, 5, 68, 60, 1, 51, 81, 70], [78, 65, 35, 5, 68, 60, 1, 51, 81, 70], [78, 65, 35, 5, 68, 60,

Re: Unique Elements in a List

2005-05-10 Thread Bengt Richter
On 9 May 2005 15:36:37 -0700, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: >OK I need to be more clear I guess!Unique Elements I mean, elements >that are non repeating. so in the above list 0.4, 0.9 are unique as >they exist only once in the list. > You want to be careful of your definitions, es

Re: why this happend using model random?

2005-05-10 Thread Fredrik Lundh
"flyaflya" wrote: > from random import * > > col = [0 for i in range(10)] > a = [col for i in range(10)] http://www.python.org/doc/faq/programming.html#how-do-i-create-a-multidimensional-list > seed() > for i in range(10): > for j in range(10): > a[i][j] = randint(0, 100) > print

Re: why this happend using model random?

2005-05-10 Thread Robert Kern
flyaflya wrote: > from random import * > > col = [0 for i in range(10)] > a = [col for i in range(10)] This is the problem. The list "a" now has ten references to the same object "col". They are not copied. > seed() > for i in range(10): > for j in range(10): > a[i][j] = randin

Re: A Module on Time & Date

2005-05-10 Thread Sakesun Roykiattisak
import datetime print datetime.datetime.now() Sara Khalatbari wrote: >Is there a Module in Python that gives you the time & >date of today??? > > > > >__ >Do you Yahoo!? >Make Yahoo! your home page >http://www.yahoo.com/r/hs > > -- http://mail

Re: Advice needed on __del__

2005-05-10 Thread André Roberge
stasz wrote: > On Mon, 09 May 2005 22:49:06 -0300, André Roberge wrote: > > >>Scott David Daniels wrote: >> >>>André Roberge wrote: >>> >>> ... Each time I refresh the screen, I could force that call, then check to see if Evil has been destroyed by Python, which would give me the inf

Re: sync dir's

2005-05-10 Thread Timothy Smith
Gerhard Haering wrote: >On Tue, May 10, 2005 at 05:21:30PM +1000, Timothy Smith wrote: > > >>i need something which has a python library, so far i haven't seen >>anything like that for rsync. i'll check out the others but >> >> > >http://osx.freshmeat.net/projects/pysync/ > >""" >Py

Re: sync dir's

2005-05-10 Thread Steve Holden
Timothy Smith wrote: > what would be the best tool to use to sync my local dir with a remote > one, say off a http resorce (although i'm open to other options there) i > haven't gotten any feed back on my problems with loading pysvn on win98, > and i can apprechiate if the dev's are too busy/can

Re: extra a column from a 2-D array?

2005-05-10 Thread Uwe Lauth
Joe Wong wrote: (original posting not on my nntp server) >>Hello, >> >> Suppose I have a python array as follow: >> >>s=[ [1,3,5], >>[2,4,6], >>[9,8,7]] >> >>what is the quickest way to extract the second colum from all rows? That >>is: [3,4,8] in this example. [a[1] for a

Re: Module on Getting the Date & Time

2005-05-10 Thread Simon Brunning
On 5/10/05, Sara Khalatbari <[EMAIL PROTECTED]> wrote: > Is there a Modules in Python that returns the time & > date of today when ran? http://www.google.com/search?q=python+time+date -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mail

Re: sync dir's

2005-05-10 Thread Steve Holden
Timothy Smith wrote: > Steve Holden wrote: > >> Timothy Smith wrote: >> >> >>> what would be the best tool to use to sync my local dir with a remote >>> one, say off a http resorce (although i'm open to other options >>> there) i haven't gotten any feed back on my problems with loading >>> py

Re: Does TKinter Have A Grid ?

2005-05-10 Thread Peter Moscatt
Mardy. that's exactly what I was chasing. I have downloaded the tarball now it's just a matter of working out how I use Tcl with Python - and I guess it won't hurt if I also use Tk in there as well Pete On Tue, 10 May 2005 10:11:59 +0100, Martin Franklin wrote: > Peter Moscatt wrote:

Re: Re: extra a column from a 2-D array?

2005-05-10 Thread Whoami
Uwe Lauth,您好! Very good! === 2005-05-10 18:57:38 您在来信中写道:=== >Joe Wong wrote: >(original posting not on my nntp server) >>>Hello, >>> >>> Suppose I have a python array as follow: >>> >>>s=[ [1,3,5], >>>[2,4,6], >>>[9,8,7]] >>> >>>what is the quickest way t

Re: sync dir's

2005-05-10 Thread Steve Holden
Timothy Smith wrote: > Steve Holden wrote: > >> Timothy Smith wrote: >> >>> Steve Holden wrote: >>> Timothy Smith wrote: > what would be the best tool to use to sync my local dir with a > remote one, say off a http resorce (although i'm open to other > options there)

Re: Module on Getting the Date & Time

2005-05-10 Thread Whoami
Simon Brunning,您好! >>> import time >>> current = time.time() >>> time.localtime(current) (2005, 5, 10, 19, 28, 14, 1, 130, 0) >>> time.ctime(current) 'Tue May 10 19:28:14 2005' === 2005-05-10 19:09:42 您在来信中写道:=== >On 5/10/05, Sara Khalatbari <[EMAIL PROTECTED]> wrote: >> Is there a Modu

Regarding Mail sending Module

2005-05-10 Thread praba kar
Dear All, In Php we can do all the mailing operations like sending a text as a message, adding attachment to a mail, adding additional headers and so on using Mail_mime class. I want to know like that class or modules in Python. I already gone through MimeWriter,smtplib and so on. But I

Re: why this happend using model random?

2005-05-10 Thread flyaflya
Robert Kern wrote: > flyaflya wrote: > >> from random import * >> >> col = [0 for i in range(10)] >> a = [col for i in range(10)] > > > This is the problem. The list "a" now has ten references to the same > object "col". They are not copied. > >> seed() >> for i in range(10): >> for j i

Re: Unique Elements in a List

2005-05-10 Thread Max M
Fredrik Lundh wrote: > Max M wrote: > > >>>depending on the data, it might be more efficient to store the >>>"last seen index" in a dictionary, and sort the result on the way >>>out (if necessary). something like >> >>form sets import Set >> >>data = list(Set([0.1,0.5,0.6,0.4,0.1,0.5,0.6,0.9]))

Re: why this happend using model random?

2005-05-10 Thread Robert Kern
flyaflya wrote: > Robert Kern wrote: > >>flyaflya wrote: >> >> >>>from random import * >>> >>>col = [0 for i in range(10)] >>>a = [col for i in range(10)] >> >> >>This is the problem. The list "a" now has ten references to the same >>object "col". They are not copied. >> >> >>>seed() >>>for i i

Re: Regarding Mail sending Module

2005-05-10 Thread Max M
praba kar wrote: > Dear All, > In Php we can do all the mailing operations like > sending a text as a message, adding attachment to a > mail, adding additional headers and so on using > Mail_mime class. I want to know like that class or > modules in Python. >I already gone through MimeW

Re: Coding comments/suggestions - first python script - sshd/ftpd blocking

2005-05-10 Thread bruno modulix
[EMAIL PROTECTED] wrote: > If anyone is interested in a /etc/hosts.deny automatic update script > (Unix only) based on sshd/vsftpd attacks, here's a python script: > http://www.aczoom.com/tools/blockhosts/ > > This is a beta release, and my first attempt at Python coding. > Any comments, suggestio

Re: Language documentation ( was Re: Computing Industry shams)

2005-05-10 Thread alex goldman
Sean Burke wrote: > > alex goldman <[EMAIL PROTECTED]> writes: > >> vermicule wrote: >> >> > >> > What is so hard to understand ? >> > Should be perfectly clear even to a first year undergraduate. >> > >> > As for "greedy" even a minimal exposure to Djikstra's shortest path >> > algorithm wou

Re: sync dir's

2005-05-10 Thread Peter Hansen
Timothy Smith wrote: > Gerhard Haering wrote: >> http://osx.freshmeat.net/projects/pysync/ >> > pysync hasn't been worked on in years by the looks of it. no new > releases since 03. and the last release was for 2.1, so i'm dubious > about it working at all? the windows installer doesn't work eith

The first programming riddle on the net. Python-challenge

2005-05-10 Thread Sara Khalatbari
Hey guys! Thanks for helping me find time&date. Have you seen this? This is the first programming riddle on the net with 20 levels! http://www.pythonchallenge.com/ __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around

Re: Advice needed on __del__

2005-05-10 Thread flupke
phil wrote: > A class instance based language doesn't have to BE C++ to have a > destructor method. > > All I wanted to know is: is the apparent treatment of __del__ > which SEEMS to work fine for me in 2.3.4 deprecated or mangled > in some later release or future plans. > If someone doesn't kno

Re: Advice needed on __del__

2005-05-10 Thread Brian Quinlan
phil wrote: > I'm probably dense and don't quite get the point, even though I > have coded about 200,000 lines of Python and coded .5 million lines of > C before there was a C++ > > A class instance based language doesn't have to BE C++ to have a > destructor method. Very true. But meaningful fin

Merging overlapping spans/ranges

2005-05-10 Thread Max M
I am writing a "find-free-time" function for a calendar. There are a lot of time spans with start end times, some overlapping, some not. To find the free time spans, I first need to convert the events into a list of non overlapping time spans "meta-spans". This nice ascii graph should show what

Re: The first programming riddle on the net. Python-challenge

2005-05-10 Thread Peter Hansen
Sara Khalatbari wrote: > Hey guys! > Thanks for helping me find time&date. > > Have you seen this? > This is the first programming riddle on the net with > 20 levels! > > http://www.pythonchallenge.com/ Yes, there's been "a bit" of discussion since this was announced a week or two ago: http:/

Re: pyvm -- faster python

2005-05-10 Thread François Pinard
[Stelios Xanthakis] > I'm afraid this may end up dead before unborn too. So it depends what > people want. If nobody cares, [...] People might not care so much about what could be done about your project, unless you give them proper and complete means for evaluating the state of affairs. Your p

Re: Re: Module on Getting the Date & Time

2005-05-10 Thread Whoami
Simon Brunning,您好! >>> import time >>> current = time.time() >>> time.localtime(current) (2005, 5, 10, 19, 28, 14, 1, 130, 0) >>> time.ctime(current) 'Tue May 10 19:28:14 2005' === 2005-05-10 19:09:42 您在来信中写道:=== >On 5/10/05, Sara Khalatbari <[EMAIL PROTECTED]> wrote: >> Is there a Modu

Re: Regarding Mail sending Module

2005-05-10 Thread Larry Bates
There is a great class for doing just this at: http://motion.technolust.cx/related/send_jpg.py I've used it many times and it has worked very well. -Larry Bates praba kar wrote: > Dear All, > In Php we can do all the mailing operations like > sending a text as a message, adding attachmen

Re: Language documentation ( was Re: Computing Industry shams)

2005-05-10 Thread Lawrence Kirby
On Tue, 10 May 2005 04:58:48 -0700, alex goldman wrote: > Sean Burke wrote: ... >> No, you're just confused about the optimization metric. >> In regexes, "greedy" match optimizes for the longest match, >> not the fastest. >> >> And this is common regex terminology - man perlre and you will >> f

Announce: Python for .NET 1.0 RC1 released

2005-05-10 Thread Brian Lloyd
Hi all - I'm happy to announce the release of Python for .NET 1.0 RC1. You can download it from: http://www.zope.org/Members/Brian/PythonNet Highlights of this release: - Implemented a workaround for the fact that exceptions cannot be new-style classes in the CPython interpreter. Ma

Re: Language documentation ( was Re: Computing Industry shams)

2005-05-10 Thread alex goldman
Lawrence Kirby wrote: > On Tue, 10 May 2005 04:58:48 -0700, alex goldman wrote: > >> Sean Burke wrote: > > ... > >>> No, you're just confused about the optimization metric. >>> In regexes, "greedy" match optimizes for the longest match, >>> not the fastest. >>> >>> And this is common regex ter

www.pythonchallange.com

2005-05-10 Thread Gabor Farkas
www.pythonchallange.com -- http://mail.python.org/mailman/listinfo/python-list

Re: www.pythonchallange.com

2005-05-10 Thread Gabor Farkas
Gabor Farkas wrote: > www.pythonchallange.com sorry, wanted to send it to someone else.. (too tired...) ;( gabor -- http://mail.python.org/mailman/listinfo/python-list

Re: Advice needed on __del__

2005-05-10 Thread Sion Arrowsmith
=?ISO-8859-1?Q?Andr=E9_Roberge?= <[EMAIL PROTECTED]> wrote: >If I need to have the user call Evil.destroy() as Evil >is getting out of scope, it would miss the whole point >of teaching about the natural way scope and namespace >work. The problem, it seems to me, is that in Python "scope" applies

Re: Advice needed on __del__

2005-05-10 Thread Fredrik Lundh
André Roberge wrote: > If I need to have the user call Evil.destroy() as Evil > is getting out of scope, it would miss the whole point > of teaching about the natural way scope and namespace > work. well, if you insist on using finalizers to keep track of what's in the current scope, I'd say that

Re: why this happend using model random?

2005-05-10 Thread flyaflya
flyaflya wrote: > Robert Kern wrote: > >> flyaflya wrote: >> >>> from random import * >>> >>> col = [0 for i in range(10)] >>> a = [col for i in range(10)] >> >> >> >> This is the problem. The list "a" now has ten references to the same >> object "col". They are not copied. >> >>> seed() >>> for

Re: Advice needed on __del__

2005-05-10 Thread André Roberge
Fredrik Lundh wrote: > André Roberge wrote: >>If I need to have the user call Evil.destroy() as Evil >>is getting out of scope, it would miss the whole point >>of teaching about the natural way scope and namespace >>work. > > > well, if you insist on using finalizers to keep track of what's in th

Re: Advice needed on __del__

2005-05-10 Thread Scott David Daniels
André Roberge wrote: > Scott David Daniels wrote: > >> André Roberge wrote: >> >>> ... Each time I refresh the screen, I could >>> force that call, then check to see if Evil has been >>> destroyed by Python, which would give me the information >>> I need to destroy Evil_twin behind the scene myse

Re: Library Naming Conventions.

2005-05-10 Thread chris . lyon
quoting: Modules should have short, lowercase names, without underscores. this still doesn't explain Cookie. [EMAIL PROTECTED] wrote: > see http://www.python.org/peps/pep-0008.html for naming conventions and > other style issues -- http://mail.python.org/mailman/listinfo/python-list

Re: Strip white spaces from source

2005-05-10 Thread qwweeeit
Hi Richie, I did not post my solution because I did not want to "pollute" the pythonic way of programming. Young programmers, don't follow me! I hate (because I am not able to use them...) classes and regular expressions. Instead I like lists, try/except (to limit or better eliminate debugging) and

Re: Library Naming Conventions.

2005-05-10 Thread Peter Hansen
[EMAIL PROTECTED] wrote: > quoting: > > Modules should have short, lowercase names, without underscores. > > this still doesn't explain Cookie. Sure it does. The subject line says "conventions", and a convention isn't a firm rule, just something many people agree on. Obviously the auth

Re: Merging overlapping spans/ranges

2005-05-10 Thread bearophileHUGS
This is the problem of finding the connected components inside an interval graph. You can implement the algorithms yourself, of you can use my graph data structure here: http://sourceforge.net/projects/pynetwork/ The graph methods: createIntervalgGraph And: connectedComponents can probably solve

Re: Library Naming Conventions.

2005-05-10 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > quoting: > > Modules should have short, lowercase names, without underscores. > > this still doesn't explain Cookie. the document you're quoting also says: This document was adapted from Guido's original Python Style Guide essay[2] where [2] points to a

Re: Library Naming Conventions.

2005-05-10 Thread Robert Kern
[EMAIL PROTECTED] wrote: > quoting: > > Modules should have short, lowercase names, without underscores. > > this still doesn't explain Cookie. PEP-008 didn't exist since the beginning of Python's development. Cookie (I believe) predates PEP-008. -- Robert Kern [EMAIL PROTECTED] "In th

Re: Strip white spaces from source

2005-05-10 Thread William Park
[EMAIL PROTECTED] wrote: > Hi all, > I need to limit as much as possible the lenght of a source line, > stripping white spaces (except indentation). > For example: > . . max_move and AC_RowStack.acceptsCards ( self, from_stack, cards > ) > must be reduced to: > . . max_move and AC_RowStack.

Filenames of files downloaded via urlretrieve that have been redirected

2005-05-10 Thread Ray Slakinski
I got a small issue, I am using urllib.urlretreive to download files but in some cases I'm downloading from a CGI that is redirecting urlretrieve to a different url. Example: urllib.urlretreive('http://someurl.com/files.asp?file=55', 'tempFileName.tmp') Is there a way to know what filename files

Iterating package's module list

2005-05-10 Thread ischenko
Hi, I'm trying to find all modules that contain doctests and execute them (using DocTestSuite). The problem is how to iterate (programmatically) through the package's modules. >>> import M >>> inspect.getmembers(M, inspect.ismodule) [] Iterating through the source files (via glob) does not help

object oriented inheritance problem

2005-05-10 Thread Matthew Thorley
I am trying to inherit from ElementTree so I can add some methods. This is the code I am trying to make work, and the following is the error I am getting. from elementtree import ElementTree class AcidTree(ElementTree): def write_string(self): File "/home/hope/var/proj/acid/serve

Re: object oriented inheritance problem

2005-05-10 Thread Michele Simionato
It looks like ElementTree is a module and not a class. The same error message was posted here few weeks ago. Actually, I discuss it in my Oxford lectures, page 30: see http://www.reportlab.org/~andy/accu2005/pyuk2005_simionato_wondersofpython.zip (there also everything you want to know about new-s

Desrtuctor WOES, was Advice on __del__

2005-05-10 Thread phil
> you haven't answered my question, btw: why are you using __del__ > to do something that the garbage collector should do for you? After more reading it seems I have made an ass of my self on this subject. Here is my problem at length. I teach high school geometry. I have created a program wit

A Faster Way...

2005-05-10 Thread andrea . gavana
Hello NG, it is probably a beginner question, but I didn't solve it without for-loops, and I am unable to determine if there is a faster way (probably using some built-in function) to do this task. I have to speed up a wxPython code that uses a lot of string concatenation (and uses these str

Put a file on an ftp server over ssl

2005-05-10 Thread Daniel Santa Cruz
Hello all! I have been troubled for the past couple of days trying to write a simple script that sends a file to an ftp server. It used to be the easiest thing in the world, but now the server has changed to a ftps (ftp over ssl) server. All of the sudden, the world has come to a crawling stop.

win32com and IIS

2005-05-10 Thread Chris Curvey
Hi all, I have a python script that uses the PAMIE libraries to drive IE. It runs fine from the command line, but it appears to have some permissions problem when I run it via CGI. Here's the stack trace that I'm getting. File "c:\documents and settings\chris\my documents\cms\com\artfact\cms\

Re: object oriented inheritance problem

2005-05-10 Thread Fredrik Lundh
Matthew Thorley wrote: > I am trying to inherit from ElementTree so I can add some methods. This > is the code I am trying to make work, and the following is the error I > am getting. > > from elementtree import ElementTree > class AcidTree(ElementTree): > def write_string(self): > ...

Re: win32com and IIS

2005-05-10 Thread Chris Curvey
my OS is Win2K (server, I think) if that makes any difference. -- http://mail.python.org/mailman/listinfo/python-list

Re: A Faster Way...

2005-05-10 Thread Bill Mill
On 5/10/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hello NG, > > it is probably a beginner question, but I didn't solve it without > for-loops, and I am unable to determine if there is a faster way (probably > using some built-in function) to do this task. I have to speed up a > wxPy

Re: pyvm -- faster python

2005-05-10 Thread Terry Reedy
"Stelios Xanthakis" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >> Maybe you can explain us why it is so fast, and/or maybe you can work >> with the other developers to improve the speed of the normal CPython, >> this can require equal or less work for you, and it can produce more

Re: Listing of declared variables and functions

2005-05-10 Thread Fernando Perez
ohms377 wrote: > Dear python users, > > In interactive mode, I was wondering if there is a way to list all > declared variables and functions (and from global workspace). In [1]: def foo(): pass ...: In [2]: x=1 In [3]: a='hello' In [4]: import re In [5]: whos Variable TypeData/

Re: object oriented inheritance problem

2005-05-10 Thread Matthew Thorley
So is elementtree a module of modules? I didn't know you could do that. I just assumed that from elementtree import ElementTree imported a class from the module elementtree. It works now. Thanks guys. Fredrik Lundh wrote: > Matthew Thorley wrote: > > >>I am trying to inherit from ElementTree so

Re: A Faster Way...

2005-05-10 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > If I simplify the problem, suppose I have 2 lists like: > > a = range(10) > b = range(20,30) > > What I would like to have, is a "union" of the 2 list in a single tuple. In > other words (Python words...): > > c = (0, 20, 1, 21, 2, 22, 3, 23, 4, 24, 5, 25, . > > and

error using process module Process class

2005-05-10 Thread Earl Eiland
When executing the following code snippet import process ... ... for x in Files: Command_String = 'C:\Program Files\WinRK\WinRK.exe -create ' + os.path.join(InputDirectory, os.path.splitext(x)[0]) + ' -set compression_method ppmz -setg include_paths none -add ' + os.path.join(InputDirector

Re: Language documentation ( was Re: Computing Industry shams)

2005-05-10 Thread Lawrence Kirby
On Tue, 10 May 2005 06:52:18 -0700, alex goldman wrote: > Lawrence Kirby wrote: ... >> However the original quote was in the context of regular expressions, so >> discussion of the terminology used in regular expressions is far more >> relevant than the terminology used in graph search and optim

Python Graphing Utilities.

2005-05-10 Thread Kenneth Miller
Hello All, I am new to Python and i was wondering what graphing utlities would be available to me. I have already tried BLT and after weeks of unsuccesful installs i'd like to find something else. Anything someone would recommend? Regards, Ken -- http://mail.python.org/mailman/listinfo/pyt

Destructor Woes, was Advice needed on __del__

2005-05-10 Thread phil
> Then i got a tip that you can register a function that needs to be > called when the object is going to be deleted. > For instance to register a function __exit, you do this: > Here is the complete line class with your suggestion: Below is the output. Nice idea, maybe I did something wrong

Re: object oriented inheritance problem

2005-05-10 Thread Fredrik Lundh
Matthew Thorley wrote: > So is elementtree a module of modules? I didn't know you could do that. "elementtree" is a package. see: http://docs.python.org/tut/node8.html#SECTION00840 for a bit more information. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Graphing Utilities.

2005-05-10 Thread Fredrik Lundh
Kenneth Miller wrote: > I am new to Python and i was wondering what graphing utlities would be > available to me. I have already tried BLT and after weeks of unsuccesful > installs i'd like to find something else. Anything someone would recommend? start here: http://www.python.org/moin/N

Solipsis: Python-powered Metaverse

2005-05-10 Thread Terry Reedy
Today I followed a link to an interesting Python application I have not seen mentioned here before: http://solipsis.netofpeers.net/wiki/HomePage/. "A peer-to-peer system for a massively multi-participant virtual world " It is a France Telecom R&D project, LGPL licenced, still in alpha, built on

Re: Merging overlapping spans/ranges

2005-05-10 Thread Jordan Rastrick
Max M wrote: > I am writing a "find-free-time" function for a calendar. There are a lot > of time spans with start end times, some overlapping, some not. > > To find the free time spans, I first need to convert the events into a > list of non overlapping time spans "meta-spans". > > This nice asci

Re: Put a file on an ftp server over ssl

2005-05-10 Thread Jp Calderone
On 10 May 2005 09:55:32 -0700, Daniel Santa Cruz <[EMAIL PROTECTED]> wrote: >Hello all! > >I have been troubled for the past couple of days trying to write a >simple script that sends a file to an ftp server. It used to be the >easiest thing in the world, but now the server has changed to a ftps >

Re: Python Graphing Utilities.

2005-05-10 Thread Bill Mill
On 5/10/05, Kenneth Miller <[EMAIL PROTECTED]> wrote: > Hello All, > > I am new to Python and i was wondering what graphing utlities would be > available to me. I have already tried BLT and after weeks of unsuccesful > installs i'd like to find something else. Anything someone would recommend?

  1   2   >