Steiner Tree

2007-02-05 Thread [EMAIL PROTECTED]
Hi, I am looking for links to any implementation of Steiner Tree ( http://en.wikipedia.org/wiki/Steiner_tree ) construction in Python. I could find GeoSteiner ( http://www.diku.dk/geosteiner/ ) which is implemented as a C program. Anybody know python wrapper for this? Anybody tried this program in

Assigning pointer to PySwigObject in Boost

2007-02-05 Thread willievdm
Hi all I'm working with Boost.Python at the moment and have to do the following: -Using Boost, assign a char* in C++ to a PySwigObject (SWIG exposed object) of type uchar*, which is received in C++ as a boost::python::object class. The uchar* pointer in the PySwigObject points to a buffer contain

Re: Python does not play well with others

2007-02-05 Thread [EMAIL PROTECTED]
John Nagle wrote: > Graham Dumpleton wrote: > > On Feb 4, 1:05 pm, Paul Rubin wrote: > > > >>"Paul Boddie" <[EMAIL PROTECTED]> writes: > >> > >>>Probably the biggest inhibitor, as far as I can see, has been the > >>>server technology chosen. Many hosting providers have hi

Finding cpu time spent on my program

2007-02-05 Thread [EMAIL PROTECTED]
I am trying to measure the time the processor spends on some operation, and I want this measure to not depend on the current load of the machine. But doing the following prints different values each time a run. import time c1 = time.clock() for x in xrange(0xF): pass c2 = time.clock() print "

Re: when will python 2.5 take in mainstream?

2007-02-05 Thread Laurent Pointal
[EMAIL PROTECTED] a écrit : > When they have to ... > > One of the big things about Python is that its penetration slows it > down. There's more legacy code and interdependant systems around now > that Python is more successful and more mature. > > Here's a thought -- perhaps it would be worth ha

Re: Decimating Excel files

2007-02-05 Thread greg
Arnd wrote: > Good observation, but as we have numbers of type Cardinalia, > Ordinalia, Distributiva & Multiplicativa in Latin I would prefer > secundating or secondating. (Bisimating or bicimating would multiply > the lines by a factor 2) Interesting. But does this mean that "duplicating" is act

python references

2007-02-05 Thread dustin . getz
>>> from Numeric import zeros >>> p=zeros(3) >>> p array([0,0,0]) >>> p[0] 0 >>> x=p[0] >>> x=10 >>> p array([0,0,0]) #actual behavior #array([10,0,0]) #desired behavior I want x to be a C++-esque reference to p[0] for convenience in a vector3 class. i dont want accessor methods. i know python c

in place-ness of list.append

2007-02-05 Thread Bart Van Loon
Hi all, I would like to find out of a good way to append an element to a list without chaing that list in place, like the builtin list.append() does. currently, I am using the following (for a list of integers, but it could be anything, really) #--

Inheriting str object

2007-02-05 Thread [EMAIL PROTECTED]
I want to have a str with custom methods, but I have this problem: class myStr(str): def hello(self): return 'hello '+self s=myStr('world') print s.hello() # prints 'hello world' s=s.upper() print s.hello() # expected to print 'hello WORLD', but s is no longer myStr, it's a regular st

Re: LDAP/LDIF Parsing

2007-02-05 Thread Michael Ströder
Bruno Desthuilliers wrote: > > If you know which attributes are supposed to be multivalued in your > specific application, then it's time to write a more serious, > application-specific wrapper. ldap.schema can be used to find that out. Ciao, Michael. -- http://mail.python.org/mailman/listinfo/

Re: How can I access data from MS Access?

2007-02-05 Thread Andy Dingley
On 3 Feb, 15:43, [EMAIL PROTECTED] wrote: > How to access data from MS Access? Can you access Access from Access ? from Excel / Visual Basic / SQL Query? First of all check that the DSN is working and connects to the back end MDB. This might not be Python's problem. Secondly check whatever error

Re: in place-ness of list.append

2007-02-05 Thread skip
Bart> #-- Bart> def addnumber(alist, num): Bart> """ work around the inplace-ness of .append """ Bart> mylist = alist[:] Bart> mylist.append(num) Bart> return mylist Bart> #

Re: python references

2007-02-05 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: from Numeric import zeros p=zeros(3) p > array([0,0,0]) p[0] > 0 x=p[0] x=10 p > array([0,0,0]) #actual behavior > #array([10,0,0]) #desired behavior > > I want x to be a C++-esque reference to p[0] for convenience in a > vector3 class.

Re: in place-ness of list.append

2007-02-05 Thread Kent Johnson
Bart Van Loon wrote: > Hi all, > > I would like to find out of a good way to append an element to a list > without chaing that list in place, like the builtin list.append() does. > > currently, I am using the following (for a list of integers, but it > could be anything, really) > > #---

Re: in place-ness of list.append

2007-02-05 Thread Robin Becker
Bart Van Loon wrote: > Hi all, > ... > > #-- > def addnumber(alist, num): > """ work around the inplace-ness of .append """ > mylist = alist[:] > mylist.append(num) > return mylist > #

Re: Python design project

2007-02-05 Thread solrick51
I think I need to explain the things better I think, so I do; First answering the questions above; I think i have to explain the project more. With type I mean; typography/fonts/characters.. For my final exam I created the idea to treath fonts as a living organisms. There for I want to create wit

Re: in place-ness of list.append

2007-02-05 Thread Bart Van Loon
It was Mon, 05 Feb 2007 11:00:50 GMT, when Kent Johnson wrote: > Bart Van Loon wrote: >> Hi all, >> >> I would like to find out of a good way to append an element to a list >> without chaing that list in place, like the builtin list.append() does. >> >> currently, I am using the following (for a

Re: Inheriting str object

2007-02-05 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > I want to have a str with custom methods, but I have this problem: > > class myStr(str): > def hello(self): > return 'hello '+self > > s=myStr('world') > print s.hello() # prints 'hello world' > s=s.upper() > print s.hello() # expect

Re: Decimating Excel files

2007-02-05 Thread Arnd
On 5 Feb., 10:53, greg <[EMAIL PROTECTED]> wrote: > Interesting. But does this mean that "duplicating" is > actually from the wrong root? by definition: roots are never wrong ;) But indeed, you're right, one has to look at the root (eg connected verb) to understand the Numeralia they used: The nu

Re: in place-ness of list.append

2007-02-05 Thread Bart Van Loon
It was Mon, 5 Feb 2007 05:01:28 -0600, when [EMAIL PROTECTED] wrote: > > Bart> #-- > Bart> def addnumber(alist, num): > Bart> """ work around the inplace-ness of .append """ > Bart> mylist = alist[:] > Bart> mylist.app

Re: Inheriting str object

2007-02-05 Thread Benjamin Niemann
Marc 'BlackJack' Rintsch wrote: > In <[EMAIL PROTECTED]>, > [EMAIL PROTECTED] wrote: > >> I want to have a str with custom methods, but I have this problem: >> >> class myStr(str): >> def hello(self): >> return 'hello '+self >> >> s=myStr('world') >> print s.hello() # prints 'hello

Re: Question

2007-02-05 Thread Simon Brunning
On 2/4/07, Magdy Sanad <[EMAIL PROTECTED]> wrote: > I have certain data in the default file format ( GADGET ) . > > I Will be appreciated if you guide me to read these data > > under Python ? You'd probably get more help if you told people what GADGET is. ;-) Are you talking about this -

Re: python references

2007-02-05 Thread Rob Wolfe
[EMAIL PROTECTED] wrote: > >>> from Numeric import zeros > >>> p=zeros(3) > >>> p > array([0,0,0]) > >>> p[0] > 0 > >>> x=p[0] `x' is now a reference to immutable integer object with value 0, not to first element of array `p' > >>> x=10 now `x' is a reference to immutable integer object with va

Re: Inheriting str object

2007-02-05 Thread Virgil Dupras
On Feb 5, 5:48 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I want to have a str with custom methods, but I have this problem: > > class myStr(str): > def hello(self): > return 'hello '+self > > s=myStr('world') > print s.hello() # prints 'hello world' > s=s.upper() > print s.he

C parsing fun

2007-02-05 Thread karoly.kiripolszky
Helo ppl! At the job I was given the task to make a script to analyze C++ code based on concepts my boss had. To do this I needed to represent C++ code structure in Python somehow. I read the docs for Yapps, pyparsing and other stuff like those, then I came up with a very simple idea. I realized t

Re: C parsing fun

2007-02-05 Thread karoly.kiripolszky
and the great thing is that the algorithm can be used with any language that structures the code with brackets, like PHP and many others. -- http://mail.python.org/mailman/listinfo/python-list

comp.lang.python Podcast - URL Change

2007-02-05 Thread [EMAIL PROTECTED]
Unfortunately I have had to change domains. The feeds for the podcast are updated and available at: http://www.latedecember.co.uk/sites/pythonpod/ Thanks, Davy Mitchell http://www.latedecember.co.uk/sites/personal/davy/ -- http://mail.python.org/mailman/listinfo/python-list

Re: subprocess stdin encoding

2007-02-05 Thread Thinker
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 yc wrote: > I have a encoding problem during using of subprocess. The input is > a string with UTF-8 encoding. > > the code is: > > tokenize = > subprocess.Popen(tok_command,stdin=subprocess.PIPE,stdout=subprocess.PIPE,close_fds=True,shell=True) > > >

Re: C parsing fun

2007-02-05 Thread Szabolcs Nagy
> based on concepts my boss had. To do this I needed to represent C++ > code structure in Python somehow. I read the docs for Yapps, pyparsing > and other stuff like those, then I came up with a very simple idea. I > realized that bracketed code is almost like a Python list, except I > have to repl

Re: C parsing fun

2007-02-05 Thread Károly Kiripolszky
Thx for responding, Szabolcs! I've already tried that, but couldn't manage to get it to work. The source I tried to parse is a huge MSVC 7.1 solution containing about 38 projects, and I believe the code is so complex that it has too many different dependencies and GCC just can't handle them. Btw I'

Re: confused about resizing array in Python

2007-02-05 Thread Neil Cerutti
On 2007-02-04, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: >> How about the traditional programming languages like C, Pascal >> or C++? > > For a start they don't have a built in list type. C and Pascal > don't even have one in the standard library. C++ has STL > vectors and if you, the p

Re: HELP NEEDED ... Regd. Regular expressions PyQt

2007-02-05 Thread Neil Cerutti
On 2007-02-03, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I am trying to work out a regular expression in a PyQt > environment for time in hh:mm:ss format. Any suggestions? After you find your time in hh:mm:ss format, be sure to check out time.strptime for a quick conversion. -- Neil Cerutti

Re: in place-ness of list.append

2007-02-05 Thread skip
> "Bart" == Bart Van Loon <[EMAIL PROTECTED]> writes: >> Such an operation will be O(N**2), Bart> why is that? The a[:] operation makes a copy of a (as will the x = a + [n] idiom). Bart> I am building a binary tree where each node is a list. the two Bart> children are the p

Re: Why less emphasis on private data?

2007-02-05 Thread Steve Holden
Paul Boddie wrote: > Paul Rubin wrote: >> Right, the problem is if those methods start changing the "private" >> variable. I should have been more explicit about that. >> >> class A: >>def __init__(self): >> self.__x = 3 >>def foo(self): >> return self.__x >> >> class B(A): pas

Re: C parsing fun

2007-02-05 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, karoly.kiripolszky wrote: > and the great thing is that the algorithm can be used with any > language that structures the code with brackets, like PHP and many > others. But it fails if brackets appear in comments or literal strings. Ciao, Marc 'BlackJack' Rintsch

Re: Inheriting str object

2007-02-05 Thread BJörn Lindqvist
On 5 Feb 2007 02:48:08 -0800, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I want to have a str with custom methods, but I have this problem: > > class myStr(str): > def hello(self): > return 'hello '+self > > s=myStr('world') > print s.hello() # prints 'hello world' > s=s.upper() > p

Re: in place-ness of list.append

2007-02-05 Thread BJörn Lindqvist
On 2/5/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Bart> #-- > Bart> def addnumber(alist, num): > Bart> """ work around the inplace-ness of .append """ > Bart> mylist = alist[:] > Bart> mylist.append(num) >

Watch folder for new file and execute extern program

2007-02-05 Thread Michael Bo
Hi. Can anyone guide me on how to minitor a folder for new files? And when they appear I need to run and externe program with the file just created (buy a 3rd program). - Michael Bo -- http://mail.python.org/mailman/listinfo/python-list

Re: wxPython: TextCtrl delayed update when using TE_RICH(2)

2007-02-05 Thread Chris Mellon
On 2/4/07, jean-michel bain-cornu <[EMAIL PROTECTED]> wrote: > Hi, > > def Execute(self, evt): > > print "Start query" > > time.sleep(5) > > > > The "Start query" message should show in the *messages* box when I > > press the button. Instead, it shows only after the time.sleep(5) > > delay.

Re: C parsing fun

2007-02-05 Thread Károly Kiripolszky
Marc 'BlackJack' Rintsch írta: > In <[EMAIL PROTECTED]>, > karoly.kiripolszky wrote: > > > and the great thing is that the algorithm can be used with any > > language that structures the code with brackets, like PHP and many > > others. > > But it fails if brackets appear in comments or literal st

Re: in place-ness of list.append

2007-02-05 Thread skip
> "BJörn" == BJörn Lindqvist <[EMAIL PROTECTED]> writes: BJörn> On 2/5/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: >> Bart> #-- Bart> def addnumber(alist, num): Bart> """ work around the inplace-ness of .append """ B

Re: C parsing fun

2007-02-05 Thread Károly Kiripolszky
You're right, thank you for the comment! I will look after how to avoid this. Marc 'BlackJack' Rintsch írta: > In <[EMAIL PROTECTED]>, > karoly.kiripolszky wrote: > > > and the great thing is that the algorithm can be used with any > > language that structures the code with brackets, like PHP and

Python 3.0 (Was: when will python 2.5 take in mainstream?)

2007-02-05 Thread Steven Bethard
Laurent Pointal wrote: > For Python 3.0, AFAIK its a big rewrite and developers know that it will > be uncompatible in large parts with existing code. Wrong on both counts. ;-) Python 3.0 is not a rewrite. It's based on the same code base as the 2.X line, but with a lot of the old deprecated thi

Re: Watch folder for new file and execute extern program

2007-02-05 Thread Diez B. Roggisch
Michael Bo wrote: > Hi. > Can anyone guide me on how to minitor a folder for new files? And when > they appear I need to run and externe program with the file just > created (buy a 3rd program). This is OS-dependend. On Linux, FAM/GAM-server come to mind. Diez -- http://mail.python.org/mailman/

Re: subprocess stdin encoding

2007-02-05 Thread Jean-Paul Calderone
On Mon, 05 Feb 2007 20:54:48 +0800, Thinker <[EMAIL PROTECTED]> wrote: > [snip] > >in site.py . and change if 0: to if 1: to enable string encoding. >Now, you can execute python interpreter with LC_CTYPE='UTF-8'. > While this is sort of a correct answer to the question asked, it isn't really a cor

Re: subprocess stdin encoding

2007-02-05 Thread Jean-Paul Calderone
On 4 Feb 2007 23:10:29 -0800, yc <[EMAIL PROTECTED]> wrote: >I have a encoding problem during using of subprocess. The input is a >string with UTF-8 encoding. > >the code is: > >tokenize = >subprocess.Popen(tok_command,stdin=subprocess.PIPE,stdout=subprocess.PIPE,close_fds=True,shell=True) > >(toke

Re: when will python 2.5 take in mainstream?

2007-02-05 Thread Jean-Paul Calderone
On Mon, 05 Feb 2007 10:19:26 +0100, Laurent Pointal <[EMAIL PROTECTED]> wrote: >[EMAIL PROTECTED] a écrit : >> When they have to ... >> >> One of the big things about Python is that its penetration slows it >> down. There's more legacy code and interdependant systems around now >> that Python is mo

Re: Python 3.0 (Was: when will python 2.5 take in mainstream?)

2007-02-05 Thread Jean-Paul Calderone
On Mon, 05 Feb 2007 07:01:26 -0700, Steven Bethard <[EMAIL PROTECTED]> wrote: >Laurent Pointal wrote: >> For Python 3.0, AFAIK its a big rewrite and developers know that it will >> be uncompatible in large parts with existing code. > >Wrong on both counts. ;-) Python 3.0 is not a rewrite. It's base

Re: C parsing fun

2007-02-05 Thread Claudio Grondi
Károly Kiripolszky wrote: > You're right, thank you for the comment! I will look after how to > avoid this. And after you have resolved this 'small' ;-) detail you will probably notice, that some full functional and in wide use being parser have still trouble with this ... Claudio > > Marc 'Bla

Calling J from Python

2007-02-05 Thread Gosi
It is quite easy to call J from Python http://groups.google.com/group/J-Programming/browse_thread/thread/5e84b75667f5f64e -- http://mail.python.org/mailman/listinfo/python-list

Re: C parsing fun

2007-02-05 Thread Károly Kiripolszky
I've found a brute-force solution. In the preprocessing phase I simply strip out the comments (things inside comments won't appear in the result) and replace curly brackets with these symbols: #::OPEN::# and #::CLOSE::#. After parsing I convert them back. In fact I can disclude commented lines from

Re: C parsing fun

2007-02-05 Thread Károly Kiripolszky
http://kiri.csing.hu/stack/python/bloppy-0.2.zip Test data now also contains brackets in literal strings. Claudio Grondi írta: > Károly Kiripolszky wrote: > > You're right, thank you for the comment! I will look after how to > > avoid this. > And after you have resolved this 'small' ;-) detail yo

Re: Calling J from Python

2007-02-05 Thread Diez B. Roggisch
Gosi wrote: > It is quite easy to call J from Python > > http://groups.google.com/group/J-Programming/browse_thread/thread/5e84b75667f5f64e What is J, and why should we care? Diez -- http://mail.python.org/mailman/listinfo/python-list

Re: Why less emphasis on private data?

2007-02-05 Thread Bart Ogryczak
On Jan 7, 1:07 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Coming from a C++ / C# background, the lack of emphasis on private data > seems weird to me. I've often found wrapping private data useful to > prevent bugs and enforce error checking.. > > It appears to me (perhaps wrongly) that P

Re: CTypes

2007-02-05 Thread Chris Mellon
On 2/4/07, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On 4 Feb 2007 05:16:27 -0800, "[EMAIL PROTECTED]" > <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: > > > > script file 'test.py' and a DLL 'AutoIt3X.DLL' in the same folder, how > > could I load it? The tutorial did somethi

Re: Python 3.0 (Was: when will python 2.5 take in mainstream?)

2007-02-05 Thread Laurent Pointal
Steven Bethard a écrit : > Laurent Pointal wrote: >> For Python 3.0, AFAIK its a big rewrite and developers know that it will >> be uncompatible in large parts with existing code. > > Wrong on both counts. ;-) Python 3.0 is not a rewrite. It's based on the > same code base as the 2.X line, but wit

Re: Watch folder for new file and execute extern program

2007-02-05 Thread Larry Bates
Michael Bo wrote: > Hi. > Can anyone guide me on how to minitor a folder for new files? And when > they appear I need to run and externe program with the file just > created (buy a 3rd program). > - Michael Bo > Here is a link that should help. http://tgolden.sc.sabren.com/python/win32_how_do_i/w

Re: Why less emphasis on private data?

2007-02-05 Thread Paul Rubin
Steve Holden <[EMAIL PROTECTED]> writes: > >> class A(B): > >>def bar(self): > >> self.__x = 5 # clobbers private variable of earlier class named A > > Has this ever been reported as a bug in Python? I could imagine more > > sophisticated "name mangling": something to do with the identit

Re: wxPython: TextCtrl delayed update when using TE_RICH(2)

2007-02-05 Thread jean-michel bain-cornu
>> For this kind of stuff, I'd try to put "self.out.WriteText(string)" in >> some 'Idle' event, which avoid to fall in focus loops or other objects >> events management problems not easy to solve. >> > > This doesn't have anything to do with focus loops or otherwise, it's > because the OP isn't fa

Re: in place-ness of list.append

2007-02-05 Thread Alexander Schmolck
[EMAIL PROTECTED] writes: > > "Bart" == Bart Van Loon <[EMAIL PROTECTED]> writes: > > >> Such an operation will be O(N**2), > > Bart> why is that? > > The a[:] operation makes a copy of a (as will the x = a + [n] idiom). I'm pretty confident append itself (and a+[n]) are linear in

Re: in place-ness of list.append

2007-02-05 Thread Alexander Schmolck
Alexander Schmolck <[EMAIL PROTECTED]> writes: > [EMAIL PROTECTED] writes: > > > > "Bart" == Bart Van Loon <[EMAIL PROTECTED]> writes: > > > > >> Such an operation will be O(N**2), > > > > Bart> why is that? > > > > The a[:] operation makes a copy of a (as will the x = a + [n] idi

[no subject]

2007-02-05 Thread Zahid Ahmadzai
HI THERE I NEED HELP WITH THE FOLLOWING EXERSISE CAN YOU PLEASE HELP IF YOU CAN. PLEASE SEND ME THE CODE ON E-MAIL MANY THANKS For presentation to your tutor during your scheduled tutorial in the week commencing 12 February. I decided that it might be a good idea to create a suitable pr

Re: when will python 2.5 take in mainstream?

2007-02-05 Thread Laurent Pointal
Jean-Paul Calderone a écrit : > On Mon, 05 Feb 2007 10:19:26 +0100, Laurent Pointal > <[EMAIL PROTECTED]> wrote: >> [EMAIL PROTECTED] a écrit : >>> When they have to ... >>> >>> One of the big things about Python is that its penetration slows it >>> down. There's more legacy code and interdependant

Re: in place-ness of list.append

2007-02-05 Thread skip
as> I'm pretty confident append itself (and a+[n]) are linear in as> N=len(a) ... Yes, as I indicated in an earlier reply. The overall construction of his data structure would be O(N**2) or O(N*log N). The latter is for binary tree construction, but I didn't know what the OP was going t

Re: when will python 2.5 take in mainstream?

2007-02-05 Thread Jean-Paul Calderone
On Mon, 05 Feb 2007 17:07:15 +0100, Laurent Pointal <[EMAIL PROTECTED]> wrote: >Jean-Paul Calderone a écrit : >> On Mon, 05 Feb 2007 10:19:26 +0100, Laurent Pointal >> <[EMAIL PROTECTED]> wrote: >>> [EMAIL PROTECTED] a écrit : When they have to ... One of the big things about Python

Re: when will python 2.5 take in mainstream?

2007-02-05 Thread Paul Rubin
Laurent Pointal <[EMAIL PROTECTED]> writes: > IMHO trying to have a binary compatibility with older compiled modules > by maintaining an ad-hoc layer to switch between 2.4/2.5 engines make > Python code more complex. And more complex code have generally more > bugs. This is the reason for my KISS h

Re: Calling J from Python

2007-02-05 Thread Gosi
On Feb 5, 2:59 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > Gosi wrote: > > It is quite easy to call J from Python > > http://groups.google.com/group/J-Programming/browse_thread/thread/5e8... > > What is J, and why should we care? > > Diez J is in many ways similar to Python. J has very ma

get objects referencing another one

2007-02-05 Thread Olivier Feys
I'm working on a tree and I have refcounting problems. Is it possible from an object, to get the list of objects referencing it ? thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: Count nb call of a function, without global var or decorator

2007-02-05 Thread M�ta-MCI
Re! I can do : def ff(): this=ff try: this.count=this.count+1 except: this.count=1 a=1 b=2 c=a+b ff() fa=ff ff() fa() print ff.count But that use, inside the function, the litteral name of the function; and I want no use litteral name (inside) @+ Mic

Re: wxPython: TextCtrl delayed update when using TE_RICH(2)

2007-02-05 Thread Chris Mellon
On 2/5/07, jean-michel bain-cornu <[EMAIL PROTECTED]> wrote: > >> For this kind of stuff, I'd try to put "self.out.WriteText(string)" in > >> some 'Idle' event, which avoid to fall in focus loops or other objects > >> events management problems not easy to solve. > >> > > > > This doesn't have anyt

Re: Count nb call of a function, without global var or decorator

2007-02-05 Thread Bjoern Schliessmann
Méta-MCI wrote: > Example, with meta-data (attributs of function) : Apart from asking what counting "nb call" of a function means, I wonder why you didn't use an iterator? > @-salutations @-less Regards, Björn -- BOFH excuse #65: system needs to be rebooted -- http://mail.python.org/mail

Re: Calling J from Python

2007-02-05 Thread Bjoern Schliessmann
Gosi wrote: > J is in many ways similar to Python. The only one I see at the moment is that they're both some kind of programming languages. > J has very many advanced operations. Sure. Mh, just looking at some "advanced" J source taken from wikipedia.org makes me feel sick: | Here's a J prog

Re:

2007-02-05 Thread Jonathan Curran
On Monday 05 February 2007 10:07, Zahid Ahmadzai wrote: > HI THERE > > I NEED HELP WITH THE FOLLOWING EXERSISE CAN YOU PLEASE HELP IF YOU CAN. > > PLEASE SEND ME THE CODE ON E-MAIL > > MANY THANKS > > Quick, everyone, send him the solution to his homework problem! =P -- http://mail.python.org/ma

Re: Calling J from Python

2007-02-05 Thread skip
Gosi> J is in many ways similar to Python. Gosi> J has very many advanced operations. Gosi> http://www.jsoftware.com/ Doesn't look like open source of any variety. If a person uses Python with various add-ons (RPy, numpy, matplotlib, etc) why would they want to switch to a closed s

Re: Calling J from Python

2007-02-05 Thread hg
Bjoern Schliessmann wrote: > Gosi wrote: > >> J is in many ways similar to Python. > > The only one I see at the moment is that they're both some kind of > programming languages. > >> J has very many advanced operations. > > Sure. > > Mh, just looking at some "advanced" J source taken from >

Will Python Run On Microsoft Vista?

2007-02-05 Thread slogging_away
I know, I know - flame away but its not clear to me if Python will run on a system running Microsoft Vista. Is anyone successfully running Python on Vista? If so, is it what version of Python are you running? I'm ordering a new system and if Python won't work on Vista then it will definately inf

Re: Will Python Run On Microsoft Vista?

2007-02-05 Thread Jonathan Curran
On Monday 05 February 2007 11:08, slogging_away wrote: > I know, I know - flame away but its not clear to me if Python will run > on a system running Microsoft Vista. Is anyone successfully running > Python on Vista? If so, is it what version of Python are you > running? I'm ordering a new syste

Re: Will Python Run On Microsoft Vista?

2007-02-05 Thread hg
slogging_away wrote: > I know, I know - flame away but its not clear to me if Python will run > on a system running Microsoft Vista. Is anyone successfully running > Python on Vista? If so, is it what version of Python are you > running? I'm ordering a new system and if Python won't work on Vis

Re: Calling J from Python

2007-02-05 Thread Diez B. Roggisch
Gosi wrote: > On Feb 5, 2:59 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: >> Gosi wrote: >> > It is quite easy to call J from Python >> >> http://groups.google.com/group/J-Programming/browse_thread/thread/5e8... >> >> What is J, and why should we care? >> >> Diez > > J is in many ways simila

Re: get objects referencing another one

2007-02-05 Thread Diez B. Roggisch
Olivier Feys wrote: > I'm working on a tree and I have refcounting problems. > Is it possible from an object, to get the list of objects referencing it ? The gc-module might help, but it is somewhat overwhelming. Diez -- http://mail.python.org/mailman/listinfo/python-list

Re: Calling J from Python

2007-02-05 Thread George Sakkis
On Feb 5, 12:23 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > Gosi wrote: > > On Feb 5, 2:59 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > >> Gosi wrote: > >> > It is quite easy to call J from Python > > >>http://groups.google.com/group/J-Programming/browse_thread/thread/5e8... > > >>

Re: Calling J from Python

2007-02-05 Thread Alexander Schmolck
[EMAIL PROTECTED] writes: > Gosi> J is in many ways similar to Python. > > Gosi> J has very many advanced operations. > > Gosi> http://www.jsoftware.com/ > > Doesn't look like open source of any variety. If a person uses Python with > various add-ons (RPy, numpy, matplotlib, etc) w

Re: Calling J from Python

2007-02-05 Thread Larry Bates
Bjoern Schliessmann wrote: > Gosi wrote: > >> J is in many ways similar to Python. > > The only one I see at the moment is that they're both some kind of > programming languages. > >> J has very many advanced operations. > > Sure. > > Mh, just looking at some "advanced" J source taken from > w

Re: Python does not play well with others

2007-02-05 Thread John Nagle
[EMAIL PROTECTED] wrote: > John Nagle wrote: > >>Graham Dumpleton wrote: >> >>>On Feb 4, 1:05 pm, Paul Rubin wrote: >>> >>> "Paul Boddie" <[EMAIL PROTECTED]> writes: >> Realistically, mod_python is a dead end for large servers, >>because Python isn't really mult

Unicode formatting for Strings

2007-02-05 Thread robson . cozendey . rj
Hi, I´m trying desperately to tell the interpreter to put an 'á' in my string, so here is the code snippet: # -*- coding: utf-8 -*- filename = u"Ataris Aquáticos #2.txt" f = open(filename, 'w') Then I save it with Windows Notepad, in the UTF-8 format. So: 1) I put the "magic comment" at the sta

Re: Count nb call of a function, without global var or decorator

2007-02-05 Thread M�ta-MCI
Re! >>> why you didn't use an iterator? If the iterator is extern (to the function), it's like decorator, or global var. If it is internal, it's huge, compare to this.count=this.count+1 (or this.count+=1) @+ Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

Re: Calling J from Python

2007-02-05 Thread Robin Becker
Dennis Lee Bieber wrote: > On Mon, 05 Feb 2007 17:52:27 +0100, Bjoern Schliessmann > <[EMAIL PROTECTED]> declaimed the following > in comp.lang.python: > >> Mh, just looking at some "advanced" J source taken from >> wikipedia.org makes me feel sick: >> >> | Here's a J program to calculate the aver

Re: Count nb call of a function, without global var or decorator

2007-02-05 Thread Bjoern Schliessmann
Méta-MCI wrote: > If the iterator is extern (to the function), it's like decorator, > or global var. Please excuse me, I don't understand your point. I'm not even sure if both of us speak of the same iterators. > If it is internal, it's huge, compare to this.count=this.count+1 > (or this.count

Re: Python compiled on Windows

2007-02-05 Thread Duncan Booth
Franz Steinhaeusler <[EMAIL PROTECTED]> wrote: > Hello, I'm only curious. > > Why is Python and most extension (also wxPython) not built using an > open source compiler like gcc or g++ on Windows? > > I'm always wondering, why Microsoft is still supported > in that way, using VC++ 7.1, if I'm n

Re: Calling J from Python

2007-02-05 Thread Alexander Schmolck
Robin Becker <[EMAIL PROTECTED]> writes: > Dennis Lee Bieber wrote: > > On Mon, 05 Feb 2007 17:52:27 +0100, Bjoern Schliessmann > > <[EMAIL PROTECTED]> declaimed the following > > in comp.lang.python: > > > > >> Mh, just looking at some "advanced" J source taken from > >> wikipedia.org makes me f

Re: Python does not play well with others

2007-02-05 Thread Paul Boddie
On 5 Feb, 18:52, John Nagle <[EMAIL PROTECTED]> wrote: > >Pre-forking doesn't reduce load; it just improves responsiveness. > You still pay for loading all the modules on every request. For > many AJAX apps, the loading cost tends to dominate the transaction. According to the Apache prefork d

Re: Calling J from Python

2007-02-05 Thread Alexander Schmolck
Larry Bates <[EMAIL PROTECTED]> writes: > And why is that superior to this: > > def avg(l): > return float(sum(l))/len(l) > > >>>avg([1,2,3,4]) > 2.5 Apart from being less to type and it is superior in that it's generalizes much better, e.g: avg&.^. NB. geomtric mean avg&.%NB. harmon

Re: Python compiled on Windows

2007-02-05 Thread hg
Duncan Booth wrote: > Franz Steinhaeusler <[EMAIL PROTECTED]> wrote: > >> Hello, I'm only curious. >> >> Why is Python and most extension (also wxPython) not built using an >> open source compiler like gcc or g++ on Windows? >> >> I'm always wondering, why Microsoft is still supported >> in tha

Re: Calling J from Python

2007-02-05 Thread Laurent Pointal
Diez B. Roggisch wrote: > m=: >@(0&{) > v=: >@(1&{) > h=: >@(2&{) > qu =: >@(3&{) > z=: [EMAIL PROTECTED]: > ret =: |[EMAIL PROTECTED]: > init =: z;z;z;i. > f1m =: (m,[EMAIL PROTECTED]);v;h;[EMAIL PROTECTED] > f5m =: (z;(v,{:@m);h;qu,[EMAIL PROTECTED]) @ (f1m^:5) > f1h =: (z;

Re: Python does not play well with others

2007-02-05 Thread Paul Rubin
John Nagle <[EMAIL PROTECTED]> writes: > > The GIL doesn't affect seperate processes, and any large server that > > cares about stability is going to be running a pre-forking MPM no > > matter what language they're supporting. > >Pre-forking doesn't reduce load; it just improves responsiveness

Re: Calling J from Python

2007-02-05 Thread Bjoern Schliessmann
Alexander Schmolck wrote: > Apart from being less to type Cool. Less to type. > and it is superior in that it's > generalizes much better, e.g: > > avg&.^. NB. geomtric mean > avg&.%NB. harmonic mean > avg M NB. column mean of matrix M > avg"1 M NB. row mean of matrix M Is there

Re: Calling J from Python

2007-02-05 Thread Stef Mientki
> > Mh, just looking at some "advanced" J source taken from > wikipedia.org makes me feel sick: > > | Here's a J program to calculate the average of a list of numbers: > |avg=: +/ % # > |avg 1 2 3 4 > | 2.5 > And here is the Python way of calculating the average >>> mean([1,2,3,4]) 2.5

Re: Unicode formatting for Strings

2007-02-05 Thread kyosohma
On Feb 5, 11:55 am, [EMAIL PROTECTED] wrote: > Hi, > > I´m trying desperately to tell the interpreter to put an 'á' in my > string, so here is the code snippet: > > # -*- coding: utf-8 -*- > filename = u"Ataris Aquáticos #2.txt" > f = open(filename, 'w') > > Then I save it with Windows Notepad, in

Re: Finding cpu time spent on my program

2007-02-05 Thread kyosohma
On Feb 5, 2:37 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I am trying to measure the time the processor spends on some > operation, and I want this measure to not depend on the current load > of the machine. But doing the following prints different values each > time a run. > > import tim

Re: Finding cpu time spent on my program

2007-02-05 Thread Carl J. Van Arsdall
[EMAIL PROTECTED] wrote: > On Feb 5, 2:37 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > wrote: > >> I am trying to measure the time the processor spends on some >> operation, and I want this measure to not depend on the current load >> of the machine. But doing the following prints different val

  1   2   >