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
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
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
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
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
Neat.
Thank Goodness for syntax-colouring editors!
Steve
--
http://mail.python.org/mailman/listinfo/python-list
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
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
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
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
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
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
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
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
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
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
>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
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
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
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
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
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
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
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
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
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
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
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.
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
>
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
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
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
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
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
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
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
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
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
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
>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
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
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:
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
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
> 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
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
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
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
> 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
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
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&
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&
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
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
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
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
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
"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
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
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
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
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
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
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
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
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
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
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
[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
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
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?
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
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
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
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
/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
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
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
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
;
>
> 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
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
;-)
>
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
1801 - 1900 of 7152 matches
Mail list logo