Re[4]: need for speed

2005-08-02 Thread Michael Rybak
sorry for emailing privately, pressed the wrong "reply" button DLB> On Mon, 1 Aug 2005 20:14:51 +0300, Michael Rybak <[EMAIL PROTECTED]> DLB> declaimed the following in comp.lang.python: >> >> Is there a way of profiling other than manual (debug output with DLB> Chapter 10 of the Pytho

Re[6]: 2-player game, client and server at localhost

2005-08-02 Thread Michael Rybak
sorry for emailing privately, pressed the wrong "reply" button >> Each player controls a snake, which is 2 to 12 balls connected to each >> other with ropes; by mouse motions you move the snake's head, and the >> rest of the body moves adhering normal physics. The objective/gameplay DLB>

Re[2]: need for speed

2005-08-02 Thread Michael Rybak
sorry for emailing privately, pressed the wrong "reply" button BD> Michael Rybak a écrit : BD> (snip) >> >> Is there a way of profiling other than manual (debug output with >> measurements and all)? Some tools? BD> http://docs.python.org/lib/profile.html BD> HTH Oh, wow! Manuals rule, I sh

Re: startfile problems

2005-08-02 Thread Timothy Smith
Dennis Lee Bieber wrote: >On Tue, 02 Aug 2005 15:10:23 +1000, Timothy Smith ><[EMAIL PROTECTED]> declaimed the following in comp.lang.python: > > > >>i'm very curious as to what everyone thinks >> >> > > I suspect most of us think: Where's the code? > followed by: Where's the tra

Re: Is this Pythonic?

2005-08-02 Thread Reinhold Birkenfeld
Delaney, Timothy (Tim) wrote: > Peter Hansen wrote: > >> Change those to "raise NotImplementedError('blah')" instead and you'll >> be taking the more idiomatic approach. > > One thing I've noticed, which I may raise on python-dev ... > NotImplementedError does *not* play well with super() ... >

Re: Wheel-reinvention with Python

2005-08-02 Thread Torsten Bronger
Hallöchen! Mike Meyer <[EMAIL PROTECTED]> writes: > Torsten Bronger <[EMAIL PROTECTED]> writes: > >> [...] >> >> I'm interested in a language with a big community. This is my >> definition of success. [...] >> >> GUI applications seem to be the most attractive application type. >> This is not o

Re: Dabo in 30 seconds?

2005-08-02 Thread EP
Jorge Godoy opined: > > We can find several problems, almost all of them can be solved with > > the admin's creativity. In response to which Cliff Wells posted an interpreter session: > >>> import creativity > Traceback (most recent call last): > File "", line 1, in ? > ImportError: No mod

Re: Python IDE's

2005-08-02 Thread Adriaan Renting
vi/vim is a godssend if you need a working system that needs to fit in 4 Mb or ROM, but it's an editor not an IDE. You can debate about how good an editor it is, but that's just differences in taste I suppose. When talking about IDE's I mean a lot more as 'just' an editor, below is my 'wishlist',

Re: doctest bug with nested triple quotes

2005-08-02 Thread Michele Simionato
This is my file $ python -c "print open('x.py').read().encode('base64')" IiIiCj4+PiBkdW1teSA9ICcnJwpzb21ldGhpbmcKaGVyZQonJycKIiIiCmltcG9ydCBkb2N0ZXN0 OyBkb2N0ZXN0LnRlc3Rtb2QoKQo= but anyway I think Peter Otten is right, the problem is with the missing dots. It makes sense, actually, but for some r

Re: Dabo in 30 seconds?

2005-08-02 Thread Daniel Dittmar
Jorge Godoy wrote: > I agree where you say that lack of information is a risk. But I don't see > how it -- lack of information -- wouldn't affect both scenarios. At least, Because you put different probabilities on different outcomes. One easy 'risk markup' would be to assume that parts of the

Re: Is this Pythonic?

2005-08-02 Thread Michael Hudson
[EMAIL PROTECTED] (phil hunt) writes: > Suppose I'm writing an abstract superclass which will have some > concrete subclasses. I want to signal in my code that the subclasses > will implement certan methods. Is this a Pythonic way of doing what > I have in mind: > > class Foo: # abstract superc

Re[2]: using Pyro for network games

2005-08-02 Thread Michael Rybak
gn20kjss> Do not use pyro, use simple UDP protocol. gn20kjss> I've written networked tetris in python, communicating via gn20kjss> UDP protocol, and used it successfully on very congested lines. Would you please be so kind to share that with me? That would be greatly helpful, because 1) I'd run it

Re: ANN: Kamaelia 0.2.0 released!

2005-08-02 Thread phil hunt
Kamaelia seems it might be an interesting project. However, I don't think the project is well served by this announcement -- which I find vague and hard to understand. Which is a shame, because it means that other people probably don't understand it very well either, which means less people wil

Re: Wheel-reinvention with Python

2005-08-02 Thread phil hunt
On Tue, 02 Aug 2005 00:42:53 -0400, Mike Meyer <[EMAIL PROTECTED]> wrote: >[EMAIL PROTECTED] (phil hunt) writes: >> In practise any Python GUI is going to contain code from otyher >> languages since if it was coded all the way down in python it would >> be too slow. > >Not necessarily. My window

Re: Python Programming Contest: First results

2005-08-02 Thread Brian Quinlan
Tomi Kyöstilä wrote: > Why don't I see my solution (__author__ = "dOb") in the results? I'm > sure that you got it as you replied to my mail. Ahhh...sorry. I have your solution and I timed it but I don't have the results here so I can't add it to the website. I'll do it tomorrow. > Where do the

Re: Is this Pythonic?

2005-08-02 Thread phil hunt
On Tue, 02 Aug 2005 08:31:27 GMT, Michael Hudson <[EMAIL PROTECTED]> wrote: >[EMAIL PROTECTED] (phil hunt) writes: > >> Suppose I'm writing an abstract superclass which will have some >> concrete subclasses. I want to signal in my code that the subclasses >> will implement certan methods. Is this

Re: calling functions

2005-08-02 Thread bruno modulix
anthonyberet wrote: > This is the first time I have tried out functions (is that the main way > of making subroutines in Python?) A function is allowed to change it's arguments and to return None, so yes, you can consider it as a 'subroutine'. > > Anyway, my function, mutate, below > > #make a

Re: Is this Pythonic?

2005-08-02 Thread Michael Hudson
[EMAIL PROTECTED] (phil hunt) writes: >>It would (possibly) be more Pythonic to >>define an interface instead, > > Does Python have the concept of an interface? When was that added? It doesn't have one included, but there are at least two implementations, zope.interface and PyProtocols (I'm sure

Re: Newer than a Newbe

2005-08-02 Thread bruno modulix
None wrote: > Hello, > I am just starting to look into python.I have been prog with php for > several years.My question is: > Can/Is Python used as a web scripting language Yes, definitively. There are in fact almost too many web-programming solutions in Python, from the good ole cgi to the

Re: [path-PEP] Path inherits from basestring again

2005-08-02 Thread Michael Hoffman
Ron Adam wrote: > PS. Could someone repost the links to the current pre-pep and the most > recent module version so I can look at it closer look? Pre-pre-PEP: http://wiki.python.org/moin/PathClass Reinhold's version of the module is in Python CVS in nondist/sandbox/path. Jason Orendorff's vers

HTTPSConnection & Password

2005-08-02 Thread michaelparkin
Hi, I'm using httplib to create a mutually authenticated HTTPS connection with a server. I create the connection as follows: c = httplib.HTTPSConnection(uri, key_file = key, cert_file = cert) However, because I am using a private key I keep getting asked to enter the password to open that key e

C++, Swig, and pyMPI

2005-08-02 Thread stringy
I would like to be able to write a C++ function, to be wrapped into some python, to be able to communicate over pyMPI. As pyMPI is based on C++ I figure that this should be possible, although I'm not sure of where to start. I know the basics of swig and pyMPI, but not how I would do this. Does any

Re: ANN: Kamaelia 0.2.0 released!

2005-08-02 Thread Michael Sparks
Phil Hunt wrote: > Kamaelia seems it might be an interesting project. However, I don't > think the project is well served by this announcement -- which I > find vague and hard to understand. Which is a shame, because it > means that other people probably don't understand it very well > either, wh

Re: Newer than a Newbe

2005-08-02 Thread gene tani
Truthfully, the number of frameworks is staggering, tho some are specialized for blogs/wiki, search engine, PIM, etc. http://www.colorstudy.com/docs/shootout.html http://pythonology.org/howto http://aspn.activestate.com/ASPN/Cookbook/Python?kwd=Web http://www.awaretek.com/tutorials.html#web http:/

SOAPpy and http authentication

2005-08-02 Thread Odd-R.
I use the following piece of code to contact a webservice, and read a wsdl file. from SOAPpy import WSDL from SOAPpy import URLopener url= ' http://someserver/somewebservice url1 = URLopener.URLopener(username='user',passwd='pass') server=WSDL.Proxy(url1.open(url)) This yields no errors, and ever

Re: Dabo in 30 seconds?

2005-08-02 Thread Jorge Godoy
Daniel Dittmar wrote: > Because you put different probabilities on different outcomes. One easy > 'risk markup' would be to assume that parts of the standard Python > distribution like TkInter have a higher chance of working with the next > release than external libraries like wxPython. Of course,

Re: C++, Swig, and pyMPI

2005-08-02 Thread Mandus
2 Aug 2005 03:47:02 -0700 skrev stringy: > I would like to be able to write a C++ function, to be wrapped into > some python, to be able to communicate over pyMPI. As pyMPI is based on > C++ I figure that this should be possible, although I'm not sure of > where to start. I know the basics of swig

Re: Python IDE's

2005-08-02 Thread Wolfgang Keller
Hello, > Thanks for your reply - that link is very useful, and i have been browsing > through the various multiplatform editors/ide's (i'm looking for something to > use on both my Windows machines and my Mac) You might want to have a look at the archive of the Python-Mac mailinglist. Someone

Re: Wheel-reinvention with Python

2005-08-02 Thread Cliff Wells
On Tue, 2005-08-02 at 09:45 +0200, Torsten Bronger wrote: > Yes, this is what I meant with "legacy code". C and C++ are > actually special-purpose. They are good for controlling a computer > but not for implementing an idea. Their current vitality on almost > all software areas arise from the f

Re: SOAPpy and http authentication

2005-08-02 Thread Lutz Horn
On 2005-08-02, Odd-R. <[EMAIL PROTECTED]> wrote: > from SOAPpy import WSDL > from SOAPpy import URLopener > url= ' http://someserver/somewebservice > url1 = URLopener.URLopener(username='user',passwd='pass') > server=WSDL.Proxy(url1.open(url)) Is it possible to call WSDL.Proxy with a String? Then

Re: Wheel-reinvention with Python

2005-08-02 Thread Torsten Bronger
Hallöchen! Cliff Wells <[EMAIL PROTECTED]> writes: > On Tue, 2005-08-02 at 09:45 +0200, Torsten Bronger wrote: > >> Yes, this is what I meant with "legacy code". C and C++ are >> actually special-purpose. They are good for controlling a >> computer but not for implementing an idea. Their curre

RE: ANN: Kamaelia 0.2.0 released!

2005-08-02 Thread Tim Golden
[Michael Sparks] | Phil Hunt wrote: | | > Kamaelia seems it might be an interesting project. However, I don't | > think the project is well served by this announcement -- which I | > find vague and hard to understand. Which is a shame, because it | > means that other people probably don't underst

Re: SOAPpy and http authentication

2005-08-02 Thread Oliver Andrich
2 Aug 2005 11:38:51 GMT, Lutz Horn <[EMAIL PROTECTED]>: > On 2005-08-02, Odd-R. <[EMAIL PROTECTED]> wrote: > > from SOAPpy import WSDL > > from SOAPpy import URLopener > > url= ' http://someserver/somewebservice > > url1 = URLopener.URLopener(username='user',passwd='pass') > > server=WSDL.Proxy(url

Re: Newer than a Newbe

2005-08-02 Thread Peter Hansen
gene tani wrote: > Truthfully, the number of frameworks is staggering, tho some are > specialized for blogs/wiki, search engine, PIM, etc. [snip massive yet even so incomplete list] It's called biodiversity and, while generally this is a good thing, I think it's high time for some of these Python

ANN: matplotlib 0.83.2

2005-08-02 Thread John Hunter
matplotlib is a 2D plotting package for python. This is a summary of recent developments in matplotlib since 0.80. For detailed notes, see http://matplotlib.sf.net/whats_new.html, http://matplotlib.sf.net/CHANGELOG and http://matplotlib.sf.net/API_CHANGES == Whats New == matplotlib wiki: this

Re: Dabo in 30 seconds?

2005-08-02 Thread Sion Arrowsmith
James Stroud <[EMAIL PROTECTED]> wrote: >Perhaps some of us are writing software with non-developer end-users in mind >and we kind of keep that mentality when evaluating modules our code uses. In the commercial environment I'm working in, non-developer end-users get a frozen executable. They don'

Re: Dabo in 30 seconds?

2005-08-02 Thread Ed Leafe
On Tuesday 02 August 2005 09:15, Sion Arrowsmith wrote: > Of course, going back to Dabo there is the question of whether it has > such a thing as a non-developer end-user. Yes and no. Developers will be the primary users of Dabo, of course, but they will most likely use it to create apps that n

JBUS and Python which way

2005-08-02 Thread mjekl
Hi, I'm a newbie without a technical background making some technology research for a company I work for. My aim is to have an idea of the alternatives technologies for accessing information produced by a machine with a JBUS interface (RS232) and how to access this information realtime in Python

RE: Terminate a thread that doesn't check for events

2005-08-02 Thread Liu Shuai
Can someone please comment on this?   From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Liu Shuai Sent: Monday, August 01, 2005 4:29 PM To: python-list@python.org Subject: Terminate a thread that doesn't check for events   Hi all,   I am aware that similar and

finding sublist

2005-08-02 Thread giampiero mu
hi everyone my target is implement a function controlla(string - a binary string-) that check if there is in a string two equal not overlapping subsequences at least of length limitem: my code: def controlla(test): # print test limitem=4 lunghezz=len(test) l1=lungh

py2exe windows apps path question

2005-08-02 Thread Grant Edwards
I have several python apps (some wxPython, some plain text-mode stuff) that I distribute internally for installation on Win32 machines. They're bundled/installed using py2exe and inno setup. I followed what I think is the normal procedure of installing each app in its own directory under /Program

Re: finding sublist

2005-08-02 Thread Kent Johnson
giampiero mu wrote: > hi everyone > > my target is implement a function controlla(string - a binary string-) > that check if there is in a string two equal not overlapping > subsequences at least of length limitem: You can do this with a regular expression: >>> import re >>> r=re.compile(r'(?P

Class design for parser object

2005-08-02 Thread James Saker
I've been working on a Python class object for APRS (Automatic Position Reporting System - a digital mode used by amateur radio operators) and have been going through David Mertz's Text Processing in Python book to help in the construction of the parser component of the class. I was curious if

Re: Tkinter, Menu(bar) font size

2005-08-02 Thread Bob Greschke
Yeah. It works on a Sun and Linux, but not Windows. That stinks. We got a bunch of 1400x1050 display laptops in and now I have to run around changing a bunch of programs that looked fine on 1024x768 displays. Thanks! <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Tk tries to u

Re: 2-player game, client and server at localhost

2005-08-02 Thread Christopher Subich
Michael Rybak wrote: > That's the problem - "or a player input comes in". As I've explained, > this happens a dozen of times per second :(. I've even tried not > checking for player's input after every frame, but do it 3 times more > rare (if framecount % 3 == 0 : process_players_input()). Well, I

RE: Terminate a thread that doesn't check for events

2005-08-02 Thread Jp Calderone
On Tue, 2 Aug 2005 09:51:31 -0400, Liu Shuai <[EMAIL PROTECTED]> wrote: >Can someone please comment on this? > > [snip - how to stop a thread without its cooperation?] There's no way to do this with threads, sorry. Perhaps you could use a child process, instead. Those are typically easy to term

Re: Python IDE's

2005-08-02 Thread projecktzero
The thing that nudged me into trying VIM was the book, The Pragmatic Programmer. It mentioned Emacs and VIM and the value of learning a powerful editor and sticking with it. I had tried Emacs three times long ago, and it didn't click with me. I decided to try VIM, and it made a lot more sense to me

time.clock() or time.time()

2005-08-02 Thread [EMAIL PROTECTED]
What's the difference between time.clock() and time.time() (and please don't say clock() is the CPU clock and time() is the actual time because that doesn't help me at all :) I'm trying to benchmark some function calls for Zope project and when I use t0=time.clock(); foo(); print time.clock()-t0 I

RE: Terminate a thread that doesn't check for events

2005-08-02 Thread Liu Shuai
Thanks for the reply Chris. Are you suggesting running the task in a *separate* process instead of a separate *thread*? Because if that's the case, I will have to share data (and possible memory) between that new process and my "master" process since they depend on one other. Yeah I will sure po

a pickle's pickle

2005-08-02 Thread [EMAIL PROTECTED]
I'm trying to pickle a class, and while I get no errors or anything, almost none of the class instance gets pickled, and I don't know why...Here's the pickled output: (i__main__ TrainingMatrix p0 (dp1 S'matrixWords' p2 I4714 sS'numWords' p3 I4714 sS'totalWordsProcessed' p4 I46735 sS'numContexts' p

Re: Terminate a thread that doesn't check for events

2005-08-02 Thread Chris Lambacher
No. On Linux a separate thread is a separate process with shared memory. You can send a signal to a particular process and catch that signal as an indication that you need to terminate (perhapse something that is set up before running your long running process so that it is generic). In windows

Re: time.clock() or time.time()

2005-08-02 Thread Shane Hathaway
[EMAIL PROTECTED] wrote: > What's the difference between time.clock() and time.time() > (and please don't say clock() is the CPU clock and time() is the actual > time because that doesn't help me at all :) > > I'm trying to benchmark some function calls for Zope project and when I > use t0=time.cl

Re: Why Tcl/Tk?

2005-08-02 Thread William Park
Thomas Bartkus <[EMAIL PROTECTED]> wrote: > > "William Park" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > Jerry He <[EMAIL PROTECTED]> wrote: > > > I'm a little curious, why does most scripting > > > languges(i.e. python and ruby) use Tcl/Tk rather than > > > wx or Fox as its

Re[2]: 2-player game, client and server at localhost

2005-08-02 Thread Michael Rybak
CS> Michael Rybak wrote: >> That's the problem - "or a player input comes in". As I've explained, >> this happens a dozen of times per second :(. I've even tried not >> checking for player's input after every frame, but do it 3 times more >> rare (if framecount % 3 == 0 : process_players_input()).

Re: finding sublist

2005-08-02 Thread Ron Adam
giampiero mu wrote: > hi everyone Hi, you appear to be fairly new to Python, so you might want to take a look at the tutorial at Python.org Kents suggestion to use RE is good. This should be faster than your example by quite a bit if you don't want to use RE. def controlla(test, size=4):

Re: time.clock() or time.time()

2005-08-02 Thread Leonhard Vogt
[EMAIL PROTECTED] schrieb: > What's the difference between time.clock() and time.time() > (and please don't say clock() is the CPU clock and time() is the actual > time because that doesn't help me at all :) clock (depending on the platform ?) measures the time spent by your program. Time gives y

Re: __autoinit__ (Was: Proposal: reducing self.x=x; self.y=y; self.z=z boilerplate code)

2005-08-02 Thread Ralf W. Grosse-Kunstleve
--- falcon <[EMAIL PROTECTED]> wrote: > Hello python-list, > > As I Understood, semantic may be next: > > def qwerty(a,a.i,b,b.i,f.j): > pass > > Would work like: > > def qwerty(anonymous1,anonymous2,anonymous3,anonymous4,anonymous5): > > (a,a.i,b,b.i,f.j)=(anonymous1,anonymo

Art of Unit Testing

2005-08-02 Thread Christoph Zwerschke
In August 2001, there was a thread about the "Art of Unit Testing": http://groups.google.com/group/comp.lang.python/browse_frm/thread/aa2bd17e7f995d05/71a29faf0a0485d5 Paul Moore asked the legitimate question why there is no hook for a "global" fixture code that is run only once for the whole Tes

Re: Art of Unit Testing

2005-08-02 Thread Grig Gheorghiu
The py.test module offers setup/teardown hooks at the method, class and module level. The scenario you're describing would be covered at the module level. See the py.test documentation for more details:

Re: a pickle's pickle

2005-08-02 Thread Magnus Lycka
[EMAIL PROTECTED] wrote: > class TrainingMatrix: > matrix = [] > estimator = {} > wordInfo = {} > contextInfo = {} > totalWordsProcessed = 0 > numWords = 0 > numContexts = 0 > matrixWords = 0 Is there some confusion between the scope of the class object and the sco

Re: time.clock() or time.time()

2005-08-02 Thread Magnus Lycka
Shane Hathaway wrote: > time.time() measures real time, while time.clock() measures the time the > CPU dedicates to your program. I suppose that varies with the platform... "help(time.clock)" says: Help on built-in function clock: clock(...) clock() -> floating point number Return t

Re: Art of Unit Testing

2005-08-02 Thread Björn Lindström
Christoph Zwerschke <[EMAIL PROTECTED]> writes: > Would it make sense to add "globaleSetup" and "globalTearDown" methods > to the TestCase class? I think at least it would not harm > anybody. Where should such proposals be submitted? In general that's not such a good idea. If you build your tests

pre subprocess module help

2005-08-02 Thread chuck
I need to execute a command shell process obtain the return code and capture stdout from that shell process. I've done this with 2.4 using subprocess. How do I do it with 2.3? -- http://mail.python.org/mailman/listinfo/python-list

pre subprocess module help

2005-08-02 Thread chuck
I need to execute a command shell process obtain the return code and capture stdout from that shell process. I've done this with 2.4 using subprocess. How do I do it with 2.3? -- http://mail.python.org/mailman/listinfo/python-list

pre subprocess help needed

2005-08-02 Thread chuck
I need to execute a command shell process obtain the return code and capture stdout from that shell process. I've done this with 2.4 using subprocess. How do I do it with 2.3? -- http://mail.python.org/mailman/listinfo/python-list

Pythoncom scripting Windows Media Player & visible

2005-08-02 Thread Bill Eldridge
I'm trying to make Windows Media Player visible and control it from Python. It seems when I call it below, I get only the console version, and there's no Visible method like with Internet Explorer. I do catch events, but I need it visible. Should it be put into a panel instead? Should a different

Re: Printing Docstrings Without Importing

2005-08-02 Thread Bengt Richter
On 1 Aug 2005 06:50:23 -0700, "Fuzzyman" <[EMAIL PROTECTED]> wrote: >This seems to scratch several people's itches. > >Care to develop/maintain it ? > Are you talking to me? ;-) (My news server is having some problem. I saw my post on google groups but my normal news client isn't seeing it.) Ass

Re: a pickle's pickle

2005-08-02 Thread [EMAIL PROTECTED]
I intended to pickle the class instance I call trainer...from my code, also in the first post: trainerString = trainDB.read() trainer = loads(trainerString) except EOFError: trainer = TrainingMatrix() ... trainerString = dumps(trainer) ... So basically trainer always gets an

Re: py2exe windows apps path question

2005-08-02 Thread vincent wehren
"Grant Edwards" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] |I have several python apps (some wxPython, some plain text-mode | stuff) that I distribute internally for installation on Win32 | machines. They're bundled/installed using py2exe and inno | setup. | | I followed w

bug in python/numarray

2005-08-02 Thread meng
Hi, there, I got different results by running the same lines of code on windows and debian. Here is the code: a = kroneckerproduct(ones((4195,1)), identity(12)) print a.mean() This works perfectly well in windows but it gave the following error while running it in debian: Traceback (most recen

Re: finding sublist

2005-08-02 Thread Johan Lindberg
Hello. > my target is implement a function controlla(string - a binary string-) > that check if there is in a string two equal not overlapping > subsequences at least of length limitem: > > my code: > [snip] > I may have misunderstood it, but does your function work the way you want it to? >>>co

Re: pre subprocess help needed

2005-08-02 Thread Chris Lambacher
There is a version of subprocess for 2.3. http://www.lysator.liu.se/~astrand/popen5/ http://effbot.org/downloads/#subprocess On Tue, Aug 02, 2005 at 10:05:00AM -0700, chuck wrote: > I need to execute a command shell process obtain the return code and > capture stdout from that shell process. I'v

Re: Dabo in 30 seconds?

2005-08-02 Thread Fernando Perez
Ed Leafe wrote: > On Monday 01 August 2005 11:56, Terry Reedy wrote: > >> That is an impossibility.  However, there is a middle path between that and >> no defensive code.  In the present case, you appear to acknowledge a known >> easy way to mis-compile wxWidgets from Dabo's viewpoint.  If there

Re: Art of Unit Testing

2005-08-02 Thread John Roth
""Björn Lindström"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Christoph Zwerschke <[EMAIL PROTECTED]> writes: > >> Would it make sense to add "globaleSetup" and "globalTearDown" methods >> to the TestCase class? I think at least it would not harm >> anybody. Where should such p

Re: Dabo in 30 seconds?

2005-08-02 Thread Paul McNett
Fernando Perez wrote: > > > You may want to steal the crash handling code from ipython. In order to > address this kind of problem, ipython sticks an exceptionally verbose > traceback printer into sys.excepthook. If ipython ever crashes, the user gets > a LOT of info, and it's all packaged read

Re: py2exe windows apps path question

2005-08-02 Thread Gregory Piñero
Vincent, I'm not sure I completely understand your question but this link may be the answer nonetheless: http://www.jrsoftware.org/isfaq.php#workingdir And here is how I make sure I'm always using the right directory in my scripts: Put this code at the top: import sys curdir=os.path.dirname(sys.a

Re: Dabo in 30 seconds?

2005-08-02 Thread Ed Leafe
On Tuesday 02 August 2005 13:40, Fernando Perez wrote: > The point is that something like this: > > - gives an experienced user a lot of information to track down the bug if > they feel like it. > > - but also gives the raw newbie an easy solution: just mail me that > auto-generated crash file and

Re: py2exe windows apps path question

2005-08-02 Thread Gregory Piñero
On 8/2/05, Gregory Piñero <[EMAIL PROTECTED]> wrote: > Vincent, I'm not sure I completely understand your question but this > link may be the answer nonetheless: > http://www.jrsoftware.org/isfaq.php#workingdir I meant to say Grant, ... , Vincent wasn't the one with the question. Sorry. -- http:

Re: 2-player game, client and server at localhost

2005-08-02 Thread Christopher Subich
Michael Rybak wrote: > CS> There's the key. How are you processing network input, specifically > CS> retrieving it from the socket? > > A "sock" class has a socket with 0.1 timeout, and every time I > want anything, I call it's read_command() method until it returns > anything. read_command(

Re: py2exe windows apps path question

2005-08-02 Thread Grant Edwards
On 2005-08-02, vincent wehren <[EMAIL PROTECTED]> wrote: > > "Grant Edwards" <[EMAIL PROTECTED]> schrieb im Newsbeitrag > news:[EMAIL PROTECTED] >|I have several python apps (some wxPython, some plain text-mode >| stuff) that I distribute internally for installation on Win32 >| machines. They're

Re: py2exe windows apps path question

2005-08-02 Thread vincent wehren
"Gregory Piñero" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] |And here is how I make sure I'm always using the right directory in my scripts: | |Put this code at the top: |import sys |curdir=os.path.dirname(sys.argv[0]) |#print curdir |Then I use curdir to build all of the

Re: py2exe windows apps path question

2005-08-02 Thread vincent wehren
"Grant Edwards" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] | On 2005-08-02, vincent wehren <[EMAIL PROTECTED]> wrote: | > | > "Grant Edwards" <[EMAIL PROTECTED]> schrieb im Newsbeitrag | > news:[EMAIL PROTECTED] | >|I have several python apps (some wxPython, some plain text-

IronPython 0.9 Released

2005-08-02 Thread Luis M. Gonzalez
IronPython 0.9 Released(8/2/2005 10:28:41 AM) http://www.microsoft.com/downloads/details.aspx?familyid=cf5ae627-5df1-4f8a-ba8b-d64f0676f43f&displaylang=en -- http://mail.python.org/mailman/listinfo/python-list

Re: py2exe windows apps path question

2005-08-02 Thread Gregory Piñero
> If you need something that works both on a frozen app as well as an > (unfrozen) python > script, you'd be better off using something like: > > def getAppPrefix(): > """Return the location the app is running from > """ > isFrozen = False > try: > isFrozen = sys.frozen >

Re: Dabo in 30 seconds?

2005-08-02 Thread Fernando Perez
Paul McNett wrote: > Fernando Perez wrote: >> If you are interested, just get ipython and grab the files for this, it's >> all >> BSD licensed. You can also browse the SVN repo here if you want to look at >> the code: >> >> http://ipython.scipy.org/svn/ipython/ipython/trunk/IPython/ >> >> The

Re: a pickle's pickle

2005-08-02 Thread Benji York
[EMAIL PROTECTED] wrote: > So basically trainer always gets an existing TrainingMatrix(the class) > pickled object if there is a file to read from, otherwise it just makes > a new instance. Either way, the instance trainer is pickled at the end. Right, but the data you're interested in is contain

Re: Art of Unit Testing

2005-08-02 Thread Christoph Zwerschke
Thanks for the link, Grig. I wasn't aware of the py lib so far. The possibility to create fixtures at the three different scopes is exactly what I was looking for. Anyway, I think it would be nice to have that feature in the standard lib unittest as well. It should not be too hard to add setUpO

Re: bug in python/numarray

2005-08-02 Thread Terry Reedy
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, there, > > I got different results by running the same lines of code on windows and > debian. Here is the code: > > a = kroneckerproduct(ones((4195,1)), identity(12)) I don't know what this does, but wonder if it uses a lot of mem

Re: a pickle's pickle

2005-08-02 Thread [EMAIL PROTECTED]
Benji, Thanks so much, you have saved the day ^_^ -- http://mail.python.org/mailman/listinfo/python-list

Re: Art of Unit Testing

2005-08-02 Thread Christoph Zwerschke
Björn Lindström wrote: >>Would it make sense to add "globaleSetup" and "globalTearDown" methods >>to the TestCase class? > In general that's not such a good idea. I completely agree and I think it makes a lot of sense that unittest calls setUp and tearDown for every single test. However, the fact

Fredericksburg, VA Zope and Python User Group

2005-08-02 Thread Benji York
Please join us August 10, 7:30-9:00 PM, for the third meeting of the Fredericksburg, VA Zope and Python User Group ("ZPUG"). This meeting has four features of note. - Brian Lloyd, the author of Python for .Net (http://www.zope.org/ Members/Brian/PythonNet/) and the Zope Corporation VP of Engineer

trying to parse non valid html documents with HTMLParser

2005-08-02 Thread florent
I'm trying to parse html documents from the web, using the HTMLParser class of the HTMLParser module (python 2.3), but some web documents are not fully valids. When the parser finds an invalid tag, he raises an exception. Then it seems impossible to resume the parsing just after where the excep

Re: py2exe windows apps path question

2005-08-02 Thread Grant Edwards
On 2005-08-02, vincent wehren <[EMAIL PROTECTED]> wrote: > If you are building paths in you code that are relative to > your app, I'm not using any paths. I use cytpes to load a .dll, and I don't really know what gnuplot-py is doing, but I think it's executing a .exe file and talking to it via a

Re: pre subprocess help needed

2005-08-02 Thread [EMAIL PROTECTED]
You can also use the spawn functions in os, together with the P_WAIT mode. os.spawnlp(os.P_WAIT, 'ls', 'ls') gconfd-martin kde-martin mcop-martin ssh-PhJzdB6333 gpg-bSRhOE ksocket-martin orbit-martin 0 os.spawnlp(os.P_WAIT, 'spam', 'spam') 127 -- http://mail.python.org/mailman/listi

Re: finding sublist

2005-08-02 Thread giampiero mu
controlla("12345678") -> "12345678" thanks everyone. only a question. there is a way to advantage of binary sequences? -- http://mail.python.org/mailman/listinfo/python-list

Re: Newer than a Newbe

2005-08-02 Thread Luis M. Gonzalez
linuxfreak wrote: > Look at Karrigell. Its a web framework for Python > > http://karrigell.sourceforge.net I second this suggestion. Karrigell is a pleasure to work with and I'm sure it will appeal any python fun who dare to play with it. I also hope Pierre (its developer) lose some of his modest

Re: bug in python/numarray

2005-08-02 Thread Robert Kern
[EMAIL PROTECTED] wrote: > Hi, there, > > I got different results by running the same lines of code on windows and > debian. Here is the code: > > a = kroneckerproduct(ones((4195,1)), identity(12)) > print a.mean() > > This works perfectly well in windows but it gave the following error while

Re: py2exe windows apps path question

2005-08-02 Thread vincent wehren
"Gregory Piñero" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > If you need something that works both on a frozen app as well as an > (unfrozen) python > script, you'd be better off using something like: > >> def getAppPrefix(): >> """Return the location the app is runnin

Pickle, __init__, and classes

2005-08-02 Thread Yin
I've created a class that reads in and processes a file in the initializer __init__. The processing is fairly substantial, and thus, instead of processing the file every time the object is created, I pickle the object to a file. In subsequent creations of the object, I implement a test to see whe

Re: trying to parse non valid html documents with HTMLParser

2005-08-02 Thread Benjamin Niemann
florent wrote: > I'm trying to parse html documents from the web, using the HTMLParser > class of the HTMLParser module (python 2.3), but some web documents are > not fully valids. Some?? Most of them :( > When the parser finds an invalid tag, he raises an > exception. Then it seems impossible

  1   2   >