Re: Does anyone want one?

2005-01-20 Thread Steve Holden
amid scams. -- Steve Holden http://www.holdenweb.com/ Python Web Programming http://pydish.holdenweb.com/ Holden Web LLC +1 703 861 4237 +1 800 494 3119 -- http://mail.python.org/mailman/listinfo/python-list

Re: PyCon Preliminary Program Announced!

2005-01-21 Thread Steve Holden
ively take this task and eat it for breakfast, but please don't believe it will happen as a result of a few newsgroup posts saying what a nice idea it would be. Things don't happen that way, and I have the grey hairs to prove it. Please, make this happen! regards Steve -- Steve

Re: Zen of Python

2005-01-21 Thread Steve Holden
; we-can't-always-see-where-we're-going-ly y'rs - steve -- Steve Holden http://www.holdenweb.com/ Python Web Programming http://pydish.holdenweb.com/ Holden Web LLC +1 703 861 4237 +1 800 494 3119 -- http://mail.python.org/mailman/listinfo/python-list

Re: Tuple size and memory allocation for embedded Python

2005-01-21 Thread Steve Holden
ur program still regards as allocated is garbage collected by Python and reused. Ugly :-P Python is pretty stable, so it's usually best to suspect our own code unless you're heavily into using the C API (which I'm not, so feel free to ignore me). regards Steve -- Steve Holden

Re: default value in a list

2005-01-21 Thread Steve Holden
#x27;, 'line'] >>> for w in l: ... print w ... This is a sample line >>> len(l) 5 >>> regards Steve -- Steve Holden http://www.holdenweb.com/ Python Web Programming http://pydish.holdenweb.com/ Holden Web LLC +1 703 861 4237 +1 800 494 3119 -- http://mail.python.org/mailman/listinfo/python-list

Re: What YAML engine do you use?

2005-01-22 Thread Steve Holden
d. At least the version 1.0 spec I snagged from W3C a long time ago. I see the third edition at http://www.w3.org/TR/REC-xml/ is differently styled, (I guess new style sheets) but still pretty readable (glancing at it now). Regards, Bengt Richter regards Steve -- Steve Holden

Re: What YAML engine do you use?

2005-01-22 Thread Steve Holden
ity. regards Steve -- Steve Holden http://www.holdenweb.com/ Python Web Programming http://pydish.holdenweb.com/ Holden Web LLC +1 703 861 4237 +1 800 494 3119 -- http://mail.python.org/mailman/listinfo/python-list

Re: OT: problems mirroring python-list to c.l.py?

2005-01-23 Thread Steve Holden
Daniel Bickett wrote: John Lenton wrote: On Sun, Jan 23, 2005 at 01:53:52PM -0500, Daniel Bickett wrote: Is there a reason that Google Groups isn't mirroring python-list exactly like it used to, or is it simply a conspiracy I'm not in on? You should not ask this kind of question in a public forum,

Microsoft to Provide PyCon Opening Keynote

2005-01-23 Thread Steve Holden
http://www.python.org/moin/PyConDC2005/Schedule for the current schedule, and register at http://www.python.org/pycon/2005/ regards Steve Holden Chairman, PyCON DC 2005 -- PyCon DC 2005: The third Python Community Conference http://www.pycon.org/ http://www.python.org/pycon/ The scoop

Re: short programming projects for kids

2005-01-24 Thread Steve Holden
then the next thing you know they're writing algorithms to compute convex hulls (well, maybe not, but you probably get the idea). regards Steve -- Steve Holden http://www.holdenweb.com/ Python Web Programming http://pydish.holdenweb.com/ Holden Web LLC +1 703 861 4237

Re: Right place for third party modules (here: fixedpoint)

2005-01-24 Thread Steve Holden
ile to your site-packages directory. You can then delete the empty fixedpoint directory, as it won't do anything except get in the way. Packages are implemented as directories, but modules are single Python files. "Site-packages" is a perfectly acceptable place to put

Import from database

2005-01-24 Thread Steve Holden
db:%s" % modname module.__loader__ = dbimporter if package: module.__path__ = sys.path exec code in module.__dict__ print modname, "loaded:", repr(module), "pkg:", package return module def install(): sys.path_hooks.append(

Re: Import from database

2005-01-25 Thread Steve Holden
Kartic wrote: Steve, I believe you have to put ntpath, macpath and posixpath in the module database for os.path to work. I tried it with zipimporter builtin and I got the same traceback till I added ntpath.py to my zip file. (Of course, I renamed the original ntpath to _ntpath so that the original

Re: Import from database

2005-01-25 Thread Steve Holden
Kartic wrote: Steve, Hmmm... Yes, I see what you are saying. Could you post your create table statement so that I can create a db and play around with dbimport? Thanks, --Kartic Here it is, plus also the loader program I used to suck in the standard library (in case it's that that's faulty): CREA

Re: Open Folder in Desktop

2005-01-25 Thread Steve Holden
Kamilche wrote: Is there a command you can execute in Python that will open a window on the desktop, such as 'My Documents'? Kind of like 'system', but for folder names, not just programs. I'm running on Windows 2000. os.system("start .") works for

PyCon: Early Bird Deadline two days away [really]!

2005-01-26 Thread Steve Holden
, which is JANUARY 28 (and it's already January 26). So, don't delay: save yourself $75 and register by midnight Friday. Which time zone, you ask. Why wait and find out - it only takes a couple of minutes to register. http://www.python.org/pycon/2005/register.html regards Steve Holde

Re: import hook, overwrite import?

2005-01-27 Thread Steve Holden
Kartic wrote: Hi Torsten, If you want to use other methods to import (other than good ole file system), yes, you can create an importer class and register it as an importer module, that import will use to search and import. For example, it is possible to use zip imports (this functionality is alrea

Hey, get this! [was: import from database]

2005-01-28 Thread Steve Holden
something pretty funky. It now "works" (for some value of "work" wiht both MySQL and sqlite. I hope I have this sorted out before PyCon ... I'm currently a bit confused! regards Steve -- Steve Holden http://www.holdenweb.com/ Python Web Programming ht

Re: [PyCon] Reg: Registration

2005-01-28 Thread Steve Holden
ay morning. I look forward to joining you all to hear Guido speak on "The State of Python". regards Steve -- Steve Holden http://www.holdenweb.com/ Python Web Programming http://pydish.holdenweb.com/ Holden Web LLC +1 703 861 4237 +1 800 494 3119 -- http://mail.python.org/mailman/listinfo/python-list

Re: Hey, get this! [was: import from database]

2005-01-29 Thread Steve Holden
Peter Otten wrote: Steve Holden wrote: This is even stranger: it makes it if I import the module a second time: [second import seems to succeed] Maybe you are experiencing some version confusion? What you describe looks much like the normal Python 2.3 behaviour (with no import hook involved

Re: test_socket.py failure

2005-01-30 Thread Steve Holden
[EMAIL PROTECTED] wrote: hi all, Linux 2.4.28 Glibc 2.2.5 gcc 2.95.3 I'm new to Python. I've compiled Python 2.4 from tar file. When running 'make test' i'm getting a failure in test_socket. Running './python Lib/test/test_socket.py' yields: ==

Re: The next Xah-lee post contest

2005-01-31 Thread Steve Holden
[EMAIL PROTECTED] wrote: Tragi-comic. really. BTW you forgot cross-post to c.l.scheme, C, smalltalk and C++ Would there, I wonder, be any enthusiasm for a "Best Xah Lee impression" prize at PyCon? regards Steve -- Steve Holden http://www.holdenweb.com/ Python Web P

Re: variable declaration

2005-01-31 Thread Steve Holden
a language that DOES, at least until and unless your brain changes by other means. Alex I think we should all remember that Python isn't for everyone, and least of all for those with little knowledge of Python and preconceptions about what Python *should* be like. regards Stev

Want to meet any of these people? They are registered for PyCon

2005-01-31 Thread Steve Holden
Hallen David Hancock Andrew Harrington Travis Hartwell Randy Heiland Mark Hertel Raymond Hettinger Rob Hill Tom Hoffman Steve Holden Jim Hugunin John Hunter Jeremy Hylton Bob Ippolito Joseph J. Pamer Kevin Jacobs Vineet Jain Micha

Re: re module - cannot make expression

2005-01-31 Thread Steve Holden
match "not beginning with" type expressions. Thanks, Laci 2.0 You can do taht with Python re's. Look in the re documentation for "negative lookahead assertion". regards Steve -- Steve Holden http://www.holdenweb.com/ Python Web Programming http://pydish.

Re: import directory error

2005-01-31 Thread Steve Holden
rb is a module from the mp1 package, mp1.p2 is a sub-package of mp1. You can see what's been compiled by the interpreter on import and when by looking at the .pyc files. Does this help any? regards Steve -- Steve Holden http://www.holdenweb.com/ Python Web Programming h

Re: variable declaration

2005-01-31 Thread Steve Holden
definitely in for a treat this year. regards Steve -- Steve Holden http://www.holdenweb.com/ Python Web Programming http://pydish.holdenweb.com/ Holden Web LLC +1 703 861 4237 +1 800 494 3119 -- http://mail.python.org/mailman/listinfo/python-list

Re: Relocatable binary installs....

2005-01-31 Thread Steve Holden
any further nouse (and no symbolic links to help it) is going to crap out badly. But I could be wrong. always-prepared-to-at-least-admit-the-possibility-ly y'rs - steve -- Steve Holden http://www.holdenweb.com/ Python Web Programming http://pydish.holdenweb.com/ Holden Web LLC

Re: Q: quoting string without escapes

2005-01-31 Thread Steve Holden
hon and Perl? Unusual to find arrogance and humility in such close proximity. Please stop cross-posting your ill-informed and inflammatory stuff to c.l.py and c.l.perl.m. And now I have your attention, the answer to your question is ... Use triple-quoting. followups-set'ly

Re: Relocatable binary installs....

2005-01-31 Thread Steve Holden
Fredrik Lundh wrote: Steve Holden wrote: Is there a way to make a relocateable python binary... that is... a python installation that won't care where it is on the machine... and won't care if it gets put somewhere else besides / ? the standard CPython interpreter is 100% "reloca

Re: python and gpl

2005-01-31 Thread Steve Holden
r an answer to the (apparently relatively simple) question: If a Python program imports a module licensed under the GPL, in your opinion does the Python program become a derivative work of the GPL'd software? regards Steve -- Steve Holden http://www.holdenweb.com/ Python Web Programming http://pydish.holdenweb.com/ Holden Web LLC +1 703 861 4237 +1 800 494 3119 -- http://mail.python.org/mailman/listinfo/python-list

Re: Want to meet any of these people? They are registered for PyCon

2005-01-31 Thread Steve Holden
Aahz wrote: In article <[EMAIL PROTECTED]>, Steve Holden <[EMAIL PROTECTED]> wrote: Note that the sort order isn't perfect - I just sorted on the second "word" in each name. PyCon is a *great* place to meet people and discuss ideas. Hope to see you there. Good thi

Re: Want to meet any of these people? They are registered for PyCon

2005-01-31 Thread Steve Holden
Stephen Thorne wrote: On Mon, 31 Jan 2005 17:49:53 -0500, Steve Holden <[EMAIL PROTECTED]> wrote: Aahz wrote: In article <[EMAIL PROTECTED]>, Steve Holden <[EMAIL PROTECTED]> wrote: Note that the sort order isn't perfect - I just sorted on the second "word" in ea

Re: Advice on OSX cocoa app with Python backend

2005-02-01 Thread Steve Holden
ue parts of OSX appear (from the outside) to be Carbon/Cocoa and the funky GUI stuff. So have at it and come back for advice when you need it. Good luck with your project. [OBPyCon: of course, if you come to PyCon DC 2005 you can discuss this stuff with experts: http://www.python.org/pycon/2

PyCon signature advertising

2005-02-01 Thread Steve Holden
me to PyCon http://www.python.org/pycon/2005/ Steve Holden http://www.holdenweb.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: PyCon signature advertising

2005-02-01 Thread Steve Holden
Mike C. Fletcher wrote: Steve Holden wrote: I appreciate that not everyone has control over their .sig, Take control of your sigs, my sisters and brothers! Viva la Revolution! Follow the Steve into the heat and light of PyCon. You can achieve enlightenment if only you go to the

Re: variable declaration

2005-02-01 Thread Steve Holden
cessive to me. Sample use case: for something in lst: if type(something) != type(()): something = tuple(something) regards Steve -- Meet the Python developers and your c.l.py favorites March 23-25 Come to PyCon DC 2005 http://www.python.org/pycon/2005/ Steve Holden

Re: variable declaration

2005-02-01 Thread Steve Holden
Thomas Bartkus wrote: "Steve Holden" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Thomas Bartkus wrote: "Carl Banks" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] How common is it for a local variable to be bound in more than one plac

Re: how do i create such a thing?

2005-02-01 Thread Steve Holden
thing to having subclassed the object's class but with closer control. regards Steve A: Top-posting Q: What puts things in the wrong order on newsgroup postings -- Meet the Python developers and your c.l.py favorites March 23-25 Come to PyCon DC 2005 http://www

Re: Next step after pychecker

2005-02-02 Thread Steve Holden
uldn't be very helpful when trying to write an optimizing compiler, but it is a valid type. Skip So reaplce the plus sign with an asterisk ... regards Steve -- Meet the Python developers and your c.l.py favorites March 23-25 Come to PyCon DC 2005 http://www.python.org/pycon/2005/ Steve Holden http://www.holdenweb.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: type of simple object

2005-02-02 Thread Steve Holden
", though there wouldn't be any problems in this case except the infinite recursion. Which definitely *would* be a problem. regards Steve -- Meet the Python developers and your c.l.py favorites March 23-25 Come to PyCon DC 2005 http://www.python.org/pycon/2005/ Steve Holden

Re: Is this a contradiction in the docs ?

2005-02-02 Thread Steve Holden
ards Steve -- Meet the Python developers and your c.l.py favorites March 23-25 Come to PyCon DC 2005 http://www.python.org/pycon/2005/ Steve Holden http://www.holdenweb.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Hey, get this! [was: import from database]

2005-02-02 Thread Steve Holden
Steve Holden wrote: Peter Otten wrote: Steve Holden wrote: This is even stranger: it makes it if I import the module a second time: [second import seems to succeed] Maybe you are experiencing some version confusion? What you describe looks much like the normal Python 2.3 behaviour (with no

Re: Hey, get this!

2005-02-02 Thread Steve Holden
Bernhard Herzog wrote: Steve Holden <[EMAIL PROTECTED]> writes: What *I* would like to know is: who is allowing the import of bsddb.os, thereby somehow causing the code of the os library module to be run a second time. I would guess (without actually running the code) that this p

Re: Finding user's home dir

2005-02-02 Thread Steve Holden
gwin too! regards Steve -- Meet the Python developers and your c.l.py favorites March 23-25 Come to PyCon DC 2005 http://www.python.org/pycon/2005/ Steve Holden http://www.holdenweb.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Generating modul classes with eval

2005-02-02 Thread Steve Holden
op so that they exist like the code was written in? Thanks, AXEL. You could try just importing the module - then, when it runs, its name won't be "__main__" but "MyModule". regards Steve -- Meet the Python developers and your c.l.py favorites March 23-25 Co

Re: Basic file operation questions

2005-02-02 Thread Steve Holden
if not os.path.exists(path2): if not os.path.exists(path3): return os.getcwd() else: return path3 else: return path2 else: return path1 print getHomeDir() >>> regards Steve -- Meet the Python developers and your c.l.py favorites March 23

Re: Getting a module's byte code, how?

2005-02-02 Thread Steve Holden
e version-dependent. tadaaa-ly y'rs - steve -- Meet the Python developers and your c.l.py favorites March 23-25 Come to PyCon DC 2005 http://www.python.org/pycon/2005/ Steve Holden http://www.holdenweb.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Getting a module's byte code, how?

2005-02-02 Thread Steve Holden
opers and your c.l.py favorites March 23-25 Come to PyCon DC 2005 http://www.python.org/pycon/2005/ Steve Holden http://www.holdenweb.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Getting a module's byte code, how?

2005-02-02 Thread Steve Holden
Irmen de Jong wrote: Steve Holden wrote: Having said which, if the module was loaded from a .pyc file then the bytecode is available from that - take everything but the first eight bytes and use marshal.loads() to turn it back into a code object: Yup. As I explained in the other message, this

Re: Generating .pyc/.pyo from a make file

2005-02-02 Thread Steve Holden
.py favorites March 23-25 Come to PyCon DC 2005 http://www.python.org/pycon/2005/ Steve Holden http://www.holdenweb.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: global variables

2005-02-02 Thread Steve Holden
http://www.pycon.org/ Steve Holden http://www.holdenweb.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Generating .pyc/.pyo from a make file

2005-02-02 Thread Steve Holden
Tim Daneliuk wrote: Steve Holden wrote: Roland Heiber wrote: Tim Daneliuk wrote: It does - thanks. One more question: Are pyc and pyo file portable across operating systems? I suspect not since I generated a pyo on a FreeBSD machine that will not run on a Win32 machine. I was under the

Re: Newbie alert

2005-02-02 Thread Steve Holden
tive! regards Steve -- Meet the Python developers and your c.l.py favorites March 23-25 Come to PyCon DC 2005 http://www.pycon.org/ Steve Holden http://www.holdenweb.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: IDLE history, Python IDE, and Interactive Python with Vim

2005-02-03 Thread Steve Holden
frame when you reach a breakpoint. It's a great way to find out what's going on. [But don't I remember that IDLE can do that too? ...] regards Steve -- Meet the Python developers and your c.l.py favorites March 23-25 Come to PyCon DC 2005 http://www.pyc

Re: IDLE history, Python IDE, and Interactive Python with Vim

2005-02-03 Thread Steve Holden
tried something called pyCrust, but this too didn't have history To recall a line from your history in PyCrust, press Ctrl+UpArrow. Ditto regards Steve -- Meet the Python developers and your c.l.py favorites March 23-25 Come to PyCon DC 2005 http://www.pycon.org/ St

Re: Awkwardness of C API for making tuples

2005-02-03 Thread Steve Holden
tem fails, you'll leak an object. And in practice this will only happen during a period when you are relying critically on it *not* to ... regards Steve -- Meet the Python developers and your c.l.py favorites March 23-25 Come to PyCon DC 2005 http://www.pycon.org/ Stev

Re: Basic file operation questions

2005-02-03 Thread Steve Holden
ntirely clear, but newbies should not be using it as any kind of model. regards Steve -- Meet the Python developers and your c.l.py favorites March 23-25 Come to PyCon DC 2005 http://www.pycon.org/ Steve Holden http://www.holdenweb.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: global variables

2005-02-03 Thread Steve Holden
signing myself "Stvev"? regards Steve -- Meet the Python developers and your c.l.py favorites March 23-25 Come to PyCon DC 2005 http://www.pycon.org/ Steve Holden http://www.holdenweb.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: ModPython: passing variables between handlers?

2005-02-03 Thread Steve Holden
es to it as a way to communicate between handlers.""". regards Steve -- Meet the Python developers and your c.l.py favorites March 23-25 Come to PyCon DC 2005 http://www.pycon.org/ Steve Holden http://www.holdenweb.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Hey, get this!

2005-02-03 Thread Steve Holden
Just wrote: In article <[EMAIL PROTECTED]>, Bernhard Herzog <[EMAIL PROTECTED]> wrote: Bernhard Herzog <[EMAIL PROTECTED]> writes: Steve Holden <[EMAIL PROTECTED]> writes: if package: module.__path__ = sys.path You usually should initialize a packag

Re: Popularizing SimpleHTTPServer and CGIHTTPServer

2005-02-03 Thread Steve Holden
:-) regards Steve -- Meet the Python developers and your c.l.py favorites March 23-25 Come to PyCon DC 2005 http://www.pycon.org/ Steve Holden http://www.holdenweb.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: convert ftp.retrbinary to file object? - Python language lacks expression?

2005-02-03 Thread Steve Holden
rites March 23-25 Come to PyCon DC 2005 http://www.pycon.org/ Steve Holden http://www.holdenweb.com/ -- http://mail.python.org/mailman/listinfo/python-list

ModPython: passing variables between handlers?

2005-02-03 Thread Steve Holden
2005 http://www.pycon.org/ Steve Holden http://www.holdenweb.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there a market for python developers?

2005-02-03 Thread Steve Holden
so, take a look at http://www.python.org/Jobs.html regards Steve -- Meet the Python developers and your c.l.py favorites March 23-25 Come to PyCon DC 2005 http://www.pycon.org/ Steve Holden http://www.holdenweb.com/ -- http://mail.python.org/mailma

Re: global variables

2005-02-03 Thread Steve Holden
Steven Bethard wrote: Steve Holden wrote: M.E.Farmer wrote: Ok it has been a long day, In my reply to Steven Bethard , Steve should read Steven ;) M.E.Farmer Well, since he signs himself "Steve" too I guess we'll just have to put up with the ambiguities. Or perhaps, given my (

Re: Easy Q: dealing with object type

2005-02-03 Thread Steve Holden
like 2.2.1. Until then "True" and "False" were just names like any other. regards Steve -- Meet the Python developers and your c.l.py favorites March 23-25 Come to PyCon DC 2005 http://www.pycon.org/ Steve Holden http://www.holdenweb.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: About standard library improvement

2005-02-03 Thread Steve Holden
25 Come to PyCon DC 2005 http://www.pycon.org/ Steve Holden http://www.holdenweb.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Why does super() require the class as the first argument?

2005-02-03 Thread Steve Holden
can linearize your diamond-shaped inheritance graphs. Very pythonic ... regards Steve -- Meet the Python developers and your c.l.py favorites March 23-25 Come to PyCon DC 2005 http://www.pycon.org/ Steve Holden http://www.holdenweb.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: List mapping question

2005-02-03 Thread Steve Holden
,b,c (1, 2, 3) >>> a,b,c = [int(x) for x in (a,b,c)] >>> a,b,c (1, 2, 3) regards Steve -- Meet the Python developers and your c.l.py favorites March 23-25 Come to PyCon DC 2005 http://www.pycon.org/ Steve Holden http://www.holdenweb.com/ -- http://mail.python.org/mailman/listinfo/python-list

[Fwd: [gnu.org #220719] Re: python and gpl]

2005-02-03 Thread Steve Holden
Python zen would advise "refuse the temptation to guess". So I am Cc'ing [EMAIL PROTECTED] with a request for an answer to the (apparently relatively simple) question: If a Python program imports a module licensed under the GPL, in your opinion does the Python program become a deri

Re: About standard library improvement

2005-02-03 Thread Steve Holden
when you submit patches/bug reports to speed it up? BJörn: I suspect you should join the python-dev list - you may well be able to help much more effectively there. regards Steve -- Meet the Python developers and your c.l.py favorites March 23-25 Come to PyCon DC 2005 http://www.p

Re: OT: why are LAMP sites slow?

2005-02-04 Thread Steve Holden
ating the real number. So what's all this about "the server", then? ;-) regards Steve -- Meet the Python developers and your c.l.py favorites March 23-25 Come to PyCon DC 2005 http://www.pycon.org/ Steve Holden http://www.holdenweb.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Converting a string to a function pointer

2005-02-04 Thread Steve Holden
uot;: c } ... funcString = GetFunctionAsString() try: f = funcMap(funcString) except KeyError: print "No such function" raise SomethingElse result = f(args) regards Steve -- Meet the Python developers and your c.l.py favorites March 23-25 Come to PyCon DC 2005

Re: regular expression match collection

2005-02-04 Thread Steve Holden
DC 2005 http://www.pycon.org/ Steve Holden http://www.holdenweb.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: OT: why are LAMP sites slow?

2005-02-04 Thread Steve Holden
and your c.l.py favorites March 23-25 Come to PyCon DC 2005 http://www.pycon.org/ Steve Holden http://www.holdenweb.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Thread in python

2005-02-04 Thread Steve Holden
regards Steve -- Meet the Python developers and your c.l.py favorites March 23-25 Come to PyCon DC 2005 http://www.pycon.org/ Steve Holden http://www.holdenweb.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: returning True, False or None

2005-02-04 Thread Steve Holden
i in lst: return i return False but frankly I think that's more obscure, and saves you pretty much nothing. regards Steve -- Meet the Python developers and your c.l.py favorites March 23-25 Come to PyCon DC 2005 http://www.pycon.org/ Steve Holden

Re: string issue

2005-02-04 Thread Steve Holden
ption, e: print e print ips time.sleep(5) Someone tell me I'm going crazy ;) You are modifying the list as you iterate over it. Instead, iterate over a copy by using: for ip in ips[:]: ... regards Steve -- Meet the Python developers and your c.l.py favorites March

Re: string issue

2005-02-04 Thread Steve Holden
Terry Reedy wrote: "Steve Holden" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] [ ... ] This seems much more sensible to me than building a new list with everything (a copy), including things you don't want, and then deleting the things you don't

Re: returning True, False or None

2005-02-05 Thread Steve Holden
Christos TZOTZIOY Georgiou wrote: On Fri, 04 Feb 2005 13:04:16 -0500, rumours say that Steve Holden <[EMAIL PROTECTED]> might have written: [STeVe] For a given list: * If all values are None, the function should return None. * If at least one value is True, the function should retur

Re: Error!

2005-02-05 Thread Steve Holden
amount + dealer + charge) print "Please hand over", actual_price Obviously the "..." are the bits you fill in to complete the program. Good luck! regards Steve -- Meet the Python developers and your c.l.py favorites March 23-25 Come to PyC

Re: An interesting python problem using Zope 2.7.3

2005-02-05 Thread Steve Holden
er, for example, there will be obvious difficulties with unquoted "<" and ">" characters, regards Steve -- Meet the Python developers and your c.l.py favorites March 23-25 Come to PyCon DC 2005 http://www.pycon.org/ Steve Holden http://www.holdenweb.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: sos!

2005-02-05 Thread Steve Holden
27;s all too useful, take a look at http://www.uselesspython.com/ Welcome to Python! regards Steve -- Meet the Python developers and your c.l.py favorites March 23-25 Come to PyCon DC 2005 http://www.pycon.org/ Steve Holden http://www.holdenweb.com

Re: returning True, False or None

2005-02-05 Thread Steve Holden
Steve Holden wrote: Christos TZOTZIOY Georgiou wrote: On Fri, 04 Feb 2005 13:04:16 -0500, rumours say that Steve Holden <[EMAIL PROTECTED]> might have written: [STeVe] For a given list: * If all values are None, the function should return None. * If at least one value is True, the function

Re: Trouble converting hex to decimal?

2005-02-05 Thread Steve Holden
-25 Come to PyCon DC 2005 http://www.pycon.org/ Steve Holden http://www.holdenweb.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Error!

2005-02-05 Thread Steve Holden
Bruno Desthuilliers wrote: Steve Holden a écrit : (snip) So, for example, your program might look like this: base_price = int(raw_input(...)) tax_rate = int(raw_input(...) tax_amount = base_price * ((100+tax_amount)/...) s/(100+tax_amount)/(100 + tax_rate)/, I guess ? Oops. Let's try tax_a

Re: Trouble converting hex to decimal?

2005-02-05 Thread Steve Holden
about making things difficult! >>> x = '\x00' >>> ord(x) 0 >>> x = '\x15' >>> ord(x) 21 >>> regards Steve -- Meet the Python developers and your c.l.py favorites March 23-25 Come to PyCon DC 2005 http://www.pycon.org/ Steve Holden http://www.holdenweb.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: mod_python Apache/2.0.52 (Win32) Python 2.4

2005-07-20 Thread Steve Holden
want - it's only around an eighth of a megabyte. > Thanks for your help > > Dieter regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC http://www.holdenweb.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Windows command line problem

2005-07-20 Thread Steve Holden
ricky about a simple internal combustion engine, right? ;-) regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC http://www.holdenweb.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: How to run python script in background after i logout

2005-07-24 Thread Steve Holden
ff. How do I make sure it stays running? > > thanks, > > Harlin Seritt > If you want to trigger each run manually, try nohup python script.py & This should allow the job to continue running after you've logged out. regards Steve -- Steve Holden +44 150 684 7255

Re: Importing User-defined Modules

2005-07-24 Thread Steve Holden
er towards PEP302. regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC http://www.holdenweb.com/ dbload.py Description: application/python dbimp.py Description: application/python -- http://mail.python.org/mailman/listinfo/python-list

Re: Building Python with Tcl/Tk on Cygwin_NT-5.1

2005-07-25 Thread Steve Holden
cally updating instructions you and others had been good enough provide in the past: http://www.holdenweb.com/review/rvw002.html regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC http://www.holdenweb.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: how to write a line in a text file

2005-07-25 Thread Steve Holden
files when a low-probability crash occurs. Since you are newbile (?) I would advise against paranoia - write your code without worrying about error handling. You'll be pleased to know that when you start to take a serious interest in error handling Python has everything you'll need.

Re: all possible combinations

2005-07-28 Thread Steve Holden
> Because it's not what you'd call (or, at least, it's not what I'd call) universally required. As you have shown it is relatively easy to hack something supp when it's needed, so since it isn't something that's required by the majority it hasn't been added to the library. regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC http://www.holdenweb.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: all possible combinations

2005-07-28 Thread Steve Holden
Steven D'Aprano wrote: > On Thu, 28 Jul 2005 12:30:23 +0100, Steve Holden wrote: > > >>>This makes me wonder why we still don't have something like the unint >>>function above in the standard distribution. >>> >> >>Because it&#

Re: easy float question just eludes me

2005-07-28 Thread Steve Holden
100))[-3:] '.50' >>> I presume that a stays in the range 0 <= a < 100. If not you will have to handle the integral digits as well with something like >>> "%4.2f" % 3.1 '3.10' >>> "%6.2f" % 3.1 ' 3.10' >>> regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC http://www.holdenweb.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: functions without parentheses

2005-07-28 Thread Steve Holden
to guess whether a function reference not followed by a left parenthesis is a reference to a function or a reference to the result of calling the function. Perl and VB(Script) make more use of context, in ways that confuse many users. Time for someone to try import this regards Steve -- Ste

Re: retrieve data from 2 database

2005-07-28 Thread Steve Holden
queries as lists of tuples, each tuple representing a row, but of course they can easily be transformed into other Python objects with more convenient properties to join the two sets together. Much then depends on how you want to join the two sets. regards Steve -- Steve Holden +44 150 684 7

Re: Ten Essential Development Practices

2005-07-29 Thread Steve Holden
spect or aspects (or the > software, or just software, as a whole, for the true Masters out there) > you happen to be working on at the time, but such is the nature of Zen. > > Regards, > Dan > If I canpoint out the obvious, the output from "import this" *is* heade

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