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: JEP and JPype in a single process

2005-06-20 Thread Steve Menard
attach to the currently running JVM instead of starting a new one. IF it does not require major changes I will release it as 0.5.1. If you'd like you can submit an enhancement request on the JPype sourceforge page, so this doesn't get lost. -- Steve Menard Maintainer of http://jpype.sourceforge.net -- http://mail.python.org/mailman/listinfo/python-list

Re: JEP and JPype in a single process

2005-06-22 Thread Steve Menard
Steve Menard wrote: > skn wrote: > >> Hello, >> >> I have written a very simple java class file, which invokes a Python >> script >> using JEP. >> >> Code snippet:- >> --- >> Jep jep = new Jep(false); >> jep.runS

Re: Avoiding deadlocks in concurrent programming

2005-06-22 Thread Steve Horsley
O work while holding the lock, I don't think there should be any performance hit using a single lock. The backup thread may be an issue though. Steve -- http://mail.python.org/mailman/listinfo/python-list

Hardening enviroment by overloading __import__?

2005-06-23 Thread Steve Juranich
the builtin behavior back. Am I barking up the wrong tree with __import__?? Where should I look for this answer? Thanks. -- Steve Juranich Tucson, AZ USA -- http://mail.python.org/mailman/listinfo/python-list

Re: Favorite non-python language trick?

2005-06-24 Thread Steve Horsley
Neat. Thank Goodness for syntax-colouring editors! Steve -- http://mail.python.org/mailman/listinfo/python-list

Acceptance test spike example

2005-06-26 Thread Steve Jorgensen
I'm posting this message for 2 reasons. First, I'm still pretty new and shakey to the whole Acceptance Testing thing, and I'm hoping for some feedback on whether I'm on the right track. Second, although all the Agile literature talks about the importance of doing Acceptance Testing, there's very

Re: Acceptance test spike example

2005-06-26 Thread Steve Jorgensen
On Sun, 26 Jun 2005 22:42:40 -0400, "Terry Reedy" <[EMAIL PROTECTED]> wrote: > >"Steve Jorgensen" <[EMAIL PROTECTED]> wrote in message >news:[EMAIL PROTECTED] >> Note how the powerful, context-aware exec() and eval() procedures really >&g

Re: Favorite non-python language trick?

2005-06-27 Thread Steve Jorgensen
On 24 Jun 2005 19:09:05 +0400, Sergei Organov <[EMAIL PROTECTED]> wrote: >Steven D'Aprano <[EMAIL PROTECTED]> writes: > >> On Fri, 24 Jun 2005 00:55:38 -0600, Joseph Garvin wrote: >> >> > I'm curious -- what is everyone's favorite trick from a non-python >> > language? And -- why isn't it in Pyt

6+ Month Python UI Contract Position in Mountain View, CA

2005-06-28 Thread Steve Burke
much. Regards, Steve Burke Sr. Recruiter Foxhunt Staffing, Inc. (650) 988-0339 x104 (650) 988-0354 fax [EMAIL PROTECTED] www.foxhunt.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Acceptance test spike example

2005-06-30 Thread Steve Jorgensen
On Sun, 26 Jun 2005 16:10:05 -0700, Steve Jorgensen <[EMAIL PROTECTED]> wrote: >I'm posting this message for 2 reasons. > >First, I'm still pretty new and shakey to the whole Acceptance Testing thing, >and I'm hoping for some feedback on whether I'm on the r

Re: Scket connection to server

2005-06-30 Thread Steve Horsley
e errors): import socket s = socket.Socket() s.connect((10.214.109.50, 2)) s.send("Hello, Mum\r\n") That should point you in the right direction, anyway. There is a higher level socket framework called twisted that everyone seems to like. It may be worth looking at that too - haven

Re: map/filter/reduce/lambda opinions and background unscientific mini-survey

2005-07-06 Thread steve . morin
map, filter, reduce and lambda Lisp constructs, bring flexibility to the language and is why I started programming in python to begin with. Removing these constructs will be a shame and one step closer to the death of some of the basic features that make python great. -- http://mail.python.org/ma

Is there an easy way to get at the value of DBL_MAX from Python?

2005-07-07 Thread Steve Juranich
I'm in a situation where it would be nice to have access to this value. I've been looking for it all afternoon and can't find anything. Thanks. -- Steve Juranich Tucson, AZ USA -- http://mail.python.org/mailman/listinfo/python-list

Should I use "if" or "try" (as a matter of speed)?

2005-07-09 Thread Steve Juranich
isons for each item. But in cases where I'm only trying a single getattr (for example), using "if" might be a cheaper way to go. What do I mean by "cheaper"? I'm basically talking about the number of instructions that are necessary to set up and execute a try bl

Re: Help with mass remove in text file

2005-07-13 Thread Steve M
First, in your intro you say you want to remove all strings of the form "f=n;" where n can be 0-14. So you want to remove "f=0;" and "f=1;" and ... Later, you appear to be trying to remove "f=;" which may be what you want but it doesn't match your described intentions. Second, the formatting (whit

Re: PY2EXE => Is there a way to go backwards? EXE2PY

2005-07-13 Thread Steve M
>I have the executable of a script that I wrote, that has been erased. >Is there any way to retrieve the uncompiled python script from the >executable that was created with py2exe? You're gonna need a case of 20-weight ball bearings and several quarts of antifreeze. Preferably Quakerstate. No, be

Re: Xah's edu corner: on Microsoft hatred

2005-07-18 Thread Steve Sobol
as ZERO to do with any of the groups you posted to. Go post to some advocacy groups where you *might* be on-topic. -- JustThe.net - Steve Sobol / [EMAIL PROTECTED] / PGP: 0xE3AE35ED Coming to you from Southern California's High Desert, where the temperatures are as high as the gas price

Re: Xah's edu corner: on Microsoft hatred

2005-07-18 Thread Steve Sobol
Cong Wang wrote: > M$ is evil! Not as evil as off-topic rants posted to c.l.j.programmer. -- JustThe.net - Steve Sobol / [EMAIL PROTECTED] / PGP: 0xE3AE35ED Coming to you from Southern California's High Desert, where the temperatures are as high as the gas prices! / 888.480.4N

Can I make the Python build use an already-installed version of Expat?

2005-07-19 Thread Steve Juranich
is a way to tell Python to link to arbitrary libraries, but I don't know how to turn off the building of the "custom" Expat that comes with Python. Thanks for any tips, pointers, and insight. -- Steve Juranich Tucson, AZ USA -- http://mail.python.org/mailman/listinfo/python-list

Re: Can I make the Python build use an already-installed version of Expat?

2005-07-19 Thread Steve Juranich
On 7/19/05, Bernhard Herzog <[EMAIL PROTECTED]> wrote: > This sounds like this bugreport on sourceforge: > http://python.org/sf/1075984 Thanks! I applied the workaround posted by `bos' and things seem to work now. -- Steve Juranich Tucson, AZ USA -- http://mail.python.org

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 M
Harlin Seritt wrote: > I have a remote linux server where I can only access it via ssh. I have > a script that I need to have run all the time. I run like so: > > python script.py & > > It runs fine. When I log off ssh I notice that the script died when I > logged off. How do I make sure it stays r

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
h it's sensible to clear when adding a new importer. I attach code below that implements an importer that loads modules from a database, plus the program that actually creates the database containing the modules. This was only a test of my understanding, but it may help you to move furth

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: Create a variable "on the fly"

2005-07-27 Thread Steve M
PythonWin 2.3.5 (#62, Feb 9 2005, 16:17:08) [MSC v.1200 32 bit (Intel)] on win32. Portions Copyright 1994-2004 Mark Hammond ([EMAIL PROTECTED]) - see 'Help/About PythonWin' for further copyright information. >>> locals()['OSCAR'] = 'the grouch' >>> OSCAR 'the grouch' >>> -- http://mail.python.or

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

poplib.POP3.list() returns extra value?

2005-07-28 Thread Steve Greenland
7;, '41 6649', '42 6776', '43 2338', '44 17808', '45 4960', '46 1785', '47 2123', '48 2011', '49 9124', '50 1910', '51 1307', '52 18869', '53 2507', '54 19099&#x

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

Re: how to append cgi FieldStorage Class instance

2005-07-29 Thread Steve Holden
it represents user input and is therefore not intended to be writable. What exactly are you trying to achieve - some kind of default value? 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: Filtering out non-readable characters

2005-07-29 Thread Steve Holden
nslate table quite easily. Then >>> import string >>> ds = tt.translate(tt, string.printable) sets ds to be all the non-printable characters (according to the string module, anyway). Now you should be able to remove the non-printable characters from s by writing s = s.translate(tt, ds) 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: poplib.POP3.list() returns extra value?

2005-07-29 Thread Steve Greenland
you have the necessary knowledge of cvs to produce a patch. Knowledge: yes; Time: maybe. If someone else gets there first, I won't be offended :-) Thanks for confirming... Steve -- Steve Greenland The irony is that Bill Gates claims to be making a stable operating system and

Re: trying to parse non valid html documents with HTMLParser

2005-08-03 Thread Steve M
>You were right, the HTMLParser of htmllib is more permissive. He just ignores the bad tags ! The HTMLParser on my distribution is a she. But then again, I am using ActivePython on Windows... -- http://mail.python.org/mailman/listinfo/python-list

pyunit and Eclipse

2005-08-03 Thread Steve Jorgensen
I was working with a friend on a project Monday night, and tried to run a pyunit test from Eclipse, and nothing seemed to happen. We finally figured out that the test is doing exactly what it's supposed to do, but the pyunit output isn't making it to the Eclipse console window. We get the same re

Re: Does FTPLIB have a 'local change directory' ?

2005-08-06 Thread Steve Bailey
Yes, I tried using just the filename itself in using storbinary, but it returned some kind of error, but your suggestion to use os.chdir is so obvious I'm not sure why I didn't think of that. Thanks for the email Steve On 8/6/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

Printing to printer

2005-08-11 Thread Steve M
Hello, I'm having problems sending information from a python script to a printer. I was wondering if someone might send me in the right direction. I wasn't able to find much by Google TIA Steve -- http://mail.python.org/mailman/listinfo/python-list

Re: Printing to printer

2005-08-11 Thread Steve M
Kristian Zoerhoff wrote: > On 8/11/05, Steve M <[EMAIL PROTECTED]> wrote: >> Hello, >> >>I'm having problems sending information from a python >> script to a printer. I was wondering if someone might send me >> in the right direction. I w

Re: Psyco & Linux

2005-08-11 Thread Steve M
> First, I tried the usual "python setup.py install" but that did not work. How exactly did it fail? Perhaps you can paste the error output from this command. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python's Exception, and Capitalization

2005-08-12 Thread Steve M
You might find the Python Style Guide to be helpful: http://www.python.org/doc/essays/styleguide.html -- http://mail.python.org/mailman/listinfo/python-list

Re: Printing to printer

2005-08-12 Thread Steve M
ees or warranties. > > Hope it helps. > > Larry Bates > > Steve M wrote: >> Hello, >> >> I'm having problems sending information from a python >> script to a printer. I was wondering if someone might send me >> in the right direction. I wasn&#

Re: Printing to printer

2005-08-12 Thread Steve M
Kristian Zoerhoff wrote: > On 8/11/05, Steve M <[EMAIL PROTECTED]> wrote: >> Kristian Zoerhoff wrote: >> >> > On 8/11/05, Steve M <[EMAIL PROTECTED]> wrote: >> >> Hello, >> >> >> >>I'm having problems sending in

Re: Psyco & Linux

2005-08-12 Thread Steve M
> c/codegen.h:19:3: #error "sorry -- I guess it won't work like that on 64-bits > machines" The first error output by gcc suggests the 64-bit OS might be the problem. But I don't actually know what that error means. -- http://mail.python.org/mailman/listinfo/python-list

Re: "Compile time" checking?

2005-08-12 Thread Steve Jorgensen
Since Python does not use manifest typing, there's not much you can do about this, but typeless languages like this are great if you're using a process that finds the errors the compiler would otherwise find. I'm referring, of course, to Test Driven Development (TDD). If you do TDD, you won't mis

Re: "Compile time" checking?

2005-08-13 Thread Steve Jorgensen
On Sat, 13 Aug 2005 11:04:55 +0400, <[EMAIL PROTECTED]> wrote: >On Fri, 12 Aug 2005 22:25:07 -0700 >Steve Jorgensen wrote: > >> Since Python does not use manifest typing, there's not much you can do about >> this, but typeless languages like this are great if you&

Re: help with mysql cursor.execute()

2005-08-15 Thread Steve Holden
QL string) parameterized to the required value for cusid. > Between your comments re: column names and table names , and the notes > in cursor.py, I was able to figure it out. > > FYI I wanted to create a tableHandler class that could be extended for > individual tables. That&

Re: cgi form validation problems

2005-08-15 Thread Steve Holden
uot;/var/www/users/senta/html/gobooks/cgi/form.py", line 99 > msg = ("From: %s\r\nTo: %s\r\nSubject: %s\r\n\r\n Feedback: > %s\r\n\r\n" % > ^ > SyntaxError: invalid syntax > > Just a simple assignation I did think it might have been an > indentation error, but I changed that around and got a message telling > me about an indentation problem, which this doesn't do. > > I have tried several different ways to assign the values, as you can > see by the commented out lines. Tried getting the values directly from > teh form, and also from the validated rev_fields dictionary. I'd be > extremely grateful to anyone who helps me through this. > > TIA > > Googleboy > Hope this helps. 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

String functions deprication

2005-08-16 Thread steve morin
http://www.python.org/doc/2.4.1/lib/node110.html These methods are being deprecated. What are they being replaced with? Does anyone know? Steve -- http://mail.python.org/mailman/listinfo/python-list

Re: Gadfly use (Newby)

2005-08-17 Thread Steve Holden
27;select id_m from mots where nom_m = %s', nom_m) > > > ? > > > > > I suspect he actually meant cursor.execute("select id_m from mots where nom_m = '%s'" % nom_m) or perhaps cursor.execute("select id_m from mots where nom_m = %s", (nom_m, )) 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: List copying idiom was Re: [Python-Dev] implementation of copy standard lib

2005-08-17 Thread Steve Holden
quickly in the interpreter. > You'd probably want a __copy__ hook for classes which want special > handling, and just do a normal deep copy for everything else. > Well yes, but given that module copy now exists (and will therefore have to continue ti exist until Py3) that would introduce some redundancy. 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: socket setdefaulttimeout

2005-08-17 Thread Steve Holden
except socket.gaierror: > pass > if not timing_done: > end_time = time() > elapsed_time = end_time - start_time > debug("2nd try:Time elapsed for rDNS on bl_list: %f secs" % > elapsed_time) > I don't believe that gethos

Re: Iterparse and ElementTree confusion

2005-08-17 Thread Steve M
"when i attempted [to load 150MB xml file] my PC goes to lala land, theres much HDD grinding followed by "windows runnign low on virtual memory" popup after 10-15mins. Then just more grinding...for an hour before i gave up" I have had great success using SAX to parse large XML files. If you use ca

Re: how do i add a new path into sys.path?

2005-08-18 Thread Steve Holden
apa wrote: > You can do it this way: > > sys.path.append("C:\Temp") > > Alejandro > Better: sys.path.append("C:\\Temp") or sys.path.append(r"C:\Temp") regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC

Re: Python for Webscripting (like PHP)

2005-08-18 Thread Steve Holden
e that the Python secret is getting out. Sharpen up your resumes, guys, you may not have to limit Python to home usage soon :-) 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: Put a url in a browsers address bar

2005-08-18 Thread Steve Holden
anks for the quick reply. Do you know what module I would use to fill > out a form on an open web page? > > Thanks > > Colin You could take a look at John Lee's ClientForm module. Start at http://wwwsearch.sourceforge.net/ClientForm/ regards Steve -- Steve Ho

Re: Put a url in a browsers address bar

2005-08-18 Thread Steve Holden
uld involve using COM, I suspect. If so be careful, as what you implement may end up being browser-specific. 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

python html

2005-08-18 Thread Steve Young
Hi, I am looking for something where I can go through a html page and make change the url's for all the links, images, href's, etc... easily. If anyone knows of something, please let me know. Thanks. -steve Star

Re: how do i add a new path into sys.path?

2005-08-19 Thread Steve Holden
James Sungjin Kim wrote: > Steve Holden wrote: > >>sys.path.append(r"C:\Temp") > > > In this case, do I need to save the refined path, i.e, the original > paths + the new path (r"C:\Temp"), by using some command in order to use > it permanen

Re: Python jobs (was Re: Python for Webscripting (like PHP))

2005-08-19 Thread Steve Holden
Aahz wrote: > In article <[EMAIL PROTECTED]>, > Steve Holden <[EMAIL PROTECTED]> wrote: > >>There's informal evidence that the Python secret is getting out. Sharpen >>up your resumes, guys, you may not have to limit Python to home usage >>soon

Re: Database of non standard library modules...

2005-08-19 Thread Steve Holden
ining what to expect. If I ask someone where I can find a piece of code and the direct me to the cheese shop, I might look for another language. regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC http://www.holdenweb.com/ -- http://mail.pyt

BeautifulSoup

2005-08-19 Thread Steve Young
gt;soup.feed(page) >>page2 = soup.renderContents() >>len(page2) 11889 I have version 2.1 of BeautifulSoup. It seems that other ppl have used BeautifulSoup and it works fine for them so I'm not sure what I'm doing wrong. Any help would be appreciated, thanks. -Steve

Re: Database of non standard library modules...

2005-08-20 Thread Steve Holden
Nigel Rowe wrote: > Steve Holden wrote: > > >>Robert Kern wrote: >> >>>Jon Hewer wrote: >>> >>> >>>>Is there an online database of non standard library modules for Python? >>> >>> >>>http://cheeseshop.python

Re: Binary Trees in Python

2005-08-20 Thread Steve M
[diegueus9] Diego Andrés Sanabria <[EMAIL PROTECTED]> wrote: > Hello!!! > > I want know if python have binary trees and more? You might be interested that ZODB comes with some B-tree implementations. They can be used alone or you can persist them in the ZODB quite easily. http://www.zope.org/Wi

Re: Python Light Revisted?

2005-08-20 Thread Steve M
I agree with you in part and disagree in part. I don't see the point to making the distribution any smaller. 10MB for the installer from python.org, 16MB for ActiveState .exe installer. How is 5MB "lightweight" while 10MB isn't? The Windows XP version of Java at java.com is 16+ MB, and the .NET fr

Re: Python Light Revisted?

2005-08-21 Thread Steve Holden
Steve M wrote: > I agree with you in part and disagree in part. > > I don't see the point to making the distribution any smaller. 10MB for > the installer from python.org, 16MB for ActiveState .exe installer. How > is 5MB "lightweight" while 10MB isn't?

Re: while c = f.read(1)

2005-08-21 Thread Steve Holden
roblem under consideration, and useless optimization work is avoided. 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: Related To Threads

2005-08-21 Thread Steve Holden
time out if it doesn't arrive. http://www.python.org/doc/faq/windows.html#how-do-i-check-for-a-keypress-without-blocking will be some help in the windows environment, select() is your friend under *nix. regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC

Re: network programming

2005-08-21 Thread Steve Holden
Programming tutorial I wrote for LinuxWorld a couple of years ago. http://www.holdenweb.com/linuxworld/NetProg.pdf (student notes) http://www.holdenweb.com/linuxworld/NetProg.ppt (slides) http://www.holdenweb.com/linuxworld/ex.tar (code samples) regards Steve -- Steve Holden +44 150 684 7255 +1 800

Re: question about binary and serial info

2005-08-21 Thread Steve Holden
ou large amounts of time, and before you know it you'll be answering other people's questions. 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: Decorator and Metaclasses Documentation

2005-08-21 Thread Steve Holden
/download/Descriptor.htm > > > > Are descriptors the same thing as decorators? No. In brief: Decorators are a mechanism whereby a function or method can be transparently wrapped by another function. Descriptors are used to hook programmed functionality into the basic access mechanis

Re: Sandboxes

2005-08-21 Thread Steve Jorgensen
Clearly, Pyton does not directly offer any kind of useful security sandbox capability, but since Java does, I suppose JPython is an option. I know there are a lot of downsides to JPython, but it should be a genuine solution to the sandbox problem. On Sat, 20 Aug 2005 10:21:06 GMT, 42 <[EMAIL PROT

Re: Reg Python Byte code

2005-08-22 Thread Steve Holden
iled each execution. > Kindly clear me all the doubts regarding > byte code of python. > > with regards > Prabahar > > Hope this helps. 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: while c = f.read(1)

2005-08-22 Thread Steve Holden
answer to say, the network connection > is still open but no data is available for the moment. '' here > would mean "nothing yet" while '' is now made into "nothing more" > Yes, but you are restricting the programmer's range of expression

Re: while c = f.read(1)

2005-08-22 Thread Steve Holden
; > > Our company is designing a new file type. *sigh*. Confidentiality > prevents me from saying any more, too. If that bugs you because it's > not open source, sorry I need a job. Don't worry though, I'm developing > an open source remote GUI for the code man

Re: network programming

2005-08-22 Thread Steve Holden
n.org/lib/module-socket.html > [...] But then Java's a bit of a mess as a language when compared with Python, I should say. While I know the language has many adherents, it also seems to have many programmers who only know enough to follow recipes. This latter feature is a symptom of the language's popularity, so I suppose we should expect the same problems in about twenty years when Python becomes more popular than Java. 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: Jargons of Info Tech industry

2005-08-22 Thread Steve Holden
;-) > Not to mention the fact that if they are unix morons they probably have no idea what length the lines are anyway :-). If only everyone would do things Xah Lee's way we wouldn't have to see all his twaddle. regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119

Re: Well, another try Re: while c = f.read(1)

2005-08-22 Thread Steve Holden
I posted it in the > first place. I care not a whit about decluttering the newgroup, an > impossible task. > It's clear that you care not a whit about it. Unfortunately the only way to preserve bandwidth on this (or any other) chanell is for those with nothing to say to not say it. 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: loop in python

2005-08-22 Thread Steve Holden
preter (it's written in Python) follows: print 42 Why are you looking for a "fast language" without any regard for the kind of problems you actually want (or need) to solve? Speed of execution is so insignificant for the majority of programming problems that this obsession reveals

Re: Best way to 'touch' a file?

2005-08-22 Thread Steve Holden
is the > more likely interpretation. > Which we probably all can. It's a right bugger when you actually have to listen to what the customer wants, innit? ;-) 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: Python Light Revisted?

2005-08-22 Thread Steve Holden
ation to get Google to bring it up. >> >>regards >> Steve > > > steve, > > are you thinking about moveable python? > > http://www.voidspace.org.uk/python/movpy/ > The very one, thanks. regards Steve -- Steve Holden +44 150 684 7255 +1

Re: up to date books?

2005-08-22 Thread Steve Holden
se them... > > > Alex > PyCon TX 2006? 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: Best way to 'touch' a file?

2005-08-23 Thread Steve Holden
far as the rest of the list is concerned we are probably all three just being tiresome now. The OP can choose whichever best meets his real requirements, whether they were accurately stated or not. 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: while c = f.read(1)

2005-08-23 Thread Steve Holden
es "success". Of course, this still leaves wiggle room to discuss whether success is True or False. 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: py-serial + CSV

2005-08-23 Thread Steve Holden
in seeing other solutions you might consider it, and it does avoid the split when it's not necessary. while 1: line = s.readline() if line.startswith("$GPRMC"): words = line.split(",") print words[1], words[3], words[5] 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: Sorta noob question - file vs. open?

2005-08-23 Thread Steve Holden
May 27 2005, 18:02:40) [GCC 3.3.3 (cygwin special)] on cygwin Type "help", "copyright", "credits" or "license" for more information. >>> open is file True >>> 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: Machine Name

2005-08-23 Thread Steve Holden
t; from socket import gethostname >>> gethostname() 'bigboy' >>> 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: reg packages examples

2005-08-24 Thread Steve Holden
lso contains modules, which are regular Python files that are executed when the module is imported. So, in brief, packages are just a way to let you organize your code in to a set of mutually dependent modules and sub-packages, making source maintenance easier and allowing selective import of parts

Re: Email client in Python

2005-08-24 Thread Steve Holden
r no avail. > I'd recommend the poplib library. There is also imaplib, but that is much more difficult to use. Examples of use: http://docs.python.org/lib/pop3-example.html http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/82233 http://effbot.org/zone/librarybook/network-protoc

Re: while c = f.read(1) [comment on news hosting]

2005-08-24 Thread Steve Holden
option doesn't quote. :\ Not a good > excuse, I know. [...] Well you could do worse than use the gmane.comp.python.general newsgroup if you want to use an NNTP newsreader. I recently left the ISP who had provided me with news services for years, and I am very happy with the gmane servic

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

2005-08-24 Thread Steve Holden
values. In a five-character string then -1 and 4 are effectively equivalent. What on earth makes you call this a bug? And what are you proposing that find() should return if the substring isn't found at all? please don't suggest it should raise an exception, as index() exists to prov

Re: MySQLdb module, method executemany with anything other than strings?

2005-08-25 Thread Steve Holden
t's just that you should use "%s" for *all* parameters, no matter what their type: >>> conn = db.connect() >>> curs = conn.cursor() >>> curs.execute(""" ... create table thingy( ...f1 char(10) primary key, ...f2 float)""") 0L >>> l = [('url1', 0.98999), ('url2', 0.89001)] >>> curs.executemany(""" ... insert into thingy (f1, f2) values (%s, %s)""", l) 2L >>> 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: Should I move to Amsterdam?

2005-08-25 Thread Steve Holden
In The Netherlands you would at least get > a significant percentage of your money back. Not in Germany. > [...] Hitler must be turnng in his grave. 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: while c = f.read(1)

2005-08-25 Thread Steve Holden
eces of code aren't equivalent. While you may be (strictly) correct, your assertion signally fails to add enlightenment to the discussion. I continue to look forward to the first post in which you actually accept someone else's point of view without wriggling and squirmin

Re: variable hell

2005-08-25 Thread Steve Holden
ecause the execute > method should be able to handle a list just as well as a tuple. > That depends on the database module. Some will insist in tuples, IIRC. 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

<    14   15   16   17   18   19   20   21   22   23   >