Re: Upgrade Python on a Mac

2009-03-16 Thread Aahz
ing software >seems cruel and unusual -- to that user, and to the other users for >whom the newly installed software "doesn't work". > >\end{whine} Because that's what Apple wants. :-/ -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.c

Re: How to add months to a date (datetime object)?

2009-03-16 Thread Aahz
In article , John Machin wrote: >On Mar 16, 3:08=A0pm, a...@pythoncraft.com (Aahz) wrote: >> In article , >> Roy Smith =A0 wrote: >>>> >>>> Besides your behavior, one could equally well argue that a 31st repeat >>>> on months without a 31st s

Re: Where's the documentation to support the following behavior...

2009-03-17 Thread Aahz
ht", "credits" or "license" for more information. >>>> list = [7,8,9] Don't use a variable named "list" -- you're hiding the list() type. -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/ "Programming langu

Re: Roulette wheel

2009-03-18 Thread Aahz
rsion or mine should be substituted for the original, depending on one's esthetics (meaning that I doubt there's enough performance difference either way to make that the reason for choosing one). -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/ &q

Re: alias method definitions / syntactic sugar suggestion

2009-03-18 Thread Aahz
ten one. > >the reason i ask is that for 3->2 backwards compatability i need to do >this in a couple of places. it would be nice to have: > > @alias('__nonzero__') > def __bool__(self): > >and even better(?) if it could depend on python version! H

Re: Roulette wheel

2009-03-18 Thread Aahz
ks with Python 2.4 or higher. Personally, I think that if the intent is to create a list you should just use a listcomp instead of list() on a genexp. -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/ "Programming language design is not a rational scienc

Re: read web page that requires javascript on client

2009-03-18 Thread Aahz
Gooja! http://groups.google.com/group/comp.lang.python/msg/aed53725885a9250 -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/ "Programming language design is not a rational science. Most reasoning about it is at best rationalization of gut feelings, and at

Re: Help cleaning up some code

2009-03-18 Thread Aahz
In article <814f91a3-faa4-4473-b28f-8e0e217fb...@f33g2000vbf.googlegroups.com>, odeits wrote: > >for row in rows: >ad = dict() Micro-optimization: ad = {} -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/ "Programming languag

Re: Candidate for a new itertool

2009-03-18 Thread Aahz
r = C([11, 12, 13, 20, 32]) for g in split_on(L_iter, L_iter.grouper, start): print list(g) print [11, 12, 13] [20] [32] [11, 12, 13, 20] [32] -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/ "Programming language desi

Re: How complex is complex?

2009-03-19 Thread Aahz
l should apologize, but I'm guessing that English is not your primary language, so it can be difficult to identify jokes here. Because the name "Python" is derived from the comedy TV show "Monty Python", stupid jokes are common in the Python community.) -- Aahz (a...@pythoncra

Re: set_process_affinity_mask problem - Python 2.5 gcc 4.3.2 (Ubuntu 4.3.2-1ubuntu12)

2009-03-19 Thread Aahz
e suggest what I can do to debug / fix this problem. Search the Ubuntu bugs first, then ask on an Ubuntu mailing list. My impression is that 8.10 is a bit half-baked -- I'm rather annoyed that the feature "save session on logout" is completely b0rked, but it's no

Re: Is python worth learning as a second language?

2009-03-19 Thread Aahz
you could just go for the jugular and say that C++ is the BASIC of the 1990s. -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/ "Programming language design is not a rational science. Most reasoning about it is at best rationalization of gut feelings, and

Re: Is python worth learning as a second language?

2009-03-19 Thread Aahz
In article <49b58b35$0$3548$426a7...@news.free.fr>, Bruno Desthuilliers wrote: >Tomasz Rola a écrit : >> >> I may not be objective (tried Java, hated it after 6 years). > >Arf - only took me 6 months !-) That long? It only took me six minutes. --

Re: What happened to NASA at Python? :(

2009-03-19 Thread Aahz
t0Lgt0Lkt0Lot0Lst0Lwt0L0t0L4t0L8t >0YAt0YEt0YIt0YMt0YQt0YUt0YYt0Yct0Ygt0Ykt0Yot0Yst0Ywt0Y0t0Y4t0Y8Kw6Qtw7Ytw7wt >w58tw4Qtw5Ytw5wK Could you perhaps be persuaded to post in ASCII? -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/ "Programming language design is not a rational science. Most reasoning about it

Re: Concurrent tasklets in Stackless Python

2009-03-19 Thread Aahz
you want parallel CPU in pure Python, you should use e.g. the multiprocessing library. -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/ "Programming language design is not a rational science. Most reasoning about it is at best rationalization of gut feelings

Re: Why doesn't this work ? For loop variable scoping ?

2009-03-19 Thread Aahz
nge your code to a more readable: newTemp += delta -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/ "Programming language design is not a rational science. Most reasoning about it is at best rationalization of gut feelings, and at worst plain wro

Re: Ordered Sets

2009-03-19 Thread Aahz
In article <9a5d59e1-2798-4864-a938-9b39792c5...@s9g2000prg.googlegroups.com>, Raymond Hettinger wrote: > >Here's a new, fun recipe for you guys: > >http://code.activestate.com/recipes/576694/ That is *sick* and perverted. -- Aahz (a...@pythoncraft.com)

Re: Ordered Sets

2009-03-20 Thread Aahz
In article , Nigel Rantor wrote: >Aahz wrote: >> In article >> <9a5d59e1-2798-4864-a938-9b39792c5...@s9g2000prg.googlegroups.com>, >> Raymond Hettinger wrote: >>> >>> Here's a new, fun recipe for you guys: >>> >>> http://code

Re: blocked on futex

2009-03-20 Thread Aahz
the same object type involved or function/method call? I'm not at all familiar with Django, but it might be using threads internally. Have you tried dumping core and using gdb to find out more about the process state? -- Aahz (a...@pythoncraft.com) <*> http://www.pyt

Holy hand grenade!

2009-03-20 Thread Aahz
http://www.telegraph.co.uk/news/newstopics/howaboutthat/5018294/Pub-evacuated-after-Monty-Python-prop-mistaken-for-grenade.html -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/ "Programming language design is not a rational science. Most reasoning abo

Re: Stopping SocketServer on Python 2.5

2009-03-20 Thread Aahz
ocketServer.py in 2.6 doesn't directly rely on anything >that's in Python 2.6, so i've simply copied the code across and i'm >using it in place of the version built into Python 2.5. That's actually a reasonably elegant solution! -- Aahz (a...@pythoncraft.com)

Re: Is python worth learning as a second language?

2009-03-20 Thread Aahz
In article , Tomasz Rola wrote: >On Thu, 19 Mar 2009, Aahz wrote: >> In article <49b58b35$0$3548$426a7...@news.free.fr>, >> Bruno Desthuilliers wrote: >>>Tomasz Rola a écrit : >>>> >>>> I may not be objective (tried Java, hated

Re: Is python worth learning as a second language?

2009-03-21 Thread Aahz
In article , Tomasz Rola wrote: >On Sat, 20 Mar 2009, Aahz wrote: >> >> Taking C++ and turning it into a VM model does not exactly strike me >> as particularly good use of resources. > >It doesn't strike me either. But resources are not the only dimension of

Re: script files with python (instead of tcsh/bash)?

2009-03-21 Thread Aahz
s? Not sure what you're looking for here -- many things you'd run an external program for in scripting can be accomplished with Python library calls, and for the rest, you can use the subprocess module (or os.system if you have no acces to Python 2.4 or higher). -- Aahz (a...@pythoncraft.com)

Re: script files with python (instead of tcsh/bash)?

2009-03-21 Thread Aahz
In article , Esmail wrote: >Aahz wrote: >> In article , >> Esmail wrote: >>> >>> I've looked around the web w/o much luck for some examples but come >>> short. Any comments/suggestions? >> >> Not sure what you're looking

Re: Style question - defining immutable class data members

2009-03-24 Thread Aahz
nfusion. Nevertheless, I personally sometimes use the style of initializing at the class level. I think it's probably worth creating a style guide entry for this issue if you're using Python for your employer. -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncra

Re: blocked on futex

2009-03-25 Thread Aahz
In article <5cffe00b-2cd3-45dc-a674-87466e8ff...@f19g2000vbf.googlegroups.com>, msoulier wrote: >On Mar 20, 10:22=A0am, a...@pythoncraft.com (Aahz) wrote: >> >> Have you tried dumping core and using gdb to find out more about the >> process state? > >Yeah, j

Re: setattr() on "object" instance

2009-03-25 Thread Aahz
o = Object() >>>> setattr(o, "x", 1000) >>>> o.x >1000 > >I notice that the first example's instance doesn't have a __dict__. >Is the second way the idiom? >>> class C(object): ... __slots__ = [] ... >>> x = C() >&

Re: Problem while copying a file from a remote filer

2009-03-25 Thread Aahz
ny extra backslashes, making it invalid. Dropping the 'r' prefix >should fix the problem. Alternatively, and I think better practice, undouble the backslashes instead of removing the 'r' prefix. -- Aahz (a...@pythoncraft.com) <*> http://www.python

c.l.py dead, news at 11 (was Re: Mangle function name with decorator?)

2009-03-27 Thread Aahz
me? What decline of this newsgroup? -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/ "At Resolver we've found it useful to short-circuit any doubt and just refer to comments in code as 'lies'. :-)" --Michael Foord paraphrases Christian Mui

Re: c.l.py dead, news at 11 (was Re: Mangle function name with decorator?)

2009-03-27 Thread Aahz
In article , andrew cooke wrote: >Aahz wrote: >> >> Excuse me? What decline of this newsgroup? > >Hmmm. It's hard to respond to this without implicitly criticising others >here, which wasn't my point at all. But my personal impression is that >over the

Re: is there a way to collect twitts with python?

2009-03-27 Thread Aahz
In article , '2+ wrote: > > [...] This is for upperclass twit of the year, right? -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/ "At Resolver we've found it useful to short-circuit any doubt and just refer to comments in code as &

Re: smtplib problem with newly rebuilt Debian/lenny system

2009-03-27 Thread Aahz
n connect >raise socket.error, msg >socket.error: (97, 'Address family not supported by protocol') > >This is with exim4 and python2.5 on a newly installed lenny system. >No error messages appear in /var/log or /var/log/exim4 directories. Wha

Re: c.l.py dead, news at 11 (was Re: Mangle function name with decorator?)

2009-03-27 Thread Aahz
In article , Nick Craig-Wood wrote: > >c.l.py is my favourite usenet group and has been for some time. I've >been doing usenet for 16 years now! Newbie. ;-) -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/ "At Resolver we've fo

Re: c.l.py dead, news at 11 (was Re: Mangle function name with decorator?)

2009-03-27 Thread Aahz
my POV as someone who has been observing Usenet for eighteen years, c.l.py is *still* an exceptional community. And while Usenet is now an Internet backwater, there's far too much useful traffic to claim that Usenet is in any danger of dying. -- Aahz (a...@pythoncraft.com) <*>

Re: Creating Linked Lists in Python

2009-03-28 Thread Aahz
In article , andrew cooke wrote: > >(I've just noticed that the comments in Sequence are incorrect, >unfortunately - please ignore any mention of "index"). s/comments/lies/ per my .sig ;-) -- Aahz (a...@pythoncraft.com) <*> http://www.python

Re: complaints about no replies last week

2009-03-28 Thread Aahz
NO* replies. Does this mean: > >a) It works >b) It doesn't work >c) It's not particularly applicable to Python at that point >(particularly) >d) It's not news e) the best place to start these days with actual implementations of ideas is the python-ideas list --

Re: How complex is complex?

2009-03-28 Thread Aahz
In article , Hendrik van Rooyen wrote: >Aahz" a...@pyft.com wrote: > >8< > >> .. Because the name "Python" is derived from the >> comedy TV show "Monty Python", stupid jokes

Re: PID lockfile

2009-03-28 Thread Aahz
y concerned with PID file >behaviour that works on Unix.) IIUC, you must use something like Skip's trick to work correctly with NFS. -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/ "At Resolver we've found it useful to short-circuit any d

Re: Creating Linked Lists in Python

2009-03-28 Thread Aahz
In article , andrew cooke wrote: >Aahz wrote: >> In article , >> andrew cooke wrote: >> >>>(I've just noticed that the comments in Sequence are incorrect, >>>unfortunately - please ignore any mention of "index"). >> >> s/com

Re: PID lockfile

2009-03-29 Thread Aahz
In article <87zlf5qi4z@benfinney.id.au>, Ben Finney wrote: >a...@pythoncraft.com (Aahz) writes: >> In article <87iqlwvemo@benfinney.id.au>, >> Ben Finney wrote: >>> >>>In the case of the ‘lockfile’ library, Skip is aiming

Re: blocked on futex

2009-03-29 Thread Aahz
In article <7aea1500-aebc-4585-97c3-ba15f5dc7...@n20g2000vba.googlegroups.com>, msoulier wrote: >On Mar 25, 10:27=A0am, a...@pythoncraft.com (Aahz) wrote: > >> That's a bit bizarre. =A0You're correct that if this is a Python bug, the= >re >> will be no

Re: meta question - how to read comp.lang.python w/o usenet feed/google interface?

2009-03-29 Thread Aahz
ds I'm stuck. You have options for paid usenet feeds. Personally, I like my ISP (panix.com), but you can also just get a plain feed from e.g. Newsguy. -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/ "At Resolver we've found it useful to short-cir

Re: Ordered Sets

2009-03-29 Thread Aahz
In article <01d457aa$0$17208$c3e8...@news.astraweb.com>, Steven D'Aprano wrote: >On Fri, 20 Mar 2009 11:50:28 -0700, Scott David Daniels wrote: >> Raymond Hettinger wrote: >>> [Aahz] >>>> >>>> The doubly-linked list part is what's sick a

Re: Safe to call Py_Initialize() frequently?

2009-03-29 Thread Aahz
really an issue, >because all that is done in Apache parent process is Py_Initialize() >and Py_Finalize() and nothing else really. Just done to get >interpreter setup before forking child processes. > >There is more detail on this analysis in that thread on mod_wsgi

Re: 2.5/2.4 multiprocessing backport doc typo

2009-03-29 Thread Aahz
In article , Daniel Fetchinson wrote: > >=== >Changes >=== > >2.6.1.1 -- 2009-12-07 > >I guess it should be 2008-12-07 :) That's just the time machine in operation. -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.c

Re: Relative Imports, why the hell is it so hard?

2009-03-30 Thread Aahz
>use relative imports inside a package, or fail. Really? I thought you would still be able to use absolute imports; you just won't be able to use implied relative imports instead of explicit relative imports. -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraf

Re: Authorize.net integration problem

2009-03-31 Thread Aahz
In article , Lakshman wrote: > >I am facing a problem in the fingerprint generation. I am repeatedly >getting that the fingerprint generated doesn't match the one the >server generates. How are you getting this? Server error? You're not giving us enough in

Re: Does Python have certificate?

2009-03-31 Thread Aahz
hose who show promise can advance to our Winter Improve Python to >Expert program, for an additional fee, and, be given expert tutoring >to help you gain our exemplary A.R.S.E./W.I.P.E certification which is >guaranteed to attract certain types of employers by its name alone. +1 QOTW

Re: complaints about no replies last week

2009-03-31 Thread Aahz
In article , Arnaud Delobelle wrote: > >There are no comments - I don't have the time to add any, sorry! The margin is too small to contain the proof? -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/ "Debugging is twice as hard as writing

Re: *args question

2009-04-02 Thread Aahz
In article <50d06eb9-2b87-43a0-a7e2-6b68e35fc...@y34g2000prb.googlegroups.com>, grocery_stocker wrote: > >Given the following code... > >import thread Here's your problem; subclass threading.Thread instead, much easier. -- Aahz (a...@pythoncraft.com)

Re: Fedora: Dual Python Versions Installed System Not Picking Up Newer Version

2009-04-02 Thread Aahz
ly specify the full path to the 2.6.1 binary inside your scripts. I think virtualenv might also be useful, but I haven't played with that myself yet. -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/ "Debugging is twice as hard as writing the code i

Re: Puzzling: local variable in recursive function made global?

2009-04-02 Thread Aahz
In article , andrew cooke wrote: > >sorry for the shouting, but someone asks this EVERY DAY AND I CAN'T TAKE >ANY MORE. Nobody's forcing you to respond. Nobody's forcing you to top-post, either. -- Aahz (a...@pythoncraft.com) <*> http://www.p

Re: dict view to list

2009-04-04 Thread Aahz
ve and readable from an OO point >of view. >In my oppinion, this would be cleaner. >Built-ins used like this look like an early decission made when >designing an imperative language. What kind of language do you think Python is? -- Aahz (a...@pythoncraft.com) <*>

Re: Python Tk Tix GUI documentation & builder overview and tips

2009-04-04 Thread Aahz
g this to wiki.python.org/moin/ would be very welcome! (You should probably hunt around a bit to find the best spot.) -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/ "Debugging is twice as hard as writing the code in the first place. Therefore,

Re: Killing threads

2009-04-04 Thread Aahz
;s a more built in way to do what >I want. I'm just not sure what it is. There isn't, you have the right idea about using queues. -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/ "Debugging is twice as hard as writing the code in the fir

Re: Killing threads

2009-04-05 Thread Aahz
dlocks and other threading problems. For more info, see the slides from my thread tutorial: http://pythoncraft.com/OSCON2001/ -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/ "Debugging is twice as hard as writing the code in the first place. Therefo

Re: CGIXMLRPCRequestHandler example

2009-04-05 Thread Aahz
telnet localhost 80 If that fails, you haven't set up the server correctly. I don't know anything about SimpleXMLRPCServer, but you should be able to make progress using standard HTTP debugging tactics. -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com

Re: Testing dynamic languages

2009-04-05 Thread Aahz
hon programs written by other >> (different) people. You will see how to use Python. >> bearophile > >Is there some online repository for such code? Start with Lib/ in the source ;-) -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/ "...str

Re: Re-raising exceptions with a different type and message, preserving existing information

2009-04-05 Thread Aahz
ion. > >What I'm trying to do is related: I need it working in earlier Python >versions, and I need it not for chaining, but only for polymorphism. >What is the right way to do this? The same way that 3.0 does it, IMO. -- Aahz (a...@pythoncraft.com) <*>

Re: CPython and C++ object GC

2009-04-05 Thread Aahz
[posted & e-mailed] In article <4425af5f-b188-4c3e-9114-eb7673165...@r33g2000yqn.googlegroups.com>, wrote: > >I would like to use a C++ gui library with the following (simplified) >interface in Python. Given the lack of responses on c.l.py, try the capi-sig mailin

Re: Killing threads

2009-04-06 Thread Aahz
roseindia.net/javatutorials/shutting_down_threads_cleanly.shtml -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/ "...string iteration isn't about treating strings as sequences of strings, it's about treating strings as sequences of characters. The fac

Re: Killing threads

2009-04-06 Thread Aahz
In article <685a59cd-9f02-483f-bc59-b55091a18...@u9g2000pre.googlegroups.com>, imageguy wrote: >Aahz: >> >>For more info, see the slides from my thread tutorial: >>http://pythoncraft.com/OSCON2001/ > >Aahz, thanks for this reference and link to your presentation.

Re: Call to PyEval_EvalCodeEx crashes in PyFrame_New with abort

2009-04-07 Thread Aahz
cation core dumps. But this is at random times & no pattern for >this. Given the lack of response, I suggest asking on the capi-sig. The likeliest problem is some kind of refcount error when the embedded code calls back into your application. Do you ever get problems when you

Re: UnknownTimeZoneError

2009-04-07 Thread Aahz
AE uses Python 2.3. Do other timezones work? I suspect you might get more responses from a GAE forum. -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/ "...string iteration isn't about treating strings as sequences of strings, it's about treating

Re: python for loop

2009-04-07 Thread Aahz
ick the one that fits best. "The wonderful thing about standards is that there are so many to choose from." -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/ "...string iteration isn't about treating strings as sequences of strings, it

Request For Comment

2009-04-07 Thread Aahz
How RFC1 got created: http://www.nytimes.com/2009/04/07/opinion/07crocker.html -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/ "...string iteration isn't about treating strings as sequences of strings, it's about treating strings as se

Re: is there a way to collect twitts with python?

2009-04-07 Thread Aahz
In article , Nick Stinemates wrote: > >You mean you don't want to read every detail of someone's life? Damn.. Someone has probably done this already, but I've been tempted to set up a Twitter feed that lists every time I visit the loo. -- Aahz (a...@pythoncraft.com)

Re: asynchronous python call

2009-04-08 Thread Aahz
simplest solution is to create an external program and use the subprocess module to call it. You could also use fork() directly, but that's more complicated. -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/ "...string iteration isn't about tr

Re: Python 3.0 online docs broken

2009-04-08 Thread Aahz
In article <49dcc2df$0$29421$4c5ec...@fe1.usenet.com>, Jim Garrison wrote: > >I emailed the webmaster but have received no response. Several people have sent e-mail about this; sorry, we haven't had time for individual responses. -- Aahz (a...@pythoncraft.com)

Re: group several methods under a attribute

2009-04-09 Thread Aahz
7;s B doing something" Blech. The pollution caused by a separate class is minimal, and nested class definitions are likely to have problems (the most obvious is that pickling will break). -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/ Why is this newsgroup different from all other newsgroups? -- http://mail.python.org/mailman/listinfo/python-list

Re: Returning different types based on input parameters

2009-04-09 Thread Aahz
ould always use a unique sentinel value so that *only* passing an argument would change the result signature: sentinel = object() def solve(x, foo=sentinel): ''' @rtype: `Result` if foo is sentinel; (`Result`, confidence) otherwise. '''

Re: Python C API String Memory Consumption

2009-04-09 Thread Aahz
t;> for i in range(100): > >... ss = esauth.penc('sumer') >... >>>> for i in range(100): > >... ss = esauth.penc('sumer') >... BTW, note that if you're using Python 2.x, range(100) will cause a "leak" be

Re: building release - assert-free python library

2009-04-09 Thread Aahz
o avoid those when compiling >the libpython.a library because when this libpython gets used for >production purpose and it aborts, the application goes down without >any means of graceful handling that error condition. >How can we handle this? Are you talking about Python source code

Re: Bug tracker off-line?

2009-04-10 Thread Aahz
In article , MRAB wrote: > >Is it just me or is the bug tracker site having problems? I'm not having >a problem with other sites. Someone else reported this on python-dev -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/ Why is this newsgrou

Re: Crash on msvcrt mismatch?

2009-04-10 Thread Aahz
In article , Lagarde, Jean wrote: > >I'm curious to understand why that matters, but I found out that if I load = >the modules in the inverse order, everything works fine. There's probably a refcount bug hiding in your code. -- Aahz (a...@pythoncraft.com)

Re: email in separate thread

2009-04-10 Thread Aahz
ct the user to the next page. 2a) Fork off a separate process How frequently do you need to send e-mail? -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/ Why is this newsgroup different from all other newsgroups? -- http://mail.python.org/mailman/listinfo/python-list

Re: Definition of Pythonic?

2009-04-11 Thread Aahz
right? What >else would you include in this definition? python -m this -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/ Why is this newsgroup different from all other newsgroups? -- http://mail.python.org/mailman/listinfo/python-list

Re: Multithreading / multiprocess

2009-04-11 Thread Aahz
pick up control after each context switch, so one thread might get more than its share. -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/ Why is this newsgroup different from all other newsgroups? -- http://mail.python.org/mailman/listinfo/python-list

Re: sharing/swapping items between lists

2009-04-11 Thread Aahz
first iteration would be ( [(1,2),(3,4),(5,6)], [7,8] ) Regardless of the actual algorithm, if you are returning items one at a time and maintaining state in a computation, you probably want to use a generator. -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/ W

Re: Reading 3 objects at a time from list

2009-04-11 Thread Aahz
of the list requires a full list copy. You're probably okay with this algorithm unless the string could be megabytes. -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/ Why is this newsgroup different from all other newsgroups? -- http://mail.python.org/mailman/listinfo/python-list

Re: win32 wins settings

2009-04-12 Thread Aahz
In article , Toff wrote: > >I don't understand why this doesn't woks. In what way is it not working? BTW, you should look up "raw strings". See also http://www.catb.org/~esr/faqs/smart-questions.html -- Aahz (a...@pythoncraft.com) <*> htt

Re: sharing/swapping items between lists

2009-04-13 Thread Aahz
ch player the same >angle? How about Googling for "round robin algorithm python"? ;-) -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/ Why is this newsgroup different from all other newsgroups? -- http://mail.python.org/mailman/listinfo/python-list

Re: Who is your daddy: Can I find what object instantiates another object?

2009-04-13 Thread Aahz
DNA-tests are available to us >we should just put all kids into a big pool and make them find out who >their parents are themselves, once they grew up? +1 QOTW -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/ Why is this newsgroup different from

Re: sharing/swapping items between lists

2009-04-14 Thread Aahz
In article , Ross wrote: >On Apr 13, 9:08=A0am, a...@pythoncraft.com (Aahz) wrote: >> In article com>, >> Ross =A0 wrote: >>> >>>I'm sorry...my example was probably a bad one. A better example of >>>output I would like would be something like

Re: [Python-Dev] PEP 382: Namespace Packages

2009-04-15 Thread Aahz
ing bystanders that > there's some genuine controversy here as well. For the benefit of us bystanders, could you summarize your vote at this point? Given the PEP's intended goals, if you do not oppose the PEP, are there any changes you think should be made? -- Aahz (a...@pythoncra

Re: Modifying the value of a float-like object

2009-04-15 Thread Aahz
the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing on usenet? -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/ Why is this newsgroup different from all other newsgroups? -- http://mail.python.org/mailman/listinfo/python-list

Re: What IDE support python 3.0.1 ?

2009-04-15 Thread Aahz
In article , Brendon Wickham wrote: > >I agree, no IDE needed. Just don't use Notepad! I'm on Mac, so spoiled >for choice of text editors, but I'm sure there's one or 2 good uns if >you're on Windows. Vim and emacs, of course. ;-) -- Aahz (a...@python

Re: need to start a new project , can python do all that ?

2009-04-15 Thread Aahz
In article <9061ea8f-b4aa-4dbc-89c9-ae6848033...@k2g2000yql.googlegroups.com>, Deep_Feelings wrote: > >now going into python i found that python 3 is just out but recourses >are limited (including IDEs) any help on that ? Stick with Python 2.x -- Aahz (a...@

Re: Python interpreters in threads crash the application

2009-04-16 Thread Aahz
ith others, so you still need to use the Python GIL. -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/ Why is this newsgroup different from all other newsgroups? -- http://mail.python.org/mailman/listinfo/python-list

Man Bites Python

2009-04-16 Thread Aahz
http://news.yahoo.com/s/nm/20090415/od_nm/us_python_odd_1/print -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/ Why is this newsgroup different from all other newsgroups? -- http://mail.python.org/mailman/listinfo/python-list

Re: compiler package vs parser

2009-04-16 Thread Aahz
In article , Robin Becker wrote: > >Is the compiler package actually supposed to be equivalent to the >parser module? Before I poke my nose into this, what versions of Python have you tried? -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/ &qu

Re: What IDE support python 3.0.1 ?

2009-04-16 Thread Aahz
In article , Scott David Daniels wrote: >Aahz wrote: >> In article , >> Brendon Wickham wrote: >>> >>> I agree, no IDE needed. Just don't use Notepad! I'm on Mac, so spoiled >>> for choice of text editors, but I'm sure there's on

Re: Data uploading to a ftp server

2009-04-16 Thread Aahz
conn.sendall(buf) > File "", line 1, in sendall >error: (10054, 'Connection reset by peer') Can you use a regular FTP client? Please show us the code you use to establish the connection. -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraf

Re: large db question about no joins

2009-04-16 Thread Aahz
In article , Aaron Brady wrote: > >Wait a second., how many legs in the zoo?? That's so you can find out how many to pull. -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/ "If you think it's expensive to hire a professional to do the

Re: Unpreempted behavior with sys.setcheckinterval

2009-04-17 Thread Aahz
the time chunk for a thread to process, and if anything goes through the GIL, the thread may yield. To force a thread to be the only thread running, you need to use some kind of locking. -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/ "If you think i

Re: compiler package vs parser

2009-04-17 Thread Aahz
ler internals, I think it's fair of you to try going to python-dev -- normally questions like this are off-topic, and if someone complains, I'll take the blame. ;-) -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/ "If you think it's expe

Re: script question

2009-04-17 Thread Aahz
for func in funclist: func() -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/ "If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." --Red Adair -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there a programming language that is combination of Python and Basic?

2009-04-17 Thread Aahz
ys. It would be interesting to >get similar functionality in Python. Why do you want to do that? Before you answer, make sure to read this: http://www.u.arizona.edu/~rubinson/copyright_violations/Go_To_Considered_Harmful.html -- Aahz (a...@pythoncraft.com) <*> http://w

Re: can't install new modules after updating python

2009-04-18 Thread Aahz
o back to 2.5? Generally speaking, you should never directly update the system Python; most Linux systems these days rely on Python for their operation. Instead, you install an additional copy of Python, and you cannot use your OS package management to install modules; just install the modu

<    3   4   5   6   7   8   9   10   11   12   >