Re: Adding behaviour for managing "task" dependencies

2007-10-04 Thread rayrayson
On Oct 2, 2:23 pm, Paddy <[EMAIL PROTECTED]> wrote: > You could use a professional Job scheduling system such as LSF or Sun Grid > Engine > that both support job dependencies (and a whole lot more). Recently, Grid Engine added support the powerful "Array Job Interdependencies" support. http://gr

Re: Real time plot

2007-10-04 Thread Nicholas Bastin
On 10/4/07, Jean-Francois Canac <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] > > I would draw dots on a suitably sized Tkinter canvas, after drawing a > > schematic > > of the race track (laborious). > > > > 20 per second will be no problem, provided the machine is half decent. > > > > What is th

Re: Python and SSL

2007-10-04 Thread Johny
On Oct 5, 3:50 am, John Nagle <[EMAIL PROTECTED]> wrote: > Johny wrote: > > Martin and John, > > Thank you both for your replies > > Must I have OpenSSL imported in my Python program? > > So far I have been using only SSL support. > > Built-in SSL support works OK if I connect from my Python pro

Re: module confusion

2007-10-04 Thread Robert Kern
Lawrence D'Oliveiro wrote: > In message <[EMAIL PROTECTED]>, Steven D'Aprano wrote: > >> What does type(os.path) return when you try it? > > It returns the type of the value contained in that variable, of course: > > >>> import os > >>> os.path = 3 > >>> type(os.path) > > > See

Re: Is there a nicer way to do this?

2007-10-04 Thread Stefan Arentz
Stefan Arentz <[EMAIL PROTECTED]> writes: > Is there a better way to do the following? > > attributes = ['foo', 'bar'] > > attributeNames = {} > n = 1 > for attribute in attributes: >attributeNames["AttributeName.%d" % n] = attribute >n = n + 1 > > It works, but I am wondering if there

Re: Combine two dictionary...

2007-10-04 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Abandoned wrote: > I want to total score.. > For example >> > dict1={1: 4, 3: 5}... and 2 millions element >> > dict2={3: 3, 8: 6}... and 3 millions element > > result should be dict3={1:4, 3:8, 8:6} Don't people like one-liners? :) dict((k, dict1.get(k, 0)

Re: Duplicate content filter..

2007-10-04 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Abandoned wrote: > I want to a idea for how can i find duplicate pages quickly and fast ? Compute a hash based on a canonicalized version of the content? Disregard white space, line wrap, upper/lower case, possibly even punctuation etc so that you get the same hash

Re: gui toolkits: the real story? (Tkinter, PyGTK, etc.)

2007-10-04 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Grant Edwards wrote: > You've got to admit that Tk "just works", although as a result > it looks ugly and foreign on all platforms. Sort of a "pidgin GUI". :) -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there a nicer way to do this?

2007-10-04 Thread Terry Reedy
"Paul Hankin" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | On Oct 4, 10:53 pm, "Terry Reedy" <[EMAIL PROTECTED]> wrote: | > However, mapping indexes to names should be more useful: | > | > >>> aNames = dict(enumerate(['foo', 'bar'])) | > >>> aNames | > | > {0: 'foo', 1: 'bar'} |

Re: Howto Launch a windows application ?

2007-10-04 Thread Nicholas Bastin
On 10/3/07, stef mientki <[EMAIL PROTECTED]> wrote: > hello, > > I'm trying to launch a windows application, > but as many others on this list, I've some trouble. > I read some other threads about this topic, > but sorry, I still don't understand all this (never heard of pipes). > > When I use a ba

ANN: Chandler Preview (0.7.0.1)

2007-10-04 Thread Heikki Toivonen
Open Source Applications Foundation (OSAF) released Chandler Preview (0.7.0.1) on September 10, 2007. Chandler is a Personal Information Management (PIM) client application with innovative design and ambitious plans for sharing, extensibility and cross-platform support. Chandler is written mainly

Re: Python 3.0 migration plans?

2007-10-04 Thread Nicholas Bastin
On 9/27/07, Steve Holden <[EMAIL PROTECTED]> wrote: > I wondered if a straw poll could get some idea of readers' thoughts > about when they will be migrating to 3.0 on, so I used the new widget on > Blogger to add a poll for that. > > I'd appreciate if if you would go to > >http://holdenweb.blo

Re: Cross platform way of finding number of processors on a machine?

2007-10-04 Thread Nicholas Bastin
On 10/4/07, John <[EMAIL PROTECTED]> wrote: > > Is there a way to find the number of processors on a machine (on linux/ > windows/macos/cygwin) using python code (using the same code/cross > platform code)? There's no single call that will give you the same info on every platform, but you can obvi

RE: Python 3.0 migration plans?

2007-10-04 Thread Delaney, Timothy (Tim)
TheFlyingDutchman wrote: > On Sep 28, 1:09 pm, Steve Holden <[EMAIL PROTECTED]> wrote: > >> That's because the tutor list doesn't offer a newsgroup. He was >> probably just trying to get rid of you. >> >> Now at 98.75% ... > > Not sure if that's the reading on your trollmeter or on the meter th

Re: PYTHONPATH, opensuse10.2, gtk not working

2007-10-04 Thread Silfheed
On Oct 4, 7:39 pm, Steve Holden <[EMAIL PROTECTED]> wrote: > Silfheed wrote: > > Heyas > > > So I'm trying to do two things, install a little gnome taskbar applet > > (timer-applet) that was written in python and experiment with writing > > python gtk apps. I've installed (through yast) gtk, gtk2,

Cross platform way of finding number of processors on a machine?

2007-10-04 Thread John
Is there a way to find the number of processors on a machine (on linux/ windows/macos/cygwin) using python code (using the same code/cross platform code)? -- http://mail.python.org/mailman/listinfo/python-list

tkinter question

2007-10-04 Thread goldtech
This works OK. But I notice that if I enlarge the window after the script has run, the white listbox only gets "so" big while the grey background enlarges. Is there a way to have it all white when I enlarge a window - like what normally happens? from Tkinter import * root = Tk() root.title("Dir

Re: Python "implements " equivalent?

2007-10-04 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Wojciech Gryc wrote: > I'm a seasoned Java programmer and quite a big fan of interfaces... > i.e. The idea that if I make a number of distinct classes that > implement interface X, I can pass them all as parameters to functions > or whatnot that require an X object.

Re: module confusion

2007-10-04 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Neil Cerutti wrote: > On 2007-10-03, Lawrence D'Oliveiro <[EMAIL PROTECTED]> > wrote: >> In message <[EMAIL PROTECTED]>, Ben Finney wrote: >> >>> Lawrence D'Oliveiro <[EMAIL PROTECTED]> writes: >>> On my Gentoo system: >>> import os >>>

Re: PYTHONPATH, opensuse10.2, gtk not working

2007-10-04 Thread Steve Holden
Silfheed wrote: > Heyas > > So I'm trying to do two things, install a little gnome taskbar applet > (timer-applet) that was written in python and experiment with writing > python gtk apps. I've installed (through yast) gtk, gtk2, gtk2-devel, > python-gtk, python-gtk-devl, python-gtk-doc but I sti

Re: Announcing the RosAsm Library Project

2007-10-04 Thread [EMAIL PROTECTED]
On Oct 4, 6:36 pm, Evenbit <[EMAIL PROTECTED]> wrote: > > This is extremely easy to answer. The average RosAsm coder tends to > only make use of the libraries documented here: > > http://msdn2.microsoft.com/en-us/library/aa383749.aspx Which is a bit limiting, wouldn't you agree? > > If you wish

Re: Python and SSL

2007-10-04 Thread John Nagle
Johny wrote: > Martin and John, > Thank you both for your replies > Must I have OpenSSL imported in my Python program? > So far I have been using only SSL support. > Built-in SSL support works OK if I connect from my Python program > directly to SSL server ( but not via proxy). > L. SSL is

Re: Announcing the RosAsm Library Project

2007-10-04 Thread Evenbit
On Oct 4, 6:29 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hey, Rene, > > Let's pretend for a moment that we're all on "Planet Betov" where > using statically linked library code is never done and all code reuse > is accomplished by "cut & paste". > > In this dream world, here's what I see

RE: unit testing

2007-10-04 Thread Ryan Ginstrom
> On Behalf Of Bruno Desthuilliers > Or py.test or nose, which are both more complete than doctest > and more pythonics than the unittest module. I second the recommendation of nose. It makes it fantastically easy to write and run unit tests. Also, in my experience unit tests help reduce bugs in

Re: Starting a thread before wxPython bootup ... interesting.

2007-10-04 Thread [david]
Since the observed behaviour is clearly undefined, I forgive you for the poorly specified behaviour description: asking for a close description of random behaviour is just ridiculous. The most obvious point is that wx is not re-entrant or thread safe: you have to make it so by using wx.CallAfter()

Re: Dynamically creating class properties

2007-10-04 Thread Michael Spencer
Karlo Lozovina wrote: > > Any idea how to do that with metaclasses and arbitrary long list of > attributes? I just started working with them, and it's driving me nuts :). > > Thanks for the help, > best regards. > Try implementing a property factory function before worrying about the metaclas

Re: module confusion

2007-10-04 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Steven D'Aprano wrote: > What does type(os.path) return when you try it? It returns the type of the value contained in that variable, of course: >>> import os >>> os.path = 3 >>> type(os.path) See, it's just a variable, like any other. -- http:/

Re: Using fractions instead of floats

2007-10-04 Thread Steven D'Aprano
On Tue, 02 Oct 2007 06:07:15 +, Rhamphoryncus wrote: > On Sep 30, 7:35 pm, andresj <[EMAIL PROTECTED]> wrote: >> I was doing some programming in Python, and the idea came to my mind: >> using fractions instead of floats when doing 2/5. > > The core problem with rationals (other than the inabi

Re: Using fractions instead of floats

2007-10-04 Thread Steven D'Aprano
On Thu, 04 Oct 2007 02:47:27 -0700, Paul Rubin wrote: > Steven D'Aprano <[EMAIL PROTECTED]> writes: >> > implementation in pure Python). Finally, arithmetic would become >> > very confusing if there were three distinct numeric types; it already >> > causes enough confusion with two! > > There's

Re: module confusion

2007-10-04 Thread MRAB
On Oct 4, 11:11 am, Steve Holden <[EMAIL PROTECTED]> wrote: > Hendrik van Rooyen wrote: > > "Steve Holden" wrote: > > >> religious issues for me. It's more like "This problem has a cross head, > >> so I'll need a Philips screwdriver". > > > As long as it is not a Pozidrive, that is a commendable a

Re: module confusion

2007-10-04 Thread Steven D'Aprano
On Thu, 04 Oct 2007 23:01:06 +1300, Lawrence D'Oliveiro wrote: > In message <[EMAIL PROTECTED]>, Steven D'Aprano wrote: > >> ... pedants ... > > When people use that word against me, it's generally a sign they're > trying not to admit I'm right. Yeah, you keep telling yourself that. What does

Re: Dynamically creating class properties

2007-10-04 Thread Paul Hankin
On Oct 4, 11:55 pm, Paul Hankin <[EMAIL PROTECTED]> wrote: > On Oct 4, 9:59 pm, Karlo Lozovina <[EMAIL PROTECTED]> wrote: > > > > > Hi all, > > > this is my problem: lets say I have a arbitrary long list of attributes > > that I want to attach to some class, for example: > > > l = ['item1', 'i

Mysql class works like php

2007-10-04 Thread Andrey
Hi just a quick question about using MySQL module... are there any api / class available to give a higher level in working with Mysql in python? such as db.fetch_array(), db.fetch_rows(), db.query(), for eachrow in db.fetch_array(): just as easy as PHP? I think someone might already don

Re: enumerate overflow

2007-10-04 Thread Gabriel Genellina
En Wed, 03 Oct 2007 08:46:31 -0300, <[EMAIL PROTECTED]> escribi�: > in python2.4, i read lines from a file with > > for lineNum, line in enumerate(f): ... > > However, lineNum soon overflows and starts counting backwards. How do > i force enumerate to return long integer? (what kind of files are

Re: Dynamically creating class properties

2007-10-04 Thread Paul Hankin
On Oct 4, 9:59 pm, Karlo Lozovina <[EMAIL PROTECTED]> wrote: > Hi all, > > this is my problem: lets say I have a arbitrary long list of attributes > that I want to attach to some class, for example: > > l = ['item1', 'item2', 'item3'] > > Using metaclasses I managed to create a class with thos

Re: setuptools without unexpected downloads

2007-10-04 Thread Gabriel Genellina
En Wed, 03 Oct 2007 08:21:04 -0300, Max Erickson <[EMAIL PROTECTED]> escribi�: > "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > ... >> This recent blog post contains step-by-step instructions on using >> free tools to compile python extensions: >>

Re: Python "implements " equivalent?

2007-10-04 Thread Terry Reedy
"Wojciech Gryc" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | Hi, | | I recently started using Python and am extremely happy with how | productive it's made me, even as a new user. I'm hoping to continue | using the language for my research, and have come across a bit of a | stumb

Re: What does the syntax [::-1] really mean?

2007-10-04 Thread Robert Kern
Casey wrote: > On Oct 4, 4:32 pm, Duncan Booth <[EMAIL PROTECTED]> wrote: >> Duncan Booth <[EMAIL PROTECTED]> wrote: >>> the invariant that you are looking for is that for all non-negative a, b: >>>x[a:b:1] reversed is x[-len(x)+b-1:-len(x)+a-1:-1] >> I should of course have said "all a, b in t

Re: Is there a nicer way to do this?

2007-10-04 Thread Victor B. Gonzalez
On Thursday 04 October 2007 5:07:51 pm Stefan Arentz wrote: > Is there a better way to do the following? > > attributes = ['foo', 'bar'] > > attributeNames = {} > n = 1 > for attribute in attributes: >attributeNames["AttributeName.%d" % n] = attribute >n = n + 1 > > It works, but I am wonde

PYTHONPATH, opensuse10.2, gtk not working

2007-10-04 Thread Silfheed
Heyas So I'm trying to do two things, install a little gnome taskbar applet (timer-applet) that was written in python and experiment with writing python gtk apps. I've installed (through yast) gtk, gtk2, gtk2-devel, python-gtk, python-gtk-devl, python-gtk-doc but I still cant get python to import

Re: Is there a nicer way to do this?

2007-10-04 Thread Paul Hankin
On Oct 4, 10:53 pm, "Terry Reedy" <[EMAIL PROTECTED]> wrote: > However, mapping indexes to names should be more useful: > > >>> aNames = dict(enumerate(['foo', 'bar'])) > >>> aNames > > {0: 'foo', 1: 'bar'} If you are right that a map from indices to name is best, there's no need for a dict: the

Re: Howto Launch a windows application ?

2007-10-04 Thread stef mientki
Matimus wrote: > stef mientki wrote: > >> hello, >> >> I'm trying to launch a windows application, >> but as many others on this list, I've some trouble. >> I read some other threads about this topic, >> but sorry, I still don't understand all this (never heard of pipes). >> >> When I use a batc

Re: Howto Launch a windows application ?

2007-10-04 Thread stef mientki
Yu-Xi Lim wrote: > stef mientki wrote: > >> cmd =[] >> cmd.append ( 'D:\\PIC-tools\\JALxxx\\jalv2_3.exe' ) >> cmd.append ( '-long-start' ) >> cmd.append ( '-d') >> cmd.append ( '-clear' ) >> cmd.append ( '-sD:\\PIC-tools\\JAL\\libs2' ) >> cmd.append ( >> 'd:\\pic-tools\\jal\\programs\\test_rs23

Re: Is there a nicer way to do this?

2007-10-04 Thread Casey
On Oct 4, 5:42 pm, Casey <[EMAIL PROTECTED]> wrote: > Not sure if this is really better or even more pythonic, but if you > like one-liners that exercise the language: Hmm, I guess it WAS more pythonic, since three of us gave essentially identical responses in a 10-minute period. That being said,

Re: Is there a nicer way to do this?

2007-10-04 Thread Terry Reedy
"Stefan Arentz" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | | Is there a better way to do the following? | | attributes = ['foo', 'bar'] | | attributeNames = {} | n = 1 | for attribute in attributes: | attributeNames["AttributeName.%d" % n] = attribute | n = n + 1 | | It wor

Re: Is there a nicer way to do this?

2007-10-04 Thread Casey
Not sure if this is really better or even more pythonic, but if you like one-liners that exercise the language: attributeNames = dict( [("AttributeName.%d" % (n+1), attribute) for n,attribute in enumerate(attributes)] ) What this does is create a list (using a list comprehension and the enumerate

Re: Is there a nicer way to do this?

2007-10-04 Thread Tim Chase
> attributes = ['foo', 'bar'] > > attributeNames = {} > n = 1 > for attribute in attributes: >attributeNames["AttributeName.%d" % n] = attribute >n = n + 1 > > It works, but I am wondering if there is a more pythonic way to > do this. "Better" may be subjective, but you could do somethin

Re: Is there a nicer way to do this?

2007-10-04 Thread Amaury Forgeot d'Arc
Hello, Stefan Arentz a écrit : > Is there a better way to do the following? > > attributes = ['foo', 'bar'] > > attributeNames = {} > n = 1 > for attribute in attributes: >attributeNames["AttributeName.%d" % n] = attribute >n = n + 1 > > It works, but I am wondering if there is a more py

Re: Owner of spawned process in threads

2007-10-04 Thread Piet van Oostrum
> "Vishal Sethia" <[EMAIL PROTECTED]> (VS) wrote: >VS> Just trying to understand the behaviour of spawn. Consider I have a >VS> function which creates two threads. And in one of the threads I make a >VS> call to pexpect.spawn. spawn would fork and create a new new child In >VS> this case who b

Re: RegEx question

2007-10-04 Thread John Masters
On 15:25 Thu 04 Oct , Robert Dailey wrote: > I am not a regex expert, I simply assumed regex was standardized to follow > specific guidelines. There are as many different regex flavours as there are Linux distros. Each follows the basic rules but implements them slightly differently and adds t

Re: What does the syntax [::-1] really mean?

2007-10-04 Thread Casey
On Oct 4, 4:58 pm, Casey <[EMAIL PROTECTED]> wrote: > Thanks, again! I figured it out from Fred's and your initial posts. Oops - I meant Kurt, not Fred. Sorry for the mis-attribution! -- http://mail.python.org/mailman/listinfo/python-list

Is there a nicer way to do this?

2007-10-04 Thread Stefan Arentz
Is there a better way to do the following? attributes = ['foo', 'bar'] attributeNames = {} n = 1 for attribute in attributes: attributeNames["AttributeName.%d" % n] = attribute n = n + 1 It works, but I am wondering if there is a more pythonic way to do this. S. -- http://mail.python.o

Re: What does the syntax [::-1] really mean?

2007-10-04 Thread Casey
On Oct 4, 4:32 pm, Duncan Booth <[EMAIL PROTECTED]> wrote: > Duncan Booth <[EMAIL PROTECTED]> wrote: > > the invariant that you are looking for is that for all non-negative a, b: > >x[a:b:1] reversed is x[-len(x)+b-1:-len(x)+a-1:-1] > > I should of course have said "all a, b in the range 0 <= a

Dynamically creating class properties

2007-10-04 Thread Karlo Lozovina
Hi all, this is my problem: lets say I have a arbitrary long list of attributes that I want to attach to some class, for example: l = ['item1', 'item2', 'item3'] Using metaclasses I managed to create a class with those three attributes just fine. But now I need those attributes to be prop

Re: unit testing

2007-10-04 Thread Jeffrey Froman
Chris Mellon wrote: > Doctest is commonly given as the alternative to people who feel this > way. Personally, I find that anything worth testing is worth having a > test directory and independent unit tests for. I like keeping my tests separate as well, and doctest does allow this, using doctest.

[OT, definitively] Re: The Modernization of Emacs: terminology buffer and keybinding

2007-10-04 Thread Bruno Desthuilliers
J. Clifford Dyer a écrit : > On Thu, Oct 04, 2007 at 04:49:50PM +0200, Wildemar Wildenburger wrote > regarding Re: The Modernization of Emacs: terminology buffer and > keybinding: > >> Steve Holden wrote: >>> Lawrence D'Oliveiro wrote: In message <[EMAIL PROTECTED]>, Steve Holden w

Re: What does the syntax [::-1] really mean?

2007-10-04 Thread Duncan Booth
Duncan Booth <[EMAIL PROTECTED]> wrote: > the invariant that you are looking for is that for all non-negative a, b: >x[a:b:1] reversed is x[-len(x)+b-1:-len(x)+a-1:-1] > I should of course have said "all a, b in the range 0 <= a <= len(x) and 0 <= b <= len(x)". -- http://mail.python.org/mai

Re: RegEx question

2007-10-04 Thread Robert Dailey
I am not a regex expert, I simply assumed regex was standardized to follow specific guidelines. I also made the assumption that this was a good place to pose the question since regular expressions are a feature of Python. The question concerned regular expressions in general, not really the applica

Re: unit testing

2007-10-04 Thread Tim Chase
>>> Does anyone else feel that unittesting is too much work? Not in general, >>> just the official unittest module for small to medium sized projects? > [snip] >> I actually do a lot of unit testing. I find it both annoying and >> highly necessary and useful. > > +1 QOTW. > > I feel exactly the

Re: What does the syntax [::-1] really mean?

2007-10-04 Thread Duncan Booth
Casey <[EMAIL PROTECTED]> wrote: > From this, I would expect that x[::-1] would be identical to x[n:0:-1] > (n and 0 being the "end" values, with the order switched due to the > negative step value). But the clause that "(but never including j)" > means that x[n:0:-1] excludes the 1st element of

Re: unit testing

2007-10-04 Thread Bruno Desthuilliers
Paul Rubin a écrit : > brad <[EMAIL PROTECTED]> writes: > >>Does anyone else feel that unittesting is too much work? Not in >>general, just the official unittest module for small to medium sized >>projects? > > > Yeah, unittest is sort of a Java-ism. You might try the newer doctest > module ins

Re: unit testing

2007-10-04 Thread Steven Bethard
[EMAIL PROTECTED] wrote: > On Oct 4, 1:02 pm, brad <[EMAIL PROTECTED]> wrote: >> Does anyone else feel that unittesting is too much work? Not in general, >> just the official unittest module for small to medium sized projects? [snip] > I actually do a lot of unit testing. I find it both annoying a

Re: HELP me Am very new one To python

2007-10-04 Thread Bruno Desthuilliers
Damodhar a écrit : > hi, > > Am working in PHP MYSQL. I am very very interest to learn Python but i > don't Know Little Bit, > am using windows Xp, Ialready download from > http://www.python.org/ftp/python/2.5.1/python-2.5.1.ia64.msi > > and install into C:\Python25 > > whats the next step . i U

Re: Boolean parser..

2007-10-04 Thread timaranz
On Oct 5, 7:29 am, Abandoned <[EMAIL PROTECTED]> wrote: > Hi.. > I try a boolean parser in python since 1 weak.. But i can't do this > because this is very complicated :( > Do you know any blooean parser script in python or how do i write a > boolean parser ? > example query: ((google or yahoo) or

Re: RegEx question

2007-10-04 Thread Tim Chase
[sigh...replying to my own post] > However, things to try: > > - sometimes the grouping parens need to be escaped with "\" > > - sometimes "\w" isn't a valid character class, so use the > long-hand variant of something like "[a-zA-Z0-9_]] > > - sometimes the "+" is escaped with a "\" > > - if

Re: RegEx question

2007-10-04 Thread Tim Chase
>>> try @param\[(in|out)\] \w+ >>> >> This didn't work either :( >> >> The tool using this regular expression (Comment Reflower for VS2005) May be >> broken... > > How about @param\[[i|o][n|u]t*\]\w+ ? ...if you want to accept patterns like @param[iutt]xxx ... The regexp at the top

Re: List of objects X Database

2007-10-04 Thread Gerardo Herzig
MindMaster32 wrote: >I am writing a script that has to read data from an ASCII file of >about 50 Mb and do a lot of searches and calculations with that data. >That would be a classic problem solved by the use of a database >(SQLite would suit just fine), but that would require the user to >install

TwistedMatrix missing OpenSSL?

2007-10-04 Thread Lamonte Harris
Where do I get it? I'm currently running python 2.5 -- http://mail.python.org/mailman/listinfo/python-list

Re: Python "implements " equivalent?

2007-10-04 Thread Bruno Desthuilliers
Grant Edwards a écrit : > On 2007-10-04, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > > >>Yes, and it's even simpler : just pass your object. If it effectively >>implements the desired interface, everything will work fine !-) > > [...] > > >>>What I'd like to do is create a feature detect

Re: RegEx question

2007-10-04 Thread Manu Hack
On 10/4/07, Robert Dailey <[EMAIL PROTECTED]> wrote: > On 10/4/07, Adam Lanier <[EMAIL PROTECTED]> wrote: > > > > try @param\[(in|out)\] \w+ > > > > This didn't work either :( > > The tool using this regular expression (Comment Reflower for VS2005) May be > broken... > > -- > http://mail.python.org

Re: migrating to packages

2007-10-04 Thread Gerardo Herzig
> > > >>>On Oct 3, 2007, at 11:42 AM, Gerardo Herzig wrote: >>> >>> >>> Hi all. I have a single file with several classes, wich i want to separate into several packages. The big file is named, say MYCLASES, and contains a class named A(object), and B(A). We have be

Re: unit testing

2007-10-04 Thread Paul Rubin
brad <[EMAIL PROTECTED]> writes: > Does anyone else feel that unittesting is too much work? Not in > general, just the official unittest module for small to medium sized > projects? Yeah, unittest is sort of a Java-ism. You might try the newer doctest module instead. -- http://mail.python.org/ma

Re: RegEx question

2007-10-04 Thread Jerry Hill
> As far as the dialect, I can't be sure. I am unable to find documentation > for Comment Reflower and thus cannot figure out what type of regex it is > using. What exactly do you mean by your question, "are you using raw > strings?". Thanks for your response and I apologize for the lack of detail.

Boolean parser..

2007-10-04 Thread Abandoned
Hi.. I try a boolean parser in python since 1 weak.. But i can't do this because this is very complicated :( Do you know any blooean parser script in python or how do i write a boolean parser ? example query: ((google or yahoo) or (live msn)) not web I'm sorry my bad english. King Regards.. -- ht

Owner of spawned process in threads

2007-10-04 Thread Vishal Sethia
Just trying to understand the behaviour of spawn. Consider I have a function which creates two threads. And in one of the threads I make a call to pexpect.spawn. spawn would fork and create a new new child In this case who becomes the owner of this child process. Is it the thread that spawned beco

Re: unit testing

2007-10-04 Thread [EMAIL PROTECTED]
On Oct 4, 1:02 pm, brad <[EMAIL PROTECTED]> wrote: > Does anyone else feel that unittesting is too much work? Not in general, > just the official unittest module for small to medium sized projects? > > It seems easier to write some quick methods that are used when needed > rather than building a pr

Re: unit testing

2007-10-04 Thread Chris Mellon
On 10/4/07, brad <[EMAIL PROTECTED]> wrote: > Does anyone else feel that unittesting is too much work? Not in general, > just the official unittest module for small to medium sized projects? > > It seems easier to write some quick methods that are used when needed > rather than building a program w

Off Topic: Gmail hates newsgroups!!!

2007-10-04 Thread Robert Dailey
I don't know how many other people subscribe to the python mailing list and use the mailing list using the web-based interface for Gmail, but I do. I use it mainly because Gmail doesn't support IMAP and I use my email from multiple locations. Gmail web based works fine except that it starts your ca

Re: What does the syntax [::-1] really mean?

2007-10-04 Thread Robert Kern
Casey wrote: > I've used [::-1] as a shorthand for reverse on several occasions, but > it occurred to me yesterday I never really thought about why it > works. First, I checked out the documentation. > >>From section 3.6 of the Python Library Reference: > > "The slice of s from i to j with step

Re: RegEx question

2007-10-04 Thread Robert Dailey
On 10/4/07, J. Clifford Dyer <[EMAIL PROTECTED]> wrote: > > You *are* talking about python regular expressions, right? There are a > number of different dialects. Also, there could be issues with the quoting > method (are you using raw strings?) > > The more specific you can get, the more we can

unit testing

2007-10-04 Thread brad
Does anyone else feel that unittesting is too much work? Not in general, just the official unittest module for small to medium sized projects? It seems easier to write some quick methods that are used when needed rather than building a program with integrated unittesting. I see the value of it

Re: Python and SSL

2007-10-04 Thread Johny
Martin and John, Thank you both for your replies Must I have OpenSSL imported in my Python program? So far I have been using only SSL support. Built-in SSL support works OK if I connect from my Python program directly to SSL server ( but not via proxy). L. -- http://mail.python.org/mailman/lis

Re: Don't understand module search path...

2007-10-04 Thread Chris Mellon
On 10/4/07, mhearne808[insert-at-sign-here]gmail[insert-dot-here]com <[EMAIL PROTECTED]> wrote: > I think I don't understand how the module search path works... > > Let's say I have a folders called 'test'. Underneath it, I create two > more folders called 'foo' and 'bar'. > > In 'foo', I create a

Re: win32com COMAdminCatalogObject Value method

2007-10-04 Thread rc
On Oct 2, 11:11 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Tue, 02 Oct 2007 12:12:09 -0300, rc <[EMAIL PROTECTED]> escribi?: > > >> Try objCOMAdminCatalogObject.SetValue("ID", AppID). > > When I try that I get exception: > > AttributeError: Add.SetValue > > I think you would get more h

Re: Starting a thread before wxPython bootup ... interesting.

2007-10-04 Thread Chris Mellon
On 10/4/07, Shafik <[EMAIL PROTECTED]> wrote: > Hello folks, > > I'm having an issue with mixing wxPython and threading ... I realize > multi-threading always introduces subtle bugs, but the following > scenario is just odd: > > I start a dummy thread, that does nothing but increment a counter and

Re: using regular express to analyze lisp code

2007-10-04 Thread Kelie
On Oct 4, 7:28 am, Dan <[EMAIL PROTECTED]> wrote: > So, paren matching is a canonical context-sensitive algorithm. Now, > many regex libraries have *some* not-purely-regular features, but I > doubt your going to find anything to match parens in a single regex. > If you want to go all out you can us

Re: using regular express to analyze lisp code

2007-10-04 Thread Kelie
On Oct 4, 7:50 am, Tim Chase <[EMAIL PROTECTED]> wrote: > Use a parsing lib. I've tinkered a bit with PyParsing[1] which > is fairly easy to pick up, but powerful enough that you're not > banging your head against limitations. There are a number of > other parsing libraries[2] with various domain

Don't understand module search path...

2007-10-04 Thread mhearne808[insert-at-sign-here]gmail[insert-dot-here]com
I think I don't understand how the module search path works... Let's say I have a folders called 'test'. Underneath it, I create two more folders called 'foo' and 'bar'. In 'foo', I create an empty '__init__.py' file, indicating that this folder is a package 'foo'. I then create a simple python

Re: What does the syntax [::-1] really mean?

2007-10-04 Thread Casey
On Oct 4, 1:41 pm, "Kurt Smith" <[EMAIL PROTECTED]> wrote: > >>> 'abc'[None:None:-1] > 'cba' > Kurt Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: What does the syntax [::-1] really mean?

2007-10-04 Thread Neil Cerutti
On 2007-10-04, Casey <[EMAIL PROTECTED]> wrote: > I've used [::-1] as a shorthand for reverse on several occasions, but > it occurred to me yesterday I never really thought about why it > works. First, I checked out the documentation. > >>From section 3.6 of the Python Library Reference: > > "The

Re: Import PY file not included in py2exe executable

2007-10-04 Thread Florian Schmidt
On Thu, Oct 04, 2007 at 10:15:59AM -0700, [EMAIL PROTECTED] wrote: > ... because they are used for program configuration ... not sure if i completely understood but i guess you do something like that: my_config.py: db_host = "mydbserver" db_user = "root" ... and in your program.py yo

Re: Python "implements " equivalent?

2007-10-04 Thread Jeff McNeil
I don't know how "clean" it is, but there are a few situations in which I do something like this: getattr(obj, "method", default_method)(*original_method_args) The default_method is a base implementation or a simple error handler. For example, when a client hits one of our XMLRPC servers and pass

Re: A question about subprocess

2007-10-04 Thread Dan Stromberg
You don't necessarily need the subprocess module to do this, though you could use it. I've done this sort of thing in the past with fork and exec. To serialize the jobs on the machines, the easiest thing is to just send the commands all at once to a given machine, like "command1; command2; comma

Re: using regular express to analyze lisp code

2007-10-04 Thread Tim Chase
> i've spent couple of hours trying to figure out the correct regular > expression to catch a VisualLisp [snipped] > "(defun foo", but it is hard to find the ")" at the end of code block. > if eventually i can't come up with the solution using regular > expression only, what i was thinking is afte

Re: Python "implements " equivalent?

2007-10-04 Thread Grant Edwards
On 2007-10-04, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > Yes, and it's even simpler : just pass your object. If it effectively > implements the desired interface, everything will work fine !-) [...] >> What I'd like to do is create a feature detection system for >> my work -- specifically

Re: What does the syntax [::-1] really mean?

2007-10-04 Thread Kurt Smith
On 10/4/07, Casey <[EMAIL PROTECTED]> wrote: [snippage] > > Following the reference to section 3.2 provides a (non-rigorous) > description of what a slice object is, in terms of the extended > slicing semantics. But it doesn't shed any additional light on the > meaning of [::-1]. > > >From this, I

Re: Import PY file not included in py2exe executable

2007-10-04 Thread Larry Bates
[EMAIL PROTECTED] wrote: > I am using py2exe to generate an executable so that I can deliver my > scripts as a EXE. I have a couple of file that are needed by the > program that I do not want to include in the EXE because they are used > for program configuration (similar to the way an INI file is

Re: using regular express to analyze lisp code

2007-10-04 Thread Dan
On Oct 4, 1:13 pm, Kelie <[EMAIL PROTECTED]> wrote: > hello, > > i've spent couple of hours trying to figure out the correct regular > expression to catch a VisualLisp (it is for AutoCAD and has a syntax > that's similar to common lisp) function body. VisualLisp is case- > insensitive. Any line beg

Re: pickle and __slots__

2007-10-04 Thread JL
I added the following method to the 2 subclasses of asyncore.dispatcher and asynchat.async_chat and now pickle works: def __getstate__(self): return Later I will probably modify this method so it returns something more interesting. Thanks for your help! I was confused because I am not

Import PY file not included in py2exe executable

2007-10-04 Thread ward . david
I am using py2exe to generate an executable so that I can deliver my scripts as a EXE. I have a couple of file that are needed by the program that I do not want to include in the EXE because they are used for program configuration (similar to the way an INI file is used.) These file may change per

  1   2   >