On Wed, Apr 21, 2010 at 3:35 PM, Dmitry Ponyatov fo...@km.ru wrote:
Hello
Help please with such problem:
I need to build program object graph (data structure) with additional
parameters for nodes and edges:
include nxgraph # data structure module allowes any py objects for
node/edge id
#
On 20 Apr, 19:38, Peter Otten __pete...@web.de wrote:
luca72 wrote:
Hello i have to do this :
glibc crypt() function, using salt $1$abcdefgh$
cryptPw = crypt(plainPw, $1$abcdefgh$)
Thanks
The result is correct i obtain the same with ctypes and crypt module,
so i think that is better to use
On Apr 20, 9:19 pm, Stodge sto...@gmail.com wrote:
Is anyone aware of a Python DXF import library? I think I remember
seeing converters but so far I haven't found a library. I need to
write a tool that reads DXFs so I'm not yet sure if a converter would
be of any use. Thanks
Hello
recently, I met a problem with one python application running with
python2.5 | debian/lenny adm64 system: it crashed occasionally in our
production environment. The problem started to happen just after we
upgraded the python application from python2.4 | debian/etch amd64.
after
On Tue, Apr 20, 2010 at 9:52 PM, Ben Finney ben+pyt...@benfinney.id.au wrote:
Sebastian ba...@redtoad.de writes:
All locales return error messages in English. Only the Japanese uses
Japanese which my regular expressions cannot handle at the moment.
What exactly are you expecting to happen,
luca72 wrote:
On 20 Apr, 19:38, Peter Otten __pete...@web.de wrote:
luca72 wrote:
Hello i have to do this :
glibc crypt() function, using salt $1$abcdefgh$
cryptPw = crypt(plainPw, $1$abcdefgh$)
Thanks
The result is correct i obtain the same with ctypes and crypt module,
so i think
A simple thread pool example. My question is, since *MyThread.run*
will loop endless, how does the thread know the time to quit? how does
the *queue* notify the thread? is there any shared variables, like a
*lock*?
When I set daemon false, it stays in the loop, not quit any more.
what's the role
Hello.
I read a string from an utf-8 file:
fichierLaTeX = codecs.open(sys.argv[1], r, utf-8)
s = fichierLaTeX.read()
fichierLaTeX.close()
I can then print the string without error with 'print s'.
Next I parse this string:
def parser(s):
i = 0
while i len(s):
if s[i:i+1] == '\\':
On 04/19/10 08:03, pp wrote:
I am currently dealing with sparse matrices and have doubts on whether
we can use
1.) dot (for matrix multiplication) and inv (inverse) operations of
numpy on sparse matrices of CSR format.
I don't know of any use of the inverse of a sparse matrix.
Note, in
On Wed, Apr 21, 2010 at 1:38 PM, kaiix kvn@gmail.com wrote:
A simple thread pool example. My question is, since *MyThread.run*
will loop endless, how does the thread know the time to quit? how does
the *queue* notify the thread? is there any shared variables, like a
*lock*?
When I set
On Wed, Apr 21, 2010 at 1:50 PM, Kushal Kumaran
kushal.kumaran+pyt...@gmail.com wrote:
On Wed, Apr 21, 2010 at 1:38 PM, kaiix kvn@gmail.com wrote:
A simple thread pool example. My question is, since *MyThread.run*
will loop endless, how does the thread know the time to quit? how does
the
Bryan a écrit :
I think I see what you mean
Err...
-- correct me if I'm wrong:
You are, sorry !-)
You want to
keep complex application data structures around between requests.
Nope. I want to keep all my settings parsed, my librairies loaded, all
my connections opened etc. That is,
On Apr 19, 3:45 pm, J dreadpiratej...@gmail.com wrote:
First, before I get farther,
Is there a way for theloggingmodule to natively handle lists and
dict objects whenlogging?
e.g. take this {'key1':'val1','key2':'val2'} and have it logged like this:
INFO: key1: val1
INFO: key2: val2
If
f...@slick.airforce-one.org wrote:
Hello.
I read a string from an utf-8 file:
fichierLaTeX = codecs.open(sys.argv[1], r, utf-8)
s = fichierLaTeX.read()
fichierLaTeX.close()
I can then print the string without error with 'print s'.
Next I parse this string:
def parser(s):
i =
With the following code, I would expect a result of 5 !!
a= 'word1 word2 word3'
a.rfind(' ',7)
11
Is this a bug ?
thanks,
Stef
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, Apr 21, 2010 at 1:51 AM, Stef Mientki stef.mien...@gmail.com wrote:
With the following code, I would expect a result of 5 !!
a= 'word1 word2 word3'
a.rfind(' ',7)
11
Is this a bug ?
No. Don't you think someone would have found such an obvious bug by now?
You want regular
On Wed, Apr 21, 2010 at 6:51 PM, Stef Mientki stef.mien...@gmail.com wrote:
With the following code, I would expect a result of 5 !!
a= 'word1 word2 word3'
a.rfind(' ',7)
11
Is this a bug ?
Python's documentation states:
| rfind(...)
| S.rfind(sub [,start [,end]]) - int
|
|
Chris Rebert wrote:
[didn't see the original message]
On Wed, Apr 21, 2010 at 1:51 AM, Stef Mientki stef.mien...@gmail.com
wrote:
With the following code, I would expect a result of 5 !!
a= 'word1 word2 word3'
a.rfind(' ',7)
11
Is this a bug ?
No. Don't you think someone would have
Change your string literals to unicode by adding the u-prefix and you should
be OK.
Thanks, it solved the problem... for a while!
I need now to know if s[i] gives the next byte or the next character,
when I scan the string s. I've googled pages about python and unicode,
but didn't find a
General advice with character sets in Python apply: always explicitly
declare the encoding of input, then decode to Unicode interally as early
as possible, and process all text that way. Only fix into an encoding
when it's time to output.
Maybe I was too vague when describing my problem. As
On Wed, Apr 21, 2010 at 2:29 AM, f...@slick.airforce-one.org wrote:
Change your string literals to unicode by adding the u-prefix and you should
be OK.
Thanks, it solved the problem... for a while!
I need now to know if s[i] gives the next byte or the next character,
when I scan the string
Alan Harris-Reid wrote:
Jean-Michel Pichavant wrote:
Alan Harris-Reid wrote:
Hi,
During my Python (3.1) programming I often find myself having to
repeat code such as...
class1.attr1 = 1
class1.attr2 = 2
class1.attr3 = 3
class1.attr4 = 4
etc.
Is there any way to achieve the same result
@kushal, thanks for your replies.
before i wrote the email, i've already read the python docs carefully.
i need the proof from code, i mean python source code. i tried to
prove some of my assumptions that lead the loop quit, and i traced
back to Queue.py, threading.py, dummy_thread.py, now i need
On Wed, 2010-04-21 at 10:28 +0200, Bruno Desthuilliers wrote:
Bryan a écrit :
I think I see what you mean
Err...
-- correct me if I'm wrong:
You are, sorry !-)
You want to
keep complex application data structures around between requests.
Nope. I want to keep all my
Peter Otten __pete...@web.de writes:
OP: you may be looking for
a = a bb ccc
a[::-1].find( )
3
But you should be aware of the effeciency implications of doing
this. a[::-1] constructs a new list. It's probably faster to do e.g.:
len(a) - a.rfind(..) - 1
--
(For some reason you posted your response before the message you were
replying to. That's called Top-posting, and is bad form on these
mailing lists)
Sandy wrote:
Thanks for the replies.
Terry,
What does 'immediately' mean? I did a small test and here are the
results.
import psutil
def
Dear all,
I'm trying to use the shove module (http://pypi.python.org/pypi/shove)
for a simple script. The script read a CSV file ad store the data.
When I check the content of the store object (instance of Shove)
*before* I close it, the data are all there but when I close and re-
open it some
On 21-04-2010 10:56, Chris Rebert wrote:
On Wed, Apr 21, 2010 at 1:51 AM, Stef Mientki stef.mien...@gmail.com wrote:
With the following code, I would expect a result of 5 !!
a= 'word1 word2 word3'
a.rfind(' ',7)
11
Is this a bug ?
No. Don't you think someone
Paul Rudin wrote:
Peter Otten __pete...@web.de writes:
OP: you may be looking for
a = a bb ccc
a[::-1].find( )
3
But you should be aware of the effeciency implications of doing
this. a[::-1] constructs a new list.
A new string, yes.
It's probably faster to do e.g.:
len(a) -
On Wed, Apr 21, 2010 at 7:36 PM, kaiix kvn@gmail.com wrote:
before i wrote the email, i've already read the python docs carefully.
i need the proof from code, i mean python source code. i tried to
prove some of my assumptions that lead the loop quit, and i traced
back to Queue.py,
Bruno Desthuilliers bruno.42.desthuilli...@websiteburo.invalid writes:
Nope. I want to keep all my settings parsed, my librairies loaded, all
my connections opened etc. That is, all the time consuming stuff at
app startup - which, with PHP, mostly happens for each and every
request.
I thought
You can do something like this:
class A(): pass
inst=A()
exec(
... a=1
... b=2
... c=3
... d=4
... ) in inst.__dict__
inst.a
1
This executes the Statement in the exec function and uses inst.__dict__
as namespace. But be aware, that this is not recommended. If you mess
with __dict__, you
On Wed, Apr 21, 2010 at 2:33 AM, Adam Tauno Williams
awill...@whitemice.org wrote:
On Wed, 2010-04-21 at 10:28 +0200, Bruno Desthuilliers wrote:
Bryan a écrit :
I think I see what you mean
Err...
-- correct me if I'm wrong:
You are, sorry !-)
You want to
keep complex application
Stef Mientki wrote:
On 21-04-2010 10:56, Chris Rebert wrote:
On Wed, Apr 21, 2010 at 1:51 AM, Stef Mientki stef.mien...@gmail.com wrote:
With the following code, I would expect a result of 5 !!
a= 'word1 word2 word3'
a.rfind(' ',7)
11
Is this
On Wed, Apr 21, 2010 at 2:59 AM, Stef Mientki stef.mien...@gmail.com wrote:
On 21-04-2010 10:56, Chris Rebert wrote:
On Wed, Apr 21, 2010 at 1:51 AM, Stef Mientki stef.mien...@gmail.com wrote:
With the following code, I would expect a result of 5 !!
a= 'word1 word2 word3'
a.rfind(' ',7)
11
* Chris Rebert:
On Wed, Apr 21, 2010 at 2:59 AM, Stef Mientki stef.mien...@gmail.com wrote:
On 21-04-2010 10:56, Chris Rebert wrote:
On Wed, Apr 21, 2010 at 1:51 AM, Stef Mientki stef.mien...@gmail.com wrote:
With the following code, I would expect a result of 5 !!
a= 'word1 word2 word3'
On Wed, Apr 21, 2010 at 2:51 AM, Alex metallourla...@gmail.com wrote:
I'm trying to use the shove module (http://pypi.python.org/pypi/shove)
for a simple script. The script read a CSV file ad store the data.
When I check the content of the store object (instance of Shove)
*before* I close it,
Dear all,
Last week, I raised the question Could declarative programming be
useful for the Model part of an application ?, and I suggested an
open-source project, Yoopf, to provide such a paradigm in Python.
Stefan told me that the proposal lacked clarity. I have thus updated
the description,
Apologies in advance if this is a totally stupid question, I've tried
looking at the Tkinter documentation on the web but since I'm something
of an ignoramus when it comes to programming generally I didn't
understand what I was reading. Anyway...
I've written a module that allows me to
Thanks for your insights.
I have taken the easy way out, I read on a page that python 3 worked
by default in UTF-8, so I downloaded and installed it.
Apart from a few surprises (print is not a funtion, and rules about
mixing spaces and tabs in indentation are much more strict, and I
guess more
On 21-04-2010 12:33, Alf P. Steinbach wrote:
* Chris Rebert:
On Wed, Apr 21, 2010 at 2:59 AM, Stef Mientki
stef.mien...@gmail.com wrote:
On 21-04-2010 10:56, Chris Rebert wrote:
On Wed, Apr 21, 2010 at 1:51 AM, Stef Mientki
stef.mien...@gmail.com wrote:
With the following code, I would
On Wed, Apr 21, 2010 at 3:33 AM, Alf P. Steinbach al...@start.no wrote:
* Chris Rebert:
On Wed, Apr 21, 2010 at 2:59 AM, Stef Mientki stef.mien...@gmail.com
wrote:
On 21-04-2010 10:56, Chris Rebert wrote:
On Wed, Apr 21, 2010 at 1:51 AM, Stef Mientki stef.mien...@gmail.com
wrote:
With the
On Wed, Apr 21, 2010 at 8:45 PM, Rotwang sg...@hotmail.co.uk wrote:
def draw(self, w, h):
out = Tkinter.Canvas(width = w, height = h)
# a load of out.create_line(...)'s go here
out.pack()
out.mainloop()
It works, but the problem is that I can't do anything else
Andreas Löscher wrote:
You can do something like this:
class A(): pass
inst=)
exec(
... a=
... b=2
... c=3
... d=4
... ) in inst.__dict__
inst.a
1
This executes the Statement in the exec function and uses inst.__dict__
as namespace. But be aware, that this is
Sebastian ba...@redtoad.de writes:
My regular expressions turn the Amazon error messages into Python
exceptions.
This works fine as long as they are in English: ??? is not a valid
value for BrowseNodeId. Please change this value and retry your
request., for instance, will raise an
f...@slick.airforce-one.org wrote:
I have taken the easy way out, I read on a page that python 3 worked
by default in UTF-8, so I downloaded and installed it.
Just a quick reminder: UTF-8 is not the same as unicode. Python3 works in
unicode and by default uses UTF-8 to read from or write into
On 21 Apr, 12:36, Chris Rebert c...@rebertia.com wrote:
[cut]
Explanation:
The explicit assignment back to the `store` pseudo-dictionary lets it
properly update its internal state to reflect the change to the value
(in this case, the list) associated with the region key. In your
original
My regular expressions turn the Amazon error messages into Python
exceptions.
This works fine as long as they are in English: ??? is not a valid
value for BrowseNodeId. Please change this value and retry your
request., for instance, will raise an InvalidParameterValue
exception.
On Wed, Apr 21, 2010 at 4:46 AM, Sebastian ba...@redtoad.de wrote:
My regular expressions turn the Amazon error messages into Python
exceptions.
This works fine as long as they are in English: ??? is not a valid
value for BrowseNodeId. Please change this value and retry your
request.,
Hello i have this question :
i connect to the server in this way:
sock = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
sock.connect(('192.168.1.11',11502))
rcv = sock.recv(8124)
here i get 14 random bytes , in a string with strange chars like :
¬¨^.á‹•Ò
a„ãj
I think because sock.recv return a
Hi,
Is it possible to something along these lines in python :-
map = {
'key1': f(),
'key2': modify_state(); val = f(); restore_state(); val,
'key3': f(),
}
For 'key2' I want to store the value returned by f() but after
modifying the state. Do we have something like a bare block. I am
On Wed, Apr 21, 2010 at 5:37 AM, luca72 lucabe...@libero.it wrote:
Hello i have this question :
i connect to the server in this way:
sock = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
sock.connect(('192.168.1.11',11502))
rcv = sock.recv(8124)
here i get 14 random bytes , in a string
Hi Peter,
Just a quick reminder: UTF-8 is not the same as unicode. Python3 works in
unicode and by default uses UTF-8 to read from or write into files.
I'm not the OP, but wanted to make sure I was fully understanding your
point.
Are you saying all open() calls in Python that read text
On Wed, Apr 21, 2010 at 5:51 AM, ++imanshu himanshu.g...@gmail.com wrote:
Is it possible to something along these lines in python :-
map = {
'key1': f(),
'key2': modify_state(); val = f(); restore_state(); val,
'key3': f(),
}
For 'key2' I want to store the value returned by f()
Bruno Desthuilliers wrote:
Nope. I want to keep all my settings parsed, my librairies loaded, all
my connections opened etc. That is, all the time consuming stuff at app
startup - which, with PHP, mostly happens for each and every request.
O.K. I wasn't clear on your objection. As I said the
pyt...@bdurham.com wrote:
Are you saying all open() calls in Python that read text files,
automatically convert UTF-8 content to Unicode in the same manner as the
following might when using Python 2.6?
codecs.open( fileName, mode='r', encoding='UTF8', ... )
That's what I meant to say, but
On Wed, Apr 21, 2010 at 2:29 AM, luca72 lucabe...@libero.it wrote:
On 20 Apr, 19:38, Peter Otten __pete...@web.de wrote:
luca72 wrote:
Hello i have to do this :
glibc crypt() function, using salt $1$abcdefgh$
cryptPw = crypt(plainPw, $1$abcdefgh$)
Thanks
The result is correct i obtain
Bryan a écrit :
Bruno Desthuilliers wrote:
Nope. I want to keep all my settings parsed, my librairies loaded, all
my connections opened etc. That is, all the time consuming stuff at app
startup - which, with PHP, mostly happens for each and every request.
O.K. I wasn't clear on your
Hi Peter,
Are you saying all open() calls in Python that read text files,
automatically convert UTF-8 content to Unicode in the same manner as the
following might when using Python 2.6?
codecs.open( fileName, mode='r', encoding='UTF8', ... )
That's what I meant to say, but it's not
++imanshu wrote:
Hi,
Is it possible to something along these lines in python :-
map = {
'key1': f(),
'key2': modify_state(); val = f(); restore_state(); val,
'key3': f(),
}
For 'key2' I want to store the value returned by f() but after
modifying the state. Do we have something like
On 04/21/2010 08:46 AM, Bruno Desthuilliers wrote:
Bryan a écrit :
Bruno Desthuilliers wrote:
Many large, sopĥisticated etc applications are written in C. Does that
make C a practical application programming language ?
It's at least a strong clue.
Oh, yes ? Then why don't you use C for web
On Apr 21, 7:31 pm, Dave Angel da...@ieee.org wrote:
++imanshu wrote:
Hi,
Is it possible to something along these lines in python :-
map = {
'key1': f(),
'key2': modify_state(); val = f(); restore_state(); val,
'key3': f(),
}
For 'key2' I want to store the value
On Apr 21, 6:10 pm, Chris Rebert c...@rebertia.com wrote:
On Wed, Apr 21, 2010 at 5:51 AM, ++imanshu himanshu.g...@gmail.com wrote:
Is it possible to something along these lines in python :-
map = {
'key1': f(),
'key2': modify_state(); val = f(); restore_state(); val,
'key3': f(),
On Apr 21, 12:45 pm, Rotwang sg...@hotmail.co.uk wrote:
Apologies in advance if this is a totally stupid question, I've tried
looking at the Tkinter documentation on the web but since I'm something
of an ignoramus when it comes to programming generally I didn't
understand what I was reading.
Dave Angel wrote:
++imanshu wrote:
Hi,
Is it possible to something along these lines in python :-
map = {
'key1': f(),
'key2': modify_state(); val = f(); restore_state(); val,
'key3': f(),
}
For 'key2' I want to store the value returned by f() but after
modifying the
On 4/21/2010 7:46 AM, Sebastian wrote:
The Amazon API returns an XML response which contains error messages
if a request fails. These messages consist of an error code and an
error description in natural language. Luckily, the description seems
to stick to the same format and is (in all but one
On 4/21/2010 5:31 AM, Sebastian wrote:
This works fine as long as they are in English:
??? is not a valid value for BrowseNodeId.
Please change this value and retry your request.,
for instance, will raise an InvalidParameterValue
exception. However, the Japanese version returns the error
On 4/21/2010 9:29 AM, Peter Otten wrote:
pyt...@bdurham.com wrote:
Are you saying all open() calls in Python that read text files,
automatically convert UTF-8 content to Unicode in the same manner as the
following might when using Python 2.6?
codecs.open( fileName, mode='r', encoding='UTF8',
I have the following simple script running on 2.5.2 on a machine where
the default character encoding is ascii:
#!/usr/bin/env python
#coding: utf-8
import xml.dom.minidom
import codecs
str=u?xml version=\1.0\ encoding=\utf-8\?elementselem attrib=
\ó\//elements
doc=xml.dom.minidom.parseString(
C. Benson Manica wrote:
I have the following simple script running on 2.5.2 on a machine where
the default character encoding is ascii:
#!/usr/bin/env python
#coding: utf-8
import xml.dom.minidom
import codecs
str=u?xml version=\1.0\ encoding=\utf-8\?elementselem attrib=
On Apr 21, 1:58 pm, Peter Otten __pete...@web.de wrote:
C. Benson Manica wrote:
(snip)
It seems that parseString() doesn't like unicode
Yes, I noticed that, and I already tried...
-- let's try a byte string
then:
doc = xml.dom.minidom.parseString(s.encode(utf-8))
xml =
luca72 wrote:
Hello i have this question :
i connect to the server in this way:
sock = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
sock.connect(('192.168.1.11',11502))
rcv = sock.recv(8124)
here i get 14 random bytes , in a string with strange chars like :
¬¨^.á‹•Ò
a„ãj
I think because
C. Benson Manica wrote:
On Apr 21, 1:58 pm, Peter Otten __pete...@web.de wrote:
C. Benson Manica wrote:
(snip)
It seems that parseString() doesn't like unicode
Yes, I noticed that, and I already tried...
-- let's try a byte string
then:
doc =
Bruno Desthuilliers wrote:
Bryan a écrit :
Bruno Desthuilliers wrote:
Nope. I want to keep all my settings parsed, my librairies loaded, all
my connections opened etc. That is, all the time consuming stuff at app
startup - which, with PHP, mostly happens for each and every request.
On Apr 21, 2:25 pm, Peter Otten __pete...@web.de wrote:
Are you sure that your script has
str = u...
like in your post and not just
str = ...
No :-)
str=u?xml version=\1.0\ encoding=\utf-8\?elementselem attrib=
\ó\//elements
doc=xml.dom.minidom.parseString( str.encode(utf-8) )
C. Benson Manica wrote:
On Apr 21, 2:25 pm, Peter Otten __pete...@web.de wrote:
Are you sure that your script has
str = u...
like in your post and not just
str = ...
No :-)
str=u?xml version=\1.0\ encoding=\utf-8\?elementselem attrib=
\ó\//elements
On 4/21/2010 11:37 AM Bryan said...
'Round here we love Python. I prefer Python to Perl or PHP even in
those languages' particular areas of specialization. Advocating for
Python does not require spreading myths about PHP.
You're missing the point -- set-up and tear-down overhead is involved
In article 4bcddc5a$0$1630$742ec...@news.sonic.net,
John Nagle na...@animats.com wrote:
Iain King wrote:
Not sure on the volume of addresses you're working with, but as an
alternative you could try grabbing the zip code, looking up all
addresses in that zip code, and then finding whatever one
According to the ctypes docs: http://docs.python.org/library/ctypes.html
An errcheck function should return the args tuple when used with out
parameters (section 15.15.2.4. Function prototypes). However, in other
cases it says to return the result, or whatever result you want
returned from the
Is the del instruction able to remove _at the same_ time more than one
element from a list ?
For instance, this seems to be correct :
z=[45,12,96,33,66,'c',20,99]
del z[2], z[6],z[0]
z
[12, 33, 66, 'c', 20]
However, the following doesn't work :
On 21 April 2010 20:56, candide cand...@free.invalid wrote:
Is the del instruction able to remove _at the same_ time more than one
element from a list ?
Yup:
z=[45,12,96,33,66,'c',20,99]
del z[:]
z
[]
--
Cheers,
Simon B.
--
http://mail.python.org/mailman/listinfo/python-list
candide wrote:
Is the del instruction able to remove _at the same_ time more than one
element from a list ?
For instance, this seems to be correct :
z=[45,12,96,33,66,'c',20,99]
del z[2], z[6],z[0]
z
[12, 33, 66, 'c', 20]
However, the following doesn't work :
On Apr 21, 2:56 pm, candide cand...@free.invalid wrote:
Is the del instruction able to remove _at the same_ time more than one
element from a list ?
For instance, this seems to be correct :
z=[45,12,96,33,66,'c',20,99]
del z[2], z[6],z[0]
z
[12, 33, 66, 'c', 20]
On 4/21/2010 12:56 PM candide said...
Is the del instruction able to remove _at the same_ time more than one
element from a list ?
For instance, this seems to be correct :
z=[45,12,96,33,66,'c',20,99]
Not as I see it -- watch your index values - they change after each
delete is
Hi everyone,
I have a production server running a Windows Service written in Python, which
uses python 2.5.4 (yes I know it is old, but I am somewhat stuck with this for
now) and pywin32 214.
Given a set of manipulations, I get a stack overflow in the service, and a bad
crash. The same
I'm looking for a Python-based, small, self-contained package to
hand out API keys, in the same spirit as Google API keys.
The basic specs are simple: 1) enforce the one key per customer
rule; 2) be robot-proof; 3) be reasonably difficult to circumvent
even for humans.
(This is for a web
I have a function exposed through ctypes that returns a c_char_p.
Since I need to deallocate that c_char_p, it's inconvenient that
ctypes copies the c_char_p into a string instead of giving me the raw
pointer. I believe this will cause a memory leak, unless ctypes is
smart enough to free the
QOTW: I used to think anonymous functions (AKA blocks, etc...) would
be a
nice feature for Python.
Then I looked at a stack trace from a different programming language
with
lots of anonymous functions. (I believe it was perl.)
I became enlightened. - Jonathan Gardner, apparently echoing Guido's
QOTW: ... [T]hat kills yet another usage of C ... - Maciej
Fijalkowski
http://morepypy.blogspot.com/2009/11/some-benchmarking.html
Making operations in the Fraction class automatically return a
subclass
instance when called with subclass arguments:
QOTW: You see? That's what I like about the Python community: people
even
apologise for apologising :) - Tim Golden
http://groups.google.com/group/comp.lang.python/msg/858d1c31d0c2adff
The third alpha version of Python 2.7 is ready for testing:
Here's the method I was using. Note that tmp_char_ptr is of type
c_void_p. This should avoid the memory leak, assuming I am
interpreting the semantics of the cast correctly. Is there a cleaner
way to do this with ctypes?
def get_prop_string(self, prop_name):
# Have to work with
On Tue, 2010-04-20 at 14:43 +0100, Alan Harris-Reid wrote:
Hi,
During my Python (3.1) programming I often find myself having to repeat
code such as...
class1.attr1 = 1
class1.attr2 = 2
class1.attr3 = 3
class1.attr4 = 4
etc.
Is there any way to achieve the same result without having
Thanks for your reponses.
--
http://mail.python.org/mailman/listinfo/python-list
QOTW: There's no RightAnswer(tm), just our best guess as to what is
the most
useful behavior for the most number of people. - Raymond Hettinger
http://groups.google.com/group/comp.lang.python/msg/e7f78ef27811781b
First beta version of Python 2.7 is available:
Ryan Kelly wrote:
On Tue, 2010-04-20 at 14:43 +0100, Alan Harris-Reid wrote:
Hi,
During my Python (3.1) programming I often find myself having to repeat
code such as...
class1.attr1 = 1
class1.attr2 = 2
class1.attr3 = 3
class1.attr4 = 4
etc.
Is there any way to achieve the same result
Ryan,
Your withhacks module looks very interesting.
http://pypi.python.org/pypi/withhacks
What are your specific concerns about its use? Are there portability
concerns?
Malcolm
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, 2010-04-21 at 19:43 -0400, pyt...@bdurham.com wrote:
Ryan,
Your withhacks module looks very interesting.
http://pypi.python.org/pypi/withhacks
What are your specific concerns about its use? Are there portability
concerns?
It combines two things you just don't see in respectable
In message 4bc9aad...@dnews.tpgi.com.au, Lie Ryan wrote:
Since in python nothing is guaranteed about implicit file close ...
It is guaranteed that objects with a reference count of zero will be
disposed. In my experiments, this happens immediately.
--
In message mailman.1949.1271443668.23598.python-l...@python.org, Martin
v. Löwis wrote:
Brian Blais wrote:
On Apr 12, 2010, at 16:36 , Martin v. Loewis is wrote:
If you are planning to build Python extension modules in the next five
years, I recommend that you obtain a copy of VS Express
On Wed, Apr 21, 2010 at 5:53 PM, Lawrence D'Oliveiro wrote:
In message 4bc9aad...@dnews.tpgi.com.au, Lie Ryan wrote:
Since in python nothing is guaranteed about implicit file close ...
It is guaranteed that objects with a reference count of zero will be
disposed.
In my experiments, this
1 - 100 of 272 matches
Mail list logo