Dr. Phillip M. Feldman schrieb:
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() should always return something; in
particular, when applied to a scalar, i
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 applied to an int or float? len() should always return something; in
>
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? len() should always return
> something; in particular, when applied to a scal
Christian Heimes wrote:
> Nick Craig-Wood wrote:
> > Christian Heimes wrote:
> >> I'm looking for a generator version of os.listdir() for Python 2.5 and
> >> newer. I know somebody has worked on it because I've seen a generator
> >> version in a posting on some list or blog a while ago. I can
On 23-07-2009, Christian Tismer wrote:
> On 7/17/09 4:11 AM, Bearophile wrote:
>> Very good, thank you. I'll try it when I can.
>>
>> Is Psyco3 going to borrow/steal some ideas/code from Unladen Swallow?
>
> Psyco3: nice typo! :-)
>
> Well, I haven't so far found a new idea there that I'd want
> to
On 2009-07-23 13:15:00 -0400, Isaac Gouy said:
I get
the feeling I'm missing the joke?
Yes, you are missing the joke. The point is that if python is 60x
slower than C, even if there were not a GIL, it would require running
the python program on a 60 core machine just reach parity with C. Th
Thanks to all!
Tim
--
http://mail.python.org/mailman/listinfo/python-list
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)?
Regards,
Fred
--
http://mail.python.org/mailman/l
os.environment('QUERY_STRING')
"Fred Atkinson" wrote in message
news:p2qg65d0t4kki1sh0t3v6ileamhkvl9...@4ax.com...
> 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
$_SERVER['QUERY_STRING'];
(if it's PHP)
"Fred Atkinson" wrote in message
news:p2qg65d0t4kki1sh0t3v6ileamhkvl9...@4ax.com...
> 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
On Friday 24 July 2009 00:14:19 Gordon wrote:
> We have many small libraries in JAVA or Ruby that need to be ported to
> Python. Actually it's so simple a rewrite is possible too.
Is this:
1 - A question?
2 - A job offer?
3 - A piece of random news?
- Hendrik
--
http://mail.python.org/mailman/
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 inheritance (because class A
OS: Win XP SP3, 32 bit
Python 2.5.4
Hi I have run into some problems with allocating numpy.memmaps
exceeding and accumulated size of about 2 GB. I have found out that
the real problem relates to numpy.memmap using mmap.mmap
I've written a small test program to illustrate it:
import itertools
imp
On Jul 24, 4:10 am, Naoki INADA wrote:
> > Yes! I confused by it.
>
> s/I confused/I am confused/
>
> > "Writing unicode to a file(-like)" is a simple requirement.
> > Does python have any simple resolution for it?
>
> s/resolution/solution/
>
Of course, Python 3 has much better Unicode support:
Slaunger schrieb:
OS: Win XP SP3, 32 bit
Python 2.5.4
Hi I have run into some problems with allocating numpy.memmaps
exceeding and accumulated size of about 2 GB. I have found out that
the real problem relates to numpy.memmap using mmap.mmap
I've written a small test program to illustrate it:
> Naoki INADA (NI) wrote:
>NI> "Writing unicode to a file(-like)" is a simple requirement.
>NI> Does python have any simple resolution for it?
Yes, Python 3 will do this. For Python < 3.0 you will have to use a
codecs wrapper or explicitely do the encoding.
--
Piet van Oostrum
URL: http://
> 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+tabnanny&cd=3&hl=en&ct=clnk&gl=us&client=firefox-a
>CR> Anyon
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
>
En Thu, 23 Jul 2009 06:56:45 -0300, News123 escribió:
Somehow I have difficulties reading the documentation for PIL (Image)
Is there an easy way to know which formats are supported and what their
names are?
py> import PIL
py> from PIL import Image
py> Image.ID
[]
py> Image.init()
py> Image.I
En Thu, 23 Jul 2009 21:27:35 -0300, Aahz escribió:
In article ,
Gabriel Genellina wrote:
NLMPI
What?
IHNFI
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I have a file having lines:-
48 ALA H = 8.33 N = 120.77 CA = 55.18 HA = 4.12 C = 181.50
104 ALA H = 7.70 N = 121.21 CA = 54.32 HA = 4.21 C =
85 ALA H = 8.60 N = CA = HA = 4.65 C =
Now i want to make two another file in which i want to put those lines for
which C is missing and another one
En Fri, 24 Jul 2009 01:27:10 -0300, David Roberts escribió:
I'm trying to port a Python application to Windows, and I'm getting
the following error (which did not occur when running on Linux):
Exception in thread Thread-4:
File "C:\Python26\lib\threading.py", line 803, in currentThread
r
Dear all,
I would like to know how to convert a list of points into a polygon
shapefile (esri).
Thanks!
Best regards,
Luis Pedro Almeida
--
http://mail.python.org/mailman/listinfo/python-list
> Slaunger (S) wrote:
>S> OS: Win XP SP3, 32 bit
>S> Python 2.5.4
>S> Hi I have run into some problems with allocating numpy.memmaps
>S> exceeding and accumulated size of about 2 GB. I have found out that
>S> the real problem relates to numpy.memmap using mmap.mmap
On Windows XP the virtual
On Fri, 24 Jul 2009 15:50:11 +0530 (IST)
amr...@iisermohali.ac.in wrote:
> but i am not getting the desired output.
Show us what output you got and what you desired.
--
D'Arcy J.M. Cain | Democracy is three wolves
http://www.druid.net/darcy/| and a sheep voting on
+1 4
amr...@iisermohali.ac.in schrieb:
Hi,
I have a file having lines:-
48 ALA H = 8.33 N = 120.77 CA = 55.18 HA = 4.12 C = 181.50
104 ALA H = 7.70 N = 121.21 CA = 54.32 HA = 4.21 C =
85 ALA H = 8.60 N = CA = HA = 4.65 C =
Now i want to make two another file in which i want to put those lines for
On Jul 22, 9:36 am, Hendrik van Rooyen
wrote:
> On Tuesday 21 July 2009 15:49:59 Inky 788 wrote:
>
> > My guess is that it was probably for optimization reasons long ago.
> > I've never heard a *good* reason why Python needs both.
>
> The good reason is the immutability, which lets you use
> a tup
Done: http://bugs.python.org/issue6562
--
David Roberts
http://da.vidr.cc/
On Fri, Jul 24, 2009 at 20:24, Gabriel Genellina wrote:
> En Fri, 24 Jul 2009 01:27:10 -0300, David Roberts escribió:
>
>> I'm trying to port a Python application to Windows, and I'm getting
>> the following error (whic
> amr...@iisermohali.ac.in (a) a écrit:
>a> Hi,
>a> I have a file having lines:-
>a> 48 ALA H = 8.33 N = 120.77 CA = 55.18 HA = 4.12 C = 181.50
>a> 104 ALA H = 7.70 N = 121.21 CA = 54.32 HA = 4.21 C =
>a> 85 ALA H = 8.60 N = CA = HA = 4.65 C =
>a> Now i want to make two another file in wh
On Jul 24, 11:21 am, Luis Pedro Almeida wrote:
> Dear all,
>
> I would like to know how to convert a list of points into a polygon
> shapefile (esri).
>
> Thanks!
>
> Best regards,
>
> Luis Pedro Almeida
I think you'd be better served by asking this question in a newsgroup
dedicated to GIS softwa
> Luis Pedro Almeida (LPA) wrote:
>LPA> Dear all,
>LPA> I would like to know how to convert a list of points into a
>LPA> polygon shapefile (esri).
http://lmgtfy.com/?q=esri+shapefile+Python
--
Piet van Oostrum
URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4]
Private email: p...@vanoo
Slaunger wrote:
OS: Win XP SP3, 32 bit
Python 2.5.4
Hi I have run into some problems with allocating numpy.memmaps
exceeding and accumulated size of about 2 GB. I have found out that
the real problem relates to numpy.memmap using mmap.mmap
I've written a small test program to illustrate it:
im
Terry Reedy wrote:
Jean-Michel Pichavant wrote:
Piet van Oostrum wrote:
[snip]
JP> file = "/home/dsp/4.6.0.0/test.py"
JP> test = __import__(file)
JP> => no module name blalalal found.
JP> Any suggestion ? I tried multiple escape technics without any
success.
Rightly so.
I think the be
Hi,
I'm not sure the subject describes what I'm looking for, but the
question is the following:
Is there a way I can tell a variable that the object it is pointing
too is not owned by it, in the sense that if it is the only reference
to the object it can be garbage collected?
I want this for what
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.
I have wrapped this program in a python script, which starts the c program.
To start the c program, there
Utpal Sarkar wrote:
> Is there a way I can tell a variable that the object it is pointing
> too is not owned by it, in the sense that if it is the only reference
> to the object it can be garbage collected?
http://docs.python.org/library/weakref.html
--
http://mail.python.org/mailman/listinfo/
Utpal Sarkar wrote:
> Hi,
> [...]
You're looking for the weakref module.
What you're describing there sounds like a nice exercise, but I cannot
imagine why you'd really need to clean it up, if it really is a singleton.
-- Gerhard
--
http://mail.python.org/mailman/listinfo/python-list
Utpal Sarkar writes:
> Is there a way I can tell a variable that the object it is pointing
> too is not owned by it, in the sense that if it is the only reference
> to the object it can be garbage collected?
Python doesn't have “pointers”, and doesn't really have “variables”
either, at least not
On Jul 24, 3:06 pm, Ben Finney wrote:
> Utpal Sarkar writes:
> > Is there a way I can tell a variable that the object it is pointing
> > too is not owned by it, in the sense that if it is the only reference
> > to the object it can be garbage collected?
>
> Python doesn't have “pointers”, and doe
amr...@iisermohali.ac.in wrote:
Hi,
I have a file having lines:-
48 ALA H = 8.33 N = 120.77 CA = 55.18 HA = 4.12 C = 181.50
104 ALA H = 7.70 N = 121.21 CA = 54.32 HA = 4.21 C =
85 ALA H = 8.60 N = CA = HA = 4.65 C =
Now i want to make two another file in which i want to put those lines for
w
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?
> len() should always return something; in particular, when
Hi,
I wonder if I use Popen, the parent process will wait for the child process to
finish or continue without waiting?
Thanks and regards!
--
http://mail.python.org/mailman/listinfo/python-list
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, in the sense that if it is the only reference
>> to the object it can be garbage collected?
>
> Python doesn't have “pointers”, and doesn't really have “v
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. Here's an example of the latter:
Why does len() give an error when applied to an int or float?
len()
On 2009-07-24, amr...@iisermohali.ac.in wrote:
>
> Hi,
>
> I have a file having lines:-
>
> 48 ALA H = 8.33 N = 120.77 CA = 55.18 HA = 4.12 C = 181.50
> 104 ALA H = 7.70 N = 121.21 CA = 54.32 HA = 4.21 C =
> 85 ALA H = 8.60 N = CA = HA = 4.65 C =
>
> Now i want to make two another file in which
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, in the sense that if it is the only reference
to the object it can be garbage collected?
Python
On Jul 23, 7:03 pm, Dave Angel wrote:
> Mark Tarver wrote:
> > I have a very strange error. I have two test python files test.py and
> > python.py which contain the following code
>
> > #!/usr/bin/python
> > print "Content-type: text/html"
> > print
> > print ""
> > print "Hello, Linux.com!"
> >
On Jul 24, 3:11 pm, "Rhodri James"
wrote:
> Which doesn't make your point less valid. In fact I'd go so
> far as to argue that what len() gives you is the number of
> items in a container, so len(7) should return 0.
Nah. 7 contains three bits, so len(7) should *clearly* return 3.
Mark
--
http
Mark Dickinson wrote:
On Jul 24, 3:11 pm, "Rhodri James"
wrote:
Which doesn't make your point less valid. In fact I'd go so
far as to argue that what len() gives you is the number of
items in a container, so len(7) should return 0.
Nah. 7 contains three bits, so len(7) should *clearly* re
Mark Dickinson schrieb:
On Jul 24, 3:11 pm, "Rhodri James"
wrote:
Which doesn't make your point less valid. In fact I'd go so
far as to argue that what len() gives you is the number of
items in a container, so len(7) should return 0.
Nah. 7 contains three bits, so len(7) should *clearly* re
On Fri, Jul 24, 2009 at 7:33 PM, Tim wrote:
>
> Hi,
> I wonder if I use Popen, the parent process will wait for the child process
> to finish or continue without waiting?
> Thanks and regards!
>
Assuming you mean subprocess.Popen, the child is executed
asynchronously. You can use the wait() meth
> "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, in the sense that if it is the o
On Jul 23, 3:42 am, Hendrik van Rooyen
wrote:
> On Wednesday 22 July 2009 16:36:51 Inky 788 wrote:
>
> > On Jul 22, 2:36 am, Hendrik van Rooyen
>
> > wrote:
> > > The good reason is the immutability, which lets you use
> > > a tuple as a dict key.
>
> > Thanks for the reply Hendrik (and Steven
> "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. Here's an example of the latter:
Why doe
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
> 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
Christian, Robert, thank you both for the replies, much appreciated.
Manu
--
http://mail.python.org/mailman/listinfo/python-list
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
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.
--
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
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
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
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)[
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:
>
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
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
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
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
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 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
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 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
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
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
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
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 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
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
> 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
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
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 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'
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
> 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
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
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
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
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 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 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.
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
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("
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
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 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,
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
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
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
> 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, 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
1 - 100 of 154 matches
Mail list logo