Re: variable hell

2005-08-25 Thread Adriaan Renting
Not in my Python. >>> for count in range(0, 10): ... value = count ... exec("'a%s=%s' % (count, value)") ... >>> dir() ['__builtins__', '__doc__', '__name__', 'count', 'value'] >>> for count in range(0, 10): ... value = count ... exec(eval("'a%s=%s' % (count, value)")) ... >>> di

Re: Jargons of Info Tech industry

2005-08-25 Thread Gordon Burditt
>>> HTML is designed to degrade gracefully (never mind that most web >>> authors and many browser developers don't seem to comprehend this), >>> so you don't really need a "subset" html to get the safety features >>> you want. All you need to do is disable the appropriate features in >>> the HTML r

Re: Email client in Pyhton

2005-08-25 Thread Oren Tirosh
> IIRC, many of the mailbox modules (such as mailbox and > mhlib) are read-only, but they should provide a good starting point. The mailbox module has recently been upgraded for full read-write access by a student participating in google's Summer of Code. It is currently under review for inclusion

Re: loop in python

2005-08-25 Thread travlr
I gotta say that as number cruncher, iteration in python is my biggest nightmare. I do what is possible with numpy, but element by element processing is a hassle. My programming experience is still pretty fresh at a year, so "exotics" as such are not in play yet. I also wish python looping/iterativ

Re: Jargons of Info Tech industry

2005-08-25 Thread Mike Schilling
"Denis Kasak" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Mike Schilling wrote: >> >> I see a difference between "X would be useful for A, B, and C" and "Y >> will always be the only proper way." >> >> Don't you? > > Y would not be useful because of the bandwidth it consumes, t

Re: Jargons of Info Tech industry

2005-08-25 Thread Chris Head
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 John Bokma wrote: [snip] >>usage consists of downloading your e-mail. When using a Webmail >>service, your bandwidth usage consists of downloading the message, >>PLUS the entire user interface. > > > Not necessary when using (i)frames + cache True.

Re: Email client in Pyhton

2005-08-25 Thread knaren
> Start reading related RFCs like RFC2822, RFC2045/6/7, RFC2231, RFC821 > ... and then read Python documentation and you'll find that most of > these RFC are supported/implemented by python modules like > > - email > - smtlib > - rfc822 > > As far I know the most complete mail client written in

Re: Jargons of Info Tech industry

2005-08-25 Thread John Bokma
Chris Head <[EMAIL PROTECTED]> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > [EMAIL PROTECTED] wrote: > [snip] >> ... and generally these "web based message boards" (i.e. forums I >> assume you mean) have none of the useful tools that Usenet offers and >> are much, much slower. > [

Re: Newbie question: Sub-interpreters for CAD program

2005-08-25 Thread sonicSpammersGoToHellSmooth
Hi, Actually I was thinking of doing the bulk of everything in Python, and then embedding a Python interpreter into the CAD program. Anything in C++ would be to speed up critical things, like rules checking, etc. I have looked at python cad (found it a year or two ago) and am inspired by it; I'm

Re: Jargons of Info Tech industry

2005-08-25 Thread Denis Kasak
Mike Schilling wrote: > > I see a difference between "X would be useful for A, B, and C" and "Y will > always be the only proper way." > > Don't you? Y would not be useful because of the bandwidth it consumes, the malware it would introduce, the additional time spent focusing on the format ra

Static vs. dynamic checking for support of concurrent programming

2005-08-25 Thread Mike Meyer
The recent thread on threads caused me to reread the formal definition of SCOOP, and I noticed something I hadn't really impressed me the first time around: it's using staticly checkable rules to help ensure correct behavior in a concurrent environment. That's impressive. That's *really* impressiv

wanna stop by my homemade glory hole?

2005-08-25 Thread Lacy
my husband is installing an extra bathroom poolside. there is a perfect size hole (unless you have a huge cock) to stick your dick through into the adjoing room. come around the side of my house(perfect if you look like a repair man) enter into the unfisnished bathroom and I'll service you fro

Re: Jargons of Info Tech industry

2005-08-25 Thread CBFalconer
Gordon Burditt wrote: > >> HTML is designed to degrade gracefully (never mind that most web >> authors and many browser developers don't seem to comprehend this), >> so you don't really need a "subset" html to get the safety features >> you want. All you need to do is disable the appropriate featu

Re: Jargons of Info Tech industry

2005-08-25 Thread CBFalconer
Chris Head wrote: > ... snip ... > > Why can't we use the Web for what it was meant for: viewing > hypertext pages? Why must we turn it into a wrapper around every > application imaginable? Because the Lord High PoohBah (Bill) has so decreed. He has replaced General bullMoose. -- Chuck F ([EM

Re: Jargons of Info Tech industry

2005-08-25 Thread BJ Swope
So says Chris from his webmail account... On 8/25/05, Chris Head <[EMAIL PROTECTED]> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > [EMAIL PROTECTED] wrote: > [snip] > > ... and generally these "web based message boards" (i.e. forums I > > assume you mean) have none of the useful to

Re: Jargons of Info Tech industry

2005-08-25 Thread Chris Head
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 [EMAIL PROTECTED] wrote: [snip] > ... and generally these "web based message boards" (i.e. forums I > assume you mean) have none of the useful tools that Usenet offers and > are much, much slower. [snip] Arrgh, I *emphatically* *hate* Web-based-(almos

Re: Jargons of Info Tech industry

2005-08-25 Thread Gordon Burditt
>HTML is designed to degrade gracefully (never mind that most web >authors and many browser developers don't seem to comprehend this), so >you don't really need a "subset" html to get the safety features you >want. All you need to do is disable the appropriate features in the >HTML renderer in your

Re: Jargons of Info Tech industry

2005-08-25 Thread John Bokma
Paul Rubin wrote: > Mike Meyer <[EMAIL PROTECTED]> writes: >> > Another advantage is that evewry internet-enabled computer today >> > already comes with an HTML renderer (AKA browser) >> >> No, they don't. Minimalist Unix distributions don't include a browser >> by defa

Re: Jargons of Info Tech industry

2005-08-25 Thread Paul Rubin
Mike Meyer <[EMAIL PROTECTED]> writes: > > Another advantage is that evewry internet-enabled computer today already > > comes with an HTML renderer (AKA browser) > > No, they don't. Minimalist Unix distributions don't include a browser > by default. I know the BSD's don't, and suspect that gentoo

Re: variable hell

2005-08-25 Thread Nx
Thanks for all the responses and animated discussion, which is still the best way to learn something new. Most of the time it is not that you want to do something in a certain way , it rather is one cannot think of a better , faster more efficient way . Nx -- http://mail.python.org/mailman/listi

Re: Jargons of Info Tech industry

2005-08-25 Thread Mike Meyer
"Mike Schilling" <[EMAIL PROTECTED]> writes: > Another advantage is that evewry internet-enabled computer today already > comes with an HTML renderer (AKA browser) No, they don't. Minimalist Unix distributions don't include a browser by default. I know the BSD's don't, and suspect that gentoo Lin

Re: argument matching question

2005-08-25 Thread Learning Python
thanks, got it. I want to test the **name option for argument matching. -- http://mail.python.org/mailman/listinfo/python-list

Re: argument matching question

2005-08-25 Thread Leif K-Brooks
Learning Python wrote: > A code like this: > > def adder(**varargs): > sum=varargs[varargs.keys()[0]] > for next in varargs.keys()[1:]: > sum=sum+varargs[next] > return sum > > print adder( "first","second",'third') > > How to pass arguments to a functions that

argument matching question

2005-08-25 Thread Learning Python
I know this is dummy, just never saw an example of this. I want to use the special argument matching. A code like this: def adder(**varargs): sum=varargs[varargs.keys()[0]] for next in varargs.keys()[1:]: sum=sum+varargs[next] return sum print adder( "first","

wanna stop by my homemade glory hole?

2005-08-25 Thread Casee
my husband is installing an extra bathroom poolside. there is a perfect size hole (unless you have a huge cock) to stick your dick through into the adjoing room. come around the side of my house(perfect if you look like a repair man) enter into the unfisnished bathroom and I'll service you fro

Re: variable hell

2005-08-25 Thread Ron Garret
In article <[EMAIL PROTECTED]>, Steve Holden <[EMAIL PROTECTED]> wrote: > rafi wrote: > > Reinhold Birkenfeld wrote: > > > > > exec(eval("'a%s=%s' % (count, value)")) > >>> > >>>why using the eval? > >>> > >>>exec ('a%s=%s' % (count, value)) > >>> > >>>should be fine > >> > >>And this demo

Re: Anyone recognize this numeric storage format - similar to "float", but not quite

2005-08-25 Thread geskerrett
I am not sure if you are still watching this thread, but I seem to have a bit of a problem with the code sample you so graciously provided. It seems to work in all instances, except the original example I provided (namely, 1234567890). On my system, the number 1234567890, gets converted to 12345678

Re: pre-PEP: Object-oriented file module

2005-08-25 Thread Martin v. Löwis
Kenneth McDonald wrote: > Why would any of the issues below be any more difficult than they are with > the current file functions? I'm not proposing a C replacement for current > functions, merely a Python module that wraps all of those functions (and > adds some additional ones) in an appropriate

Re: pre-PEP: Object-oriented file module

2005-08-25 Thread Kenneth McDonald
Why would any of the issues below be any more difficult than they are withthe current file functions? I'm not proposing a C replacement for currentfunctions, merely a Python module that wraps all of those functions (andadds some additional ones) in an appropriate class.On Aug 25, 2005, at 5:28 PM,

Re: Bug in string.find; was: Re: Proposed PEP: New style indexing, was Re: Bug in slice type

2005-08-25 Thread Bryan Olson
Steve Holden asked: > Do you just go round looking for trouble? In the course of programming, yes, absolutly. > As far as position reporting goes, it seems pretty clear that find() > will always report positive index values. In a five-character string > then -1 and 4 are effectively equivalen

Re: pre-PEP: Object-oriented file module

2005-08-25 Thread Martin v. Löwis
Kenneth McDonald wrote: > I'd like to propose a new PEP [no, that isn't a redundant 'process' in > there :-)--pre-PEP is a different process than PEP], for a standard > library module that deals with files and file paths in an object > oriented manner. I believe this module should be included as

Embedding Python in other programs

2005-08-25 Thread Thomas Bartkus
Name: lib64python2.4-devel Summary: The libraries and header files needed for Python development Description: The Python programming language's interpreter can be extended with dynamically loaded extensions and can be embedded in other programs. This package contains the header files and libraries

Re: MacPython 2.2 on Mac OS X 10.3.8 - configurePython error

2005-08-25 Thread Robert Kern
Paul Miller wrote: > I have a user who is is having trouble getting MacPython on his OS X > 10.3.8 system. > > When he runs ConfigurePythonCarbon, he gets this error: > > [terminated] > 'import site' failed; use -v for traceback > traceback )most recent call last): > File "Moes:SWdev:Jack:Python

Re: a dummy python question

2005-08-25 Thread Learning Python
Thanks all for replying. I finally know what's going on. -- http://mail.python.org/mailman/listinfo/python-list

Re: pickle.load not working?

2005-08-25 Thread [EMAIL PROTECTED]
I get it, I missed the little parintheses or however you spell it. () . -- http://mail.python.org/mailman/listinfo/python-list

Re: a dummy python question

2005-08-25 Thread Robert Kern
infidel wrote: > Learning Python wrote: > >>A example in learning Python by Mark Lutz and David Ascher >> >>about function scope >> >>example like this: >> >> def outer(x): >> >> def inner(i): >>print i, >>if i: inner(i-1) >> inner(x) >> outer(3) >> >>Here supposely

Re: a dummy python question

2005-08-25 Thread rafi
Learning Python wrote: >>>def outer(x): > > def inner(i): > print i, > if i: inner(i-1) > inner(x) > >>>outer(3) > > Here supposely, it should report error, because the function inner > cannot see itself since inner is only in local namespace of outer. There is no er

Re: New Arrival to Python

2005-08-25 Thread [EMAIL PROTECTED]
1. Whichever one works best for you, of course. :) There are lots of editors and IDEs out there. I find myself coming back to Emacs and jEdit the most, but there are a sizable number of vi partisans (benighted heathens tho they be) and an increasing number of Eclipse, Wing and Komodo partisans.

MacPython 2.2 on Mac OS X 10.3.8 - configurePython error

2005-08-25 Thread Paul Miller
I have a user who is is having trouble getting MacPython on his OS X 10.3.8 system. When he runs ConfigurePythonCarbon, he gets this error: [terminated] 'import site' failed; use -v for traceback traceback )most recent call last): File "Moes:SWdev:Jack:Python2.2:Mac:script:configurePython.py", l

Re: a dummy python question

2005-08-25 Thread [EMAIL PROTECTED]
This is not reproducible under either Python 2.3.4 (UNIX), Python 2.4.1 (UNIX) or Python 2.4.1 (Windows). If you still need help, we need to know precisely what you're doing. = scope_test.py = #!/usr/bin/env python # # (insert his code, verbatim...) # if __name__=='__main__': outer(3)

Re: a dummy python question

2005-08-25 Thread infidel
Learning Python wrote: > A example in learning Python by Mark Lutz and David Ascher > > about function scope > > example like this: > > >>def outer(x): > def inner(i): > print i, > if i: inner(i-1) > inner(x) > >>outer(3) > > Here supposely, it should report error, becaus

Re: minimalist regular expression

2005-08-25 Thread John Bokma
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Exists some tool, programs or some able to compute the minimal regular > expression, namely ,taking a series of regular exoression, the minimal > one that makes the same matching? > thanx in advance length? (define minimal) :-D. -- John

Usenet, HTML (was Re: Jargons of Info Tech industry)

2005-08-25 Thread John Bokma
Ulrich Hobelmann <[EMAIL PROTECTED]> wrote: > On the information side (in contrast to the discussion side) RSS is > replacing Usenet, LOL, how? I can't post to RSS feeds. Or do you mean for lurkers? > There is no real reason why NNTP couldn't be used like RSS (i.e. > contain a small description

Re: Jargons of Info Tech industry

2005-08-25 Thread John Bokma
[EMAIL PROTECTED] wrote: > In comp.lang.perl.misc John Bokma <[EMAIL PROTECTED]> wrote: >> >> > the argument that usenet should never change seems a little >> > heavy-handed and anachronistic. >> >> No, simple since there *are* alternatives: web based message boards. >> Those alternatives *do* s

Re: Jargons of Info Tech industry

2005-08-25 Thread Rich Teer
On Thu, 25 Aug 2005, Ulrich Hobelmann wrote: > CSS sheet. If things were that way, suddenly people *would* use Outlook No no no! Let's keep those Outhouse lusers away from Usenet. There's tto much top posting as it is! -- Rich Teer, SCNA, SCSA, OpenSolaris CAB member President, Rite Online

a dummy python question

2005-08-25 Thread Learning Python
A example in learning Python by Mark Lutz and David Ascher about function scope example like this: >>def outer(x): def inner(i): print i, if i: inner(i-1) inner(x) >>outer(3) Here supposely, it should report error, because the function inner cannot see itself since inn

Re: minimalist regular expression

2005-08-25 Thread [EMAIL PROTECTED]
very nice -- http://mail.python.org/mailman/listinfo/python-list

pre-PEP: Object-oriented file module

2005-08-25 Thread Kenneth McDonald
I'd like to propose a new PEP [no, that isn't a redundant 'process' in there :-)--pre-PEP is a different process than PEP], for a standard library module that deals with files and file paths in an object oriented manner. I believe this module should be included as part of the standard Pytho

Re: Speed quirk: redundant line gives six-fold speedup

2005-08-25 Thread Claudio Grondi
> I've learnt my lesson :) Thank you for your help, and apologies > for wasting other people's time with this as well as my own! I've learnt my lesson reading through this thread, too. I am glad to be given the chance of wasting my time with it and very happy and thankful, that you posted your

Re: Limited XML tidy

2005-08-25 Thread uche . ogbuji
> The problem is that when the sax handler raises an exception, I can't see how to find out why. What I want to do is for DodgyErrorHandler to do something different depending on where we are in the course of parsing. Is there anyway to get that information back from xml.sax (or indeed from any oth

Re: minimalist regular expression

2005-08-25 Thread Trent Mick
[EMAIL PROTECTED] wrote] > Exists some tool, programs or some able to compute the minimal regular > expression, namely ,taking a series of regular exoression, the minimal > one that makes the same matching? def get_minimal_regex(*regexes): return ".*" :) Or, slightly less smart-ass-y

Re: Filetypes in email attachments.

2005-08-25 Thread Martin v. Löwis
[EMAIL PROTECTED] wrote: > I would like to use the magic file to detect the filetype, if this is > possible. I have the attachement stored and (generally) decoded in a > variable. There is a Python binding to the libmagic library, see http://mx.gw.com/pipermail/file/2003/55.html Meanwhile,

Re: New Arrival to Python

2005-08-25 Thread Luis M. Gonzalez
Windows Apps: Since you said "professional looking" applications, I assume you mean graphical interfaces (windows - GUI): If so, I recomend PythonCard ( http://pythoncard.sourceforge. net/ ). It is very easy to use, very similar to Visual Basic or Delphi (drag and drop widgets on a form...). Web

Re: New Arrival to Python

2005-08-25 Thread Luis M. Gonzalez
Windows Apps: Since you said "professional looking" applications, I assume you mean graphical interfaces (windows - GUI): If so, I recomend PythonCard ( http://pythoncard.sourceforge.net/ ). It is very easy to use, very similar to Visual Basic or Delphi (drag and drop widgets on a form...). Web D

Re: variable hell

2005-08-25 Thread rafi
Steve Holden wrote: > Because eval() takes an expression as an argument, and assignment is a > statement. I am definitely not a language lawyer... but I should a little bit more thanks, -- rafi "Imagination is more important than knowledge." (Alber

Jargons of Info Tech industry

2005-08-25 Thread Alexander Zatvornitskiy
Привет Xah! 11 aug 2005 at 18:23, Xah Lee wrote: XL> Jargons of Info Tech industry XL> (A Love of Jargons) XL> Xah Lee, 2002 Feb XL> People in the computing field like to spur the use of spurious ...skipped... Look at this site for some info: http://lleo.aha.ru/na/en Alexander, [EMAIL PROT

ANN: SPE 0.7.5.c: Improved documentation & bugfixes

2005-08-25 Thread SPE - Stani's Python Editor
With special thanks to Dimitri Pater to contribute his documenation from http://www.serpia.com and Nir Aides for the documentation about the debugger. Also thanks to all Mac donors who bring real Mac support for SPE more and more close. For more info visit the homepage. Stani Spe is a free python

Re: Suppressing checking of modules with pychecker

2005-08-25 Thread MrJean1
FWIIW, We use PyChecker all the time with Python files using importing wx plus wx.grid or wx.stc, etc. and the run times vary between 5 and 15 seconds. This is Python 2.4 with wxPython 2.4.2.4 and RedHat Fedora Core 2 Linux running on a 1.2 GHz Pentium 4 M laptop. /Jean Brouwers -- http://mail

Re: variable hell

2005-08-25 Thread Steve Holden
rafi wrote: > Reinhold Birkenfeld wrote: > > exec(eval("'a%s=%s' % (count, value)")) >>> >>>why using the eval? >>> >>>exec ('a%s=%s' % (count, value)) >>> >>>should be fine >> >>And this demonstrates why exec as a statement was a mistake ;) >> >>It actually is >> >>exec 'a%s=%s' % (count, v

minimalist regular expression

2005-08-25 Thread [EMAIL PROTECTED]
Exists some tool, programs or some able to compute the minimal regular expression, namely ,taking a series of regular exoression, the minimal one that makes the same matching? thanx in advance -- http://mail.python.org/mailman/listinfo/python-list

Re: variable hell

2005-08-25 Thread Robert Kern
rafi wrote: > In the meantime another question I cannot find an answer to: any idea > why does eval() consider '=' as a syntax error? > > >>> eval ('a=1') > Traceback (most recent call last): >File "", line 1, in ? >File "", line 1 > a=1 > ^ > SyntaxError: invalid syntax eva

Re: variable hell

2005-08-25 Thread Robert Kern
Ron Garret wrote: > In article <[EMAIL PROTECTED]>, > Robert Kern <[EMAIL PROTECTED]> wrote: > >> In the >>bowels of my modules, I may not know what the contents are at code-time, > > Then how do you write your code? With style. ;-) I use a Bunch where I might otherwise use a dictionary insid

Re: variable hell

2005-08-25 Thread rafi
Reinhold Birkenfeld wrote: >>> exec(eval("'a%s=%s' % (count, value)")) >> >>why using the eval? >> >>exec ('a%s=%s' % (count, value)) >> >>should be fine > > And this demonstrates why exec as a statement was a mistake ;) > > It actually is > > exec 'a%s=%s' % (count, value) Noted. In the mea

Re: Speed quirk: redundant line gives six-fold speedup

2005-08-25 Thread MrJean1
Two observations: 1 - The difference in run time with and without the dummy* globals is due to a difference in the number of invokations of the search() function: 1,140 resp. 27,530 in my environment. To verify, just change the line def search(): to searches = 0 def search():

Re: Speed quirk: redundant line gives six-fold speedup

2005-08-25 Thread rafi
Stelios Xanthakis wrote: > Mark Dickinson wrote: > >> I have a simple 192-line Python script that begins with the line: >> >> dummy0 = 47 >> >> The script runs in less than 2.5 seconds. The variable dummy0 is never >> referenced again, directly or indirectly, by the rest of the script. >> >> Here

Re: variable hell

2005-08-25 Thread Reinhold Birkenfeld
rafi wrote: > Adriaan Renting wrote: >> You might be able to do something along the lines of >> >> for count in range(0,maxcount): >> value = values[count] >> exec(eval("'a%s=%s' % (count, value)")) > > why using the eval? > > exec ('a%s=%s' % (count, value)) > > should be fine And this de

Re: Speed quirk: redundant line gives six-fold speedup

2005-08-25 Thread Raymond Hettinger
Mark Dickinson wrote: > I have a simple 192-line Python script that begins with the line: > > dummy0 = 47 > > The script runs in less than 2.5 seconds. The variable dummy0 is never > referenced again, directly or indirectly, by the rest of the script. > > Here's the surprise: if I remove or comme

Re: Jargons of Info Tech industry

2005-08-25 Thread Ulrich Hobelmann
[EMAIL PROTECTED] wrote: > In comp.lang.perl.misc John Bokma <[EMAIL PROTECTED]> wrote: >>> the argument that usenet should never change seems a little >>> heavy-handed and anachronistic. >> No, simple since there *are* alternatives: web based message boards. Those >> alternatives *do* support HTM

Re: New Arrival to Python

2005-08-25 Thread calfdog
I have been using Eclispe IDE with the PyDev plugin for Python Development. it allow you to set up projects. you can use PyAnt to build them. It works great for me. It's free an easy to use. Eclipse is at http://www.eclipse.org There is also Emacs with the python plugin Rob M. python project -

Re: Jargons of Info Tech industry

2005-08-25 Thread usenet
In comp.lang.perl.misc John Bokma <[EMAIL PROTECTED]> wrote: > > > the argument that usenet should never change seems a little > > heavy-handed and anachronistic. > > No, simple since there *are* alternatives: web based message boards. Those > alternatives *do* support HTML formatting (often the

Re: variable hell

2005-08-25 Thread Ron Garret
In article <[EMAIL PROTECTED]>, Robert Kern <[EMAIL PROTECTED]> wrote: > In the > bowels of my modules, I may not know what the contents are at code-time, Then how do you write your code? rg -- http://mail.python.org/mailman/listinfo/python-list

Re: Speed quirk: redundant line gives six-fold speedup

2005-08-25 Thread Mark Dickinson
In article <[EMAIL PROTECTED]>, Bill Mill <[EMAIL PROTECTED]> wrote: > I'm also pretty sure I've caught a bug in his code, though I'm not > sure how it works exactly. I replaced the 'min' built-in with my own > min, and he's going to get nondeterministic results from this line: > >mm =

Re: Unix diff command under Window.

2005-08-25 Thread Thomas Heller
Trent Mick <[EMAIL PROTECTED]> writes: > [Neil Hodgson wrote] >> Thomas Heller: >> >> > Yes. There's a script in your Python distribution: >> > Tools/scripts/diff.py >> > >> > See also the docs for the 'difflib' standard library module. >> >> Is the opposite code, a Python equivalent to 'p

Re: Unix diff command under Window.

2005-08-25 Thread Max M
TonyHa wrote: > Hello, > > Does any one have using Python to write a Unix "diff" command for > Window? I generally just us the diff built into tortoiseSVN. That way it's only a rightclick away. -- hilsen/regards Max M, Denmark http://www.mxm.dk/ IT's Mad Science -- http://mail.python.org/

Re: loop in python

2005-08-25 Thread James
>> I don't want to offend you or anything, but doesn't the second sentence mean >> that someone DID do a speed comparison? I did provide Language Shootout link in the next paragraph of the post you referred to along with an obligatory caution about interpreting benchmarks. The Language Shootout i

Suppressing checking of modules with pychecker

2005-08-25 Thread Qopit
Does anyone know how to stop the command line pychecker from analyzing particular modules? It really gets slowed down on some big ones. In particular having 'import wx' takes a long while (30 - 60s). If you try pycheck'ing the program below it takes a while and prints a zillion warnings. #--- i

Re: Speed quirk: redundant line gives six-fold speedup

2005-08-25 Thread Mark Dickinson
In article <[EMAIL PROTECTED]>, Stelios Xanthakis <[EMAIL PROTECTED]> wrote: > In the sudoku solver, there is a min (number, object) which is > probably what's affected by the extistance of the dummy variable. > Now, in sudoku puzzles some times the algorithm has to suppose > that in a box the r

Re: variable hell

2005-08-25 Thread bruno modulix
[EMAIL PROTECTED] wrote: > Hey, if the man wants to write it that way, let the man write it that > way. If it works for him, great... he's sure confused the heck out of > all of us, and that translates into job security for him! As you can > see, the name of the post is 'variable hell' and that is

Re: Superclass files and order - oh my!! Questioning the experts!!

2005-08-25 Thread rh0dium
Slight correction.. rh0dium wrote: > Hi all, > > Still a newbie but making some headway. So I have a file structure > like this.. > > top/ > --modules/ > metrics.py > --metrix/ > uptime.py > > Now metrics.py is my superclass, and uptime.py inherits the superclass > metrics.py. > > So for

Re: Jargons of Info Tech industry

2005-08-25 Thread Rich Teer
On Thu, 25 Aug 2005, John Bokma wrote: > Just have a look at some web based message boards, and you might see why it > would be another disaster on Usenet. Moreoever, why keep people insisting > on making Usenet "better"? If you want HTML and fancy mark up, start a > message board. You probably ca

Re: Speed quirk: redundant line gives six-fold speedup

2005-08-25 Thread Bill Mill
On 8/25/05, Jack Diederich <[EMAIL PROTECTED]> wrote: > On Thu, Aug 25, 2005 at 09:23:09PM +0300, Stelios Xanthakis wrote: > > The explanation is this: hash > > and comparison of objects depends on the state of the memory > > allocator. A sample case is this: > > > > class A: pass > >

Re: Command Line arguments

2005-08-25 Thread Trent Mick
[michael wrote] > SOLVED! Thank you. > > I wonder why this was needed for 2.4 and not 2.2? I don't think it was > lingering things from old installs because it happened on a persons > computer that had never had any python installed before 2.4. It might be due to a bug in the Python 2.4 installer

Re: Unix diff command under Window.

2005-08-25 Thread Trent Mick
[Neil Hodgson wrote] > Thomas Heller: > > > Yes. There's a script in your Python distribution: > > Tools/scripts/diff.py > > > > See also the docs for the 'difflib' standard library module. > > Is the opposite code, a Python equivalent to 'patch' available? I > have endless trouble receivi

Re: Jargons of Info Tech industry

2005-08-25 Thread Mike Schilling
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > "Mike Schilling" <[EMAIL PROTECTED]> writes: > >> "Rich Teer" <[EMAIL PROTECTED]> wrote in message >> news:[EMAIL PROTECTED] >> > On Thu, 25 Aug 2005, Mike Schilling wrote: >> > >> >> Another advantage is that evewry internet-enabled c

Superclass files and order - oh my!! Questioning the experts!!

2005-08-25 Thread rh0dium
Hi all, Still a newbie but making some headway. So I have a file structure like this.. top/ --modules/ metrics.py --metrix/ uptime.py Now metrics.py is my superclass, and uptime.py inherits the superclass metrics.py. So for arguments sake metrics.py class metrics():

Re: Speed quirk: redundant line gives six-fold speedup

2005-08-25 Thread Jack Diederich
On Thu, Aug 25, 2005 at 09:23:09PM +0300, Stelios Xanthakis wrote: > The explanation is this: hash > and comparison of objects depends on the state of the memory > allocator. A sample case is this: > > class A: pass > dummy0=47 # comment this to get a different result for min >

Re: Speed quirk: redundant line gives six-fold speedup

2005-08-25 Thread Bill Mill
On 8/25/05, Erik Max Francis <[EMAIL PROTECTED]> wrote: > Bill Mill wrote: > > > Unlikely; 2 people have confirmed these results already. > > > > I did find, though, that if I remove all print statements from the > > program, the dummy and non-dummy variable versions take indentical > > time. Can

Re: Bug in string.find; was: Re: Proposed PEP: New style indexing, was Re: Bug in slice type

2005-08-25 Thread Paul Rubin
Steve Holden <[EMAIL PROTECTED]> writes: > As far as position reporting goes, it seems pretty clear that find() > will always report positive index values. In a five-character string > then -1 and 4 are effectively equivalent. > > What on earth makes you call this a bug? And what are you proposing

Re: Jargons of Info Tech industry

2005-08-25 Thread Alan J. Flavell
On Thu, 25 Aug 2005, Mike Schilling wrote: [Off Topic discussion of netiquette, seen on comp.lang.perl.misc:] > Gosh, if you say they should be, there's no point trying to have an > intelligent discussion, is there? Discussion about netiquette on any of these cross-posted groups cannot by defi

Re: Speed quirk: redundant line gives six-fold speedup

2005-08-25 Thread Stelios Xanthakis
Mark Dickinson wrote: > I have a simple 192-line Python script that begins with the line: > > dummy0 = 47 > > The script runs in less than 2.5 seconds. The variable dummy0 is never > referenced again, directly or indirectly, by the rest of the script. > > Here's the surprise: if I remove or com

Re: Speed quirk: redundant line gives six-fold speedup

2005-08-25 Thread Bill Mill
On 8/25/05, Jack Diederich <[EMAIL PROTECTED]> wrote: > On Thu, Aug 25, 2005 at 01:35:04PM -0400, Bill Mill wrote: > > On 8/25/05, Erik Max Francis <[EMAIL PROTECTED]> wrote: > > > Mark Dickinson wrote: > > > > > > > Questions: > > > > > > > > (1) Can anyone else reproduce this behaviour, or is it

Re: Speed quirk: redundant line gives six-fold speedup

2005-08-25 Thread Jack Diederich
On Thu, Aug 25, 2005 at 01:55:48PM -0400, Bill Mill wrote: > Bill Mill wrote: > > > > Pentium M 1.8 GHz Windows 2k. Here's the top of the profile results > > for fast and slow on my machine (these won't look decent except in a > > fixed-width font): > > > > > > > Interestingly, the test.py:36 li

Re: Speed quirk: redundant line gives six-fold speedup

2005-08-25 Thread jay graves
Mark Dickinson wrote: > Questions: > (1) Can anyone else reproduce this behaviour, or is it just some quirk > of my setup? yes. I get 7 sec vs 1 sec on my laptop. > (2) Any possible explanations? Is there some optimization that kicks > in at a certain number of lines, or at a certain le

Re: Jargons of Info Tech industry

2005-08-25 Thread John Bokma
Rich Teer <[EMAIL PROTECTED]> wrote: > On Thu, 25 Aug 2005, Mike Schilling wrote: > >> Another advantage is that evewry internet-enabled computer today >> already comes with an HTML renderer (AKA browser), so that a message >> saved to a file can be read very easily. > > I think you're missing t

Re: Speed quirk: redundant line gives six-fold speedup

2005-08-25 Thread Mark Dickinson
In article <[EMAIL PROTECTED]>, Bill Mill <[EMAIL PROTECTED]> wrote: > One of my own: what in the world made you think "maybe I'll add 29 > dummy global variables to speed things up?" You mean this isn't a well-known optimization technique? :) I was refactoring the code, and after making a part

Re: Jargons of Info Tech industry

2005-08-25 Thread joe
"T Beck" <[EMAIL PROTECTED]> writes: > Mike Schilling wrote: > > "Rich Teer" <[EMAIL PROTECTED]> wrote in message > > news:[EMAIL PROTECTED] > > > On Thu, 25 Aug 2005, Mike Schilling wrote: > > > > > >> Another advantage is that evewry internet-enabled computer > > >> today already comes with an H

Re: Speed quirk: redundant line gives six-fold speedup

2005-08-25 Thread Jack Diederich
On Thu, Aug 25, 2005 at 01:35:04PM -0400, Bill Mill wrote: > On 8/25/05, Erik Max Francis <[EMAIL PROTECTED]> wrote: > > Mark Dickinson wrote: > > > > > Questions: > > > > > > (1) Can anyone else reproduce this behaviour, or is it just some quirk > > > of my setup? > > > (2) Any possible expla

Re: Speed quirk: redundant line gives six-fold speedup

2005-08-25 Thread Bill Mill
Bill Mill wrote: > > Pentium M 1.8 GHz Windows 2k. Here's the top of the profile results > for fast and slow on my machine (these won't look decent except in a > fixed-width font): > > > Interestingly, the test.py:36 line, which takes 45 seconds (!!) in the > slow version, does not appear at all

Re: Jargons of Info Tech industry

2005-08-25 Thread John Bokma
"T Beck" <[EMAIL PROTECTED]> wrote: > If we argue that people are evolving the way e-mail is handled, and > adding entire new feature sets to something which has been around > since the earliest days of the internet, then that's perfectly > feasable. HTML itself has grown. We've also added Javasc

Re: Speed quirk: redundant line gives six-fold speedup

2005-08-25 Thread Erik Max Francis
Bill Mill wrote: > Unlikely; 2 people have confirmed these results already. > > I did find, though, that if I remove all print statements from the > program, the dummy and non-dummy variable versions take indentical > time. Can others reproduce this? Yes, it's obviously a real effect given the o

  1   2   3   >