Project layout / Import files from different subdirectories

2008-11-10 Thread Markus Mayer
Hi folks. I'm new to python and have a slight problem importing - or maybe understanding - modules. I'm writing a GUI application using Qt4 and wanted to separate the business from the view logic. So I have my folder structure as following: project/ main.py important.py project/ gui/ __

Re: concurrency program design stackless python tasklet or python thread?

2008-11-10 Thread davy zhang
thanks very much for the hint, circuits is a very good event-driven frame work just like twisted but currently my project is in a pretty much complex way see, I'm designing a so called "Game Server", every client has their own task execution order, see like below: 1.clientA wants to sale his ar

Re: Final Python Class of 2009

2008-11-10 Thread Steven D'Aprano
On Mon, 10 Nov 2008 22:14:16 -0500, Steve Holden wrote: Subject: Final Python Class of 2009 Steve, have you been in Guido's time machine again? -- Steven (not Steve Holden, another one) -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 3.0 - is this true?

2008-11-10 Thread Tim Roberts
Steven D'Aprano <[EMAIL PROTECTED]> wrote: >On Sat, 08 Nov 2008 22:53:14 -0800, Kay Schluehr wrote: > >>> How often do you care about equality ignoring order for lists >>> containing arbitrary, heterogeneous types? >> >> A few times. Why do you care, Steven? > >I'm a very caring kind of guy. Tha

Re: concurrency program design stackless python tasklet or python thread?

2008-11-10 Thread James Mills
On Tue, Nov 11, 2008 at 3:57 PM, davy zhang <[EMAIL PROTECTED]> wrote: > first here is my basic idea is every actor holds their own msg queue, > the process function will handle the message as soon as the dispatcher > object put the message in. > > This idea naturally leads me to place every actor

Re: Finding the instance reference of an object

2008-11-10 Thread Steven D'Aprano
On Tue, 11 Nov 2008 16:54:10 +1300, greg wrote: > Steven D'Aprano wrote: > >> But the name isn't the argument. The argument to a function is an >> object > > The *formal* argument *is* a name, and that's what the phrase "changes > to the arguments within the called procedure" is talking about.

concurrency program design stackless python tasklet or python thread?

2008-11-10 Thread davy zhang
first here is my basic idea is every actor holds their own msg queue, the process function will handle the message as soon as the dispatcher object put the message in. This idea naturally leads me to place every actor in a separate thread waiting for msg but the rumor has it, stackless python wit

Re: creating a block file for file-like object

2008-11-10 Thread Iain
> Perhaps the parent should open the pipe for reading, before calling > TroublesomeFunction. If the parent then dies, the child will get a "broken > pipe" signal, which by default should kill it. Yeah, that seems to work well, I think. Thanks for the help! I also realised the child process was co

Plot for sale

2008-11-10 Thread [EMAIL PROTECTED]
SELL OUT land area with 12,681 ha, located at the entrance to the town of Pazardzhik(Bulgaria) in city limits and has 106 meters individual . "Dimcho Debelyanov (Miryansko road). A plot in the new economic zone of the city - in the vicinity has built industrial enterprises, shops and warehouses. U

Re: hello

2008-11-10 Thread Robert Singer
On Mon, 10 Nov 2008 19:34:42 -0800 (PST), javed044 <[EMAIL PROTECTED]> wrote: >THIS IS MY NEW BLOG. BLOG TYPE COOL WALLPAPERS AND PICTURE. > This is my new kill filter candidate. -- Bob -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 3.0 - is this true?

2008-11-10 Thread Rhamphoryncus
On Nov 10, 9:31 pm, Rhamphoryncus <[EMAIL PROTECTED]> wrote: > On Nov 10, 6:25 pm, Steven D'Aprano > > > > <[EMAIL PROTECTED]> wrote: > > On Mon, 10 Nov 2008 11:43:59 -0800, Rhamphoryncus wrote: > > > You might as well comment out the sort and call it good.  That's what > > > you really had in 2.x.

Re: Python 3.0 - is this true?

2008-11-10 Thread Rhamphoryncus
On Nov 10, 6:25 pm, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > On Mon, 10 Nov 2008 11:43:59 -0800, Rhamphoryncus wrote: > > You might as well comment out the sort and call it good.  That's what > > you really had in 2.x.  It was close enough most of the time to *look* > > right, yet in truth it s

Re: Workflow engine?

2008-11-10 Thread greg
BJörn Lindqvist wrote: "standard implementation completely based on WfMC specifications using XPDL (without any proprietary extensions !)" Ah, it's based on WtfMC. That explains everything. :-) -- Greg -- http://mail.python.org/mailman/listinfo/python-list

Re: C Module question

2008-11-10 Thread greg
[EMAIL PROTECTED] wrote: Sadly this doesn't work on "file-like" objects like those that are created by opening bz2 files (using the bz2 lib). If the C code you're calling requires a FILE *, then you're out of luck. There's no way of getting a FILE * from an object that's not based on an actual

Re: pysqlite install error on hp ux (ld: Can't find library for -lpython2.5)

2008-11-10 Thread Benjamin Kaplan
On Mon, Nov 10, 2008 at 9:00 PM, Geon. <[EMAIL PROTECTED]> wrote: > > Hi, as far as I know. > > > > 1. you can use module sqlite3 instead. > > 2. you can use these commands on ubuntu: > > > > sudo apt-get install libsqlite3-dev > > sudo easy_install -Z pysqlite > > is possible apt-get on hp unix?

Re: Finding the instance reference of an object

2008-11-10 Thread greg
Steven D'Aprano wrote: But the name isn't the argument. The argument to a function is an object The *formal* argument *is* a name, and that's what the phrase "changes to the arguments within the called procedure" is talking about. Take a function foo that takes one formal parameter x. Pass an

Re: [Newbie] Strange output from list

2008-11-10 Thread Ben Finney
Andrew <[EMAIL PROTECTED]> writes: > (47,) is the python representation of a one item tuple It's also the representation of a one-column result row, which is more pertinent here. Just because ‘str(foo) == str(bar)’, does *not* necessarily mean ‘type(foo) == type(bar)’, nor even ‘isinstance(foo,

Re: disable ctrl-P in idle?

2008-11-10 Thread [EMAIL PROTECTED]
On Nov 10, 4:49 pm, RichardT <[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 from my > >years of

hello

2008-11-10 Thread javed044
THIS IS MY NEW BLOG. BLOG TYPE COOL WALLPAPERS AND PICTURE. PLEASE VISIT MY BLOG THANK YOU. http://picturewallpapers.blogspot.com/ -- http://mail.python.org/mailman/listinfo/python-list

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

2008-11-10 Thread greg
Aaron Brady wrote: I thought of another way Python's passing method could be implemented. Parameters are passed as namespace-name pairs, and every time a variable occurs, it's looked up in the namespace it's in. If it's changed (concurrently) in the outer scope, a copy is made into the inner s

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

2008-11-10 Thread greg
Arnaud Delobelle wrote: But in the course of conversation I might refer to Napoleon, meaning Napoleon Bonaparte (1769 - 1821) or Napoleon III (1808 - 1873). That's more like referring to the name 'Napoleon' in two different namespaces. The original binding still exists, you're just switching co

Final Python Class of 2009

2008-11-10 Thread Steve Holden
As the year draws to a close, Holden Web is pleased to remind readers that its final public "Introduction to Python" class of this year will be held from 9-11 December at our education center close to Washington, DC. There are several hotels conveniently located within walking distance, and we pro

Re: pysqlite install error on hp ux (ld: Can't find library for -lpython2.5)

2008-11-10 Thread Geon.
On 11월10일, 오후1시31분, 一首诗 <[EMAIL PROTECTED]> wrote: > On Nov 10, 10:29 am, "Geon." <[EMAIL PROTECTED]> wrote: > > > hi everyone! > > > when i install pysqlite i meet bellow error. ( use easy_install and > > source code building same problem ) > > > ld: Can't find library for -lpython2.5 > > > what m

Re: [Newbie] Strange output from list

2008-11-10 Thread Andrew
Ben Finney wrote: > Gilles Ganault <[EMAIL PROTECTED]> writes: > > >> Hello >> >> I'm getting some unwanted result when SELECTing data from an SQLite >> database: >> >> == >> sql = 'SELECT id FROM master' >> rows=list(cursor.execute(sql)) >> for id in rows: >> sql = 'SELECT COUNT(code)

Re: [Newbie] Strange output from list

2008-11-10 Thread Ben Finney
My apologies, my response was rather confused. Ben Finney <[EMAIL PROTECTED]> writes: > The result of an SQL SELECT is a sequence of tuples, where each item > in the tuple is a value for a column as specified in the SELECT > clause. This remains true. No matter how many columns you specify in th

Re: [Newbie] Strange output from list

2008-11-10 Thread Ben Finney
Gilles Ganault <[EMAIL PROTECTED]> writes: > Hello > > I'm getting some unwanted result when SELECTing data from an SQLite > database: > > == > sql = 'SELECT id FROM master' > rows=list(cursor.execute(sql)) > for id in rows: > sql = 'SELECT COUNT(code) FROM companies WHERE code="%s"' %

Re: Finding the instance reference of an object

2008-11-10 Thread Steven D'Aprano
On Mon, 10 Nov 2008 23:16:13 +1300, greg 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

Re: Python 3.0 - is this true?

2008-11-10 Thread Steven D'Aprano
On Mon, 10 Nov 2008 11:43:59 -0800, Rhamphoryncus wrote: > You might as well comment out the sort and call it good. That's what > you really had in 2.x. It was close enough most of the time to *look* > right, yet in truth it silently failed. 3.0 makes it an explicit > failure. I don't doubt th

[Newbie] Strange output from list

2008-11-10 Thread Gilles Ganault
Hello I'm getting some unwanted result when SELECTing data from an SQLite database: == sql = 'SELECT id FROM master' rows=list(cursor.execute(sql)) for id in rows: sql = 'SELECT COUNT(code) FROM companies WHERE code="%s"' % id[0] result = list(cursor.execute(sql)) prin

Re: Call-By-Object

2008-11-10 Thread Steven D'Aprano
On Mon, 10 Nov 2008 13:30:08 -0800, Ethan Furman wrote: > Coming from assembly, C, Pascal, Fortran, BASIC, FoxPro, and possibly > others whose names I do not currently remember, I am well aware of what > c-b-v and c-b-r means and had never heard of c-b-o (alas, my degree is > in Business Administr

Re: Finding the instance reference of an object

2008-11-10 Thread Steven D'Aprano
On Mon, 10 Nov 2008 08:39:58 -0700, Joe Strout wrote: > By that definition, Java, REALbasic, C++, and VB.NET are all call-by- > reference too (even when explicitly using the "ByVal" keyword in RB/ > VB.NET). No, they are not call-by-reference either. They are call-by-sharing, just like Python an

Re: Python 3.0 - is this true?

2008-11-10 Thread Steven D'Aprano
On Mon, 10 Nov 2008 12:51:51 +, Duncan Grisby wrote: > I have an object database written in Python. It, like Python, is > dynamically typed. It heavily relies on being able to sort lists where > some of the members are None. To some extent, it also sorts lists of > other mixed types. It will b

Re: disable ctrl-P in idle?

2008-11-10 Thread Robert Singer
On Mon, 10 Nov 2008 12:27:22 -0800 (PST), "timw.google" <[EMAIL PROTECTED]> wrote: > >Thanks. I on a XP box now, and it's a pain to get things installed >here. That's why I'm not using emacs. When I'm on Linux, I use emacs. >It's not worth the trouble to install something else for just this. Actu

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

2008-11-10 Thread [EMAIL PROTECTED]
Thank you guys, indeed, calling join() for each thread actually solved the problem. I misunderstood it and call join() right after start() so it didn't work the way I wanted. for i in range(args.threads): children[i].join() -- http://mail.python.org/mailman/listinfo/python-list

Re: Why is indexing into an numpy array that slow?

2008-11-10 Thread Robert Kern
Robert Kern wrote: Rüdiger Werner wrote: Hello! Hi! numpy questions are best answered on the numpy mailing list. http://www.scipy.org/Mailing_Lists Out of curiosity and to learn a little bit about the numpy package i've tryed to implement a vectorised version of the 'Sieve of Zakiya'.

Re: First post, recursive references with pickle.

2008-11-10 Thread Jeremiah Dodds
On Mon, Nov 10, 2008 at 4:36 PM, George Sakkis <[EMAIL PROTECTED]>wrote: > 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: > > > >

Re: IBM integer and double formats

2008-11-10 Thread John Machin
On Nov 11, 9:00 am, Mark Dickinson <[EMAIL PROTECTED]> wrote: > On Nov 10, 7:20 pm, "john.goodleaf" <[EMAIL PROTECTED]> wrote: > > > my own routines, does anyone know of an already-done means of writing > > integers and floats out to their IBM mainframe equivalents? > > Here's a quick attempt at co

Re: Python 2.5 and sqlite

2008-11-10 Thread david . lyon
Quoting "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>: Hi all, On a (sun) webserver that I use, there is python 2.5.1 installed. I'd like to use sqlite3 with this, however sqlite3 is not installed on the webserver. If I were able to compile sqlite using a sun machine (I normally use linux machines) a

Re: Overlapping axis text

2008-11-10 Thread McBuell
try this: fig.autofmt_xdate() should help a lot =) Cheers -- View this message in context: http://www.nabble.com/-matplotlib--Overlapping-axis-text-tp19348114p20430433.html Sent from the Python - python-list mailing list archive at Nabble.com. -- http://mail.python.org/mailman/listinfo/pytho

Python 2.5 and sqlite

2008-11-10 Thread [EMAIL PROTECTED]
Hi all, On a (sun) webserver that I use, there is python 2.5.1 installed. I'd like to use sqlite3 with this, however sqlite3 is not installed on the webserver. If I were able to compile sqlite using a sun machine (I normally use linux machines) and place this in my lunix home account would I be ab

Re: Why is indexing into an numpy array that slow?

2008-11-10 Thread bearophileHUGS
Rüdiger Werner: > So i am looking for any explaination why the numpy version is that slow > (i expected it to be at least as fast as the pure python version). For speed use Psyco with array.array. Psyco is available for Python 2.6 too now. Bye, bearophile -- http://mail.python.org/mailman/listin

Re: Memory error due to the huge/huge input file size

2008-11-10 Thread John Machin
On Nov 11, 8:47 am, [EMAIL PROTECTED] wrote: > import linecache Why??? > reader2 = csv.reader(open(sys.argv[2],"rb")) > reader2_list = [] > reader2_list.extend(reader2) > > for data2 in reader2_list: >    refSeqIDsinTransPro.append(data2[3]) > for data2 in reader2_list: >    promoterSequencesinT

Re: My first Python program -- a lexer

2008-11-10 Thread John Machin
On Nov 11, 8:35 am, Thomas Mlynarczyk <[EMAIL PROTECTED]> wrote: > [Using dict] > > > No, not at all. The point is that you were not *using* any of the > > mapping functionality of the dict object, only ancillary methods like > > iteritems -- hence, you should not have been using a dict at all. >

Re: Class v. Instance variables in Python

2008-11-10 Thread Zane Selvans
Joe Strout strout.net> writes: > How are you creating your list? You need to make sure that each > instance creates its very own list object, something like: > >self.foo = [] > > rather than grabbing a reference to some shared list instance, such as > one defined as a default argument

Re: Memory error due to the huge/huge input file size

2008-11-10 Thread James Mills
On Tue, Nov 11, 2008 at 7:47 AM, <[EMAIL PROTECTED]> wrote: > refSeqIDsinTransPro = [] > promoterSequencesinTransPro = [] > reader2 = csv.reader(open(sys.argv[2],"rb")) > reader2_list = [] > reader2_list.extend(reader2) Without testing, this looks like you're reading the _ENTIRE_ input stream int

Re: disable ctrl-P in idle?

2008-11-10 Thread Jorgen Grahn
On Mon, 10 Nov 2008 13:53:40 -0800 (PST), [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > On Nov 10, 3:27 pm, "timw.google" <[EMAIL PROTECTED]> wrote: >> On Nov 10, 2:57 pm, Robert Singer <[EMAIL PROTECTED]> wrote: ... >> > Or, you can just continue using emacs. I'm using vim, and can't think >> >

Re: Class v. Instance variables in Python

2008-11-10 Thread Joe Strout
On Nov 10, 2008, at 2:44 PM, Zane Selvans wrote: However, one (and only one) of these instance variables is behaving mysteriously like a class variable: all instances of the class are sharing a single copy of the variable, located at the same place in memory. Is there a common mistake tha

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

2008-11-10 Thread Joe Strout
On Nov 10, 2008, at 2:30 PM, Aaron Brady wrote: I agree with Terry that all calling is call-by-value, and Steven that all calling is call-by-bit-flipping. I agree with Joe that call-by- object is a special case of call-by-value. Woo! Almost sounds like approaching consensus. :) However, I'

Re: IBM integer and double formats

2008-11-10 Thread Mark Dickinson
On Nov 10, 7:20 pm, "john.goodleaf" <[EMAIL PROTECTED]> wrote: > my own routines, does anyone know of an already-done means of writing > integers and floats out to their IBM mainframe equivalents? Here's a quick attempt at converting doubles using Python. It uses the isnan and isinf functions that

Class v. Instance variables in Python

2008-11-10 Thread Zane Selvans
I have defined a class called Lineament, which has no class variables - only instance variables, defined and set within __init__(), and later potentially modified by other class methods. However, one (and only one) of these instance variables is behaving mysteriously like a class variable:

Re: Threading on an old machine

2008-11-10 Thread Astley Le Jasper
On 10 Nov, 16:20, Terry Reedy <[EMAIL PROTECTED]> wrote: > 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

Re: Why is indexing into an numpy array that slow?

2008-11-10 Thread Robert Kern
Rüdiger Werner wrote: Hello! Hi! numpy questions are best answered on the numpy mailing list. http://www.scipy.org/Mailing_Lists Out of curiosity and to learn a little bit about the numpy package i've tryed to implement a vectorised version of the 'Sieve of Zakiya'. While the code itse

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

2008-11-10 Thread bruce
hi mike you might look at/into selenium, or firewatir check the spellings! -peace -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Mike Driscoll Sent: Monday, November 10, 2008 1:28 PM To: python-list@python.org Subject: Re: Remote control of firef

Re: disable ctrl-P in idle?

2008-11-10 Thread [EMAIL PROTECTED]
On Nov 10, 3:27 pm, "timw.google" <[EMAIL PROTECTED]> wrote: > 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 PROTECTE

Memory error due to the huge/huge input file size

2008-11-10 Thread tejsupra
Hello Everyone, I need to read a .csv file which has a size of 2.26 GB . And I wrote a Python script , where I need to read this file. And my Computer has 2 GB RAM Please see the code as follows: """ This program has been developed to retrieve all the promoter sequences for the specified list of

Call-By-Object

2008-11-10 Thread Ethan Furman
Many thanks to Stephen, Marc, Terry, and everyone else. Even thanks to those whose stubborn refusal to think at the appropriate layer extended the thread clear off my mail reader's screen. This is one area where my understanding was weak, and in fact have had to change code because I didn't u

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

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: 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: 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: 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: 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: 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: 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: 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: 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, 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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

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: 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

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.

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: 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

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: 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, 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.

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: 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

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: 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

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

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

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

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: 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

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: 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 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: 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

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: 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

  1   2   >