On Sat, Jul 25, 2009 at 4:50 AM, Dr. Phillip M.
Feldman wrote:
>
> Here's a simple-minded example:
>
> def dumbfunc(xs):
> for x in xs:
> print x
>
> This function works fine if xs is a list of floats, but not if it is single
> float. It can be made to work as follows:
>
> def dumbfunc(xs):
En Fri, 24 Jul 2009 14:56:29 -0300, Ronn Ross
escribió:
On Tue, Jul 21, 2009 at 7:32 PM, Gabriel Genellina
wrote:
En Tue, 21 Jul 2009 21:08:57 -0300, Ronn Ross
escribió:
Hello I'm trying to read an xml file using minidome. The xml looks
like:
myProj
/here/
I have used
On Sat, 25 Jul 2009 07:47:14 +0200, Andre Engels wrote:
> On Sat, Jul 25, 2009 at 3:27 AM, Roy Smith wrote:
>
>> Keep in mind that while a float may have a large apparent precision,
>> there's no promise that the actual value returned by the OS has that
>> much precision. You should be fine if a
On Sat, Jul 25, 2009 at 3:27 AM, Roy Smith wrote:
> Keep in mind that while a float may have a large apparent precision,
> there's no promise that the actual value returned by the OS has that much
> precision. You should be fine if all you're looking for is ms, but I
> wouldn't count on much more
On Jul 24, 6:57 am, Grant Edwards wrote:
> On 2009-07-24, Dr. Phillip M. Feldman wrote:
>
>
>
> > Some aspects of the Python design are remarkably clever, while
> > others leave me perplexed. Here's an example of the latter:
> > Why does len() give an error when applied to an int or float?
> > le
On Jul 24, 11:06 am, Raffael Cavallaro
wrote:
> On 2009-07-23 23:51:02 -0400, Carl Banks said:
>
> > On Jul 23, 5:52 pm, Rui Maciel wrote:
> >> fft1976 wrote:
> >>> How do you explain that something as inferior as Python beat Lisp in
> >>> the market place despite starting 40 years later.
>
> >>
On Fri, Jul 24, 2009 at 7:50 PM, Dr. Phillip M.
Feldman wrote:
>
> Here's a simple-minded example:
>
> def dumbfunc(xs):
> for x in xs:
> print x
>
> This function works fine if xs is a list of floats, but not if it is single
> float. It can be made to work as follows:
>
> def dumbfunc(xs):
Here's a simple-minded example:
def dumbfunc(xs):
for x in xs:
print x
This function works fine if xs is a list of floats, but not if it is single
float. It can be made to work as follows:
def dumbfunc(xs):
if isinstance(xs,(int,float,complex)): xs= [xs]
for x in xs:
print
Scott David Daniels wrote:
> ru...@yahoo.com wrote:
>> Nick Dumas wrote:
>>> On 7/23/2009 9:23 AM, Mark Lawrence wrote:
scriptlear...@gmail.com wrote:
> For example, I have a string "#a=valuea;b=valueb;c=valuec;", and I
> will like to take out the values (valuea, valueb, and valuec).
"As far as I know, there is no programming language which treats scalars like
ints as if they were
vectors of length 1"
Actually, Matlab does:
>> length(5)
ans =
1
>>
--
View this message in context:
http://www.nabble.com/len%28%29-should-always-return-something-tp24639361p24654358.html
isinstance(x, (int, float, complex))
is certainly very compact, and does what I want. Thanks!
--
View this message in context:
http://www.nabble.com/len%28%29-should-always-return-something-tp24639361p24654347.html
Sent from the Python - python-list mailing list archive at Nabble.com.
--
htt
superpollo writes:
> >>> number = 252509952
> >>> hex(number)
> '0xf0cff00'
> >>>
>
> so i would like a string like '\xf0\xcf\xf0\x00'
def encode(number):
h = '%x' % number
if len(h) % 2 == 1:
h = '0' + h
return h.decode('hex')
--
http://mail.python.org/mailman/listinfo/p
In article
<9c600f0c-f4a0-4e8c-bbb9-27f128aec...@m7g2000prd.googlegroups.com>,
"scriptlear...@gmail.com" wrote:
> I am trying to measure some system response time by using the time.time
> () or time.clock() in my script. However, the numbers I get are in
> 10s of milliseconds.
> [...]
> The tr
According to http://www.python.org/doc/essays/packages.html:
"The import statement first tests whether the item is defined in the
package; if not, it assumes it is a module and attempts to load it."
However, I've noticed that once a module is imported using the
`from pkg import mod' syntax, if it
In article ,
ulf wrote:
>
>Does anybody know if python includes a win64 version of ctypes?
>
>According to the documentation it should be included - at least
>there's no special remarks for win64, and I haven't found any recent
>notes saying that it shouldn't work on win64. Yet it looks like both
I am trying to measure some system response time by using the time.time
() or time.clock() in my script. However, the numbers I get are in
10s of milliseconds.
For example,
1248481670.34 #from time.time()
0.08 #from time.clock()
That won't work for me, since the response time
On Jul 24, 3:28 pm, superpollo wrote:
> is there a pythonic and synthetic way (maybe some standard module) to
> "pack" an integer (maybe a *VERY* big one) into a string? like this:
>
> >>> number = 252509952
> >>> hex(number)
> '0xf0cff00'
> >>>
>
> so i would like a string like '\xf0\xcf\
gert schrieb:
On Jul 24, 7:32 pm, "Diez B. Roggisch" wrote:
gert schrieb:
this is a non standard way to store multi part post data on disk
def application(environ, response):
with open('/usr/httpd/var/wsgiTemp','w') as f:
while True:
chunk = environ['wsgi.input'].read(
On Jul 24, 7:16 pm, superpollo wrote:
> thanks a lot, but [struct] does not work for large integers:
Since the struct module is designed specifically for C-style structs,
it's definitely not going to handle arbitrary-length integers on its
own. You could chop up your Python (long) integer into C
Hi,
I have a problem with Freetype2 in the Python Image Library. I
compiled it as 64bit and I got a file named freetype239.lib. So I
added this file to a folder called lib. I added the parent folder of
the lib folder to the setup.py settings (like all the others: libjpeg,
zlib). LIbjpeg and Zlib w
Hi,
I have a problem with Freetype2 in the Python Image Library. I
compiled it as 64bit and I got a file named freetype239.lib. So I
added this file to a folder called lib. I added the parent folder of
the lib folder to the setup.py settings (like all the others: libjpeg,
zlib). LIbjpeg and Zlib w
Christian Heimes wrote:
scriptlear...@gmail.com wrote:
My parent thread keeps a counter for the number of free child workers
(say 100) and initializes some child threads and call child.start().
Once the number of free child workers reach 0, the parent thread will
wait until some at least one chi
scriptlear...@gmail.com wrote:
> My parent thread keeps a counter for the number of free child workers
> (say 100) and initializes some child threads and call child.start().
> Once the number of free child workers reach 0, the parent thread will
> wait until some at least one child thread finishes
scriptlear...@gmail.com wrote:
My parent thread keeps a counter for the number of free child workers
(say 100) and initializes some child threads and call child.start().
Once the number of free child workers reach 0, the parent thread will
wait until some at least one child thread finishes and th
On 2009-07-24 18:26, greg wrote:
Robert Kern wrote:
a[:0] = array('i', [0])
Not when 'a' is a numpy array rather than an array.array.
That's true, but I got the impression that the OP was
talking about array.array, not numpy.array.
Did you read the Subject: line? :-)
--
Robert Kern
"I h
Robert Kern wrote:
a[:0] = array('i', [0])
Not when 'a' is a numpy array rather than an array.array.
That's true, but I got the impression that the OP was
talking about array.array, not numpy.array.
It's very confusing having two widely-used types
both called 'array'. :-(
--
Greg
--
http:/
My parent thread keeps a counter for the number of free child workers
(say 100) and initializes some child threads and call child.start().
Once the number of free child workers reach 0, the parent thread will
wait until some at least one child thread finishes and then it will
initialize another chi
Piet van Oostrum wrote:
...
You have the string wrong.
oops yea.
But the correct one you get with:
In [67]: import struct
In [68]: number = 252509952
In [69]: struct.pack('>I', number)
Out[69]: '\x0f\x0c\xff\x00'
(Please note that this is big endian)
thanks a lot, but it does not work f
"Dr. Phillip M. Feldman" wrote in message
news:mailman.3644.1248417347.8015.python-l...@python.org...
Some aspects of the Python design are remarkably clever, while others
leave
me perplexed. Here's an example of the latter: Why does len() give an
error
when applied to an int or float? len()
superpollo wrote:
Sebastian Bassi wrote:
On Fri, Jul 24, 2009 at 7:28 PM, superpollo wrote:
is there a pythonic and synthetic way (maybe some standard module) to
"pack"
an integer (maybe a *VERY* big one) into a string? like this:
What do you mean to pack? Maybe Pickle is what you want.
> superpollo (s) wrote:
>s> is there a pythonic and synthetic way (maybe some standard module) to
>s> "pack" an integer (maybe a *VERY* big one) into a string? like this:
> number = 252509952
> hex(number)
>s> '0xf0cff00'
>
>s> so i would like a string like '\xf0\xcf\xf0\x00'
Sebastian Bassi wrote:
On Fri, Jul 24, 2009 at 7:28 PM, superpollo wrote:
is there a pythonic and synthetic way (maybe some standard module) to "pack"
an integer (maybe a *VERY* big one) into a string? like this:
What do you mean to pack? Maybe Pickle is what you want.
import cPickle
variab
On 7/24/2009 2:11 PM Bryan said...
The script runs fine in my bash shell, what could cron be doing to
interfere?
It's likely environmental -- make sure you're starting with the same
path, etc. Sometimes I'll create a sell script by env'ing to a bash
script file and append the actual command
On Fri, Jul 24, 2009 at 7:28 PM, superpollo wrote:
> is there a pythonic and synthetic way (maybe some standard module) to "pack"
> an integer (maybe a *VERY* big one) into a string? like this:
What do you mean to pack? Maybe Pickle is what you want.
import cPickle
variable = 124348654333577698
c
> I just downloaded and attempted to install python 2.6.2. The
> installer proceeds to do its work then dies, leaving an entry in the
> eventlog:
>
> Windows Installer installed the product. Product Name: Python 2.6.2.
> Product Version: 2.6.2150. Product Language: 1033. Installation
> success or
is there a pythonic and synthetic way (maybe some standard module) to
"pack" an integer (maybe a *VERY* big one) into a string? like this:
>>> number = 252509952
>>> hex(number)
'0xf0cff00'
>>>
so i would like a string like '\xf0\xcf\xf0\x00'
i wrote some code to do it, so ugly i am ashame
On Jul 24, 2:06 pm, Raffael Cavallaro
wrote:
> On 2009-07-23 23:51:02 -0400, Carl Banks said:
>
> > On Jul 23, 5:52 pm, Rui Maciel wrote:
> >> fft1976 wrote:
> >>> How do you explain that something as inferior as Python beat Lisp in
> >>> the market place despite starting 40 years later.
>
> >>
Roy Smith wrote:
> In article ,
> Terry Reedy wrote:
>
>> Better:if isinstance(x, (int, float, complex)):
>
> I never noticed this before, but it seems odd that the second argument
> to isinstance() should be a tuple. Using the normal arguments made
> about tuples vs. lists, it seems lik
I have a backup script that runs fine when I run it manually from the
command line. When I run it with cron, the script stops running at
random points in the source code.
The script calls rsync with the subprocess module, which in turn uses
ssh to backup files from a box on my lan. It also uses
Steven D'Aprano wrote:
On Fri, 24 Jul 2009 15:55:45 +0200, Hrvoje Niksic wrote:
The term "variable" is used in the Python
language reference and elsewhere, and is quite compatible with how other
popular languages (Java, PHP, Lisp, ...) use it. Please stop
complaining about valid terminology; i
Greetings.
Since I have been using dia to make my UML diagrams. I also found an
util named dia2code that generates python code from dia diagram. Now
that I have that option I really want to find a way to generate dia
diagram from existing code and/or maintain my diagrams.
I have been googling li
Chris Rebert wrote:
I think the point made by Grant Edwards is instructive. len(x) = 1
typically implies list(x)[0] and similar should be valid.
At least, one should be able to iterate with x and get len(x) items.
See below.
And there's nothing ambiguous about len(42).
Really? What is its
Steven D'Aprano wrote:
On Fri, 24 Jul 2009 15:03:29 -0400, Roy Smith wrote:
In article ,
Terry Reedy wrote:
Better:if isinstance(x, (int, float, complex)):
I never noticed this before, but it seems odd that the second argument
to isinstance() should be a tuple. Using the normal argume
On 7/24/09 1:04 AM, William Dode wrote:
On 23-07-2009, Christian Tismer wrote:
...
Wasn't the project plan saying the opposite, borrowing
some ideas from psyco? :-)
http://code.google.com/p/unladen-swallow/wiki/ProjectPlan
How do you see the future of psyco when unladen-swallow will grab the
On Fri, Jul 24, 2009 at 1:30 PM, Tim Chase wrote:
> Marcus Wanner wrote:
>>
>> First one to correctly decompress the value 0 into an ASCII
>> character wins the title of the world's most capable hacker :p
>
> Bah...uncompressing the value 0 into *an* ASCII character is easy.
> Uncompressing it int
Marcus Wanner wrote:
First one to correctly decompress the value 0 into an ASCII
character wins the title of the world's most capable hacker :p
Bah...uncompressing the value 0 into *an* ASCII character is
easy. Uncompressing it into the *original* ASCII character from
which it was compressed
On 7/24/2009 4:18 PM, Mark Lawrence wrote:
Marcus Wanner wrote:
On 7/24/2009 3:04 PM, Roy Smith wrote:
In article <0279f596$0$5185$c3e8...@news.astraweb.com>,
Steven D'Aprano wrote:
On Fri, 24 Jul 2009 16:50:03 +0200, superpollo wrote:
Nah. 7 contains three bits, so len(7) should *clearl
Marcus Wanner wrote:
On 7/24/2009 3:04 PM, Roy Smith wrote:
In article <0279f596$0$5185$c3e8...@news.astraweb.com>,
Steven D'Aprano wrote:
On Fri, 24 Jul 2009 16:50:03 +0200, superpollo wrote:
Nah. 7 contains three bits, so len(7) should *clearly* return 3.
and len("7") must return 8, by
On 7/24/2009 3:04 PM, Roy Smith wrote:
In article <0279f596$0$5185$c3e8...@news.astraweb.com>,
Steven D'Aprano wrote:
On Fri, 24 Jul 2009 16:50:03 +0200, superpollo wrote:
Nah. 7 contains three bits, so len(7) should *clearly* return 3.
and len("7") must return 8, by the same token... but
On Fri, Jul 24, 2009 at 12:05 PM, Steven
D'Aprano wrote:
> On Fri, 24 Jul 2009 00:02:28 -0700, Chris Rebert wrote:
>
>> On Thu, Jul 23, 2009 at 11:35 PM, Dr. Phillip M.
>> Feldman wrote:
>>>
>>> Some aspects of the Python design are remarkably clever, while others
>>> leave me perplexed. Here's an
On Fri, 2009-07-24 at 16:43 -0300, Fabio Zadrozny wrote:
> On Fri, Jul 24, 2009 at 4:17 PM, Linuxguy123 wrote:
> > Does anyone know why this error is occurring in my Eclipse Pydev
> > update ?
> >
> > An error occurred while collecting items to be installed
> > No repository found containing:
> >
jakecjacobson wrote:
I am trying to do a post to a REST API over HTTPS and requires the
script to pass a cert to the server. I am getting
"exceptions.TypeError an integer is required" error and can't find the
reason. I commenting out the lines of code, it is happening on the
connection.request(
On Jul 24, 4:17 pm, Piet van Oostrum wrote:
> > André (A) a écrit:
> >A> I have a function to replace the content of an ElementTree Element by
> >A> that of another one which works using Python 2 but not with Python 3.
> >A> I get an assertion error.
[SNIP]
> >A> Traceback (most recent call
André wrote:
I have a function to replace the content of an ElementTree Element by
that of another one which works using Python 2 but not with Python 3.
I get an assertion error. The function is as follows:
def replace_element(elem, replacement):
'''replace the content of an ElementTree Ele
On Fri, Jul 24, 2009 at 4:17 PM, Linuxguy123 wrote:
> Does anyone know why this error is occurring in my Eclipse Pydev
> update ?
>
> An error occurred while collecting items to be installed
> No repository found containing:
> org.python.pydev/osgi.bundle/1.4.7.2843
> No repository found containi
> André (A) a écrit:
>A> I have a function to replace the content of an ElementTree Element by
>A> that of another one which works using Python 2 but not with Python 3.
>A> I get an assertion error. The function is as follows:
>A> def replace_element(elem, replacement):
>A> '''replace t
On Fri, 24 Jul 2009 15:03:29 -0400, Roy Smith wrote:
> In article ,
> Terry Reedy wrote:
>
>> Better:if isinstance(x, (int, float, complex)):
>
> I never noticed this before, but it seems odd that the second argument
> to isinstance() should be a tuple. Using the normal arguments made
> a
marekw2143 wrote:
Hi,
I have one class (A) that has defined method createVars. I would like
to add that method to class B
The code looks like this:
class A(object):
def createVars(self):
self.v1 = 1
self.v2 = 3
pass
class B(object):
pass
I don't want to use inheritan
Does anyone know why this error is occurring in my Eclipse Pydev
update ?
An error occurred while collecting items to be installed
No repository found containing:
org.python.pydev/osgi.bundle/1.4.7.2843
No repository found containing:
org.python.pydev.ast/osgi.bundle/1.4.7.2843
No repository
On Fri, 24 Jul 2009 11:24:58 -0700, jakecjacobson wrote:
> I am trying to do a post to a REST API over HTTPS and requires the
> script to pass a cert to the server. I am getting "exceptions.TypeError
> an integer is required" error and can't find the reason. I commenting
> out the lines of code,
Sorry for replying to myself ... the following seems to be a working
solution to my original problem.
On Jul 24, 2:54 pm, André wrote:
> I have a function to replace the content of an ElementTree Element by
> that of another one which works using Python 2 but not with Python 3.
> I get an asserti
On Fri, 24 Jul 2009 00:02:28 -0700, Chris Rebert wrote:
> On Thu, Jul 23, 2009 at 11:35 PM, Dr. Phillip M.
> Feldman wrote:
>>
>> Some aspects of the Python design are remarkably clever, while others
>> leave me perplexed. Here's an example of the latter: Why does len()
>> give an error when appli
In article <0279f596$0$5185$c3e8...@news.astraweb.com>,
Steven D'Aprano wrote:
> On Fri, 24 Jul 2009 16:50:03 +0200, superpollo wrote:
>
> >> Nah. 7 contains three bits, so len(7) should *clearly* return 3.
> >
> > and len("7") must return 8, by the same token... but wait!
> >
> > >>> len("
In article ,
Terry Reedy wrote:
> Better:if isinstance(x, (int, float, complex)):
I never noticed this before, but it seems odd that the second argument to
isinstance() should be a tuple. Using the normal arguments made about
tuples vs. lists, it seems like a list would be the right data
On Fri, 24 Jul 2009 15:55:45 +0200, Hrvoje Niksic wrote:
> The term "variable" is used in the Python
> language reference and elsewhere, and is quite compatible with how other
> popular languages (Java, PHP, Lisp, ...) use it. Please stop
> complaining about valid terminology; it is not helpful.
On 2009-07-24 05:21, Luis Pedro Almeida wrote:
Dear all,
I would like to know how to convert a list of points into a polygon
shapefile (esri).
shapelib has Python bindings.
http://shapelib.maptools.org/
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless e
On Fri, 24 Jul 2009 16:50:03 +0200, superpollo wrote:
>> Nah. 7 contains three bits, so len(7) should *clearly* return 3.
>
> and len("7") must return 8, by the same token... but wait!
>
> >>> len("7")
> 1
> >>>
> >>>
> my python installation must me outdated ;-)
No no no, you're obviously
On Fri, Jul 24, 2009 at 2:51 PM, kk wrote:
> Hello
>
> I am writing some Python code that runs in another application(has
> wrapper functions). Due to lack of debugging I am printing out alot of
> outputs and manual messages. I want to be able to create a function
> that would let me print the curr
Hello
I am writing some Python code that runs in another application(has
wrapper functions). Due to lack of debugging I am printing out alot of
outputs and manual messages. I want to be able to create a function
that would let me print the current line number that is called from.
This is not for d
Phillip M. Feldman wrote:
I've been converting Matlab codes to Python. In Matlab, a scalar is
just a one-by-one matrix and has a length of 1. This convention seems
no less arbitrary to me than Python's convention that the concept of
length is not applicable to ints and floats.
Multiplicati
> Scott David Daniels (SDD) wrote:
>SDD> Stephen Cuppett (should have written in this order):
>>> "Fred Atkinson" wrote ...
Is there a pre-defined variable that returns the GET line
(http://www.php.net/index.php?everythingafterthequestionmark) as a
single variable (rathe
I am trying to do a post to a REST API over HTTPS and requires the
script to pass a cert to the server. I am getting
"exceptions.TypeError an integer is required" error and can't find the
reason. I commenting out the lines of code, it is happening on the
connection.request() line. Here is the pr
On Jul 24, 7:32 pm, "Diez B. Roggisch" wrote:
> gert schrieb:
>
> > this is a non standard way to store multi part post data on disk
>
> > def application(environ, response):
> > with open('/usr/httpd/var/wsgiTemp','w') as f:
> > while True:
> > chunk = environ['wsgi.input'
On 2009-07-23 23:51:02 -0400, Carl Banks said:
On Jul 23, 5:52 pm, Rui Maciel wrote:
fft1976 wrote:
How do you explain that something as inferior as Python beat Lisp in
the market place despite starting 40 years later.
Probably due to similar reasons that lead php to become remotely releva
On Fri, 24 Jul 2009 16:03:58 +0100, Piet van Oostrum wrote:
"Rhodri James" (RJ) wrote:
RJ> On Fri, 24 Jul 2009 14:55:45 +0100, Hrvoje Niksic
wrote:
Ben Finney writes:
Utpal Sarkar writes:
Is there a way I can tell a variable that the object it is pointing
too is not owned by it, i
> Jul 24, 2009 07:02:29 AM, c...@rebertia.com wrote:
>
> On Thu, Jul 23, 2009 at 11:35 PM, Dr. Phillip M.
> Feldman wrote:
>>
>> Some aspects of the Python design are remarkably clever, while others
>> leave
>> me perplexed. Here's an example of the latter: Why does len() give an
>> error
>> when a
I have a function to replace the content of an ElementTree Element by
that of another one which works using Python 2 but not with Python 3.
I get an assertion error. The function is as follows:
def replace_element(elem, replacement):
'''replace the content of an ElementTree Element by that of
On Tue, Jul 21, 2009 at 7:32 PM, Gabriel Genellina
wrote:
> En Tue, 21 Jul 2009 21:08:57 -0300, Ronn Ross
> escribió:
>
>
> Hello I'm trying to read an xml file using minidome. The xml looks like:
>>
>>
>> myProj
>> /here/
>>
>>
>>
>> My code looks like so:
>> from xml.dom.mini
On Fri, 24 Jul 2009 16:10:07 +0100, Piet van Oostrum wrote:
"Rhodri James" (RJ) wrote:
RJ> On Fri, 24 Jul 2009 14:57:02 +0100, Grant Edwards
wrote:
On 2009-07-24, Dr. Phillip M. Feldman wrote:
Some aspects of the Python design are remarkably clever, while
others leave me perplexed. He
On Fri, Jul 24, 2009 at 5:34 AM, Sanne Korzec wrote:
> Hi Mailing,
>
> I am using a c program, which first initializes for some seconds and then
> waits for user input (keyboard) to type something. When enter is pressed the
> c program continues.
> Using the keyboard and then enter in the c progra
gert schrieb:
this is a non standard way to store multi part post data on disk
def application(environ, response):
with open('/usr/httpd/var/wsgiTemp','w') as f:
while True:
chunk = environ['wsgi.input'].read(8192).decode('latin1')
if not chunk: break
mathieu schrieb:
As far as I know there has not been any consensus on how to install
multiple version of a same module in python ? What are the recommended
mechanism ?
I use virtualenvs for everything. Especially on unixish OSes this
usually works without problems. On windows, things are a bi
> --- On Fri, 7/24/09, Diez B. Roggisch wrote:
>
>> From: Diez B. Roggisch
>> Subject: Re: Popen
>> To: python-list@python.org
>> Date: Friday, July 24, 2009, 12:35 PM
>> Tim schrieb:
>> > Thanks! Yes I mean subprocess.Popen.
>> >
>> > I was wondering the meaning of "asynchronously"
>> > Here is
this is a non standard way to store multi part post data on disk
def application(environ, response):
with open('/usr/httpd/var/wsgiTemp','w') as f:
while True:
chunk = environ['wsgi.input'].read(8192).decode('latin1')
if not chunk: break
f.write(chun
On Jul 20, 12:27 pm, Phillip B Oldham
wrote:
> My colleagues and I have been working with python for around 6 months
> now, and while we love a lot of what python has done for us and what
> it enables us to do some of the decisions behind such certain
> data-types and their related methods baffle
On Fri, Jul 24, 2009 at 2:38 AM, Piet van Oostrum wrote:
>> Chris Rebert (CR) wrote:
>
>>CR> On Thu, Jul 23, 2009 at 12:42 PM, Chris Rebert wrote:
You can use tabnanny to help diagnose the problem:
http://74.125.155.132/search?q=cache:QtxvZm3QDLsJ:effbot.org/librarybook/tabnanny.htm+
On 7/21/2009 12:13 PM, Stef Mientki wrote:
hi Marcus,
That sounds like a very specialized type of thing,
Well from an application point of view,
with the current netbooks,
this looks like a perfect tool for any conversation or meeting.
which only the few people with experience with wxPython, Py
I've read the "Zen of Python", but most of these aphorisms are vague and could be understood differently by different readers. In particular, I don't understand the statement that "explicit is better than implicit". Some examples of this would be helpful.I've been converting Matlab codes to Pyth
Thanks! If that is the case, i.e. the parent doesn't wait, is the code in my
last post wrong? "result" could be nothing.
--- On Fri, 7/24/09, Diez B. Roggisch wrote:
> From: Diez B. Roggisch
> Subject: Re: Popen
> To: python-list@python.org
> Date: Friday, July 24, 2009, 12:35 PM
> Tim schrie
As far as I know there has not been any consensus on how to install
multiple version of a same module in python ? What are the recommended
mechanism ?
I could not find any documentation on the subject. Does anyone sees
any issue with using standard SONAME mechanism when installing a
python module
On Jul 24, 6:24 pm, Tim wrote:
> Thanks!
> Yes I mean subprocess.Popen.
>
> I was wondering the meaning of "asynchronously"
> Here is some code I am reading recently:
> "
> result = Popen(cmdline,shell=True,stdout=PIPE).stdout
> for line in result.readlines():
> if find(line,"Cross") != -1:
>
Tim schrieb:
Thanks!
Yes I mean subprocess.Popen.
I was wondering the meaning of "asynchronously"
Here is some code I am reading recently:
"
result = Popen(cmdline,shell=True,stdout=PIPE).stdout
for line in result.readlines():
if find(line,"Cross") != -1:
return float(split(line)[
Thanks!
Yes I mean subprocess.Popen.
I was wondering the meaning of "asynchronously"
Here is some code I am reading recently:
"
result = Popen(cmdline,shell=True,stdout=PIPE).stdout
for line in result.readlines():
if find(line,"Cross") != -1:
return float(split(line)[-1][0:-1])
"
T
Stephen Cuppett (should have written in this order):
"Fred Atkinson" wrote ...
Is there a pre-defined variable that returns the GET line
(http://www.php.net/index.php?everythingafterthequestionmark) as a
single variable (rather than individual variables)?
> os.environment('QUERY_STRING')
Ma
ru...@yahoo.com wrote:
Nick Dumas wrote:
On 7/23/2009 9:23 AM, Mark Lawrence wrote:
scriptlear...@gmail.com wrote:
For example, I have a string "#a=valuea;b=valueb;c=valuec;", and I
will like to take out the values (valuea, valueb, and valuec). How do
I do that in Python? The group method wi
On Jul 18, 7:03 am, Tim Chase wrote:
> Lastly, you can force all standard-output in your program to be
> unbuffered without the "-u" parameter:
And if you're using -u a lot, the PYTHONUNBUFFERED environment
variable can also be set (but not empty), so that python adds the
option automatically.
--
Well actually your subject is `how to get no value'. Your code does that
perfectly. :=)
--
Piet van Oostrum
URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4]
Private email: p...@vanoostrum.org
--
http://mail.python.org/mailman/listinfo/python-list
Christian, Robert, thank you both for the replies, much appreciated.
Manu
--
http://mail.python.org/mailman/listinfo/python-list
> Tim (T) wrote:
>T> Hi,
>T> I wonder if I use Popen, the parent process will wait for the child process
>to finish or continue without waiting?
>T> Thanks and regards!
Only if you use Popen.wait(), Popen.communicate() or something similar
like os.waitpid(), subprocess.call()
--
P
Hrvoje Niksic writes:
> The term "variable" is used in the Python language reference and
> elsewhere
Yes. It should also be abundantly clear from the constant stream of
confused newbies on this point that its usage of that term is different
to what many expect from usage elsewhere.
> and is qui
1 - 100 of 154 matches
Mail list logo