Re: Help with Threading

2005-01-24 Thread Pierre Barbier de Reuille
Philip Smith a écrit : Hi I am fairly new to Python threading and my needs are simple(!) I want to establish a number of threads each of which work on the same computationally intensive problem in different ways. I am using the thread module rather than the threading module. My problem is I

pygsl-0.3.1 released

2005-01-24 Thread Pierre Schnizer
pyGSL is a wrapper for the GNU Scientific Library. Get it from http://sourceforge.net/projects/pygsl. Up to now it provides the following modules: Blas, Chebyshev, Combination, Const Diff, Deriv, Eigen, Fit, FFT, Ieee, Integrate Interpolation, Linalg, Math Minimize, Multifit,

Re: best way to do a series of regexp checks with groups

2005-01-24 Thread Alex Martelli
Nick Craig-Wood [EMAIL PROTECTED] wrote: Here is a different solution... class Result: def set(self, value): self.value = value return value m = Result() if m.set(re.search(r'add (\d+) (\d+)', line)): do_add(m.value.group(1), m.value.group(2)) elif

Re: compile python to binary

2005-01-24 Thread Alex Martelli
Doug Holton [EMAIL PROTECTED] wrote: ... oh, you mean that python compiler didn't mean the python compiler. I wouldn't assume a novice uses terms the same way you would. It was quite clear from his message that py2exe and the like were what he was referring to, if you had read his first

PyWin32 installation

2005-01-24 Thread mg
Hi all, I have reinstalled my Win32 computer last week and I did an update of the project PyWin32 to complete my Python installation. (I have to use sources from CVS for my project !) So, when I run 'python setup.py' in my PyWin32 directory, I have two problem : the version indacated in

Re: Alternative Ways to install Python 2.4?

2005-01-24 Thread Michael Goettsche
On Monday 24 January 2005 00:29, Martin v. Löwis wrote: Michael Goettsche wrote: I convinced my CS teacher to use Python in school. We currently have 2.2 installed on a Windows 2000 Terminal server. I asked the system administrator to upgrade to Python 2.4, but he didn't succeed in doing

Re: best way to do a series of regexp checks with groups

2005-01-24 Thread Duncan Booth
Mark Fanty wrote: No nesting, but the while is misleading since I'm not looping and this is a bit awkward. I don't mind a few more key strokes, but I'd like clarity. I wish I could do if m = re.search(r'add (\d+) (\d+)', $line): do_add(m.group(1), m.group(2)) elif m =

Re: best way to do a series of regexp checks with groups

2005-01-24 Thread Steven Bethard
Alex Martelli wrote: class ReWithMemory(object): def search(self, are, aline): self.mo = re.search(are, aline) return self.mo def group(self, n): return self.mo.group(n) m = ReWithMemory() if m.search(r'add (\d+) (\d+)', line): do_add(m.group(1), m.group(2))

Why can't use cursor.nextset() in adodbapi package?

2005-01-24 Thread nightmarch
I want use crsr.nextset() , But I got errors like following: connStr = Provider=MSDAORA.1;Password=jmpower;User ID=jmpower;Data Source=jmgis_agps3;Persist Security Info=True import adodbapi conn= adodbapi.connect( connStr ) crsr = conn.cursor() sql = select * from wjtmp crsr.execute(sql)

Re: best way to do a series of regexp checks with groups

2005-01-24 Thread Alex Martelli
Steven Bethard [EMAIL PROTECTED] wrote: I get a bit uneasy from the repeated calls to m.group... If I was going to build a class around the re, I think I might lean towards something like: class ReWithMemory(object): def search(self, are, aline): self.mo = re.search(are,

Re: Keyboard problems with Python shell over SSH

2005-01-24 Thread Nils Emil P.Larsen
Hello Stian Your Python installation is probably compiled without readline support. It is the readline library that enables arrow keys and Ctrl-R and stuff to work. Try import readline - you will probably get an error. You are indeed right. import readline generated an error. I downloaded,

Re: Help on project, anyone?

2005-01-24 Thread Fuzzyman
Hello Chap, I work on various projects. Several of them would *greatly* benefit from input from another programmer. You can see them at : http://www.voidspace.org.uk/python/index.shtml Specifically, I have three projects that I'm looking for someone to work on, but they are all on the 'small'

Re: delay and force in Python

2005-01-24 Thread Will Stuyvesant
Just for the record, an implementation without using generators, somewhat like in Sect. 3.5 of the Wizard book, and without recursion limit problems. . . def stream_hd(s): # the head of the stream . return s[0] . . def stream_tl(s): # the tail of the stream . return s[1]() . . ## . # The

Re: Class introspection and dynamically determining functionarguments

2005-01-24 Thread harold fellermann
On 20.01.2005, at 12:24, Mark English wrote: I'd like to write a Tkinter app which, given a class, pops up a window(s) with fields for each attribute of that class. The user could enter values for the attributes and on closing the window would be returned an instance of the class. The actual

Re: how to write a tutorial

2005-01-24 Thread Jonathan Burd
Xah Lee wrote: adding to my previosu comment... snip *plonk* -- Women should come with documentation. - Dave -- http://mail.python.org/mailman/listinfo/python-list

Re: Asynchronous event handling...?

2005-01-24 Thread Pedro Werneck
Hi, Maybe something like this... from Tkinter import * import itertools class Application(Frame): def __init__(self, master=None): Frame.__init__(self, master) self.grid() self.createWidgets() def createWidgets(self): self.stop =

Re: What's so funny? WAS Re: rotor replacement

2005-01-24 Thread Fuzzyman
I also feel the lack of a standard cryptography module in the core... even a *basic* one. At least rotor provided that, before it was deprecated. I (along with many other python users) write CGIs where the only extension modules that I can use are either pure python, or ones my web hoster is

Pointer: CfV de.comp.lang.python

2005-01-24 Thread Christian Helmbold
hi I ask german speaking python programmers to contest the election to establish the german python newsgroup de.comp.lang.python. You can find the ballot in de.admin.news.annouce [EMAIL PROTECTED] or via Google http://tinyurl.com/5g5gf. Thank You! Christian --

RE: Pointer: CfV de.comp.lang.python

2005-01-24 Thread Tim Golden
[Christian Helmbold] | I ask german speaking python programmers to contest the election to | establish the german python newsgroup de.comp.lang.python. It strikes me that this would have been one of the few occasions when it *would* have made sense to write in a language other than English on

Re: delay and force in Python

2005-01-24 Thread Nick Coghlan
Nick Coghlan wrote: Will Stuyvesant wrote: The program below creates a stream with the numbers 1..995 and then filters the stream, keeping only the even numbers, and then prints the second number in the stream (implemented as the first number of the tail, just like in the 3.5 Section in the Wizard

Re: compile python to binary

2005-01-24 Thread Fredrik Lundh
Daniel Bickett wrote: oh, you mean that python compiler didn't mean the python compiler. [snip] I simply inferred that he was using the wrong terminology, being that he said binary twice ;-) yeah, but PYC files (which is what the standard compiler produces) are binary files too, in all the

Re: delay and force in Python

2005-01-24 Thread Fredrik Lundh
Nick Coghlan wrote: How's this: Py from itertools import islice Py print islice((x for x in xrange(1, 996) if x % 2 == 0), 1, 2).next() 4 Wouldn't it be nice if this could be spelt: print (x for x in xrange(1, 996) if x % 2 == 0)[2] as I've always said, the sooner we can all use the

Re: finding name of instances created

2005-01-24 Thread Nick Coghlan
Steven Bethard wrote: That is, you can just keep track of all the names of a Robot in the Robot object. In the simple case, where there's only one name, you can display it as such. In the more complicated case, where there's some aliasing, you can display the multiple aliases. This means you

Wrapping functions in modules or packages.

2005-01-24 Thread Antoon Pardon
I'm writing some utilty functions for use with gtk. But in order to use them correctly I have to know whether they are called in the gtk-thread or an other. So my idea was to wrap the gtk.main function so that it would registrate the thread_id that called it. So I was thinking about doing

Re: short programming projects for kids

2005-01-24 Thread Adrian Casey
André Roberge wrote: bobdc wrote: I will be teaching an Introduction to Programming class to some middle school aged children and will be using Python, obviously. Does anyone have suggestions for simple little programs to create and analyze with them after I get past turtle graphics?

Re: Help with Threading

2005-01-24 Thread [EMAIL PROTECTED]
I use threading.Thread as outlined in this recipe: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65448 -- http://mail.python.org/mailman/listinfo/python-list

Re: finding name of instances created

2005-01-24 Thread Fredrik Lundh
Nick Coghlan wrote: Incidentally, this discussion made me realise the real reason why using a lambda to create a named function is evil: Py def f(): pass ... Py f.func_name 'f' Py f = lambda: None Py f.func_name 'lambda' I think I've heard that explanation before, but it never

Re: short programming projects for kids

2005-01-24 Thread Steve Holden
Adrian Casey wrote: André Roberge wrote: bobdc wrote: I will be teaching an Introduction to Programming class to some middle school aged children and will be using Python, obviously. Does anyone have suggestions for simple little programs to create and analyze with them after I get past turtle

Py2.4 .exe installer

2005-01-24 Thread Batista, Facundo
Title: Py2.4 .exe installer I'm trying to get everybody at the office to become a Python programmer. The bigger problem I'm facing is that the official operating system installed in the PCs is Win NT 4.0, tweaked and restricted, and it's impossible to install the Microsoft package that

Re: Py2.4 .exe installer

2005-01-24 Thread Fredrik Lundh
Facundo Batista: The bigger problem I'm facing is that the official operating system installed in the PCs is Win NT 4.0, tweaked and restricted, and it's impossible to install the Microsoft package that enables the .msi as a installer. Result: they can not install Py24.msi. There's

Re: delay and force in Python

2005-01-24 Thread Peter Otten
Nick Coghlan wrote: Py print islice((x for x in xrange(1, 996) if x % 2 == 0), 1, 2).next() 4 Wouldn't it be nice if this could be spelt: print (x for x in xrange(1, 996) if x % 2 == 0)[2] Well, I just put a patch on SF to enable exactly that: http://www.python.org/sf/1108272 I like

Re: short programming projects for kids

2005-01-24 Thread Duncan Booth
bobdc wrote: I will be teaching an Introduction to Programming class to some middle school aged children and will be using Python, obviously. Does anyone have suggestions for simple little programs to create and analyze with them after I get past turtle graphics? Turtle graphics will be

Re: wx.BoxSizer problem

2005-01-24 Thread Laszlo Zsolt Nagy
My problem is that only one of the buttons is visible and that one is not expanded. (System: Windows, Python 2.3.4, wxPython 2.5.3) Works as expected on Mac OS X 10.3.7, python 2.3.4, wxPython 2.5.2.8. Thanks. Probably the problem is with my bitmap (I used a bitmap instead of a button).

Re: Weakref.ref callbacks and eliminating __del__ methods

2005-01-24 Thread Richie Hindle
[Tim] I'll note that one fairly obvious pattern works very well for weakrefs and __del__ methods (mutatis mutandis): don't put the __del__ method in self, put it in a dead-simple object hanging *off* of self. Like the simple: class BTreeCloser: def __init__(self, btree):

Re: Classical FP problem in python : Hamming problem

2005-01-24 Thread Francis Girard
Ok, I think that the bottom line is this : For all the algorithms that run after their tail in an FP way, like the Hamming problem, or the Fibonacci sequence, (but unlike Sieve of Eratosthene -- there's a subtle difference), i.e. all those algorithms that typically rely upon recursion to get

Re: finding name of instances created

2005-01-24 Thread Antoon Pardon
Op 2005-01-24, Nick Coghlan schreef [EMAIL PROTECTED]: Steven Bethard wrote: That is, you can just keep track of all the names of a Robot in the Robot object. In the simple case, where there's only one name, you can display it as such. In the more complicated case, where there's some

Re: short programming projects for kids

2005-01-24 Thread [EMAIL PROTECTED]
I was just about to suggest Livewires. I'm a programming newb (35 yrs old ) haha- and I'm finding the lIvewires course pretty helpful, even though it's geared for teens. I suppose my brain works on that functional level. :) And a book that's great for beginner's (know you probably don't want to

Re: Zen of Python

2005-01-24 Thread Aahz
In article [EMAIL PROTECTED], Tim Peters [EMAIL PROTECTED] wrote: [Paul Rubin] And you can break out of a containing loop from a nested loop with try/raise. Heh heh. Yes, you can. I've never seen a real Python program that did, but there's nothing to stop you. What did you think the

Re: finding name of instances created

2005-01-24 Thread André
Ryan Paul wrote: On Mon, 24 Jan 2005 13:19:45 +, Ryan Paul wrote: A working solution: class A: pass a = A() b = A() c = A() [x for x,y in locals().items() if hasattr(y,__class__) and y.__class__ == A] Just wanted to clarify, because I know that the

Re: compile python to binary

2005-01-24 Thread Peter Hansen
sam wrote: Peter Hansen wrote: After all, source code is stored in binary too... Sorry for the vagues terms. I meant compile a python script into a binary program. As I said, binary is a very ambiguous term, so your clarification by itself wouldn't have helped. (That is, while the defined

Re: Memory Usage

2005-01-24 Thread Peter Hansen
rbt wrote: Would a Python process consume more memory on a PC with lots of memory? For example, say I have the same Python script running on two WinXP computers that both have Python 2.4.0. One computer has 256 MB of Ram while the other has 2 GB of Ram. On the machine with less Ram, the process

Re: is there better 32 clock() timing?

2005-01-24 Thread Claudio Grondi
On my 2.8GHz P4, Windows 2000 SP4 with Python 2.3.4 I am getting totally different results compared to Ray. Does Python 2.3.4 already use the Pentium RTDSC instruction for clock()? Claudio # \ Claudio Grondi, 2.8GHz P4 Python 2.3.4 (2005-01-24 14:32) # time of taking time: #

RE: Help on project, anyone?

2005-01-24 Thread Batista, Facundo
Title: RE: Help on project, anyone? [Georg Brandl] #- Does anyone run, or participate in, a project looking for fellow #- programmers? I don't have a special area of interest, well, #- perhaps web #- programming... You can join us in SiGeFi: http://sf.net/projects/sigefi ---

TCP server

2005-01-24 Thread assaf
i am try to create a server what am i suppose to send to SocketServer.TCPServer what is the client_address (127.0.0.1:80 ?) and BaseRequestHandler = ? thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: [OT] XML design intent ... further musings

2005-01-24 Thread Istvan Albert
Paul Rubin wrote: I love this old rant about XML: http://groups-beta.google.com/group/comp.lang.lisp/msg/9a30c508201627ee This is my favorite: http://weblog.burningbird.net/archives/2002/10/08/the-parable-of-the-languages Im considered the savior, the ultimate solution, the final word. Odes are

Re: finding name of instances created

2005-01-24 Thread Ryan Paul
On Fri, 21 Jan 2005 16:13:19 -0800, André wrote: Short version of what I am looking for: Given a class public_class which is instantiated a few times e.g. a = public_class() b = public_class() c = public_class() I would like to find out the name of the instances so that I could

Re: Py2.4 .exe installer

2005-01-24 Thread Fuzzyman
I built Movable Python for use on a windows box where I didn't have admin rights. See : http://sourceforge.net/projects/movpy Regards, Fuzzy http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

Memory Usage

2005-01-24 Thread rbt
Would a Python process consume more memory on a PC with lots of memory? For example, say I have the same Python script running on two WinXP computers that both have Python 2.4.0. One computer has 256 MB of Ram while the other has 2 GB of Ram. On the machine with less Ram, the process takes

Python curses wizard

2005-01-24 Thread Damjan
Is there some tool that can help me design a simple curses wizards, preferably one that uses Python, but if there's some other sollution I'd be happy to hear. The important requirement is that its curses based (or similar text based UI). -- damjan --

Re: What YAML engine do you use?

2005-01-24 Thread Istvan Albert
rm wrote: http://www.theinquirer.net/?article=20868 :-) There's a lot of nonsense out there propagated by people who do not understand XML. You can't possibly blame that on XML... For me XSLT transformations are the main reason for using XML. If I have an XML document I can turn it into other

[perl-python] 20050124 classes objects

2005-01-24 Thread Xah Lee
© # -*- coding: utf-8 -*- © # Python © © # in Python, one can define a boxed set © # of data and functions, which are © # traditionally known as class. © © # in the following, we define a set of data © # and functions as a class, and name it xxx © class xxx: © a class extempore! (^_^) ©

Re: TCP server

2005-01-24 Thread Pedro Werneck
A quick example for you: ### import SocketServer class EchoRequestHandler(SocketServer.BaseRequestHandler): def setup(self): print self.client_address, 'connected!' self.request.send('hi ' + str(self.client_address) + '\n') def handle(self): while 1:

Re: What is print? A function?

2005-01-24 Thread david . tolpin
Is it possible to create own statements, such that it would be possible to do: printDebug test ? This question is well addressed in a neighbour group comp.lang.lisp . -- http://mail.python.org/mailman/listinfo/python-list

Re: What YAML engine do you use?

2005-01-24 Thread Sion Arrowsmith
Paul Rubin http://[EMAIL PROTECTED] wrote: YAML looks to me to be completely insane, even compared to Python lists. I think it would be great if the Python library exposed an interface for parsing constant list and dict expressions, e.g.: [1, 2, 'Joe Smith', 8237972883334L, # comment

¤Ñ¤ô³ò¤Ñ´I­bA®y¤K¦Ê¤Ø³æ¦ì©Ð¶¡¤À¯²..............................................................................................................................................................................................................................................................................................

2005-01-24 Thread noreplyemail
[EMAIL PROTECTED] ´N¦b¹|´I°Ó³õ³ÄÃä ªþªñ¥æ³qª½³q¦U­«­n¦a°Ï »´ÅK¦èÅK¥þ³¡´N¸} [EMAIL PROTECTED] [EMAIL PROTECTED] ©Ð¶¡¦³§N®ð¾÷ [EMAIL PROTECTED] ¥þ«Î­±¿n¬ù¤C¦Ê¤Ø,©Ð¶¡¬ù80¤Ø ¹q±èª½¨ì¤G¤Q¤C¼Ó ¥u­­³æ¨­¤H¥K,¥¿·í¤H®a, ¤£©â·Ï,¤£¶¼°s,µL¤£¨}”ܦnªÌ ¥»¤H³æ¨­,[EMAIL PROTECTED] ¦³·N½Ð¹q¶l±zªº­Ó¤H¸ê®Æ¥]¬A

Re: Memory Usage

2005-01-24 Thread rbt
Peter Hansen wrote: rbt wrote: Would a Python process consume more memory on a PC with lots of memory? For example, say I have the same Python script running on two WinXP computers that both have Python 2.4.0. One computer has 256 MB of Ram while the other has 2 GB of Ram. On the machine with

Re: What YAML engine do you use?

2005-01-24 Thread Doug Holton
rm wrote: Doug Holton wrote: rm wrote: this implementation of their idea. But I'd love to see a generic, pythonic data format. That's a good idea. But really Python is already close to that. A lot of times it is easier to just write out a python dictionary than using a DB or XML or whatever.

Re: Weakref.ref callbacks and eliminating __del__ methods

2005-01-24 Thread Mike C. Fletcher
Richie Hindle wrote: [Tim] I'll note that one fairly obvious pattern works very well for weakrefs and __del__ methods (mutatis mutandis): don't put the __del__ method in self, put it in a dead-simple object hanging *off* of self. Like the simple: class BTreeCloser: def __init__(self,

Re: What is print? A function?

2005-01-24 Thread Sion Arrowsmith
Michael Hoffman [EMAIL PROTECTED] wrote: Frans Englich wrote: Nah, I don't think it's a function, but rather a builtin statement. But it's possible to invoke it as an function; print( test ) works fine. That is not invoking it as a function. The parentheses are only for ordering the

urllib2 and proxy question

2005-01-24 Thread Fuzzyman
urllib2 (under windows) will auto-detect your proxy settings and use those. Normally that's a good thing (I guess), except when it's not ! How do I switch off this behaviour ? I'm behind a censoring proxy and wanting to test things *locally*. IE is set to not use the proxy when fetching local

Re: Classical FP problem in python : Hamming problem

2005-01-24 Thread Francis Girard
The following implementation is even more speaking as it makes self-evident and almost mechanical how to translate algorithms that run after their tail from recursion to tee usage : *** BEGIN SNAP from itertools import tee, imap import sys def imerge(xs, ys): x = xs.next() y = ys.next()

Re: Python serial data aquisition

2005-01-24 Thread Miki
Hello Flávio, My problem is to how to recover my reading from these bytes, since pyserial gives me a character (string) from each byte... I dont know how to throw away the unneeded bits and concatenate the remaining bits to form a number... See the array module. Also

Configuring Python for Tk on Mac (continued)

2005-01-24 Thread Martyn Quick
From: Alex Martelli ([EMAIL PROTECTED]) No idea about any 10.2, sorry, but on 10.3 that's not the problem: Tk support is there alright, it's Tcl/Tk which _isn't_. Get MacPython, its PackageManager will explain where to get Tcl/Tk Aqua from, as a prereq for Tkinter and IDLE! Ok, I've

Re: urllib2 and proxy question

2005-01-24 Thread rbt
Fuzzyman wrote: urllib2 (under windows) will auto-detect your proxy settings and use those. Normally that's a good thing (I guess), except when it's not ! How do I switch off this behaviour ? I'm behind a censoring proxy and wanting to test things *locally*. IE is set to not use the proxy when

Re: Weakref.ref callbacks and eliminating __del__ methods

2005-01-24 Thread Richie Hindle
[me] why the `self.btree = None` in the last line? [Mike] It's to allow the Closer object to act as a substitute for a .close() method on the object [...] If the user explicitly calls storage.close() we don't want the __del__ trying to re-close the storage later. In other words, its an

Re: urllib2 and proxy question

2005-01-24 Thread Fuzzyman
rbt wrote: Fuzzyman wrote: urllib2 (under windows) will auto-detect your proxy settings and use those. Normally that's a good thing (I guess), except when it's not ! How do I switch off this behaviour ? I'm behind a censoring proxy and wanting to test things *locally*. IE is set to

Re: Weakref.ref callbacks and eliminating __del__ methods

2005-01-24 Thread Mike C. Fletcher
Tim Peters wrote: [Mike C. Fletcher] I'm looking at rewriting parts of Twisted and TwistedSNMP to eliminate __del__ methods (and the memory leaks they create). A worthy goal! Well, as of now it seems to have eliminated the last leaks in TwistedSNMP, and that's likely going to eliminate

Right place for third party modules (here: fixedpoint)

2005-01-24 Thread Sibylle Koczian
Hello, for the first time since getting Python I can't get a third party module to work. I got fixedpoint.0.1.2.tar.gz from SourceForge for use with KinterbasDB. After unpacking I had a directory called fixedpoint which I put under my site-packages directory. There are no installation

Finding a script's home directory?

2005-01-24 Thread Gabriel Cooper
In one of my python programs has a data file I need to load. My solution was to say: if os.path.exists(os.path.join(os.getcwd(), config.xml)): self.cfgfile = os.path.join(os.getcwd(), config.xml) Which works fine... as long as you're *in* the script's home directory when you

RE: Finding a script's home directory?

2005-01-24 Thread Pieter Claerhout
The following should work: os.path.split( os.path.realpath( sys.argv[0] ) )[0] Cheers, pieter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gabriel Cooper Sent: 24 January 2005 16:40 To: python-list@python.org Subject: Finding a script's home

Re: Memory Usage

2005-01-24 Thread Fredrik Lundh
rbt wrote: For example, say I have the same Python script running on two WinXP computers that both have Python 2.4.0. One computer has 256 MB of Ram while the other has 2 GB of Ram. On the machine with less Ram, the process takes about 1 MB of Ram. On the machine with more Ram, it uses

Re: Finding a script's home directory?

2005-01-24 Thread Mark McEahern
Gabriel Cooper wrote: In one of my python programs has a data file I need to load. My solution was to say: if os.path.exists(os.path.join(os.getcwd(), config.xml)): self.cfgfile = os.path.join(os.getcwd(), config.xml) Which works fine... as long as you're *in* the script's home

Re: Memory Usage

2005-01-24 Thread Peter Hansen
rbt wrote: Peter Hansen wrote: I would expect to see such behaviour, given how difficult it is to measure *actual* memory usage. How are you measuring it? Just by looking at the Mem Usage column in the Task Manager? That's right. I look at that column. Should I measue mem usage in some other

Re: Right place for third party modules (here: fixedpoint)

2005-01-24 Thread Steve Holden
Sibylle Koczian wrote: Hello, for the first time since getting Python I can't get a third party module to work. I got fixedpoint.0.1.2.tar.gz from SourceForge for use with KinterbasDB. After unpacking I had a directory called fixedpoint which I put under my site-packages directory. There are

Re: Memory Usage

2005-01-24 Thread Stuart McGarrity
Do you have a page file? The Mem column should be RAM usage and not total working set. Some of it could be swapped to the page file. A free tool like process explorer can give you better informaton than the task manager. rbt [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Would a

Re: What YAML engine do you use?

2005-01-24 Thread Peter Hansen
Sion Arrowsmith wrote: Paul Rubin http://[EMAIL PROTECTED] wrote: YAML looks to me to be completely insane, even compared to Python lists. I think it would be great if the Python library exposed an interface for parsing constant list and dict expressions, e.g.: [1, 2, 'Joe Smith',

Re: Right place for third party modules (here: fixedpoint)

2005-01-24 Thread Fredrik Lundh
Sibylle Koczian wrote: for the first time since getting Python I can't get a third party module to work. I got fixedpoint.0.1.2.tar.gz from SourceForge for use with KinterbasDB. After unpacking I had a directory called fixedpoint which I put under my site-packages directory. There are

bad argument type for built-in operation

2005-01-24 Thread Gilles Arnaud
Hello, I've got a nasty bug and no idea to deal with : here is the method : method def denormer(self, var) : denorme un vecteur d'entree try: #a = map(self.decerner, self.param, var) #a = [self.decerner(x, y) for x, y in map(None, self.param, var)]

ANN: Leo 4.3-a1 released

2005-01-24 Thread Edward K. Ream
Leo 4.3 alpha 1 is now available at http://sourceforge.net/projects/leo/ Leo 4.3 is the culmination of more than four months of work. In spite of its alpha status, I recommend Leo 4.3a1 over any 4.2 release. The defining features of Leo 4.3: - 1. Leo now stores

pylibpcap and multiple threads

2005-01-24 Thread Örjan Gustavsson
Hi All! Sorry if this is not the correct forum for this kind of question (I did not find any pylibpcap related lists). I am trying to use pylibpcap to capture network traffic from several ethernet devices at the same time, each nic having a separate thread assigned to it. My problem is that

Re: What is print? A function?

2005-01-24 Thread Ryan Paul
On Sun, 23 Jan 2005 18:01:50 +, Frans Englich wrote: Nah, I don't think it's a function, but rather a builtin statement. But it's possible to invoke it as an function; print( test ) works fine. So I wonder, what _is_ exactly the print statement? The untraditional way of invoking

Re: Right place for third party modules (here: fixedpoint)

2005-01-24 Thread Fredrik Lundh
I suppose fixedpoint is no package as described in the tutorial and so site-packages might not be the right place for it. site-packages sure works on my windows xp / python 2.4 configuration. ah, forget what I said. you need to put the fixedpoint.py *file* under site-packages, not the

Re: Memory Usage

2005-01-24 Thread Tim Peters
[[EMAIL PROTECTED]] Would a Python process consume more memory on a PC with lots of memory? For example, say I have the same Python script running on two WinXP computers that both have Python 2.4.0. One computer has 256 MB of Ram while the other has 2 GB of Ram. On the machine with less Ram,

Re: on the way to find pi!

2005-01-24 Thread Ali Polatel
when we change the code that way the programme gets awful slow when I want to calculate say 100 digits or more .Can't we just get the numbers out of there without changing the code radically thus not making the programme sloww? Do you Yahoo!? Yahoo! Search presents - Jib Jab's 'Second Term'--

how to ncurses on win32 platform

2005-01-24 Thread Brane
please advice regards brane -- http://mail.python.org/mailman/listinfo/python-list

Python 2.1 - 2.4 differences

2005-01-24 Thread BOOGIEMAN
I found some e-book about Python 2.1, I want to print it but just to check first if sintax of Python 2.1 is same as 2.4 ? Also does anybody know where can I download any newer Python related e-book, because there isn't any published yet in my country. --

Re: Python 2.1 - 2.4 differences

2005-01-24 Thread Fredrik Lundh
BOOGIEMAN [EMAIL PROTECTED] wrote: I found some e-book about Python 2.1, I want to print it but just to check first if sintax of Python 2.1 is same as 2.4 ? almost everything that works under 2.1 works under 2.4. the opposite isn't always true, though. for more information on new stuff, see:

Re: Python 2.1 - 2.4 differences

2005-01-24 Thread Simon Brunning
On Mon, 24 Jan 2005 17:13:44 +0100, BOOGIEMAN [EMAIL PROTECTED] wrote: I found some e-book about Python 2.1, I want to print it but just to check first if sintax of Python 2.1 is same as 2.4 ? Pretty musch the same, but naturally, some things have changed. See these documents for the major

Re: [perl-python] 20050124 classes objects

2005-01-24 Thread Chris Mattern
Xah Lee wrote: Perl does not support classes or objects in the so-called Object Oriented programing. Boy, the ignorance never stops, does it? However, a complete set of emulations of OO style of programing have been done, resulting in modules and books and many documentations and

Import from database

2005-01-24 Thread Steve Holden
I'm trying to load module code from a database, which stores for each module its full name, code, load date and a Boolean indicating whether it's a package or not. The following simple program: import dbimp, sys if __name__ == __main__: dbimp.install() #import bsddb.db import

Re: [perl-python] 20050124 classes objects

2005-01-24 Thread Gian Mario Tagliaretti
Chris Mattern wrote: It doesn't have OO, but it emulates in software! Better go with python, which has hardware OO. :-) Chris don't feed the troll -- http://mail.python.org/mailman/listinfo/python-list

Re: What is print? A function?

2005-01-24 Thread Philippe C. Martin
Why don't you redirect stdout or stderr #*** class Debug_Stderr: __m_text = '' __m_log_text = None __m_dbg = None __m_refresh_count = 0

Tuple slices

2005-01-24 Thread George Sakkis
Why does slicing a tuple returns a new tuple instead of a view of the existing one, given that tuples are immutable ? I ended up writing a custom ImmutableSequence class that does this, but I wonder why it is not implemented for tuples. George --

RE: Tuple slices

2005-01-24 Thread Batista, Facundo
Title: RE: Tuple slices [George Sakkis] #- Why does slicing a tuple returns a new tuple instead of a #- view of the existing one, given that #- tuples are immutable ? I ended up writing a custom #- ImmutableSequence class that does this, but I #- wonder why it is not implemented for

Re: Memory Usage

2005-01-24 Thread Stephen Kellett
In message [EMAIL PROTECTED], rbt [EMAIL PROTECTED] writes That's right. I look at that column. Should I measue mem usage in some other way? Try VM Validator, a free memory visualization tool from Software Verification. http://www.softwareverify.com

Re: Import from database

2005-01-24 Thread Kartic
Steve, I believe you have to put ntpath, macpath and posixpath in the module database for os.path to work. I tried it with zipimporter builtin and I got the same traceback till I added ntpath.py to my zip file. (Of course, I renamed the original ntpath to _ntpath so that the original did not get

Re: Tuple slices

2005-01-24 Thread Fredrik Lundh
George Sakkis wrote: Why does slicing a tuple returns a new tuple instead of a view of the existing one, given that tuples are immutable ? really? a = 1, 2, 3 b = a[:] a is b True /F -- http://mail.python.org/mailman/listinfo/python-list

private variables a.k.a. name mangling (WAS: What is print? A function?)

2005-01-24 Thread Steven Bethard
Philippe C. Martin wrote: class Debug_Stderr: __m_text = '' __m_log_text = None __m_dbg = None __m_refresh_count = 0 rant I don't see the benefit in 99.9% of cases for making class variables like this private. If you don't want people to use them, simply use the standard

Re: Tuple slices

2005-01-24 Thread Steven Bethard
Fredrik Lundh wrote: George Sakkis wrote: Why does slicing a tuple returns a new tuple instead of a view of the existing one, given that tuples are immutable ? really? a = 1, 2, 3 b = a[:] a is b True My impression was that full tuple copies didn't actually copy, but that slicing a subset of a

Re: Tuple slices

2005-01-24 Thread Pedro Werneck
On Mon, 24 Jan 2005 18:45:46 +0100 Fredrik Lundh [EMAIL PROTECTED] wrote: George Sakkis wrote: Why does slicing a tuple returns a new tuple instead of a view of the existing one, given that tuples are immutable ? really? Well... seems like this case is optimized to return the original

  1   2   >