In message , Seebs wrote:
> sqlite is a source of joy, a small bright point of decent
> and functional software in a world full of misbehaving crap.
Have you learnt how to be selective in your downloads yet?
--
http://mail.python.org/mailman/listinfo/python-list
In message , Anssi Saari wrote:
> Nobody writes:
>
>> Have you considered parsing /proc/partitions?
>
> One could also just read the partition table directly, it's on the
> first sector usually.
The Linux kernel includes built-in support for something close to two dozen
different partition fo
[email protected] wrote:
> My understanding is that appending to a list and then joining
> this list when done is the fastest technique for string
> concatenation. Is this true?
>
> The 3 string concatenation techniques I can think of are:
>
> - append to list, join
> - string 'addition' (s = s
hi
I have been trying out singleton design pattern implementations..I
wrote this,
class Singleton(object):
_instance = None
def __new__(self, *args, **kwargs):
if not self._instance:
self._instance = super(Singleton, self).__new__(self,
*args, **kwargs)
return
On Sun, 03 Oct 2010 01:55:00 -0700, harryos wrote:
> hi
> I have been trying out singleton design pattern implementations..I wrote
> this,
>
>
> class Singleton(object):
> _instance = None
> def __new__(self, *args, **kwargs):
> if not self._instance:
> self._instance
thanks Steven..that was very helpful..thanks a lot
harry
> Since __new__ is called before the instance exists, it doesn't receive an
> instance as the first argument. Instead it receives the class. While you
> can call the parameter anything you like, it is conventional to call it
> cls rather than
hi Steven,
can you explain that?I didn't quite get it.
I have a module say 'managerutils' where I have a class
MyManager..
ie,
managerutils.py
--
class MyManager(object):
def __init__(self):
self.myaddresses={}
...
from another main program ,if I call ,
import managerutils
harryos writes:
> hi
> I have been trying out singleton design pattern implementations..I
> wrote this,
>
>
> class Singleton(object):
> _instance = None
> def __new__(self, *args, **kwargs):
> if not self._instance:
> self._instance = super(Singleton, self).__new__(se
On Oct 3, 3:05 am, MRAB wrote:
> On 03/10/2010 03:29, Hidura wrote:> 2010/10/2, Niklasro:
> >> Hello
> >> Getting a web same page with 2 or more possible "states" eg business
> >> part, private part or all parts, can you recommend a way to represent
> >> the states via HTTP GET? Feasible way could
Arnaud Delobelle writes:
[...]
> That's because overriding __new__ doesn't prevent __init__ from being
> executed. The reason for this is that when you do:
>
> MySingle('jeff')
>
> what is executed is:
>
> MySingle.__metaclass__.__call__('jeff')
Oops. I meant:
MySingle.__metaclass_
thanks Arnold..that made it quite clear
harry
On Oct 3, 4:11 pm, Arnaud Delobelle wrote:
> Arnaud Delobelle writes:
>
--
http://mail.python.org/mailman/listinfo/python-list
Anyone using M2crypto with Python 2.7? The M2crypto site [1]
seems to indicate that M2crypto should be compatible with all 2.x
versions 2.3 or higher. However there are no user contributed
builds for any release of Python above 2.6. I'm wondering if this
is because M2crypto has problems with Python
On 10/03/2010 01:16 AM, Antoine Pitrou wrote:
You should check that you aren't doing anything wrong
with "env" and "start_response" (like deallocate them forcefully).
I commented out the `Py_DECREF(start_response)` after the `app` call and
the crash was gone. `start_response` is created via `P
(http://www.salesuper.com)(http://www.salesuper.com)
Air Jordan Sneakers, Release Dates, Nike Shoes, Air Force Ones
at ...All the info a sneakerhead needs, including Nike, Air Jordans,
Nike SB, air force ones, Adidas, Bape, Vans and other news, nike
release dates, air jordan(http://www.salesuper.co
My local news feed seems to have lost the early part of this thread, so
I'm afraid I don't know who I'm quoting here:
> My understanding is that appending to a list and then joining
> this list when done is the fastest technique for string
> concatenation. Is this true?
>
> The 3 string concaten
On Sun, 03 Oct 2010 14:44:32 +0200
"Jonas H." wrote:
> On 10/03/2010 01:16 AM, Antoine Pitrou wrote:
> > You should check that you aren't doing anything wrong
> > with "env" and "start_response" (like deallocate them forcefully).
>
> I commented out the `Py_DECREF(start_response)` after the `app`
* Ravi:
> The documentation of the sqlite module at
> http://docs.python.org/library/sqlite3.html
> says:
>
> "...allows accessing the database using a nonstandard variant of the
> SQL..."
>
> But if you see SQLite website they clearly say at
> http://sqlite.org/omitted.html that only very few of
On 10/03/2010 03:47 PM, Antoine Pitrou wrote:
You shouldn't call PyObject_FREE yourself, but instead rely on
Py_DECREF to deallocate it if the reference count drops to zero.
So, instead of commenting out Py_DECREF and keeping PyObject_FREE, I'd
recommend doing the reverse. That way, if a referenc
Seebs wrote:
> On 2010-10-03, Steven D'Aprano
> wrote:
>> On Sat, 02 Oct 2010 12:50:02 -0700, Dennis Lee Bieber wrote:
>>> Well... We could maybe borrow from REXX... and
>>> use || for concatenation.
>
>>|| for concatenation? What's the connection between the pipe character
>> and c
On Oct 2, 10:08 pm, Seebs wrote:
> On 2010-10-02, Sandy wrote:
>
> > I want to find how much free memory (RAM) is available in my system
> > using python.
>
> The question is essentially incoherent on modern systems. You'd have to
> define terms. Consider that on a given system, it's quite poss
On 2010-10-03, Lawrence D'Oliveiro wrote:
> In message , Seebs wrote:
>> sqlite is a source of joy, a small bright point of decent
>> and functional software in a world full of misbehaving crap.
> Have you learnt how to be selective in your downloads yet?
Sadly, as a side-effect of my day job, I
(2010 new fashion brand shoes)
N I K E Shoes($35): http://www.stefsclothes.net
H a n d b a g ($35): http://www.stefsclothes.net
U G G($80) N F L ($35): http://www.stefsclothes.net
%% dghjdr dfjdrt drtjsr rfth r
--
http://mail.python.org/mailman/listinfo/python-list
On Oct 2, 5:32 am, [email protected] (Diez B. Roggisch) wrote:
> tekion writes:
> > All,
> > I have the following xml tag:
> >
> >
> > httpRequest
> > HTTP://cmd.wma.ibm.com:80/
> > GET
> > 200
> >
> >
>
> > I am interested in:
> > httpRequest
> > HTTP://cmd.
jimgardener a écrit :
> hi Steven,
> can you explain that?I didn't quite get it.
> I have a module say 'managerutils' where I have a class
> MyManager..
What Steven was talking about was to NOT use a class at all. Modules are
objects and have their own namespace. And you can use threading.locals
i
An interesting archive article on the topic of correctness, and the
layers thereof:
Program verification: the very idea;
Communications of the ACM
Volume 31 , Issue 9 (September 1988)
Pages: 1048 - 1063
Year of Publication: 1988
ISSN:0001-0782
"The notion of program verificatio
Stefan Schwarzer a écrit :
> One could argue that using L[::-1] isn't "obvious"
It *is* obvious - once you've learned slicing. "obvious" doesn't mean
you shouldn't bother reading the FineManual.
--
http://mail.python.org/mailman/listinfo/python-list
On Sat, 02 Oct 2010 22:15:31 -0700, flebber wrote:
> Cargo Cult Coding?
>
> Not sure what it is but it sounds good.
Imitation without understanding, aka monkey-see-monkey-do.
http://en.wikipedia.org/wiki/Cargo_cult
--
http://mail.python.org/mailman/listinfo/python-list
On Sat, 02 Oct 2010 13:06:12 -0700, Ravi wrote:
> The documentation of the sqlite module at
> http://docs.python.org/library/sqlite3.html says:
>
> "...allows accessing the database using a nonstandard variant of the
> SQL..."
>
> But if you see SQLite website they clearly say at
> http://sqlite
On 10/2/2010 6:15 PM, Niklasro wrote:
Hello
Getting a web same page with 2 or more possible "states" eg business
part, private part or all parts, can you recommend a way to represent
the states via HTTP GET? Feasible way could be ?business=business, ?
type=business, ?business=true or others. Shou
tekion writes:
> On Oct 2, 5:32 am, [email protected] (Diez B. Roggisch) wrote:
>> tekion writes:
>> > All,
>> > I have the following xml tag:
>> >
>> >
>> > httpRequest
>> > HTTP://cmd.wma.ibm.com:80/
>> > GET
>> > 200
>> >
>> >
>>
>> > I am interested in:
>> >
On 10/2/2010 3:06 PM, Seebs wrote:
I would agree that the word "nonstandard" seems to be a little strong and
discouraging. sqlite is a source of joy, a small bright point of decent
and functional software in a world full of misbehaving crap. While it
does omit a few bits of SQL functionality,
On Oct 3, 2010, at 2:21 PM, John Nagle wrote:
> On 10/2/2010 3:06 PM, Seebs wrote:
>
>> I would agree that the word "nonstandard" seems to be a little strong and
>> discouraging. sqlite is a source of joy, a small bright point of decent
>> and functional software in a world full of misbehaving
pakalk wrote:
>
>Can anyone help me find GOOD IMAP library for python? Imaplib is..
>ekhm... nevermind... Is there any good library?
What do you expect it to do? Imaplib is designed to help you access IMAP
stores, and it does that well enough. But it's not a mail reader.
--
Tim Roberts, t...@p
pakalk writes:
> Hello,
>
> Can anyone help me find GOOD IMAP library for python? Imaplib is..
> ekhm... nevermind... Is there any good library?
Instead of pissing on something it helps to actually state what's
missing from it. Or give a list of what you're looking for. Nevermind is
so ekhm... n
Hi all :)
I've really been wondering about the following lately. The question is
this: if there are no (real) private or protected members in Python,
how can you be sure, when inheriting from another class, that you
won't wind up overriding, and possibly clobbering some important data
field of the
On 10/03/2010 01:07 PM, Rock wrote:
Hi all :)
I've really been wondering about the following lately. The question is
this: if there are no (real) private or protected members in Python,
how can you be sure, when inheriting from another class, that you
won't wind up overriding, and possibly clobb
On Oct 3, 1:07 pm, Rock wrote:
> Hi all :)
>
> I've really been wondering about the following lately. The question is
> this: if there are no (real) private or protected members in Python,
> how can you be sure, when inheriting from another class, that you
> won't wind up overriding, and possibly
On Sun, 03 Oct 2010 16:33:48 +0200
"Jonas H." wrote:
>
> Humm. Now the behaviour is as follows:
>
> with assignment to local variable
> --
> * start_response = PyObject_NEW(...) -> start_response->ob_refcnt=1
> * wsgiapp(environ, start_response) ->
> Object-oriented designs are difficult to design in any programming
> language, and it helps to have some sort of concrete problem to drive
> the discussion. Are you working on a particular design where you
> think Python's philosophy will inhibit good design? My take on Python
> is that it focu
Rock writes:
>> Object-oriented designs are difficult to design in any programming
>> language, and it helps to have some sort of concrete problem to drive
>> the discussion. Are you working on a particular design where you
>> think Python's philosophy will inhibit good design? My take on Pytho
Arnaud Delobelle writes:
> I've been reading c.l.python for years (on and off) and I can't recall
> anybody saying this has been a problem in practise.
Arghh! Practice, I meant practice!
--
Arnaud
--
http://mail.python.org/mailman/listinfo/python-list
On Oct 3, 3:04 pm, Rock wrote:
> > Object-oriented designs are difficult to design in any programming
> > language, and it helps to have some sort of concrete problem to drive
> > the discussion. Are you working on a particular design where you
> > think Python's philosophy will inhibit good desi
Rock wrote:
What if the
library I'm using doesn't realase the source, or what if I just can't
get my hands on it for some reason or another?
You can always use dir() on an instance of the class to
find out what names it's using.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
On Oct 3, 3:57 pm, Gregory Ewing wrote:
> Rock wrote:
> > What if the
> > library I'm using doesn't realase the source, or what if I just can't
> > get my hands on it for some reason or another?
>
> You can always use dir() on an instance of the class to
> find out what names it's using.
>
Indeed
Arnaud Delobelle writes:
> I've been reading c.l.python for years (on and off) and I can't recall
> anybody saying this has been a problem in practise.
It has been a problem for me at least once. I blew a good chunk of a
day debugging a problem that turned out due to my clobbering something
in
On Oct 3, 3:04 pm, Rock wrote:
> No, I was just working with a normal library
> class which was supposed to be derived. So that's what I did, but in
> the process I found myself needing to create an instance variable and
> it dawned on me: "how do I know I'm not clobbering something
> here???" ...
On 04/10/2010 00:06, Steve Howell wrote:
On Oct 3, 3:57 pm, Gregory Ewing wrote:
Rock wrote:
What if the
library I'm using doesn't realase the source, or what if I just can't
get my hands on it for some reason or another?
You can always use dir() on an instance of the class to
find out what
In message , Seebs wrote:
> It is stunning how often you can guess which of two packages will be the
> source of a bug just by seeing which one hurts more to look at.
QOTW. :)
--
http://mail.python.org/mailman/listinfo/python-list
In message <[email protected]>, John Nagle wrote:
> (Personally, I like MySQL, but I fear Oracle will mess it up.)
Doesn’t matter whether Oracle messes up the brand called “MySQL” or not.
With Free Software, it’s the software that matters, not the brand. And the
softw
On Oct 3, 2:09 pm, [email protected] (Diez B. Roggisch) wrote:
> tekion writes:
> > On Oct 2, 5:32 am, [email protected] (Diez B. Roggisch) wrote:
> >> tekion writes:
> >> > All,
> >> > I have the following xml tag:
> >> >
> >> >
> >> > httpRequest
> >> > HTTP://cmd.wma.ibm.com:80/
> >> >
On Oct 3, 5:13 pm, Carl Banks wrote:
> On Oct 3, 3:04 pm, Rock wrote:
>
> > No, I was just working with a normal library
> > class which was supposed to be derived. So that's what I did, but in
> > the process I found myself needing to create an instance variable and
> > it dawned on me: "how do
On Oct 3, 5:17 pm, MRAB wrote:
> On 04/10/2010 00:06, Steve Howell wrote:> On Oct 3, 3:57 pm, Gregory
> Ewing wrote:
> >> Rock wrote:
> >>> What if the
> >>> library I'm using doesn't realase the source, or what if I just can't
> >>> get my hands on it for some reason or another?
>
> >> You can
On 2010-10-01, pakalk wrote:
> Can anyone help me find GOOD IMAP library for python?
Yes.
> Imaplib is.. ekhm... nevermind... Is there any good library?
Yes, there is another one that's easier to use and a bit more
high-level, and more... akhm... nevermind.
--
Grant
--
http://mail.python.
On Sun, 03 Oct 2010 15:04:17 -0700, Rock wrote:
> Thanks for the reply. No, I was just working with a normal library class
> which was supposed to be derived. So that's what I did, but in the
> process I found myself needing to create an instance variable and it
> dawned on me: "how do I know I'm
On Mon, 04 Oct 2010 11:57:18 +1300, Gregory Ewing wrote:
> Rock wrote:
>> What if the
>> library I'm using doesn't realase the source, or what if I just can't
>> get my hands on it for some reason or another?
>
> You can always use dir() on an instance of the class to find out what
> names it's u
In article <[email protected]>
Rock wrote:
>I've really been wondering about the following lately. The question is
>this: if there are no (real) private or protected members in Python,
>how can you be sure, when inheriting from another class, that yo
On Fri, 1 Oct 2010 00:42:34 -0700 (PDT) "[email protected]"
wrote:
> On 30 sep, 19:22, Andreas Waldenburger
> wrote:
> > On Thu, 30 Sep 2010 03:42:29 -0700 (PDT)
> >
> > "[email protected]"
> > wrote:
> > > On 29 sep, 19:20, Seebs wrote:
> > > > On 2010-09-29, Tracubik
Having STFW and come up empty, I'm wondering if anyone knows if there
is an analogue to the Ruby Version Manager in the Python world? rvm is essentially a
tool that can install several Ruby implementations side by side and
easily hot swap them in your shell session. Check a few pages of their
webs
On 10/3/2010 5:40 PM, Lawrence D'Oliveiro wrote:
In message<[email protected]>, John Nagle wrote:
(Personally, I like MySQL, but I fear Oracle will mess it up.)
Doesn’t matter whether Oracle messes up the brand called “MySQL” or not.
With Free Software, it’s the so
On Mon, Oct 4, 2010 at 8:39 AM, TerryP wrote:
> Having STFW and come up empty, I'm wondering if anyone knows if there
> is an analogue to the Ruby Version Manager rvm.beginrescueend.com/> in the Python world? rvm is essentially a
> tool that can install several Ruby implementations side by side a
60 matches
Mail list logo