Re: multiple threads with Logging: ValueError: I/O operation on closed file

2008-11-10 Thread Vinay Sajip
On Nov 8, 10:52 pm, [EMAIL PROTECTED] wrote: > OS: Solaris 9 > Python Version: 2.4.4 > > I need to log certain data in a worker thread; however, I am getting > an error now when I use two worker threads. > I think the problem comes from the linelogging.info('Thread Object (%d):(%d), > Time:%s in s

Re: My first Python program -- a lexer

2008-11-10 Thread Robert Lehmann
On Sun, 09 Nov 2008 15:53:01 +0100, Thomas Mlynarczyk wrote: > Arnaud Delobelle schrieb: > >> Adding to John's comments, I wouldn't have source as a member of the >> Lexer object but as an argument of the tokenise() method (which I would >> make public). The tokenise method would return what you

Re: multiple threads with Logging: ValueError: I/O operation on closed file

2008-11-10 Thread Vinay Sajip
On Nov 8, 10:52 pm, [EMAIL PROTECTED] wrote: > OS: Solaris 9 > Python Version: 2.4.4 > > I need to log certain data in a worker thread; however, I am getting > an error now when I use two worker threads. > I think the problem comes from the linelogging.info('Thread Object (%d):(%d), > Time:%s in s

Re: using exec() to instantiate a new object.

2008-11-10 Thread RyanN
Thank you both, I knew there had to be a good way of doing this. -Ryan -- http://mail.python.org/mailman/listinfo/python-list

Re: My first Python program -- a lexer

2008-11-10 Thread Thomas Mlynarczyk
Robert Lehmann schrieb: You don't have to introduce a `next` method to your Lexer class. You could just transform your `tokenize` method into a generator by replacing ``self.result.append`` with `yield`. It gives you the just in time part for free while not picking your algorithm into tiny unr

Re: C Module question

2008-11-10 Thread Floris Bruynooghe
Hi On Nov 10, 11:11 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > 1. How can I pass a file-like object into the C part? The PyArg_* > functions can convert objects to all sort of types, but not FILE*. Parse it as a generic PyObject object (format string of "O" in PyArg_*), check the type a

Re: C Module question

2008-11-10 Thread Floris Bruynooghe
On Nov 10, 1:18 pm, Floris Bruynooghe <[EMAIL PROTECTED]> wrote: > On Nov 10, 11:11 am, "[EMAIL PROTECTED]" > > <[EMAIL PROTECTED]> wrote: > > 1. How can I pass a file-like object into the C part? The PyArg_* > > functions can convert objects to all sort of types, but not FILE*. > > Parse it as a g

Re: Threading on an old machine

2008-11-10 Thread Astley Le Jasper
Sorry ... that should be: for sitename in mysites: log.info("define thread") thread_list[sitename]=threading.Thread(name=sitename,target=myproceedure, args=(sitename,)) log.info("done") thread_list[sitename].start() log.info("Started") -- http://mail.python.org/mailman/listinfo/p

Re: My first Python program -- a lexer

2008-11-10 Thread Thomas Mlynarczyk
John Machin schrieb: On the other hand: If all my tokens are "mutually exclusive" then, But they won't *always* be mutually exclusive (another example is relational operators (< vs <=, > vs >=)) and AFAICT there is nothing useful that the lexer can do with an assumption/guess/input that they

Re: My first Python program -- a lexer

2008-11-10 Thread Thomas Mlynarczyk
Paul McGuire schrieb: loc = data.index("list") print data[:loc].count("\n")-1 print loc-data[:loc].rindex("\n")-1 prints 5,14 I'm sure it's non-optimal, but it *is* an algorithm that does not require keeping track of the start of every line... Yes, I was thinking of something like this. As l

Re: C Module question

2008-11-10 Thread [EMAIL PROTECTED]
On Nov 10, 1:16 pm, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > On Mon, 10 Nov 2008 03:11:06 -0800, [EMAIL PROTECTED] wrote: > > 1. How can I pass a file-like object into the C part? The PyArg_* > > functions can convert objects to all sort of types, but not FILE*. > > http://docs.python.

Re: C Module question

2008-11-10 Thread [EMAIL PROTECTED]
On Nov 10, 2:23 pm, Floris Bruynooghe <[EMAIL PROTECTED]> wrote: > Sorry, I probably should have mentioned you want to cast the object to > PyFileObject and then use the PyFile_AsFile() function to get the > FILE* handle. Yes, I figured that out by now. Sadly this doesn't work on "file-like" obje

Re: C Module question

2008-11-10 Thread Marc 'BlackJack' Rintsch
On Mon, 10 Nov 2008 05:36:58 -0800, [EMAIL PROTECTED] wrote: > On Nov 10, 1:16 pm, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: >> On Mon, 10 Nov 2008 03:11:06 -0800, [EMAIL PROTECTED] wrote: >> > 1. How can I pass a file-like object into the C part? The PyArg_* >> > functions can convert o

Re: C Module question

2008-11-10 Thread Marc 'BlackJack' Rintsch
On Mon, 10 Nov 2008 03:11:06 -0800, [EMAIL PROTECTED] wrote: > 1. How can I pass a file-like object into the C part? The PyArg_* > functions can convert objects to all sort of types, but not FILE*. http://docs.python.org/c-api/file.html#PyFile_AsFile > 2. How can I preserve information needed in

Re: C Module question

2008-11-10 Thread Marc 'BlackJack' Rintsch
On Mon, 10 Nov 2008 05:44:44 -0800, [EMAIL PROTECTED] wrote: > All in all I must say that implementing a C extension is a piece of > cake. Had I known that it was this straightforward I wouldn't have asked > my questions in the first place. Making the whole thing more robust will > be a bit more d

Re: Threading on an old machine

2008-11-10 Thread Astley Le Jasper
On 10 Nov, 11:07, Astley Le Jasper <[EMAIL PROTECTED]> wrote: > Sorry ... that should be: > > for sitename in mysites: >     log.info("define thread") > > thread_list[sitename]=threading.Thread(name=sitename,target=myproceedure, > args=(sitename,)) >     log.info("done") >     thread_list[sitename]

Re: is there really no good gui builder

2008-11-10 Thread Mike Driscoll
On Nov 8, 1:35 pm, azrael <[EMAIL PROTECTED]> wrote: > whoever I ask, everyone tells me when it come to python and GUI-s and > that there is the best way to use WX. I am browsing for the 10th time > during the last year and I can still not bealive that there is not one > project to make gui-buildin

Re: PySqlite - division of real numbers without decimal fractions

2008-11-10 Thread Astley Le Jasper
On 8 Nov, 05:39, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On Fri, 07 Nov 2008 14:36:52 +0100, Gerhard Häring <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: > > > Astley Le Jasper wrote: > > > I've been getting errors recently when using pysqlite. I've declared > > > the ta

Re: My first Python program -- a lexer

2008-11-10 Thread Paul McGuire
On Nov 10, 7:29 am, Thomas Mlynarczyk <[EMAIL PROTECTED]> wrote: > Paul McGuire schrieb: > > > loc = data.index("list") > > print data[:loc].count("\n")-1 > > print loc-data[:loc].rindex("\n")-1 > > > prints 5,14 > > > I'm sure it's non-optimal, but it *is* an algorithm that does not > > require ke

Re: Workflow engine?

2008-11-10 Thread BJörn Lindqvist
2008/11/10 Grzegorz Staniak <[EMAIL PROTECTED]>: > On 09.11.2008, Tino Wildenhain <[EMAIL PROTECTED]> wroted: > >> The common denonimator of a workflow (state engine) is so simple, the >> only complexity comes from the environment it needs to drive. >> >> So in short: I doubt there is a general sol

Python fish simulation?

2008-11-10 Thread Joe Strout
Is there any Python-based fish simulation project? I've tried searching google and pypi, but no luck. No burning need, just seems like it'd be fun. Thanks, - Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 3.0 - is this true?

2008-11-10 Thread Aahz
In article <[EMAIL PROTECTED]>, Roy Smith <[EMAIL PROTECTED]> wrote: > >The point is that you're forced to use lists to compute the sub-sequences. >This makes sense, because lists fit the "indefinite length sequence" idea. >Then, you're forced to use tuples as the dictionary keys, because tupl

Re: My first Python program -- a lexer

2008-11-10 Thread Steve Holden
Some pratt wrote: > BLAST YOUR AD [...] and curse yours -- http://mail.python.org/mailman/listinfo/python-list

Re: Python COM: Automatic wrap/unwrap?

2008-11-10 Thread Paul Rudin
Tim Golden <[EMAIL PROTECTED]> writes: > greg wrote: >> Larry Bates wrote: >> >>> You should post this on comp.python.windows as Mark and the other >>> Windows/COM gurus hang around there a lot. >> >> I can't find any such newsgroup -- are you sure >> that's what it's called? > > I think that's wh

Re: Python fish simulation?

2008-11-10 Thread Tim Chase
Is there any Python-based fish simulation project? I've tried searching google and pypi, but no luck. No burning need, just seems like it'd be fun. Without much detail on what you want to simulate... class Fish: LITTLE, HUGE = range(2) def __init__(self, name, size=None): self.name

Re: Python 3.0 - is this true?

2008-11-10 Thread Terry Reedy
Duncan Grisby wrote: In article <[EMAIL PROTECTED]>, Terry Reedy <[EMAIL PROTECTED]> wrote: Have you written any Python code where you really wanted the old, unpredictable behavior? I have an object database written in Python. It, like Python, is dynamically typed. It heavily relies on bein

Re: My first Python program -- a lexer

2008-11-10 Thread Thomas Mlynarczyk
Paul McGuire schrieb: Just be sure to account for tabs when computing the column, which this simple-minded algorithm does not do. Another thing I had not thought of -- thanks for the hint. Greetings, Thomas -- Ce n'est pas parce qu'ils sont nombreux à avoir tort qu'ils ont raison! (Coluche)

Re: Threading on an old machine

2008-11-10 Thread Terry Reedy
Astley Le Jasper wrote: I have an application that put on an old machine with a fresh Xubuntu installation (with Python 2.5). But I can't get the threading to work The application was written on a combination of Windows XP and OpenSuse and has been running without any problems using Eclipse/ Pyd

Re: Python 3.0 - is this true?

2008-11-10 Thread Robin Becker
Martin v. Löwis wrote: Sure: if len(L1) == len(L2): return sorted(L1) == sorted(L2) # check whether two lists contain the same elements else: return False It doesn't really matter here what the result of the sorts actually is as long as the algorithm leads to the same result for all pe

Re: Pyro "could not find NameServer"

2008-11-10 Thread Chuckk Hubbard
OK, I think I have it. The Manual says to start a Name Server "using the ns command", and I figured out that means using the pyro-ns script. On Mon, Nov 10, 2008 at 10:49 AM, Chuckk Hubbard <[EMAIL PROTECTED]> wrote: > The docs say to try to discover the URI on my own if this happens. > Could I g

Re: Finding the instance reference of an object

2008-11-10 Thread Terry Reedy
greg wrote: Arnaud Delobelle wrote: (CBV) An evaluation strategy where arguments are evaluated before the function or procedure is entered. Only the values of the arguments are passed and changes to the arguments within the called procedure have no effect on the actual arguments

Re: mod_python and file not found

2008-11-10 Thread Steve Holden
Simo D wrote: > Hello, I'm trying to configure the apache to handle the python scripts. My > platform is a CentOs server. > I wrote these directives in the conf.d/python.conf: > > Options Indexes FollowSymLinks MultiViews > AllowOverride None > Order allow,deny > allow from all > AddHand

Re: Finding the instance reference of an object

2008-11-10 Thread greg
Terry Reedy wrote: In other words, as I acknowledged in my other post, one can say that all calling is calling by value. No, those are not other words for what I'm saying. Call by reference is very demonstrably different from call by value, as has been pointed out a large number of times alrea

Re: Python COM: Automatic wrap/unwrap?

2008-11-10 Thread Tim Golden
greg wrote: Larry Bates wrote: You should post this on comp.python.windows as Mark and the other Windows/COM gurus hang around there a lot. I can't find any such newsgroup -- are you sure that's what it's called? I think that's what it's called on gmane (or some other newsgroup gateway). Fr

Re: C Module question

2008-11-10 Thread Christian Heimes
[EMAIL PROTECTED] wrote: Hello, I'm trying to write a Python extension module in C for the first time. I have two questions: I have a much better suggestion: Use Cython! Although I'm pretty experienced with the Python C API, I prefer Cython over hand written C code for most stuff. It's s

Re: Python 3.0 - is this true?

2008-11-10 Thread Duncan Grisby
In article <[EMAIL PROTECTED]>, Terry Reedy <[EMAIL PROTECTED]> wrote: >Have you written any Python code where you really wanted the old, >unpredictable behavior? I have an object database written in Python. It, like Python, is dynamically typed. It heavily relies on being able to sort lists w

mod_python and file not found

2008-11-10 Thread Simo D
Hello, I'm trying to configure the apache to handle the python scripts. My platform is a CentOs server. I wrote these directives in the conf.d/python.conf: Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all AddHandler mod_python .py PythonHand

Re: using exec() to instantiate a new object.

2008-11-10 Thread George Sakkis
On Nov 10, 10:37 am, RyanN <[EMAIL PROTECTED]> wrote: > On Nov 10, 7:47 am, RyanN wrote: > > > Thank you both, I knew there had to be a good way of doing this. > > > -Ryan > > Just an update. I used dictionaries to hold objects and their names. > I'm beginning to understand better. Now to apply th

Re: Python 3.0 - is this true?

2008-11-10 Thread Steve Holden
Robin Becker wrote: > Martin v. Löwis wrote: >>> Sure: >>> >>> if len(L1) == len(L2): >>> return sorted(L1) == sorted(L2) # check whether two lists contain >>> the same elements >>> else: >>> return False >>> >>> It doesn't really matter here what the result of the sorts actually is >>> as

Threading on an old machine

2008-11-10 Thread Astley Le Jasper
I have an application that put on an old machine with a fresh Xubuntu installation (with Python 2.5). But I can't get the threading to work The application was written on a combination of Windows XP and OpenSuse and has been running without any problems using Eclipse/ Pydev. However, now that I tr

Re: Python COM: Automatic wrap/unwrap?

2008-11-10 Thread greg
Larry Bates wrote: You should post this on comp.python.windows as Mark and the other Windows/COM gurus hang around there a lot. I can't find any such newsgroup -- are you sure that's what it's called? -- Greg -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 3.0 - is this true?

2008-11-10 Thread George Sakkis
On Nov 10, 4:10 am, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > Roy Smith wrote: > > Your > > choice of containers is not based on any theoretical arguments of what each > > type was intended to represent, but the cold hard reality of what > > operations they support. > > Right. What seems missi

Re: using exec() to instantiate a new object.

2008-11-10 Thread RyanN
On Nov 10, 7:47 am, RyanN wrote: > Thank you both, I knew there had to be a good way of doing this. > > -Ryan Just an update. I used dictionaries to hold objects and their names. I'm beginning to understand better. Now to apply this to my actual problem. Here's the code I ended up with: class con

Tone channel BBC World

2008-11-10 Thread هيثم
Download FREE from here http://ringtonesmp03.blogspot.com/2008/11/tone-channel-bbc-world.html http://ringtonesmp03.blogspot.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Finding the instance reference of an object

2008-11-10 Thread Joe Strout
On Nov 10, 2008, at 8:30 AM, Terry Reedy wrote: That hinges on what exactly is meant by "changes to the arguments". Mutating them, like Python does, which is why calling Python CBV leads people to write buggy code. >In Python it can only mean assigning directly to the bare name -- anythin

Re: Python fish simulation?

2008-11-10 Thread Mike Driscoll
On Nov 10, 8:39 am, Joe Strout <[EMAIL PROTECTED]> wrote: > Is there any Python-based fish simulation project?  I've tried   > searching google and pypi, but no luck.  No burning need, just seems   > like it'd be fun. > > Thanks, > - Joe Or you could check out the turtle simulation which should gi

Remote control of firefox (mozilla) from a python program

2008-11-10 Thread Scott
I have a requirement to control a firefox web browser from an external python program. The python program running under linux from a command shell needs to first find all open firefox web browser windows read the URL currently displayed in each web browser and if the URL matches a particular regul

Re: is there really no good gui builder

2008-11-10 Thread Colin J. Williams
Mike Driscoll wrote: On Nov 8, 1:35�pm, azrael <[EMAIL PROTECTED]> wrote: whoever I ask, everyone tells me when it come to python and GUI-s and that there is the best way to use WX. I am browsing for the 10th time during the last year and I can still not bealive that there is not one project to

Re: Python 3.0 - is this true?

2008-11-10 Thread Robin Becker
Steve Holden wrote: .intain). Of course, using SQL against a traditional RDBMS will not return rows with NULL values for salary in a query such as SELECT name, address WHERE salary < 1 precisely *because* NULL (absence of value) does not compare with any value. So you could say t

Re: Python 3.0 - is this true?

2008-11-10 Thread Robin Becker
Robin Becker wrote: Steve Holden wrote: .intain). Of course, using SQL against a traditional RDBMS will not return rows with NULL values for salary in a query such as SELECT name, address WHERE salary < 1 precisely *because* NULL (absence of value) does not compare with any valu

Re: Python 3.0 - is this true?

2008-11-10 Thread Steven D'Aprano
On Sun, 09 Nov 2008 10:45:31 -0500, Roy Smith wrote: > As another example, consider a list of items being juggled: > > [RubberChicken(), ChainSaw(), Canteloupe()] > > I could go through contortions to find some common subclass for these > items, but the whole *point* is that they're not of the s

wildcard match with list.index()

2008-11-10 Thread Mr . SpOOn
Hi, is there any way to search elements in a list using wildcards? I have a list of various elements and I need to search for elements starting with 'no', extract them and put in a new list. I was thinking about something like: mylist.index('no*') Of course this doesn't work. -- http://mail.pyth

Re: wildcard match with list.index()

2008-11-10 Thread Grzegorz Staniak
On 10.11.2008, Mr.SpOOn <[EMAIL PROTECTED]> wroted: > is there any way to search elements in a list using wildcards? > > I have a list of various elements and I need to search for elements > starting with 'no', extract them and put in a new list. > I was thinking about something like: > > mylist.i

Re: Python 3.0 - is this true?

2008-11-10 Thread Marc 'BlackJack' Rintsch
On Mon, 10 Nov 2008 16:32:47 +, Robin Becker wrote: > on the other hand I find it odd that > > cmp(None,None) fails in Python 3 when None==None returns True. That's because there is no order defined for `NoneType` but equality is. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python

Re: The London Fetish Week Survival Guide for North Americans

2008-11-10 Thread superfanhfut
On 11月10日, 下午6时13分, [EMAIL PROTECTED] wrote: > Magazine BDSMhttp://magazin.byethost2.comHands-down, London has some > the best fetish party weekends around. So what? I really do not understand ! -- http://mail.python.org/mailman/listinfo/python-list

Re: Logging thread with Queue and multiple threads to log messages

2008-11-10 Thread Vinay Sajip
On Nov 9, 8:28 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I am trying to put up a queue (through aloggingthread) so that all > worker threads can ask it to log messages. However, the problem I am > facing is that, well, theloggingthread itself is running forever. > It does not know when

Pyro "could not find NameServer"

2008-11-10 Thread Chuckk Hubbard
The docs say to try to discover the URI on my own if this happens. Could I get a hand doing that? This isn't just something I want to solve on my machine, e.g. by changing my network setup or what not; this is a program I hope to distribute and I hope my users can avoid having to deal with this, be

Re: Finding the instance reference of an object

2008-11-10 Thread greg
Arnaud Delobelle wrote: // What is passed to foo below is obviously not a 'variable // reference' as the argument is not a variable. foo(a[3]); // Now a[3] == 7 foo(b.i); // Now b.i == 7 Yes, it is. By "variable" I mean what C calls an lvalue, i.e. something you can assign to.

حصريا نغمة احمد حلمى فى فيلم اسف على الازعاج

2008-11-10 Thread هيثم
حصريا نغمة احمد حلمى فى فيلم اسف على الازعاج نغمة احمد حلمى من فيلم أسف علي الازعاج حمل من هنا http://nagamatkteer.blogspot.com/2008/11/blog-post_10.html http://nagamatkteer.blogspot.com/2008/11/blog-post_10.html بدون تسجيل ولا يحزنون -- http://mail.python.org/mailman/listinfo/python-list

Sync paramstyle between sqlite and mysql

2008-11-10 Thread Daniel
Hello, I'm developing an application that accesses both a MySQL and an SQLite database. I would like to have named parameters in my SQL and have found the following: For MySQL my named parameters need to look like this: %(paramname)s For SQLite my named parameters need to look like this: :paramn

Re: Remote control of firefox (mozilla) from a python program

2008-11-10 Thread Daniel
On Nov 10, 9:23 am, Scott <[EMAIL PROTECTED]> wrote: > I have a requirement to control a firefox web browser from an external > python program.  The python program running under linux from a command > shell needs to first find all open firefox web browser windows read > the URL currently displayed

The London Fetish Week Survival Guide for North Americans

2008-11-10 Thread fernandena
Magazine BDSM http://magazin.byethost2.com Hands-down, London has some the best fetish party weekends around. -- http://mail.python.org/mailman/listinfo/python-list

C Module question

2008-11-10 Thread [EMAIL PROTECTED]
Hello, I'm trying to write a Python extension module in C for the first time. I have two questions: 1. How can I pass a file-like object into the C part? The PyArg_* functions can convert objects to all sort of types, but not FILE*. 2. How can I preserve information needed in the C part between

Re: creating a block file for file-like object

2008-11-10 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Iain wrote: > Well I did work out *a* solution this way: > > pipename = os.tmpnam() > os.mkfifo(pipename) > pid = os.fork() > if pid==0: > fifoobj = open(pipename,"w") > fifoobj.write(streamobj.read()) > fifoobj.close() > os.unlink(pipename)

Re: why does this call to re.findall() loop forever?

2008-11-10 Thread Nick Craig-Wood
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > My apologies, given that Google Groups messes up the formatting, the > regexp should read > > regexp = re.compile(""" href= > \"(.*?)\" rel=\"nofollow\">(.*?).*?\s*(?: \">(.*?))?.*?(?:to ((?: ) > +))*.*?.*?\s*.*? li>""", re.DOTALL) Some regu

Re: 2.6, 3.0, and truly independent intepreters

2008-11-10 Thread Andy O'Meara
On Nov 5, 5:09 pm, Paul Boddie <[EMAIL PROTECTED]> wrote: > Anyway, to keep things constructive, I should ask (again) whether you > looked at tinypy [1] and whether that might possibly satisfy your > embedded requirements. Actually, I'm starting to get into the tinypy codebase and have been talk

Re: Python 3.0 - is this true?

2008-11-10 Thread Martin v. Löwis
Roy Smith wrote: > Your > choice of containers is not based on any theoretical arguments of what each > type was intended to represent, but the cold hard reality of what > operations they support. Right. What seems missing is a "frozen list" type - the list needs to be frozen in order to be use

Re: Finding the instance reference of an object

2008-11-10 Thread Terry Reedy
Joe Strout wrote: On Nov 10, 2008, at 8:30 AM, Terry Reedy wrote: That hinges on what exactly is meant by "changes to the arguments". Mutating them, like Python does, which is why calling Python CBV leads people to write buggy code. >In Python it can only mean assigning directly to the ba

Re: Finding the instance reference of an object

2008-11-10 Thread Terry Reedy
Joe Strout wrote: On Nov 10, 2008, at 8:30 AM, Terry Reedy wrote: That hinges on what exactly is meant by "changes to the arguments". Mutating them, like Python does, which is why calling Python CBV leads people to write buggy code. >In Python it can only mean assigning directly to the ba

disable ctrl-P in idle?

2008-11-10 Thread timw.google
Is there a way to disable ctrl-P (print window) in IDLE? I'm editing some python code in IDLE and I keep hitting this by mistake from my years of emacs editing. Thanks in advance. -- http://mail.python.org/mailman/listinfo/python-list

Re: 2.6, 3.0, and truly independent intepreters

2008-11-10 Thread Andy O'Meara
On Nov 6, 8:25 am, sturlamolden <[EMAIL PROTECTED]> wrote: > On Nov 5, 8:44 pm, "Andy O'Meara" <[EMAIL PROTECTED]> wrote: > > > In a few earlier posts, I went into details what's meant there: > > >http://groups.google.com/group/comp.lang.python/browse_thread/thread/... > > All this says is: > > 1.

Re: is there really no good gui builder

2008-11-10 Thread Mike Driscoll
On Nov 10, 10:27 am, "Colin J. Williams" <[EMAIL PROTECTED]> wrote: > Mike Driscoll wrote: > > On Nov 8, 1:35 pm, azrael <[EMAIL PROTECTED]> wrote: > >> whoever I ask, everyone tells me when it come to python and GUI-s and > >> that there is the best way to use WX. I am browsing for the 10th time >

Re: 2.6, 3.0, and truly independent intepreters

2008-11-10 Thread Andy O'Meara
On Nov 6, 9:02 pm, sturlamolden <[EMAIL PROTECTED]> wrote: > On Nov 7, 12:22 am, Walter Overby <[EMAIL PROTECTED]> wrote: > > > I read Andy to stipulate that the pipe needs to transmit "hundreds of > > megs of data and/or thousands of data structure instances."  I doubt > > he'd be happy with memcp

Re: Finding the instance reference of an object [long and probably boring]

2008-11-10 Thread Aaron Brady
On Nov 7, 3:03 pm, Arnaud Delobelle <[EMAIL PROTECTED]> wrote: > 1. Is Napoleon a copy of Dobby or are they the same cat? > > 2. Is Polion a copy of Napoleon or are they the same cat? > > 3. When we got rid of Napoleon's fleas, was Nelson deflea-ed as well? > > 4. When Napoleon died, did Nelson die

IBM integer and double formats

2008-11-10 Thread john.goodleaf
I'm poking at writing data out to a SAS XPORT file (transport file). Each record must be 80 bytes long, ASCII. Integers should be "IBM- style integers" and floats should be "IBM-style doubles." Now I have some idea what that means from reading a C source file documented by the SAS institute, but be

Re: Python 3.0 - is this true?

2008-11-10 Thread rurpy
On Nov 10, 8:57 am, Steve Holden <[EMAIL PROTECTED]> wrote: > Robin Becker wrote: ...snip... >> In old style python there was a sort of standard behaviour whereby None >> was comparable with most of the other primitive types. That at least >> allowed us to performs various stupid tricks with data.

Re: Python 3.0 - is this true?

2008-11-10 Thread Arnaud Delobelle
Robin Becker <[EMAIL PROTECTED]> writes: > Steve Holden wrote: > .intain). >> >> Of course, using SQL against a traditional RDBMS will not return rows >> with NULL values for salary in a query such as >> >> SELECT name, address WHERE salary < 1 >> >> precisely *because* NULL (absence

First post, recursive references with pickle.

2008-11-10 Thread mark starnes
Hi everyone, this is my first post to this group, so please be gentle. I've written a class which, when I attempt to pickle, gives the error: *** RuntimeError: maximum recursion depth exceeded Is there a way to make pickle display data about what it's trying to do? I'm thinking that if so, the

Re: Logging thread with Queue and multiple threads to log messages

2008-11-10 Thread Floris Bruynooghe
Hi On Nov 9, 8:28 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I am trying to put up a queue (through a logging thread) so that all > worker threads can ask it to log messages. There is no need to do anything like this, the logging module is thread safe and you can happily just create log

Re: Python 3.0 - is this true?

2008-11-10 Thread George Sakkis
On Nov 10, 2:21 pm, [EMAIL PROTECTED] wrote: > So you could say that 3.0 is forcing us to acknowledge database > > > reality ;-) > > (Again) huh? > Reality in databases is that NULL *is* comparable. > "NULL==something" returns False, it doesn't raise an error. Given that in SQL "NULL `op` somethi

Re: Python 3.0 - is this true?

2008-11-10 Thread Rhamphoryncus
On Nov 10, 8:16 am, Terry Reedy <[EMAIL PROTECTED]> wrote: > Duncan Grisby wrote: > > In article <[EMAIL PROTECTED]>, > >  Terry Reedy  <[EMAIL PROTECTED]> wrote: > > >> Have you written any Python code where you really wanted the old, > >> unpredictable behavior? > > > I have an object database wr

Re: wildcard match with list.index()

2008-11-10 Thread Arnaud Delobelle
Mr.SpOOn <[EMAIL PROTECTED]> writes: > Hi, > is there any way to search elements in a list using wildcards? > > I have a list of various elements and I need to search for elements > starting with 'no', extract them and put in a new list. > I was thinking about something like: > > mylist.index('no*

Re: disable ctrl-P in idle?

2008-11-10 Thread Robert Singer
On Mon, 10 Nov 2008 10:40:28 -0800 (PST), "timw.google" <[EMAIL PROTECTED]> wrote: >Is there a way to disable ctrl-P (print window) in IDLE? I'm editing >some python code in IDLE and I keep hitting this by mistake from my >years of emacs editing. > >Thanks in advance. Try autohotkey and map it to

Re: disable ctrl-P in idle?

2008-11-10 Thread Robert Singer
On Mon, 10 Nov 2008 20:56:46 +0100, Robert Singer <[EMAIL PROTECTED]> wrote: >On Mon, 10 Nov 2008 10:40:28 -0800 (PST), "timw.google" ><[EMAIL PROTECTED]> wrote: > >>Is there a way to disable ctrl-P (print window) in IDLE? I'm editing >>some python code in IDLE and I keep hitting this by mistake f

Re: IBM integer and double formats

2008-11-10 Thread Mark Dickinson
On Nov 10, 7:20 pm, "john.goodleaf" <[EMAIL PROTECTED]> wrote: > does anyone know of an already-done means of writing > integers and floats out to their IBM mainframe equivalents? > I don't know of anything in Python that does this. There was a thread a while ago that may be relevant: http://mai

Re: Python 3.0 - is this true?

2008-11-10 Thread Steve Holden
[EMAIL PROTECTED] wrote: > On Nov 10, 8:57 am, Steve Holden <[EMAIL PROTECTED]> wrote: >> Robin Becker wrote: > ...snip... >>> In old style python there was a sort of standard behaviour whereby None >>> was comparable with most of the other primitive types. That at least >>> allowed us to performs

Re: Python 3.0 - is this true?

2008-11-10 Thread Russ P.
On Nov 8, 10:20 am, walterbyrd <[EMAIL PROTECTED]> wrote: > I have read that in Python 3.0, the following will raise an exception: > > >>> [2, 1, 'A'].sort() > > Will that raise an exception? And, if so, why are they doing this? How > is this helpful? Is this new "enhancement" Pythonic? I realize

Re: IBM integer and double formats

2008-11-10 Thread Mark Dickinson
On Nov 10, 8:16 pm, Mark Dickinson <[EMAIL PROTECTED]> wrote: > and how to handle out-of-range floats coming back (if I recall > correctly, the IBM format allows a wider range of exponents > than IEEE). > Whoops---wrong way around. It looks like it's IEEE that has the larger exponent range. DBL

Re: disable ctrl-P in idle?

2008-11-10 Thread timw.google
On Nov 10, 2:57 pm, Robert Singer <[EMAIL PROTECTED]> wrote: > On Mon, 10 Nov 2008 20:56:46 +0100, Robert Singer <[EMAIL PROTECTED]> > wrote: > > >On Mon, 10 Nov 2008 10:40:28 -0800 (PST), "timw.google" > ><[EMAIL PROTECTED]> wrote: > > >>Is there a way to disable ctrl-P (print window) in IDLE? I'm

Re: Python 3.0 - is this true?

2008-11-10 Thread rurpy
On Nov 10, 1:21 pm, Steve Holden <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > On Nov 10, 8:57 am, Steve Holden <[EMAIL PROTECTED]> wrote: > >> Robin Becker wrote: > > ...snip... > >>> In old style python there was a sort of standard behaviour whereby None > >>> was comparable with most

Re: Finding the instance reference of an object [long and probably boring]

2008-11-10 Thread Arnaud Delobelle
Aaron Brady <[EMAIL PROTECTED]> writes: > Do you ever say to someone, "'Napoleon' will no longer refer to > Nelson. It is this lobster now instead", while you are holding a > lobster? Not explicitly. But in the course of conversation I might refer to Napoleon, meaning Napoleon Bonaparte (1769 -

Re: Python 3.0 - is this true?

2008-11-10 Thread rurpy
On Nov 10, 12:39 pm, George Sakkis <[EMAIL PROTECTED]> wrote: George Sakkis wrote: > On Nov 10, 2:21 pm, [EMAIL PROTECTED] wrote: > >> So you could say that 3.0 is forcing us to acknowledge database >> >> > reality ;-) >> >> (Again) huh? >> Reality in databases is that NULL *is* comparable. >> "NUL

Re: My first Python program -- a lexer

2008-11-10 Thread John Machin
On Nov 11, 12:26 am, Thomas Mlynarczyk <[EMAIL PROTECTED] webdesign.de> wrote: > John Machin schrieb: > > >> On the other hand: If all my tokens are "mutually exclusive" then, > > But they won't *always* be mutually exclusive (another example is > > relational operators (< vs <=, > vs >=)) and AFAI

Re: Snippets management

2008-11-10 Thread Stef Mientki
expora wrote: On Nov 6, 12:38 pm, Stef Mientki <[EMAIL PROTECTED]> wrote: Edwin wrote: Hi there, I've been looking for a snippet manager and found PySnippet but it requires PyGTK. Do you know any other option that doesn't need much? I'm sort of new to python and user inte

Re: C Module question

2008-11-10 Thread John Machin
On Nov 11, 12:55 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > On Mon, 10 Nov 2008 05:44:44 -0800, [EMAIL PROTECTED] wrote: > > All in all I must say that implementing a C extension is a piece of > > cake. Had I known that it was this straightforward I wouldn't have asked > > my questio

Re: Remote control of firefox (mozilla) from a python program

2008-11-10 Thread Mike Driscoll
On Nov 10, 10:23 am, Scott <[EMAIL PROTECTED]> wrote: > I have a requirement to control a firefox web browser from an external > python program.  The python program running under linux from a command > shell needs to first find all open firefox web browser windows read > the URL currently displayed

Re: Finding the instance reference of an object [long and probably boring]

2008-11-10 Thread Aaron Brady
On Nov 10, 2:45 pm, Arnaud Delobelle <[EMAIL PROTECTED]> wrote: > Aaron Brady <[EMAIL PROTECTED]> writes: > > Do you ever say to someone, "'Napoleon' will no longer refer to > > Nelson.  It is this lobster now instead", while you are holding a > > lobster? > > Not explicitly.  But in the course of

Re: Python 3.0 - is this true?

2008-11-10 Thread Steve Holden
[EMAIL PROTECTED] wrote: > On Nov 10, 1:21 pm, Steve Holden <[EMAIL PROTECTED]> wrote: >> [EMAIL PROTECTED] wrote: >>> On Nov 10, 8:57 am, Steve Holden <[EMAIL PROTECTED]> wrote: Robin Becker wrote: >>> ...snip... > In old style python there was a sort of standard behaviour whereby None >>

Re: First post, recursive references with pickle.

2008-11-10 Thread George Sakkis
On Nov 10, 2:23 pm, mark starnes <[EMAIL PROTECTED]> wrote: > Hi everyone, this is my first post to this group, so please be gentle. > > I've written a class which, when I attempt to pickle, gives the error: > > *** RuntimeError: maximum recursion depth exceeded > > Is there a way to make pickle d

Re: My first Python program -- a lexer

2008-11-10 Thread Thomas Mlynarczyk
John Machin schrieb: Single-character tokens like "<" may be more efficiently handled by doing a dict lookup after failing to find a match in the list of (name, regex) tuples. Yes, I will keep that in mind. For the time being, I will use only regexes to keep the code simpler. Later, or when t

  1   2   >