Re: Best memory analyzer?

2006-12-06 Thread skip
if you're on Linux you should look at valgrind. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: dict.has_key(x) versus 'x in dict'

2006-12-07 Thread skip
hat Hendrik> there is far too much emphasis on doing things the quickest way Hendrik> - as long as it works, and is fast enough, its not broken, so Hendrik> don't fix it... That's the rub. It wasn't fast enough. I only realized that had been a problem once I fi

Re: dict.has_key(x) versus 'x in dict'

2006-12-09 Thread skip
e you had to, or were asked to), Hendrik> it became faster, and then, suddenly, retrospectively, it Hendrik> became a problem No, I think you misunderstand. I was poking around in that function for other reasons, saw the "k in d.keys()" and realized that the wrong way

Re: converting mysql db into sqlite3.

2006-12-17 Thread skip
the OP is listening, I believe you can do this in a fairly straightforward manner with SQLAlchemy. Skip -- http://mail.python.org/mailman/listinfo/python-list

Shed Skin - Does it break any Python assumptions?

2006-12-18 Thread skip
but implicitly statically typed Python ...". Where does the static typing begin and end? Can one module tweak another module's attributes? Can a class's attributes be modified from outside the class? What about the attributes of a class instance? Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: on PySol's popularity

2006-12-19 Thread skip
s. Aside from mail and web browsing, PySol is her number one application. Harry> [PySol] should be considered a cultural treasure, and if a bit of Harry> funding would help keep it rolling into the future, that might be Harry> worthwhile. Agreed, and +1 QOTW. Skip -- http://mai

Re: regexp

2006-12-19 Thread skip
vertigo> document. vertigo> Can i force re to math as narrow as possible ? http://docs.python.org/lib/re-syntax.html Search for "greedy". Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: python-hosting.com projects: dead?

2006-12-22 Thread skip
share for setting a default that leaves it open to spammers. Skip -- http://mail.python.org/mailman/listinfo/python-list

module with a threading-like api that uses processes?

2006-12-26 Thread skip
I could have sworn someone was working on a module recently with a threading-like API that used subprocesses under the covers, but 10 minutes or so of googling didn't yield anything. Pointers appreciated. Thx, Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: module with a threading-like api that uses processes?

2006-12-28 Thread skip
ev/summary/2006-10-01_2006-10-15/#processes-and-threading-module-api Thank you. Exactly what I was thinking of. I had even replied to the thread!!! Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Question about the "new" module

2006-12-29 Thread skip
Why use the new module? Why not call __import__() or execfile()? Details on their use are here: http://docs.python.org/dev/lib/built-in-funcs.html Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Beginner question on text processing

2006-12-29 Thread skip
ed that looks like: Harold> X11 IPB = .32 Harold> X22 IPB = .45 ... This is a problem with a number of different solutions. Here's one way to do it: for line in open(filename, "r"): fields = line.split() print fields[0], "IPB =", f

Re: No way to set a timeout in "urllib".

2006-12-29 Thread skip
> The correct fix would probably be to add methods to class John> URLopener to control this; that's the usual way of handling John> special URL opening situations. The correct way would be to deal with it at the httplib level, then percolate it up to urllib2. Urllib should probably not be extended any further. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: No way to set a timeout in "urllib".

2006-12-30 Thread skip
John> If you're looking for a Summer of Code project, ... I'm not. I'm about 25 years out of grad school. ;-) Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Missing erf()

2006-12-31 Thread skip
rrenaud> Is there a reason why erf() is not included in the math rrenaud> package? According to the following URL it looks like it has rrenaud> been standard C since 1999. Python is implemented in the C89 dialect. Maybe Python 3.0 will be implemented using C99. Skip

Re: Collecting list of module dependencies

2007-01-01 Thread skip
David> Hi. Is anyone aware of any code to create a list of dependent David> modules for a python module. modulefinder: http://docs.python.org/lib/module-modulefinder.html Added to Python in 2.3. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: python2.5 frameobject - how to upgrade?

2007-01-02 Thread skip
Helmut> I'd like to install a package ('rekall') which uses Helmut> frame->f_nlocals which is no longer contained in frameobject.h. Helmut> What's the recommended way to upgrade such an application? I suspect PySequence_Length(frame->f_locals

Re: python2.5 frameobject - how to upgrade?

2007-01-02 Thread skip
Helmut> A personal question: Have you converted from Perl to Python, as Helmut> well? Never really needed to. Anybody hiring me for my Perl expertise would be in big trouble. ;-) Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Iterate through list two items at a time

2007-01-02 Thread skip
, string.letters[1::3], string.letters[2::3]) [('a', 'b', 'c'), ('d', 'e', 'f'), ('g', 'h', 'i'), ... Obviously, if your lists are long, you can substitute itertools.izip for zip. There's probably some easy way to achieve the same result with itertools.groupby, but I'm out of my experience there... Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Why less emphasis on private data?

2007-01-06 Thread skip
python.html http://www.mail-archive.com/[email protected]/msg17806.html Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: strange for loop construct

2007-01-07 Thread skip
Gabriel> Where do you find the "What's new" for previous releases? I Gabriel> have to read them online. Google for what's new site:python.org Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: strange for loop construct

2007-01-07 Thread skip
ou needed to read them online because (perhaps) you don't have a source distribution on your computer. My 2.5 source (Subversion sandbox) has 2.0 through 2.5 What's New source in Doc/whatsnew. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Table

2007-01-08 Thread skip
ild_get_property method and the list of child properties for gtk.Table children: http://www.pygtk.org/docs/pygtk/class-gtkcontainer.html http://www.pygtk.org/docs/pygtk/class-gtktable.html Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Using with CSV library in Python 2.2!!!

2007-01-09 Thread skip
python.org/view/*checkout*/python/tags/r236/Modules/_csv.c?content-type=text%2Fplain&rev=52574 http://svn.python.org/view/*checkout*/python/tags/r236/Lib/csv.py?content-type=text%2Fplain&rev=52574 Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Using with CSV library in Python 2.2!!!

2007-01-09 Thread skip
w document for version 2.3 (google for it) you;ll probably have a pretty good idea of any such changes. mohan> Otherwise upgrading to Python 2.4 would be the easiest choice. Oh, you didn't mention that. By all means, upgrade to 2.4 or 2.5 instead of trying to backport the csv module to

Re: Python code written in 1998, how to improve/change it?

2006-01-24 Thread skip
the last yield. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Python code written in 1998, how to improve/change it?

2006-01-25 Thread skip
Wolfgang> So basically if I want to write a long-running program in Wolfgang> Python, it would make sense to code all functions that are Wolfgang> likely to be called more than once as generators... Skip> If they need to resume their calculations from where they left

Re: Python code written in 1998, how to improve/change it?

2006-01-25 Thread skip
>>> g.next() 4 >>> g.next() 4 >>> g.next(3) Traceback (most recent call last): File "", line 1, in TypeError: expected 0 arguments, got 1 Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: The problem of anonymity with decorators

2006-02-07 Thread skip
Franck> My problem is that the errors comes from a function named Franck> "wrapped" while I'd prefer to see here the name of the wrapped Franck> function. Take a look at http://wiki.python.org/moin/PythonDecoratorLibrary In particular, check out the De

QOTW candidate...

2006-02-07 Thread skip
>>>>> "Roy" == Roy Smith <[EMAIL PROTECTED]> writes: Roy> There is much about traditional OO which translates well to Python, Roy> but sometimes it is difficult to read a treatise on OO and tell Roy> which bits are "traditional OO"

Re: apostrophe or double quote?

2006-02-08 Thread skip
low literal newlines to be embedded in the string. Their presence is most often detected in doc strings precisely for this reason. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: spell check code

2006-02-09 Thread skip
menu items that allow you to check just comments and strings. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Is Forth for real?

2006-02-12 Thread skip
Roy> If you like Forth, take a look at PostScript. I miss NeWS... :-( Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 2.4.2 and Berkeley DB 4.4.20 ?

2006-02-13 Thread skip
02 2006 UTC (2 weeks, 6 days ago) by gregory.p.smith File length: 142926 byte(s) Diff to previous 41922 backport of commit 42169 adds support for compiling against BerkeleyDB 4.4.x Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Loop Backwards

2006-02-13 Thread skip
So, to go backwards, just add "-1, -1, -1" to the range function in the forward loop version. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Class subscripting

2006-02-17 Thread skip
ny> internal index. Ronny> bar[] = 4.2. #Setting baz2 to 4.2 Sure. Check out the special method names for container types: http://www.python.org/dev/doc/devel/ref/sequence-types.html To index into instances of your class you need to define a __getitem__ method. Skip -- http

Re: Writing my own typing monitor program for RSI sufferers...

2006-02-20 Thread skip
System (Linux). Take a look at http://sourceforge.net/projects/watch/ If you'd like to be added as a developer, let me know... Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Writing my own typing monitor program for RSI sufferers...

2006-02-21 Thread skip
ready has a more-or-less functional user interface and support for Windows. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Mutable numbers

2006-02-21 Thread skip
= 12100 ... b = 12100 ... c = 121*100 ... print a is b ... print a is c ... >>> f() True False >>> print f.func_code.co_consts (None, 12100, 121, 100) Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: CSV module and UNICODE

2006-02-23 Thread skip
uld like to tackle something for Python 2.5, I am sure a patch that Unicodifies the csv module would be welcome. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Best python module for Oracle, but portable to other RDBMSes

2006-03-02 Thread skip
is released I suspect there will be no difference. If passing a long integer to some other routine is a problem (because it can only accept regular integers) you can always convert it explicitly: z = int(x) Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: A simple question

2006-03-04 Thread skip
[[0, 0], [0, 0]] >>> map(id, y) [16988520, 16988520] The object x refers to is a list with references to two other lists. The object y refers to is a list with two references to the same list. Skip -- http://mail.python.org/mailman/listinfo/python-list

Does Boost.Python participate in cyclic gc?

2007-06-05 Thread skip
to didn't disappear. (We could tell because it made connections to another server which didn't disappear.) The solution was to recognize when we where finished with it to set self.over_there to None. It would be nice if Boost.Python knew how to play in the gc sandbox, but I suspect it

Pyrex problem with cdef'd attribute

2007-06-08 Thread skip
7;B' TypeError: bad argument type for built-in operation If the mod() method is defined in the base class it works properly. Is this a Pyrex bug or am I not allowed to modify cdef'd attributes in subclasses? (Note that I want Bar visible outside the module, hence no "cdef".) Thanks, Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Pyrex problem with cdef'd attribute

2007-06-08 Thread skip
confuse myself will subscribe to the pyrex mailing list (or at least use the somewhat clunky gmane.org interface). Skip -- http://mail.python.org/mailman/listinfo/python-list

Mouse/keyboard watcher?

2007-07-18 Thread skip
ojects/synergy2). Someone, I thought from this list or maybe python-dev, told me about a newer open source application in the same space which is more portable and actively maintained/developed. Alas, I can't recall the name, nor can I find it on my computer. Ring any bells? Thx, Skip -- ht

Re: script for seconds in given month?

2007-04-25 Thread skip
So try the 2.4 version of calendar.py... Skip -- http://mail.python.org/mailman/listinfo/python-list

curses mystical error output

2007-05-02 Thread skip
tried commenting out the particular line (it's just drawing a boundary between the left and right halves of the window, so I can live without it). A later addstr call fails. Any suggestions? Do I need to followup addstr with some sort of periodic flush() call? Thx, Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: curses mystical error output

2007-05-02 Thread skip
inted out that out before. I stuck a couple asserts on the row and column values. They didn't trip, the "addstr() returned ERR" tripped. Skip -- http://mail.python.org/mailman/listinfo/python-list

Upgrading a largish group of packages w/ distutils

2007-05-31 Thread skip
second time the build_ext part should be fast. Can anyone comment on the feasibility of this approach? I guess what I'm wondering is what dependencies there are on the installation directory. Thx, Skip -- http://mail.python.org/mailman/listinfo/python-list

__call__ considered harmful or indispensable?

2007-08-02 Thread skip
s the class callable. In this particular case it was clearly unnecessary and just obfuscated the code. I'm wondering, are there some general cases where __call__ methods of a user-defined class are simply indispensable? Thx, Skip -- http://mail.python.org/mailman/listinfo/python-list

PEP 11 update - Call for port maintainers to step forward

2007-08-18 Thread skip
but know who is, please pass this note along to them. If I've missed any other platforms (I know I must have have missed something), let me know that as well. Thanks, -- Skip Montanaro - [EMAIL PROTECTED] - http://www.webfast.com/~skip/ -- http://mail.python.org/mailman/listinfo/python-list

datetime.timedelta division confusion

2007-09-01 Thread skip
'datetime.timedelta' and 'int' >>> d.__div__(2) datetime.timedelta(0, 43200) When I run the interpreter under gdb's control with a breakpoint set in delta_divide, the breakpoint is not reached in the first case, but it is in the second. Is t

Re: [PyCON-Organizers] Next PyCon Organizers' Meeting Tuesday, 11 September

2007-09-10 Thread skip
David> Connection details: David> http://wiki.python.org/moin/PyCon2008/OrganizersMeetingsConnectionDetails Ah, now I remember. GAIM complained: 400: Malformed Jabber ID GAIM recorded my Jabber ID as "[EMAIL PROTECTED]" which seems pretty well-formed to me

Re: Python 2.5 incompatible with Fedora Core 6 - packaging problems again

2007-03-04 Thread skip
require ncurses. It's an add-on module which happens to be distributed with Python. The distutils setup.py script checks for ncurses bits and indeed "plows ahead" if it's not found. Not all systems (Windows, in particular) have ncurses. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: How use XML parsing tools on this one specific URL?

2007-03-04 Thread skip
voiding regular expression hacks to extract the data Chris> from this page? Tidy it perhaps or use BeautifulSoup? ElementTree can use tidy if it's available. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Where I could find older python releases ?

2007-03-04 Thread skip
ckins on 1991-02-19, the last being r2314. The next checkin after that is on 1991-03-06. Since 0.9.1 was also released in February 1991, r2314 will probably get you that version, or something very near to it. Skip -- http://mail.python.org/mailman/listinfo/python-list

identifying modules to be built and not

2007-03-04 Thread skip
linuxaudiodev ossaudiodev spwd Feel free to add comments to the above patch page. It will help the development team decide whether or not it's a worthwhile addition. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: calendar (date) iterator?

2007-03-06 Thread skip
dateutil.parser import parse >>> rule = rrule(DAILY, count=5, dtstart=parse("2006-03-12")) >>> for d in rule: ... print d ... 2006-03-12 00:00:00 2006-03-13 00:00:00 2006-03-14 00:00:00 2006-03-15 00:00:00 2006-03-16 00:00:00 Skip -- http://mail.python.org/mailman/listinfo/python-list

RE: Python 2.1 and Daylight saving time

2007-03-07 Thread skip
best chance of correct operation will be to have the correct timezone tables installed on your computer. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: pylint: don't warn about tabs

2007-03-09 Thread skip
from PEP 666: The problem is that there is no polite way to say 'Stop wasting your valuable time and mine.' That's as politely as I can put it. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Python-list Digest, Vol 42, Issue 117

2007-03-09 Thread skip
Bart> I'm sorry, but what's wrong with: Bart> radix = [ [] ] * 256 Follow it up with: print [id(e) for e in radix] then you tell me what's wrong with it. ;-) Skip -- http://mail.python.org/mailman/listinfo/python-list

Searching comp.lang.python/[email protected] (was: UTF-8)

2007-03-10 Thread skip
ree Network Group - go to http://archives.free.net.ph/splash/index.en.html select Python group and/or python-list mailing list and search for utf8 As for RSS, try ASPN: feed://listserv.activestate.com/rss/python-list-rss1.0.xml I could keep going, but I'

Re: pylint: don't warn about tabs

2007-03-10 Thread skip
Created:3-Dec-2001 Python-Version: 2.2 Post-History: 5-Dec-2001 Note the title and status. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: distributed queue?

2007-03-10 Thread skip
worker thread" pattern except Paul> distributed across a network. PyBrenda maybe? (Dunno if it's even still around.) Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Request for a change in the csv module.

2007-03-13 Thread skip
e is going to be a panacea. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: execfile locks file forever if there are any syntax errors - is it python bug?

2007-03-14 Thread skip
ock the file... Is this Slawomir> a bug in Python? Kinda seems like it might be. Please file a bug report on SourceForge. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: dict.items() vs dict.iteritems and similar questions

2007-03-14 Thread skip
>> When is it appropriate to use dict.items() vs dict.iteritems. Laurent> Both work, you may prefer xrange/iteritems for iteration on Laurent> large collections... I find "iter" to be extremely ugly and hope to avoid using them altogether until they are gone i

Re: dict.items() vs dict.iteritems and similar questions

2007-03-14 Thread skip
he Drew> dict is large? Sure, but I try hard to keep my dicts small. ;-) Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: dict.items() vs dict.iteritems and similar questions

2007-03-15 Thread skip
Duncan> I think I'd prefer the barbaric: Duncan>return len(list(iterator)) Duncan> since at least it is guaranteed to terminate. Are you sure? There's no guarantee that an iterator will terminate: len(list(itertools.cycle(range(10 Skip -- htt

Re: CSV module and "fileobj"

2007-03-16 Thread skip
Jon> If I have a CSV reader that's passed to a function, is it possible Jon> for that function to retrieve a reference to the "fileobj" like Jon> object that was passed to the reader's __init__? Nope, that isn't exposed from the C type. Skip

Re: coverage.py problem

2007-03-19 Thread skip
Orin> I have a problem in using coverage.py module in my project: You might want to contact Ned Batchelder, the author: http://nedbatchelder.com/code/modules/coverage.html Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: struct.pack returns nothing [3]

2007-03-19 Thread skip
x00\x03' Andrés> I get an empty line, a '\n': >>>> >>>> _ Try import struct struct.pack('hhl', 1, 2, 3) or from struct import pack pack('hhl', 1, 2, 3) instead. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: an enumerate question

2007-03-19 Thread skip
then when using it you have to test line2 for None: for n, (line1, line2) in enumerate(TwoLiner(open("file")): print n, line1 if line2 is not None: print line2 Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Garbage collection

2007-03-21 Thread skip
on. Whether or not the system actually reclaims any memory from your process is dependent on the details of the malloc/free implementation's details. That is, the behavior is outside Python's control. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Garbage collection

2007-03-21 Thread skip
long as you don't exhaust swap space). Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Garbage collection

2007-03-21 Thread skip
sue (assuming Python for linux Tom> and Python for windows are both compiled with GCC). Sure, my apologies. The malloc/free implementation is strictly speaking not part of the operating system. I tend to mentally lump them together because it's uncommon for people to use a malloc/free implementation different than the one delivered with their computer. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: [JOB] Sr. Python Developer, Northern VA

2007-03-22 Thread skip
n and aren't just trying to recruit through traditional channels. You'd probably never see job postings for the Space Telescope Science Institute or The World Wide Workshop for Children's Media Technology and Learning if they only appeared in the Washington Post or New York Times. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: "finally" for unit test

2007-03-23 Thread skip
gabriel> Is there something like a finally for unittest functions? TestCase instances have setUp() and tearDown() methods: http://docs.python.org/dev/lib/testcase-objects.html Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Catching an unknown error

2007-03-23 Thread skip
r Harlin> error name even though one is not specifically named? >>> try: ... 1/0 ... except Exception, err: ... print repr(err) ... Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Cleanly exiting multi thread application on SIGINT

2007-03-23 Thread skip
ere was some sort of wait() method in the threading module, but I was mistaken. Maybe: while threading.activeCount(): time.sleep(0.01) ? Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Removing Python 2.4.4 on OSX

2007-03-24 Thread skip
x==/usr/local you will wind up with /usr/local/bin/python. There will also be a /usr/local/lib/pythonX.Y (with structure underneath it) containing all the Python and extension modules. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: bugs.python.org has been compromised (urgent)

2007-03-24 Thread skip
e working on solving the problem. Thanks, Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Calling Queue experts

2007-03-26 Thread skip
jrpfinch> # Some other I/O problem, reraise error jrpfinch> raise err I'd just execute a bare raise (without err). That way the caller gets the stack trace of the actual IOError. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: how to abort on syntax errors

2007-03-26 Thread skip
at is, be as precise as you can in the exceptions you catch. Also, try to keep the body of the try block as small as you can. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: socket read timeout

2007-03-27 Thread skip
objects have timeout attributes now. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: PyPy 1.0: JIT compilers for free and more

2007-03-27 Thread skip
gt; at speeds typical of JITs! Woo hoo! Congratulations to all the PyPynistas! Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: socket read timeout

2007-03-28 Thread skip
hg> My issue with that is the effect on write: I only want a timeout on hg> read ... but anyway ... So set a long timeout when you want to write and short timeout when you want to read. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: very strange syntax errors

2007-03-28 Thread skip
but i doubt it would help. Maybe not all of your code, but a few lines of code around the suspect points. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: File deletion after 72 hours of creation

2007-03-29 Thread skip
s wont be modified Alex> since their creation. Alex> Im very confused on how to work with the number easily. Take a look at the dateutil module. Its relativedelta object has some weekday sense: http://labix.org/python-dateutil Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: New to Python - Easy way to open a text file

2007-03-30 Thread skip
Max> Hey gang, I'm new to python coding. I'm trying to find the Max> simplest way to open a text file (on the same server) and display Max> it's content. Try the open() builtin function: f = open(plainfiles.href, "r") print f.read() Skip

Re: LRU cache (and other things missing from the standard library ...)

2007-03-30 Thread skip
LRU cache package to the Python Evan> Package Index: Evan> http://www.python.org/pypi?:action=display&name=lrucache&version=0.2 Couldn't get to your website, but I've been using this one I wrote for several years: http://www.webfast.com/~skip/python/Cache.py

Re: LRU cache (and other things missing from the standard library ...)

2007-03-30 Thread skip
Evan> http://www.python.org/pypi?:action=display&name=lrucache&version=0.2 skip> Couldn't get to your website, but I've been using this one I wrote skip> for several years: skip> http://www.webfast.com/~skip/python/Cache.py skip> I&#

Re: [Pythonmac-SIG] MacPython wiki "moved" to Python wiki - now it's your turn...

2007-03-30 Thread skip
Kevin> I was just looking at the new MacPython pages at the Python Kevin> wiki--it appears nothing has been done with them since Skip moved Kevin> them over. I'm thinking this is a terrific opportunity to bring Kevin> them up to date: would anyone mind if I got s

Re: Shed Skin Python-to-C++ Compiler 0.0.21, Help needed

2007-03-31 Thread skip
advantage of the compiler's optimization facilities. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: How can I kill a running thread when exiting from __main__

2007-04-03 Thread skip
Steve> The only way to do this is to have the thread regularly examine a Steve> "please quit" flag that is set from the main thread when Steve> termination is required. I thought the process would terminate when only daemon threads were left. Skip -- http://mail

Re: How can I kill a running thread when exiting from __main__

2007-04-03 Thread skip
Steve> Maybe, then, the real answer is "just exit from the main thread"? Yes, I believe so. If that's not what's happening I would look to see if there is another thread which wasn't marked as a daemon. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: heap doesn't appear to work as described

2007-04-03 Thread skip
han what you stated above: Heaps are arrays for which heap[k] <= heap[2*k+1] and heap[k] <= heap[2*k+2] for all k, counting elements from zero. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: heap doesn't appear to work as described

2007-04-04 Thread skip
skip> Check the heapq docs for the constraints the Python heapq module skip> maintains: s/constraints/invariants/ Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: heap doesn't appear to work as described

2007-04-04 Thread skip
were the same as those maintained by Python's heapq module. Skip -- http://mail.python.org/mailman/listinfo/python-list

<    1   2   3   4   5   6   7   8   9   10   >