Dear All,
I have doubt in python cgi script. I describe
that doubt with below code
import cgi
form = cgi.FieldStorage()
passwd = form['passwd'].value
print passwd
But Now I want to assign some value to form['passwd']
field value
form['passwd'] = 'surese'
Now If I try to print
print form['pas
[Tony Meyer]
|
| [Tim Golden]
| > Well, I actually had some correspondence with Jason on this
| > very subject a year or so ago:
| [...]
| > Obviously, I don't know how much weight Jason's original
| > ideas have on the prepped-for-syslib module, but it does
| > support what other people have
Andrew Dalke wrote:
> Steven Bethard wrote:
>> Here's one possible solution:
>>
>> py> import itertools as it
>> py> def zipfill(*lists):
>> ... max_len = max(len(lst) for lst in lists)
>
> A limitation to this is the need to iterate over the
> lists twice, which might not be possible if one of
praba kar wrote:
> Dear All,
> I have doubt in python cgi script. I describe
> that doubt with below code
> import cgi
> form = cgi.FieldStorage()
> passwd = form['passwd'].value
> print passwd
> But Now I want to assign some value to form['passwd']
> field value
> form['passwd'] = 'surese'
>
Cheers Guys,
I have come across twisted and used in async code. What i'm really
looking for is something that provides concurrency based on CSP or pi
calculus. Or something that looks much more like Java's JSR 166 which is
now integrated in Tiger.
Peter Tillotson wrote:
> Hi,
>
> I'm looking f
Hello,
I'm looking for a spreadsheet application (MacOS X prefered, but
Windows, Linux ar available as well) with support for Python scripting
(third-party "plug-ins" are ok) and a database interface.
Applications that I know of (that they exist) are:
MS Excel
Quattro
Lotus
OO Calc
Gnumeric
Kspr
Wolfgang Keller wrote:
> Excel: I know of a module that allows to script Excel in Python from
> outside (COM scripting on Windows and Applescript on MacOS are know as
> well), but I don't know of any possibility to do Python scripting with
> Excel itself?
For scripting Mac applications with Pytho
Dan Sommers wrote:
> On Thu, 28 Jul 2005 15:35:54 -0700,
> Robert Kern <[EMAIL PROTECTED]> wrote:
>
>
>>That said, I made a boo-boo. The Zen of Python is really a set of
>>design principles (and some of them, like this one, are more
>>specifically *language* design principles), not Essential Deve
Peter Tillotson <[EMAIL PROTECTED]> writes:
> I have come across twisted and used in async code. What i'm really
> looking for is something that provides concurrency based on CSP or pi
> calculus. Or something that looks much more like Java's JSR 166 which
> is now integrated in Tiger.
Python does
Steve Holden <[EMAIL PROTECTED]> writes:
> If I canpoint out the obvious, the output from "import this" *is*
> headed "The Zen of Python", so clearly it isn;t intended to be
> universal in its applicability.
It's also mistitled there, given that it was originally posted as '19
Pythonic Theses' an
praba kar wrote:
> Dear All,
> I have doubt in python cgi script. I describe
> that doubt with below code
> import cgi
> form = cgi.FieldStorage()
> passwd = form['passwd'].value
> print passwd
> But Now I want to assign some value to form['passwd']
> field value
> form['passwd'] = 'surese'
>
I've used Kylix 3 in the past, but would not consider it nowadays,
because it's realy behind the times, it can't run on the latest linux
versions and does only support Qt 2.7, while Qt4 has just been released.
I'm a C++ programmer and loved Borland C++Builder, I was disappointed by
how buggy the C+
Thank you very much !
Nicolas
--
http://mail.python.org/mailman/listinfo/python-list
def StripNoPrint(self, S):
from string import printable
return "".join([ ch for ch in S if ch in printable ])
Adriaan Renting| Email: [EMAIL PROTECTED]
ASTRON | Phone: +31 521 595 217
P.O. Box 2 | GSM: +31 6 24 25 17 28
NL-7990 AA Dwingeloo
--- Fuzzyman <[EMAIL PROTECTED]> wrote:
>
> praba kar wrote:
> > Dear All,
> > I have doubt in python cgi script. I describe
> > that doubt with below code
> > import cgi
> > form = cgi.FieldStorage()
> > passwd = form['passwd'].value
> > print passwd
> > But Now I want to assign some value
praba kar wrote:
> --- Fuzzyman <[EMAIL PROTECTED]> wrote:
>
> >
> > praba kar wrote:
> > > Dear All,
> > > I have doubt in python cgi script. I describe
> > > that doubt with below code
> > > import cgi
> > > form = cgi.FieldStorage()
> > > passwd = form['passwd'].value
> > > print passwd
> >
I have the problem that I need to interact with a CD/DVD burning program
called gear. I do this by running it in a pseudo terminal.
I also need to log what I'm doing, so I copy all output I get from gear
to a logfile. The problem is that gear uses terminal control commands to
create a nice command
On Fri, 29 Jul 2005 10:08:15 +0100,
Steve Holden <[EMAIL PROTECTED]> wrote:
> If I canpoint out the obvious, the output from "import this" *is*
> headed "The Zen of Python", so clearly it isn;t intended to be
> universal in its applicability.
Ok, not universal. But as usual, Zen is not easily na
On Fri, 29 Jul 2005 06:37:52 +, Bengt Richter wrote:
> I suggested in a previous thread that one could support such a syntax by
> supporting an invisible binary operator between two expressions, so that
> examine "string" translates to examine.__invisbinop__("string") if
> examine as an expres
Some people are of the opinion that threads are evil.
Best Regards,
Fuzzy
http://www.voidspace.org.uk/python
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> The following url points to an article written by Damian Conway
> entitled "Ten Essential Development Practices":
> http://www.perl.com/pub/a/2005/07/14/bestpractices.html
>
> Althought the article has Perl as a focus, I thought that some of the
> general points made mig
Bob Greschke wrote:
>"Peter Hansen" <[EMAIL PROTECTED]> wrote in message >
>
>
>>Actually, I'm curious why you don't do the same. I'd call it very unusual
>>(in my experience) to have a program open and close a serial port
>>repeatedly. Among other things, this means that the DSR/DTR lines a
Tony Meyer wrote:
> Would you really choose this:
> p = Path() / "build" / "a" / "very" / "very" / "long" / "path"
>
> Over this:
> p = Path(os.path.join("build", "a", "very", "very", "long", "path"))
I'd choose neither, because both are contrived examples (who builds
paths out of six li
Andrew Dalke wrote:
> sys.exit() is identical to "raise SystemExit()". It raises a Python
> exception which may be caught at a higher level in the program stack.
And which *is* caught at the highest levels of threading.Thread objects
(which Timer is based on). Exceptions raised (and caught or n
Bob Greschke wrote:
> "Peter Hansen" <[EMAIL PROTECTED]> wrote in message >
>>I'd call it very unusual
>>(in my experience) to have a program open and close a serial port
>>repeatedly.
>
> One of the serial ports (there are actually two) is used to read some NMEA
> sentences from a GPS. It i
"Peter Hansen" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Andrew Dalke wrote:
>> sys.exit() is identical to "raise SystemExit()". It raises a Python
>> exception which may be caught at a higher level in the program stack.
>
> And which *is* caught at the highest levels of thre
I want to write a program which will automatically login to my ISPs
website, retrieve data and do some processing. Can this be done? Can
you point me to any example python programs which do similar things?
Regards,
Ajar
--
http://mail.python.org/mailman/listinfo/python-list
Neil Benn wrote:
> PySerial doesn;t have any kind of event firing to notify you when data
> is available. The way I get round this is to have a loop polling (in a
> seperate thread) to see if any data is available (it's a method on the
> interface), then read all the data in and fire this off t
Bryan wrote:
> Thanks for the clarifications. One more question, can I catch this
> exception in my main thread and then do another sys.exit() to kill the whole
> process?
Not as such. Exceptions can be caught only in the thread in which they
are raised. There are tricky techniques to change
Ajar wrote:
> I want to write a program which will automatically login to my ISPs
> website, retrieve data and do some processing. Can this be done? Can
> you point me to any example python programs which do similar things?
>
> Regards,
> Ajar
Very easily. Have a look at my article on the ``urlli
I use PySerial in a 16 line data collection system
with LOTS of threads, and yes am frustrated by read().
This sounds excellent, keep us updated.
BTW, haven't done any event driven Python except Tkinter.
Would this a class library which would let you
define an event and a handler?
Do you have a
<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> At top of a module I have an integer like so...
>
> foo = 4
>
> In a function in that module I know I need to do 'global foo' to get at
> the value 4.
Actually, you don't need a "global foo" statement to
_access_ the value. You do need
Find a new release of python-ldap:
http://python-ldap.sourceforge.net/
python-ldap provides an object-oriented API to access LDAP directory
servers from Python programs. It mainly wraps the OpenLDAP 2.x libs for
that purpose. Additionally it contains modules for other LDAP-related
stuff (e.g. p
fuzzy's urllib2 info is excellent. The other way peopel snarf stuff
over HTTP and FTP is using 'wget' or 'libcurl'. THere's
http://pycurl.sourceforge.net/
--
http://mail.python.org/mailman/listinfo/python-list
Steven D'Aprano wrote:
> On Fri, 29 Jul 2005 06:37:52 +, Bengt Richter wrote:
>
>
>>I suggested in a previous thread that one could support such a syntax by
>>supporting an invisible binary operator between two expressions, so that
>>examine "string" translates to examine.__invisbinop__("stri
EnderLocke wrote:
> I have a friend who wants to learn python programming. I learned off
> the internet and have never used a book to learn it. What books do you
> recommend?
>
> Any suggestions would be appreciated.
I have just uploaded a podcast specifically about which tutorials and
books might
Adriaan Renting wrote:
> def StripNoPrint(self, S):
> from string import printable
> return "".join([ ch for ch in S if ch in printable ])
>
>
> Adriaan Renting| Email: [EMAIL PROTECTED]
> ASTRON | Phone: +31 521 595 217
> P.O. Box 2 | GSM: +3
[Steve Holden]
>> If I canpoint out the obvious, the output from "import this" *is*
>> headed "The Zen of Python", so clearly it isn;t intended to be
>> universal in its applicability.
[Michael Hudson]
> It's also mistitled there, given that it was originally posted as '19
> Pythonic Theses' and n
According to Jeff Epler <[EMAIL PROTECTED]>:
> I'd consider it a doc bug too. If you feel comfortable doing it, dive
> in and improve the documentation of poplib. Submitting a patch to the
> patch tracker on sf.net/projects/python is probably the best way to do
> this, if you have the necessary
[Dan Sommers]
> Ok, not universal. But as usual, Zen is not easily nailed to a tree.
>
> Was Tim writing about developing Python itself, or about developing
> other programs with Python?
Tim was channeling Guido, and that's as far as our certain knowledge
can go. It _seems_ reasonable to believ
Asad Habib wrote:
> Well, even if you are a hobbyist, that does not excuse you from being
> civil. After all, we are all humans beings that deserve to be treated with
> respect. Professional, hobbyist, vagabond, ogre, instigator, troll ...
> THERE IS NO EXCUSE ... please treat others with respect.
In article <[EMAIL PROTECTED]>,
Dan Sommers <[EMAIL PROTECTED]> wrote:
>
>Was Tim writing about developing Python itself, or about developing
>other programs with Python?
Yes.
(C'mon, didja really expect any other answer?)
--
Aahz ([EMAIL PROTECTED]) <*> http://www.pythoncraft
> although, as some argue, it's
> possible [GvR] thinks in base 9.5, that just doesn't seem Pythonic to me.
+1 QOTW
Peace
Bill Mill
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
I am new to Python. I tried it out and think it is fantastic.
I really loved this from import this statements:
There should be one-- and preferably only one --obvious way to do it.
But this not true of Python.
GUI, Web development, Application Framework - it is shambles. It is so
frustrating fo
Dark Cowherd wrote:
> GUI, Web development, Application Framework - it is shambles.
Yeah, I agree. When I finally make that GUI application I still don't
know whether I am going to use wx or PyGTK.
> Is there some place to discuss topics like this? Is this the right place?
Sure, although you m
Peter Otten wrote:
> Combining your "clever" and your "elegant" approach to something fast
> (though I'm not entirely confident it's correct):
>
> def fillzip(*seqs):
> def done_iter(done=[len(seqs)]):
> done[0] -= 1
> if not done[0]:
> return
> while 1:
>
Dark Cowherd wrote:
> There should be one-- and preferably only one --obvious way to do it.
>
> But this not true of Python.
> GUI, Web development, Application Framework - it is shambles. It is so
That's because there is no *obvious* way to do these.
> -Quote - Phillip J. Eby from dirtsimple.o
Hallöchen!
Michael Hoffman <[EMAIL PROTECTED]> writes:
> Dark Cowherd wrote:
>
>> GUI, Web development, Application Framework - it is shambles.
>
> Yeah, I agree. When I finally make that GUI application I still
> don't know whether I am going to use wx or PyGTK.
I agree, too, although I can onl
I was explaining the difference between irony and sarcasm to my
daughter just the other day. It was nice of Asad to provide us with
such a besutiful example. Not that I'm sure that was his intent...
Jeff
--
http://mail.python.org/mailman/listinfo/python-list
Sion Arrowsmith
> That way lies Java
well, no, a dynamic language such as Python with the possibility of
adding methods on the fly and metaclasses could live pretty well
without
multiple inheritance. There would be no real loss
of power and hopefully less monstruosities such
a Zope 2. But maybe th
Torsten Bronger wrote:
> Hallöchen!
>
> Michael Hoffman <[EMAIL PROTECTED]> writes:
>
>
>>Dark Cowherd wrote:
>>
>>
>>>GUI, Web development, Application Framework - it is shambles.
>>
>>Yeah, I agree. When I finally make that GUI application I still
>>don't know whether I am going to use wx or P
The choice is GUI toolkits is largely seperate from Python. Consider
that they are just bindings to libraries that are developed completely
seperate of the language. GUI is should be seperate from the language,
and thus not bound to same expectations and desires as elements of the
language itself.
On 7/29/05, Dark Cowherd <[EMAIL PROTECTED]> wrote:
> I am new to Python. I tried it out and think it is fantastic.
Congrats and have fun learning all there is to learn.
> I really loved this from import this statements:
>
> There should be one-- and preferably only one --obvious way to do it.
>
Peter Otten wrote:
> def fillzip(*seqs):
> def done_iter(done=[len(seqs)]):
> done[0] -= 1
> if not done[0]:
> return
> while 1:
> yield None
> seqs = [chain(seq, done_iter()) for seq in seqs]
> return izip(*seqs)
Can I play too? How abou
On Fri, 2005-07-29 at 17:59 +0200, Torsten Bronger wrote:
> Hallöchen!
>
> Michael Hoffman <[EMAIL PROTECTED]> writes:
>
> > Dark Cowherd wrote:
> >
> >> GUI, Web development, Application Framework - it is shambles.
> >
> > Yeah, I agree. When I finally make that GUI application I still
> > don't
Andrew Dalke wrote:
> Peter Otten wrote:
>> Combining your "clever" and your "elegant" approach to something fast
>> (though I'm not entirely confident it's correct):
>>
>> def fillzip(*seqs):
>> def done_iter(done=[len(seqs)]):
>> done[0] -= 1
>> if not done[0]:
>>
Michael Hoffman wrote:
> He spends so much space on "Create Consistent Command-Line Interfaces,"
> a section that, in Python, could be replaced with a simple "Use optparse."
In Perl there's also the equivalent of optparse, but where does it guarantee
that you'll use consistent name options and de
Jeremy Moles wrote:
> Four?
>
> 1. wx
> 2. PyGTK
> 3. Tk (Are you including this one even?)
> 4. ???
PyQt / PyKDE.
> Of the few I can think of, only one would qualify as great. :)
The fourth one? ;-)
--
Jorge Godoy <[EMAIL PROTECTED]>
--
http://mail.python.org/mailman/listinfo/python-
On 29 Jul 2005 07:45:33 -0700,
[EMAIL PROTECTED] (Aahz) wrote:
> In article <[EMAIL PROTECTED]>,
> Dan Sommers <[EMAIL PROTECTED]> wrote:
>>
>> Was Tim writing about developing Python itself, or about developing
>> other programs with Python?
> Yes.
> (C'mon, didja really expect any other answ
On Fri, 2005-07-29 at 14:19 -0300, Jorge Godoy wrote:
> Jeremy Moles wrote:
>
> > Four?
> >
> > 1. wx
> > 2. PyGTK
> > 3. Tk (Are you including this one even?)
> > 4. ???
>
> PyQt / PyKDE.
Ah! Can't believe I forgot that one! :)
> > Of the few I can think of, only one would qualify as great. :
On Fri, Jul 29, 2005 at 01:18:10PM -0400, Jeremy Moles wrote:
> On Fri, 2005-07-29 at 17:59 +0200, Torsten Bronger wrote:
> > one thinks "well, perfect, I have the choice between four
>
> Four?
>
> 1. wx
> 2. PyGTK
> 3. Tk (Are you including this one even?)
> 4. ???
Well, QT at least. And sure
Jorge Godoy wrote:
> Michael Hoffman wrote:
>
>
>>He spends so much space on "Create Consistent Command-Line Interfaces,"
>>a section that, in Python, could be replaced with a simple "Use optparse."
>
>
> In Perl there's also the equivalent of optparse, but where does it guarantee
> that you'll
thats pretty cool, could someone post a example program of a python
web-based program?
--
http://mail.python.org/mailman/listinfo/python-list
thats pretty cool, could someone post a example program of a python
web-based program?
--
http://mail.python.org/mailman/listinfo/python-list
Well, im not no expert on the python programming language but i just
wanted to know if there was a quick way to hide certain things when
programming in python. Such as, i wanted some music or sound effects
with my python program. So, i type...
print "Music is by blah blah"
music-file = open(file c
Me:
>> Could make it one line shorter with
>
>> from itertools import chain, izip, repeat
>> def fillzip(*seqs):
>> def done_iter(done=[len(seqs)]):
>> done[0] -= 1
>> if not done[0]:
>> return []
>> return repeat(None)
>> seqs = [chain(seq, done_iter()
Scott David Daniels wrote:
> Can I play too? How about:
Sweet!
Andrew
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
QOTW: "Guido has marked the trail; don't ignore the signs unless you really
know where you're going." - Raymond Hettinger
'Proverbs 28:14 JPS "Happy is the man that feareth alway; but he that
hardeneth his heart shall fall into evil." Obviously an exhortation to not
ignore raised exceptions with "
Andrew Dalke wrote:
> Me:
>>> Could make it one line shorter with
>>
>>> from itertools import chain, izip, repeat
>>> def fillzip(*seqs):
>>> def done_iter(done=[len(seqs)]):
>>> done[0] -= 1
>>> if not done[0]:
>>> return []
>>> return repeat(None)
>>>
Scott David Daniels wrote:
> Can I play too?
Not unless you buy the expensive but good-looking c.l.py gaming license
which is only available trough me :)
> How about:
> import itertools
>
> def fillzip(*seqs):
> def Nones(countactive=[len(seqs)]):
> countactive
Hi,
I found out about your Python community and thought you may be able to help me out.
I am supporting an elite group of traders (more like the Who's Who on Wall Street). We are building algorithmic trading models to analyze market movements, economic indicators, and various factors to pre
Well, using the open function in Python doesn't launch any application
associated with the file (such as Media Player). It just makes the
contents of the file accessible to your Python code. Also, I think
using file("C:\file.txt") is now preferred to open("C:\file.txt").
To answer the specific que
I can say with some certainty that opening a "music file" with open
won't launch media player. If rather, you do os.system('musicfile.mp3')
it will launch whatever application is associated with the file type
.mp3. You can either automate Windows Media player or use pymedia
to play such files.
H
Firstly, there's probably a better way to do whatever you're trying to
do w.r.t cd/dvd burning. I'm not familiar with gear, but its webpage
lists "Batch file scripting capability" as a feature, which suggests
that you might be able to do what you want without parsing output
intended for humans. T
Hello,
I am using Asyncore.dispatcher around a socket (well call the wrapped
version a channel). This channel is passed around to other objects.
These objects call "send" on the channel.
My question is, what do you do for "writable" and "handle_write"?
Those seemed designed for channel-internal b
Michael Hoffman wrote:
> True, but a lot of his point *is* parsing input from the command line.
> Consider the following points paraphrased from his article:
>
> * Don't mix multiple ways of specifying options. (Solved by optparse)
> * If a flag expects an associated value, allow an optional = be
Steve Holden wrote:
> >>> tt = "".join([chr(i) for i in range(256)])
Or:
tt = string.maketrans('', '')
STeVe
--
http://mail.python.org/mailman/listinfo/python-list
Jason Drew wrote:
> Also, I think using file("C:\file.txt") is now preferred
> to open("C:\file.txt").
Guido has said he wants to keep open() around as the way to open a
file-like object, with the theory that in the future open might also
support opening non-files (e.g. urls). So open("C:\file.
Steven Bethard wrote:
> So open("C:\file.txt") is still fine
I think it is more like it is recommended, not just OK.
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
Michael Hoffman wrote:
> I use path in more of my modules and scripts than any other third-party
> module, and I know it will be very helpful when I no longer have to
> worry about deploying it.
Same here. An object-oriented path module is extremely useful, and
makes one's code much less cluttere
Peter Hansen <[EMAIL PROTECTED]> writes:
> I'm not sure what "completion" means in this case, and I'm not aware
> of any "command-line completion" support in cmd.Cmd though it may well
> be there, so I can't say. Certainly there is nothing in any way
> different about the new attribute created by
Peter Tillotson wrote:
> Hi,
>
> I'm looking for an advanced concurrency module for python and don't seem
> to be able to find anything suitable. Does anyone know where I might
> find one? I know that there is CSP like functionality built into
> Stackless but i'd like students to be able to use a
Dan Sommers wrote:
> [EMAIL PROTECTED] (Aahz) wrote:
>>Dan Sommers <[EMAIL PROTECTED]> wrote:
>>>Was Tim writing about developing Python itself, or about developing
>>>other programs with Python?
>
>>Yes.
>
> It was a rhetorical question. :-)
That's all right... Aahz gave a rhetorical answer.
Jason Drew wrote:
> Also, I think
> using file("C:\file.txt") is now preferred to open("C:\file.txt").
As others have noted, "open" is preferred as the method for opening
files, while "file" is the _type_ involved, for testing or subclassing
or what-have-you.
But neither file("C:\file.txt") nor
Sarir Khamsi wrote:
> Peter Hansen <[EMAIL PROTECTED]> writes:
>>I'm not sure what "completion" means in this case, and I'm not aware
>>of any "command-line completion" support in cmd.Cmd though it may well
>>be there, so I can't say. Certainly there is nothing in any way
>>different about the new
"Fuzzyman" <[EMAIL PROTECTED]> writes:
> Ajar wrote:
>> I want to write a program which will automatically login to my ISPs
>> website, retrieve data and do some processing. Can this be done? Can
>> you point me to any example python programs which do similar things?
>>
>> Regards,
>> Ajar
>
> Ver
Peter Otten wrote:
> Seems my description didn't convince you. So here's an example:
Got it. In my test case the longest element happened to be the last
one, which is why it didn't catch the problem.
Thanks.
Andrew
[EMAIL PROTECTED
"Michele Simionato" <[EMAIL PROTECTED]> writes:
> adding methods on the fly and metaclasses could live pretty well
> without
> multiple inheritance. There would be no real loss
> of power and hopefully less monstruosities such
> a Zope 2. But maybe this is just wishful thinking ...
Um, no real lo
phil wrote:
> I use PySerial in a 16 line data collection system
> with LOTS of threads, and yes am frustrated by read().
> This sounds excellent, keep us updated.
>
> BTW, haven't done any event driven Python except Tkinter.
> Would this a class library which would let you
> define an event and
I know, lambda bashing (and defending) in the group is one of the most
popular ways to avoid writing code. However, while staring at some Oz
code, I noticed a feature that would seem to make both groups happy -
if we can figure out how to avoid the ugly syntax.
This proposal does away with the wel
When handling resources in Python, where the scope of the resource is
known, there seem to be two schools of thought:
(1) Explicit:
f = open(fname)
try:
# ...
finally:
f.close()
(2) Implicit: let the GC handle it.
I've come up with a third method that uses decorators to achieve a
useful
Certain pages cause urllib2 to go into an infinite loop when using
readline(), but everything works fine if read() is used instead. Is
this a bug or am I missing something simple?
import urllib2
url = 'http://www.naylamp.com'
f = urllib2.urlopen(url)
i = 0
#this works fine when uncommented
#pr
On Thu, 28 Jul 2005 15:23:46 -0500, Rocco Moretti wrote:
> Professionals (and even decent hobbyists) don't
> escalate flame wars, even unintentionally.
You don't get out much, do you? *wink*
If your comment is meant to be _prescriptive_ rather than _descriptive_, I
don't entirely agree.
Flame
On Thu, 28 Jul 2005 17:24:06 -0400, Asad Habib wrote:
> Well, even if you are a hobbyist, that does not excuse you from being
> civil. After all, we are all humans beings that deserve to be treated with
> respect. Professional, hobbyist, vagabond, ogre, instigator, troll ...
> THERE IS NO EXCUSE .
"I'm looking for a library that can search through an XML document
tree,
locate an element by attribute (ideally this can be done through
XPath), and insert an element (as its child).
Simple? Yes? ...but the code I've seen so far which does this uses
'nested for loops' for trees which are relative
"I am looking for an xml-object mapping tool ('XML Data Binding-design
time product') where I can define the mapping rules in 'binding files'
and the parser is generated automatically.
Similar to the solution of Dave Kuhlman
(http://www.rexx.com/~dkuhlman/ generateDS.html) where the mapping is
def
John Perks:
> When handling resources in Python, where the scope of the resource is
> known, there seem to be two schools of thought:
> ...
This is part of what PEP 343 addresses:
http://www.python.org/peps/pep-0343.html
Neil
--
http://mail.python.org/mailman/listinfo/python-list
[Re: alternatives to overloading '/']
Is there a reason the Path constructor is limited to a single argument?
If it allowed multiple arguments, the following would seem very
straightforward:
p = Path(somePath, user.getFolder(), 'archive', oldPath + ".bak")
I'm usually not much of a purist, but C
"John Perks and Sarah Mount" <[EMAIL PROTECTED]> writes:
> When handling resources in Python, where the scope of the resource is
> known, there seem to be two schools of thought:
>
> (1) Explicit:
> f = open(fname)
> try:
> # ...
> finally:
> f.close()
>
> (2) Implicit: let the GC handle i
Mike Meyer <[EMAIL PROTECTED]> writes:
> > When handling resources in Python, where the scope of the resource is
> > known, there seem to be two schools of thought:
> > (1) Explicit: ...
> > (2) Implicit: let the GC handle it.
>
> The only cases I see the first school of thought is when the resour
1 - 100 of 124 matches
Mail list logo