Re: Draft PEP - get the regex module into stdlib

2014-08-28 Thread Skip Montanaro
On Thu, Aug 28, 2014 at 6:10 PM, Chris Angelico wrote: > Ow, that doesn't look like a draft PEP to me, that looks like a > 321-comment tracker issue. A PEP is usually a smidge more coherent > than that :) > From: http://legacy.python.org/dev/peps/pep-0001/ *PEP stands for Python Enhancement Pro

Re: Keeping python code and database in sync

2014-08-29 Thread Skip Montanaro
On Fri, Aug 29, 2014 at 9:54 AM, Roy Smith wrote: > Yeah, schema migration is an ugly problem. It's not really any worse than any other sort of complex data structure change, is it? If your persistent data lived in a pickle file, it would likely be as bad or worse. > ... suckitude ... Nice word

python-dateutil suggestiopn

2014-08-29 Thread Skip Montanaro
It doesn't look like Gustavo Niemeyer is actively working on python-dateutil. Tomi Pievilaeinen is listed on PyPI as the author, but I have no email address for him, so I'm tossing this message in a bottle out into the Gulf Stream in hopes that Gustavo or Tomi notice it. I'm using imaplib to downl

Re: Keeping python code and database in sync

2014-08-29 Thread Skip Montanaro
On Aug 29, 2014 5:34 PM, "Chris Angelico" wrote: > I'm not sure how suckitude is affected by bugs, exactly; possibly O(N > log N), because each bug has a small probability of affecting another > bug. OTOH, bug fixes often have a fairly high probability of adding more bugs to the system, especial

Re: Keeping python code and database in sync

2014-08-29 Thread Skip Montanaro
On Fri, Aug 29, 2014 at 6:54 PM, Ethan Furman wrote: > Thus endeth my attempts to train Skip's Polly. But I am curious -- if > 'suckitude' is in immediate contact with punctuation such as just now, or at > the end of a sentence, does it not count? That would be suckitude indeed! ;) Thank you

Re: Why doesn't this work

2014-09-02 Thread Skip Montanaro
On Tue, Sep 2, 2014 at 3:13 PM, Seymore4Head wrote: > I still can't get the syntax > test='Hey buddy get away from my car' > if test[0].alpha(): > return True > My guess is you meant isalpha(), as Mark indicated. Here's a cheap way to see what an object can do: >>> test='Hey buddy get away

Re: Python is going to be hard

2014-09-03 Thread Skip Montanaro
On Wed, Sep 3, 2014 at 1:24 PM, MRAB wrote: > Iterating over a list yields its contents, not indexes. Unlike in JavaScript. Not sure where the OP is coming from, but that "feature" of JavaScript threw me when I first encountered it. My guess would be that his prior experience includes (at least)

Re: Thread-ID - how much could be?

2014-09-11 Thread Skip Montanaro
On Thu, Sep 11, 2014 at 8:29 PM, Steven D'Aprano wrote: > Suppose you somehow managed to create 9223372036854775807 threads. If your > computer has 16 GB of RAM available, that means that at most each thread > can use: > > py> 16*1024*1024*1024/9223372036854775807 > 1.862645149230957e-09 > > bytes

pylint for cython?

2014-09-12 Thread Skip Montanaro
I have slowly been converting some Python source to Cython. I'm pretty conservative in what changes I make, mostly sprinkling a few "cdef", "float" and "int" declarations around the pyx file. Still, conservative or not, it's enough to choke pylint. Rather than have to maintain a pure Python version

PyCharm refactoring tool?

2014-09-15 Thread Skip Montanaro
I started up an instance of PyCharm last Friday. It's mostly just been sitting there like a bump on a log. I set things up to use Emacs as my editor. It seems most of its functionality won't be all that useful. Most of my work is on libraries/platforms - stuff which is not runnable in isolation, so

Re: python script monitor

2014-09-16 Thread Skip Montanaro
On Sep 16, 2014 4:17 AM, "Nicholas Cannon" wrote: > > Nah I mean like there is performance issues. It delivers result that I want just mot very conveinetly fast. Take a look at the cProfile module. That's what it's called in Python 2.x. Not sure if it lost its camel case spelling in 3.x or is now

Re: Timedelta constructor with string parameter

2014-09-23 Thread Skip Montanaro
On Tue, Sep 23, 2014 at 4:11 AM, wrote: > I created some code recently to parse a string and create a timedelta from > it. Interesting. I notice that dateutil.parser.parse already understands you notation: >>> x = dateutil.parser.parse("5h32m15s") >>> x datetime.datetime(2014, 9, 23, 5, 32, 15

Re: why can't open the file with browser?

2014-09-24 Thread Skip Montanaro
Maybe it's supposed to be file://localhost/test.html ? Just a guess, as I don't use Windows. Skip On Wed, Sep 24, 2014 at 4:32 AM, luofeiyu wrote: > > import webbrowser > webbrowser.open('f:\\test.html') > > why the file f:\\test.html is opened by notepad ,not by my firefox or chrome? > > >

Re: Storage Cost Calculation

2014-09-27 Thread Skip Montanaro
On Sep 27, 2014 1:06 AM, "Chris Angelico" wrote: > > We are not going to do your homework for you. Perhaps it was a take home test... What then? :-) Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Understanding co_lnotab

2014-09-27 Thread Skip Montanaro
On Sat, Sep 27, 2014 at 7:08 AM, Ned Batchelder wrote: > Just out of curiosity, what are you writing, it sounds interesting! :) Ned would say that. I think he has an unusual fondness for static code analysis tools. :-) Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: "High water" Memory fragmentation still a thing?

2014-10-03 Thread Skip Montanaro
On Fri, Oct 3, 2014 at 1:36 PM, Croepha wrote: > Long running Python jobs that consume a lot of memory while > running may not return that memory to the operating system > until the process actually terminates, even if everything is > garbage collected properly. (I see Antoine replied that this

Re: Practice question

2014-10-05 Thread Skip Montanaro
On Oct 5, 2014 6:07 PM, "Seymore4Head" wrote: > > For the record, I don't want a hint. I want the answer. > I see a practice question is similar to this. > 15 <= x < 30 And it wants a similar expression that is equivalent. Maybe 30 > x >= 15 ? Seems more "similar" to the original expressi

Re: Practice question

2014-10-06 Thread Skip Montanaro
On Sun, Oct 5, 2014 at 9:47 PM, Rustom Mody wrote: > Sorry Seymore if this sounds condescending -- its not a complaint > against you but against those who treat the print statement/expression as > kosher for newbies. So if you're not griping about Seymore's original post, are you griping about my

Re: Practice question

2014-10-08 Thread Skip Montanaro
On Wed, Oct 8, 2014 at 11:14 AM, Rustom Mody wrote: > So pushing beginners away from print can push them up the learning > curve more quickly Or more quickly discourage them. I still use print for all sorts of things. In my opinion, there is often no need for fancy loggers, str.format, or the wri

Re: Numpy, uint64 and Big O notation.

2014-10-09 Thread Skip Montanaro
On Thu, Oct 9, 2014 at 8:08 AM, wrote: > I'm trying to find out the best way to multiply an uint64 (numpy). Could > someone help me find the best way to achieve that and where can I find the > time and space complexity in a Big O notation? Multiply it by what? This works fine for me: >>> imp

Re: Numpy, uint64 and Big O notation.

2014-10-09 Thread Skip Montanaro
(For future reference, when responding to answers, it's worthwhile to continue to cc python-list.) On Thu, Oct 9, 2014 at 11:12 AM, Marcos Schratzenstaller < marksabb...@gmail.com> wrote: > The numpy has a function which manipulate 64 bits integers, but I couldn't > find a specific method to multi

Re: while loop - multiple condition

2014-10-13 Thread Skip Montanaro
On Mon, Oct 13, 2014 at 6:59 AM, Chris Angelico wrote: > while input('Do you like python?') not in ('yes', 'y'): pass Unfortunately, you probably have to account for people who SHOUT: while input('Do you like python?').lower() not in ('yes', 'y'): pass Skip -- https://mail.python.org/m

Re: I'm looking to start a team of developers, quants, and financial experts, to setup and manage an auto-trading-money-making-machine

2014-10-14 Thread Skip Montanaro
On Tue, Oct 14, 2014 at 7:16 AM, ryguy7272 wrote: > I'm looking to start a team of developers, quants, and financial experts, > to setup and manage an auto-trading-money-making-machine > Two things: 1. That's obviously much easier said than done. (I happen to develop automated trading systems f

Re: strange thing that disturbs

2014-10-14 Thread Skip Montanaro
On Tue, Oct 14, 2014 at 1:13 PM, wrote: > it doesnt seem to be present and doesnt react to the "python -m tkinter" > -module not present > I don't know how it's spelled in 3.4.x, but in 2.7 it's spelled "Tkinter". Give that a try. (Sorry, no 3.4 install handy or I'd verify it myself.) The other

Re: strange thing that disturbs

2014-10-14 Thread Skip Montanaro
you! > > GD > > p.s. i only installed 3.4.2... thats enough right? or do i have to install > the 2.X version as well? > > 2014-10-14 20:32 GMT+02:00 Skip Montanaro : > >> >> On Tue, Oct 14, 2014 at 1:13 PM, wrote: >> >>> it doesnt seem to be presen

Re: Parsing Python dictionary with multiple objects

2014-10-14 Thread Skip Montanaro
Shuffle the keys, then grab the first 20 for one dictionary, the next 30 for the second, and the last 50 for the third. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Detecting user's installed Python/Tkinter packages during install of app

2014-10-16 Thread Skip Montanaro
On Thu, Oct 16, 2014 at 4:54 PM, Noble Bell wrote: > If my application uses a version of python/tkinter that is not on the users > computer will I be able to detect that during an install and automatically > install the proper files silently? You mean, like this? % python -c 'import _tkinter ;

Re: Py2App - Could not import Tkinter error from resulting app

2014-10-21 Thread Skip Montanaro
On Tue, Oct 21, 2014 at 8:20 AM, Noble Bell wrote: > I realized this problem shortly after I posted the question and tried to > go back to google groups and delete my post before anyone had seen it. In general, that won't work, as lots of people use email ( python-list@python.org) or Usenet (co

How to build 64-bit Python on Solaris with GCC?

2011-12-06 Thread Skip Montanaro
I'd like to build a 64-bit version of Python on Solaris using gcc. I did a bit of Googling, but everything I came up with seemed old, inconclusive or assumes the use of the Sun Studio compiler, with which i have no experience. Does anyone have a recipe for the subject build? Thanks, --

Re: How to build 64-bit Python on Solaris with GCC?

2011-12-07 Thread Skip Montanaro
> Does anyone have a recipe for the subject build? I know Solaris is a minority platform these days, but surely someone has tackled this problem, haven't they? Thx, Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: How to build 64-bit Python on Solaris with GCC?

2011-12-09 Thread Skip Montanaro
Karim gmail.com> writes: > ./configure > make > make install Thanks. I have several different versions in my local sandbox. None are 64-bit ELFs. Just to make sure I hadn't missed some new development in this area, I cloned the hg repository and build the trunk version from scratch. I get a

Re: How to build 64-bit Python on Solaris with GCC?

2011-12-09 Thread Skip Montanaro
> ./configure CFLAGS=-m64 LDFLAGS=-m64 should work with a reasonably > recent revision. Thanks, that did, indeed work with CPython trunk. I eventually switched from gcc to Sun's compiler though because I was getting link warnings. Skip -- http://mail.python.org/mailman/listinfo/python-list

subprocess module and long-lived subprocesses

2012-01-20 Thread Skip Montanaro
et raised as for os.popen() or do I have to call Popen.poll() even in error situations? Thanks, -- Skip Montanaro - s...@pobox.com - http://www.smontanaro.net/ -- http://mail.python.org/mailman/listinfo/python-list

Can you reference VCS location in distutils.core.setup()?

2013-02-06 Thread Skip Montanaro
The distutils.core.setup() function accepts a bunch of attributes, among them a download_url parameter. I don't see a way to specify a VCS repository. Is that possible? Thx, Skip -- http://mail.python.org/mailman/listinfo/python-list

itertools doc example "consume"

2013-03-08 Thread Skip Montanaro
I've never really used itertools before. While trying to figure out how to break a list up into equal pieces, I came across the consume function in the examples here: http://docs.python.org/2/library/itertools.html It seems to me that it should return whatever it consumes from the list. I thoug

Re: itertools doc example "consume"

2013-03-08 Thread Skip Montanaro
Ian Kelly gmail.com> writes: > Depending on your Python version lst is either a range object or a > list, neither of which is an iterator. If you pass to consume an > iterable object that is not an iterator, it will implicitly obtain an > iterator for it, consume from the iterator, and then disc

image transforming web proxy?

2013-03-12 Thread Skip Montanaro
I stumbled upon an old FFT tutorial on astro.berkeley.edu website whose images are in xbm format. Neither Chrome nor Firefox knows how to display X bitmap format and for Chrome at least, I've been unable to find an extension to do the conversion (didn't hunt for a FF extension). I can clearly dow

Re: List Count

2013-04-22 Thread Skip Montanaro
Numpy is a big improvement here. In Py 2.7 I get this output if I run Steven's benchmark: 2.10364603996 3.68471002579 4.01849389076 7.41974878311 10.4202470779 9.16782712936 3.36137390137 (confirming his results). If I then run the numpy idiom for this: import random f

Re: List Count

2013-04-22 Thread Skip Montanaro
> But I was really wondering if there was a simple solution that worked > without people having to add libraries to their basic Python installations. I think installing numpy is approximately pip install numpy assuming you have write access to your site-packages directory. If not, install u

Re: There must be a better way

2013-04-23 Thread Skip Montanaro
> But a csv.DictReader might still be more efficient. Depends on what efficiency you care about. The DictReader class is implemented in Python, and builds a dict for every row. It will never be more efficient CPU-wise than instantiating the csv.reader type directly and only doing what you need.

Re: AttributeError Problem

2013-04-23 Thread Skip Montanaro
> numberOfVertices = int(infile.readline().decode()) # Read the first line from > the file > AttributeError: 'str' object has no attribute 'readline' ... > infile = filedialog.askopenfilename() This is just returning a filename. You need to open it to get a file object. For example: in

Re: Efficient way of looging in python

2013-04-25 Thread Skip Montanaro
> a) If multiple processes are trying to write to the same file, I need to > prevent that. Two things: Use some sort of file locking. You can get the lockfile module from PyPI. Include at least the process id as one of the logging fields in your formatter. I haven't don't enough with the loggin

Re: CPython's cyclic garbage collector (was [Python-ideas] Automatic context managers)

2013-04-26 Thread Skip Montanaro
> Whenever the GC finds a cycle that is unreferenced but uncollectable, > it stores those objects in the list gc.garbage. At that point, if the > user wishes to clean up those cycles, it is up to them to delve into > gc.garbage, untangle the objects contained within, break the cycles, > and remove

Re: CPython's cyclic garbage collector (was [Python-ideas] Automatic context managers)

2013-04-26 Thread Skip Montanaro
>From the Zen of Python: > In the face of ambiguity, refuse the temptation to guess. I believe the reason something isn't already done to break cycles is that the authors of the cyclic garbage collector considered the above aphorism. They rely on the author of the code with the cycles to figure

Re: How do I encode and decode this data to write to a file?

2013-04-29 Thread Skip Montanaro
> How strange. I think it must be something to do with the gmane > interface between news and mail then. Probably. It was borked in Gmail as well... Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Finding referents with Gdb

2013-05-01 Thread Skip Montanaro
On Tue, Apr 23, 2013 at 9:52 AM, Dave Butler wrote: > with gdb, can you find referents of an object given an object id? Look at the C code for gc.get_referents and set things up to call it from GDB. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: ALLAH

2006-08-09 Thread Skip Montanaro
Sybren Stuvel YOURthirdtower.com.imagination> writes: > You might want to try in English. Given the subject of the message, I suspect he wasn't trying to reach an English-speaking audience... ;-) Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: atexit.register does not return the registered function. IMHO, it should.

2006-11-16 Thread Skip Montanaro
> Since that the decorator syntax is upon us, I think it would be good if > atexit.register() was returning the function passed as argument. This > simple change to the library would solve a problem with the use of > atexit.register as a decorator (and I can't think of any use case where > this ch

Re: Random image downloader for newsgroups (first script)

2006-09-07 Thread Skip Montanaro
> > SERVER = "news.server.co.uk" #Insert news server here > > GROUP = "alt.binaries.pictures.blah" #newsgroup will go here > > Just why do I imagine there will be an adult newsgroup in the end? I can see the freshmeat announcement now: "Random Boob Visualizer 1.0"... Skip -- http://mail.

Re: Re: decompiler

2006-11-19 Thread Skip Montanaro
> You have to know your enemy ;) We have met the enemy and they are us. http://www.igopogo.com/we_have_met.htm ;-) Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: How to kill a SocketServer?

2005-05-01 Thread Skip Montanaro
Paul> Let's say you have a SocketServer with the threading mix-in and Paul> you run serve_forever on it. How can you shut it down, or rather, Paul> how can it even shut itself down? Even if you use a Paul> handle_request loop instead of serve_forever, it still seems Paul> dif

Re: How to kill a SocketServer?

2005-05-01 Thread Skip Montanaro
>> I use precisely that scheme with (I think *) no problem. The only >> maybe significant difference I see is that I subclass ThreadingMixin >> so that it creates daemon threads: ... Paul> According to the docs, you don't need the subclass, you can just Paul> set the "daemon_

Re: How to kill a SocketServer?

2005-05-01 Thread Skip Montanaro
Paul> Yes, this is precisely what I'm asking. How do you get the server Paul> to go away without going out of your way to connect to it again? Paul> Don't you notice if it stays around? Skip> It fields lots of requests, so it's possible that another request Skip> arrives afte

Re: Tripoli: a Python-based triplespace implementation

2005-05-02 Thread Skip Montanaro
Dominic> Tripoli will eventually support RDF/XML as a format for Dominic> importing and exporting triples. Is there some interoperability requirement with non-Python apps? If not, why not just use pickle or marshal? Slo[ -- http://mail.python.org/mailman/listinfo/python-list

Re: How to kill a SocketServer?

2005-05-02 Thread Skip Montanaro
>> > set self.pause to something short-ish. The select call times out >> > and the server exits. Guido> [Paul Rubin] >> Ah, good point. Something like this should probably be added to >> SocketServer.py (optional timeout parameter to serve_forever), or at >> least the tri

Re: urllib2 and timeout question

2005-05-02 Thread Skip Montanaro
Gerard> Code below: Order might be important (though hopefully not). Can you give this a try? import time import socket socket.setdefaulttimeout(300) import urllib2 ... Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: atexit not being executed

2005-05-03 Thread Skip Montanaro
Chris> I tried looking through the documentation ... Always a good first step... Chris> ... and came across atexit. I tried putting this into my code and Chris> it never seems to actually process the atexit.register() Chris> function thus leaving me stranded. My question is

Re: atexit not being executed

2005-05-03 Thread Skip Montanaro
Chris> The environment in which I am working is client/server and it is Chris> the server that processes all python code. I have tried creating Chris> a file (which in the case of what I have explained means that I Chris> can't issue a close command) and let the process run as I ha

Re: New Python regex Doc (was: Python documentation moronicities)

2005-05-07 Thread Skip Montanaro
Xah> I don't know what kind of system is used to generate the Python Xah> docs, but it is quite unpleasant to work with manually, as there Xah> are egregious errors and inconsistencies. The main Python documentation is written in LaTeX. I believe most, if not all, HTML is generated b

Re: Trouble saving unicode text to file

2005-05-07 Thread Skip Montanaro
Svennglenn> Traceback (most recent call last): Svennglenn> File "D:\Documents and Svennglenn> Settings\Daniel\Desktop\Programmering\aaotest\aaotest2\aaotest2.pyw", Svennglenn> line 5, in ? Svennglenn> titel = unicode(titel) Svennglenn> UnicodeDecodeError: 'ascii' cod

Re: New Python regex Doc

2005-05-08 Thread Skip Montanaro
Peter> And which, at least implicitly, defines "greedy" by in section Peter> 6.3 titled "Greedy versus Non-Greedy". It's not perfect, but Peter> then nobody in this thread has offered anything even remotely Peter> resembling perfect documentation for regular expressions Peter>

Inverse confusion about floating point precision

2005-05-09 Thread Skip Montanaro
I understand why the repr() of float("95.895") is "95.8949996". What I don't understand is why if I multiply the best approximation to 95.895 that the machine has by 1 I magically seem to get the lost precision back. To wit: % python Python 2.3.4 (#12, Jul 2 2004, 09:48:10)

Re: Inverse confusion about floating point precision

2005-05-09 Thread Skip Montanaro
>> Why isn't the last result "958949.996"? IOW, how'd I get >> back the lost bits? Dan> You were just lucky. Thanks for the response (and to Tim as well). Dan> The floating-point representation of 95.895 is exactly Dan> 6748010722917089 * 2**-46. I seem to recall se

Re: Jabber/XML-RPC lib in Python?

2005-05-11 Thread Skip Montanaro
Michael> I was wanting to write a program that lets two machines Michael> communicate (without user intervention) using XML-RPC over a Michael> Jabber network. Does anyone know of an existing library suited Michael> to that task? Googling for "Jabber XML-RPC Python" yielded this a

Re: Problems with csv module

2005-05-11 Thread Skip Montanaro
>> You mean that csv.reader can't work with unicode as the delimiter >> parameter? Richie> Exactly Richie> "Note: This version of the csv module doesn't support Unicode Richie> input Richie> That note is still there in the current development docs, so it Rich

Re: pylab: plot update

2005-05-11 Thread Skip Montanaro
Jan> After that i call sleep(5) until I can acuire the next tuple. Jan> But during that I can't use the zoom/pan, save etc in the window. ... Jan> Is there any better way to do this easily? Set a timeout. How to do that depends on what gui tools you are using. I've never used p

Re: Problems with csv module

2005-05-11 Thread Skip Montanaro
Fredrik> does the CSV format even support Unicode-encoded data streams? Based on the requests I've seen here and on the [EMAIL PROTECTED] mailing list, it appears people are certainly generating CSV files which contain Unicode-encoded data. Skip -- http://mail.python.org/mailman/listinfo/py

Re: Problems with csv module

2005-05-11 Thread Skip Montanaro
>> Based on the requests I've seen here and on the [EMAIL PROTECTED] mailing >> list, it appears people are certainly generating CSV files which >> contain Unicode- encoded data. Fredrik> in what encodings? I've seen hints about iso-8859-1/iso-8859-15 and mention that Excel 2000

Re: Python Documentation (should be better?)

2005-05-11 Thread Skip Montanaro
Christopher> The intricacies of the computing term "greedy" aside, yes I Christopher> think the Python documentation should generally be better. Christopher> What that means, I have no idea. All I know is that I like Christopher> PHP's documentation and it should be like that. It

RE: Python Documentation (should be better?)

2005-05-11 Thread Skip Montanaro
Jue> Maybe a mailing list or forum people can contribute example and Jue> notes? Contributions can be made at the SourceForge patch tracker: http://sourceforge.net/tracker/?group_id=5470&atid=305470 Plain text is fine. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Documentation (should be better?)

2005-05-11 Thread Skip Montanaro
Christopher> Exactly!! See thats what I'm saying. I _think_ its widely Christopher> accepted that PHP has awesome documentation. And like rbt Christopher> said, that makes it extremely useful. Why can't Python Christopher> have documentation like that? It's just a simple matte

Re: Python Documentation (should be better?)

2005-05-11 Thread Skip Montanaro
Ivan> I can never remember ...where to find string methods dir('') Bruno> ['__add__', '__class__', ... Also: >>> help(str) Help on class str in module __builtin__: class str(basestring) | str(object) -> string | | Return a nice string representati

Re: Python Documentation (should be better?)

2005-05-11 Thread Skip Montanaro
Steve> [AMK's] wiki side-by-side with the Python docs: Steve> http://pydoc.amk.ca/frame.html There's also wikalong, though that's firefox-specific. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Documentation (should be better?)

2005-05-12 Thread Skip Montanaro
Paul> Some parts of the lib doc are better than others. The only way to Paul> understand SocketServer, for example, is to read the long comment Paul> at the beginning of the source file. I've been wanting to get Paul> around to merging that with the doc writeup and adding some

Re: Python Documentation (should be better?)

2005-05-12 Thread Skip Montanaro
Ivan> I get that. My question, cleverly concealed in a rant, was, "Why Ivan> does clicking on the Documentation link at python.org NOT take me Ivan> to docs.python.org?" I almost changed that link, but then reconsidered. Compare http://docs.python.org/ with http://www.pyt

Re: pyvm -- faster python

2005-05-12 Thread Skip Montanaro
>> - hacking SWIG. Shouldn't be too hard and will instantly give >> us access to wx, qt, etc. Mike> You can't assume that because some package is a C/C++ library Mike> wrapped for Python that it uses SWIG. pyqt, for example, doesn't Mike> use SWIG at all. It uses SIP, which i

Re: urllib download insanity

2005-05-12 Thread Skip Montanaro
Timothy> i DELETED the file from my webserver, uploaded the new Timothy> one. when my app logs in it checks the file, if it's changed it Timothy> downloads it. the impossible part, is that on my pc is Timothy> downloading the OLD file i've deleted! if i download it via IE, Timo

Re: Sleepycat Bsdbd 4.3.27 and Python 2.4.1

2005-05-12 Thread Skip Montanaro
Marco> I've just compiled Python 2.4.1 on a linux box (RHEL 3AS) after Marco> having installed Berkeley DB 4.3.27 from sleepycat Software. Marco> During the configure/build process python correctly found the Marco> BSBDB library. ... Marco> File "/usr/local/lib/python2.

Re: Python Documentation (should be better?)

2005-05-12 Thread Skip Montanaro
Mike> Given that Python hides the difference between user-defined Mike> objects and built-in objects, it's not clear to me that anything Mike> other than the current system, with all the classes/types in one Mike> place, makes sense. Maybe the Module Index should be renamed "Modul

Re: Python Documentation (should be better?)

2005-05-13 Thread Skip Montanaro
bruno> I fail to see why would it would be better to have to open a bruno> browser, go to python.org, go to the doc, find the right link etc bruno> instead of just typing dir(xxx) and/or help(xxx). Actually, you frequently don't even have to enter the Python interpreter. Executing "py

Re: sockets don't play nice with new style classes :(

2005-05-14 Thread Skip Montanaro
Paul> It seems to me that the socket module itself should be rewritten Paul> to use new style classes, so that socket.socket objects can extend Paul> _socket.socket instead of wrapping them. Paul> Am I missing something? Probably not. The socket module could use some attention.

Re: question about the id()

2005-05-15 Thread Skip Montanaro
kyo> Can someone explain why the id() return the same value, and why kyo> these values are changing? Instance methods are created on-the-fly. In your example the memory associated with the a.f bound method (not the same as the unbound method A.f) is freed before you reference a.g. That

Re: German spam event [was: Re: Schily ueber Deutschland]

2005-05-16 Thread Skip Montanaro
Bernd> Looks like another windows worm. Now they seem to come with a Bernd> more sofisticated 'payload'. I am sure that will increase in the Bernd> future. It is just the beginning ... Indeed. This turns out to be the Sober.Q worm. Sober.P infected gazillions of machines with its "

Re: optparse global

2005-05-16 Thread Skip Montanaro
Ashton> How do i make an option passed through command line, using Ashton> optparse global. I need to import this value in another file. Place the parser's output at the module scope. global options parser = OptionParser() parser.add_option("-p", "--port", dest="port", defaul

Re: optparse global

2005-05-16 Thread Skip Montanaro
Ashton> This does not seem to work. I still get the default value Ashton> 5007... Hmmm... Works for me (Python from CVS): % python testme.py 5007 % python testme.py -p 5006 5006 % python testme.py -p5006 5006 The only change from what you posted was to add

Re: optparse global

2005-05-17 Thread Skip Montanaro
Dennis> So far as I understand, the Dennis> global Dennis> is not needed for your example. I think the original context was that optparse was being used in the context of a function. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Python forum

2005-05-17 Thread Skip Montanaro
Brett> Don't forget that there's also the Tutor list (see Brett> http://www.python.org/mailman/listinfo/tutor ), targeted to Brett> people looking to learn the language... I wonder if there's a way to gateway the tutor list to the python-forum.org forum, probably to the beginner's for

Re: Python forum

2005-05-17 Thread Skip Montanaro
John> Web forums do reach a different audience. Maybe python.org should John> have a 'web forum' link to gmane.org's web interface for c.l.py? Any idea if the gmane folks could be convinced to move gmane.comp.python.general to gmane.comp.lang.python so it's with the rest of the programmi

Re: Python forum

2005-05-18 Thread Skip Montanaro
>> If you speak German, there is a forum at www.python-forum.de . There >> is also an english one at http://python-forum.org/py/index.php, but >> as you can see, there's not much traffic :-/ Jonas> There are few messages because they are not known. I believe that Jonas> they

Re: Comparing 2 similar strings?

2005-05-20 Thread Skip Montanaro
Steve> (is this the same as 'Conchobar'?) No, that's a trendy pub in Key West... Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: first release of PyPy

2005-05-21 Thread Skip Montanaro
beliavsky> C++ is a higher level language than C, >From the compiler's viewpoint C++ is not much higher level than C. It has the same basic types, (structs, unions and C++ classes are really the same thing data-wise, though C++ classes can be somewhat more complex layout-wise) and supports

Re: execution error

2005-05-23 Thread Skip Montanaro
Ximo> And my question is how can show the execution error whitout exit Ximo> of the program, showing it in the error output as You need to catch ZeroDivisionError. Here's a trivial example: >>> try: ... 6/0 ... except ZeroDivisionError: ... print "whoops! divide by z

Re: reg python related job searching

2005-05-24 Thread Skip Montanaro
praba> Can any one guide me how to get python related jobs? You mean a source of job postings? If so, try the Python Jobs Board: http://www.python.org/Jobs.html Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Hacking the scope to pieces

2005-05-24 Thread Skip Montanaro
Hugh> What I'm after is a way of moduleLoader.loadModule working back up Hugh> the scope and placing the imported module in the main global Hugh> scope. Any idea how to do this? You want to write an import hook I think. I'd start with the docs for the __import__ builtin. Also, Googl

Re: Copy paste in entry widget

2005-05-28 Thread Skip Montanaro
Michael> is copy, paste, cut of selection possible in entry widget? Docs Michael> say selection must be copied by default, in my programm it Michael> doesn't work. What platform? What GUI toolkit? -- Skip Montanaro [EMAIL PROTECTED] -- http://mail.python.org/ma

Re: cgi.py?

2005-05-29 Thread Skip Montanaro
in semicolon in quoted strings: david>Content-Type: image/jpeg; filename="home:lib;images;face.jpg" ... david> What am I missing? Probably nothing. Can you maybe submit a patch? Thx, -- Skip Montanaro [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: The need to put "self" in every method

2005-05-31 Thread Skip Montanaro
Simon> Of course, if you *don't* use 'self', you should expect an angly Simon> mob with pitchforks and torches outside your castle. I take it an "angly mob" is a large group of stick figures? Skip -- http://mail.python.org/mailman/listinfo/python-list

Another source of time for the logging package?

2005-06-01 Thread Skip Montanaro
I have code I run in both live and historical modes. When running in historical mode the input stream is a set of stored event sequences that have their own timestamps. When picking through the logfiles for a particular run, I'd much prefer it if the timestamps in the logfile generated with the

Re: Another source of time for the logging package?

2005-06-01 Thread Skip Montanaro
>> Before I get out my scalpel, has anyone found a non-invasive way to >> do this (or already done the surgery and would be willing to share >> it)? Ames> While I'm not sure you would call the following 'non-invasive' Ames> I've used it in a similar situation: Ames> class

Re: PySol not working on WinXP, SP2

2005-06-01 Thread Skip Montanaro
Ivan> I can't find any later version on google... It may not help you much, but I was able to get it working on MacOSX by grabbing the latest available source and tracking down the contents of the data directory via the Wayback Machine. If you'd like to give it a try (I'm not sure how you'd

<    5   6   7   8   9   10   11   12   >