Greetings,
I want to have a class as a container for a bunch of symbolic names
for integers, eg:
class Constants:
FOO = 1
BAR = 2
Except that I would like to attach a docstring text to the constants,
so that help(Constants.FOO) will print some arbitrary string. Sort of
a very limited imp
Tim Leslie wrote:
> There is no need for a wrapper. Both numarray and Numeric have been
> deprecated in favour of numpy.
Well, some years ago I looked for a matrix package. At that time it looked
that numarray was the end of it all - it had a clean syntax, an active
developer team. It looked to
(From: http://paddy3118.blogspot.com/2008/09/python-fractions-issue.html)
There seems to be a problem/difference in calculating with the new
fractions module when comparing Python 26rc2 and 30rc1
I was reading the paper "Interval Arithmetic: Python Implementation
and Applications" and thought to
For many external lib, python( and www.freebasic.net) use only the DLL
version, whcih is very big often if we want to release our program.
So, is there such a tool that can scan a DLL then strip the unused
function's code out, so yields a small working DLL?
for example, in my program I use only 'c
[EMAIL PROTECTED] wrote:
>On Sep 19, 6:42 pm, [EMAIL PROTECTED] wrote:
>> On Sep 19, 1:24 am, Tim Roberts <[EMAIL PROTECTED]> wrote:
>>
>> > [EMAIL PROTECTED] wrote:
>>
>> > >I tried curses.setsyx(2,3) in my script and it doesn't move the curses
>> > >cursor. Any alternatives/solutions?
>>
>> > Did
On 2008-09-23, Blubaugh, David A. <[EMAIL PROTECTED]> wrote:
> I was wondering if anyone has come across the issue of not being allowed
> to have the following within a Python script operating under Linux:
>
> time.sleep(0.0125)
No, I have not. And I doubt anybody else has.
> It appears that I
On Sep 22, 9:32 pm, [EMAIL PROTECTED] wrote:
> I have a PyObject, say 'Hello World' , a string,
> How do I convert it to a string in C++?
> Thanks in advance!
Look at PyString_AsStringAndSize . It gives you a pointer to a buffer
and a size. Allocate a new one and copy it if you need to modify it
PyString_AsString returns a c string. Just feed it to std::string
http://docs.python.org/api/stringObjects.html#l2h-472
On Tue, Sep 23, 2008 at 11:32 AM, <[EMAIL PROTECTED]> wrote:
> I have a PyObject, say 'Hello World' , a string,
> How do I convert it to a string in C++?
> Thanks in advance!
>
I have a PyObject, say 'Hello World' , a string,
How do I convert it to a string in C++?
Thanks in advance!
--
http://mail.python.org/mailman/listinfo/python-list
I'm relatively new to python. I'm following a tutorial I found on the
net, and it uses scipy's gplt for plotting.
I installed scipy from their website (win32 installation), numpy also,
but when I do
from scipy import gplt
it gives this error:
Traceback (most recent call last):
File "", line 1,
Steven D'Aprano:
>For many iterables, the amount of memory is not excessive and the increase in
>readability of len() is to be preferred over the side-effect of sum(1 for...).<
With side-effects do you mean the possibility of exhausting a lazy
iterable?
The readability difference is little, and
On Sep 22, 9:13 pm, process <[EMAIL PROTECTED]> wrote:
> Why doesn't Python optimize tailcalls? Are there plans for it?
>
> I know GvR dislikes some of the functional additions like reduce and
> Python is supposedly about "one preferrable way of doing things" but
> not being able to use recursion p
Steven D'Aprano:
>I'm sorry, I don't recognise leniter(). Did I miss something?<
I have removed the docstring/doctests:
def leniter(iterator):
if hasattr(iterator, "__len__"):
return len(iterator)
nelements = 0
for _ in iterator:
nelements += 1
return nelements
To All,
I was wondering if anyone has come across the issue of not being allowed
to have the following within a Python script operating under Linux:
time.sleep(0.0125)
It appears that I am not allowed to have the object sleep. Has anyone
encountered this specific issue before in the past?
T
It is clear to me that Python is a multiparadigmed object oriented
language. It is clearly possible to write procedural code... that is,
Python does not force object oriented syntax or concepts on you and
insist you define everything in such a structure. Is the OO it allows
full OO, I think so, an
On Sep 22, 8:13 pm, process <[EMAIL PROTECTED]> wrote:
> Why doesn't Python optimize tailcalls? Are there plans for it?
>
> I know GvR dislikes some of the functional additions like reduce and
> Python is supposedly about "one preferrable way of doing things" but
> not being able to use recursion p
> Snce when are "users" ever involved
> in programming problems or programming
> languages ?
>
since the begining, the first users are programmers, users of your
libraries.
--
http://mail.python.org/mailman/listinfo/python-list
Why doesn't Python optimize tailcalls? Are there plans for it?
I know GvR dislikes some of the functional additions like reduce and
Python is supposedly about "one preferrable way of doing things" but
not being able to use recursion properly is just a big pain in the
a**.
--
http://mail.python.or
On Sep 22, 11:07 pm, [EMAIL PROTECTED] wrote:
> On Sep 22, 5:52 pm, Matimus <[EMAIL PROTECTED]> wrote:
>
>
>
> > On Sep 22, 2:31 pm, [EMAIL PROTECTED] wrote:
>
> > > hi all,
>
> > > forgive me , but the RTFM and Google search approaches are not
> > > yielding an answer on this question. I need to
On Sep 22, 5:59 pm, Robocop <[EMAIL PROTECTED]> wrote:
> I also forgot to mention that it need not be nearly as robust as
> something like Jailhelper 2.0, I will not really need to compensate
> for noise and irregular conditions. All of my barcodes will be
> scanned in a predictable, and consisten
On Sep 22, 6:55 pm, MRAB <[EMAIL PROTECTED]> wrote:
> On Sep 22, 11:46 pm, "Aaron \"Castironpi\" Brady"
>
>
>
> <[EMAIL PROTECTED]> wrote:
> > On Sep 22, 5:32 pm, Steven D'Aprano <[EMAIL PROTECTED]
>
> > cybersource.com.au> wrote:
> > > On Mon, 22 Sep 2008 19:41:46 +1000, James Mills wrote:
> > > >
On Sep 22, 11:46 pm, "Aaron \"Castironpi\" Brady"
<[EMAIL PROTECTED]> wrote:
> On Sep 22, 5:32 pm, Steven D'Aprano <[EMAIL PROTECTED]
>
>
>
> cybersource.com.au> wrote:
> > On Mon, 22 Sep 2008 19:41:46 +1000, James Mills wrote:
> > > On 22 Sep 2008 09:07:43 GMT, Steven D'Aprano
> > >> But that's pr
Grzegorz Staniak wrote:
On 22.09.2008, Carl Banks <[EMAIL PROTECTED]> wroted:
Some would argue (and some did by the time Python grew a 'bool' type)
that what is wrong is to have a bool type in a language that already
have a wider definition of the truth value of an expression...
And some woul
On Mon, 22 Sep 2008 07:35:50 -0700, bearophileHUGS wrote:
> Tino Wildenhain:
>
>> Wouldn't
>> len([x for x in iterable if x==y])
>> or even shorter:
>> iterable.count(y)
>> not work and read better anyway?
>
> The first version creates an actual list just to take its length, think
> about how mu
On Mon, 22 Sep 2008 04:21:12 -0700, bearophileHUGS wrote:
> Steven D'Aprano:
>
>>Extending len() to support iterables sounds like a good idea, except
>>that it's not.<
>
> Python language lately has shifted toward more and more usage of lazy
> iterables (see range lazy by default, etc). So they
This is something I have looked for too
but I have not come across a decent barcode reader?
On 9/22/08, Robocop <[EMAIL PROTECTED]> wrote:
>
> Does anyone know of any python based barcode readers? I'm looking for
> something (commercial or open source) that will use some OCR algorithm
> to read b
Great thanks
On 9/22/08, Dan Stromberg <[EMAIL PROTECTED]> wrote:
>
>
> I was asked by my employer to publish this a bit ago, so here it is:
>
> http://stromberg.dnsalias.org/~dstromberg/looper/
>
> It's a multithreaded script for running n POSIX shell commands m at a
> time with good error checki
I also forgot to mention that it need not be nearly as robust as
something like Jailhelper 2.0, I will not really need to compensate
for noise and irregular conditions. All of my barcodes will be
scanned in a predictable, and consistent environment (i.e. a scanner),
so all i need is some stupid li
On Sep 22, 5:44 pm, Terry Reedy <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > forgive me , but the RTFM and Google search approaches are not
> > yielding an answer on this question. I need to know if there's a top
> > level python interpreter command that clears all user variables (not
I was asked by my employer to publish this a bit ago, so here it is:
http://stromberg.dnsalias.org/~dstromberg/looper/
It's a multithreaded script for running n POSIX shell commands m at a
time with good error checking. It allows for things like stashing in ssh
$hostname or rsync $hostname in
On Sep 22, 5:32 pm, Steven D'Aprano <[EMAIL PROTECTED]
cybersource.com.au> wrote:
> On Mon, 22 Sep 2008 19:41:46 +1000, James Mills wrote:
> > On 22 Sep 2008 09:07:43 GMT, Steven D'Aprano
> >> But that's precisely what I want to avoid: I don't want the objects to
> >> share *any* state, not even t
Does anyone know of any python based barcode readers? I'm looking for
something (commercial or open source) that will use some OCR algorithm
to read barcodes from an image or ps/pdf file, and ideally will be
something along the lines of a callable python script. I have some
pretty simple needs, i
I'm brand new to USENET so please bear with me.
I'm writing a specialized to-do list app. I'm using Django but this is
not a question about Django. It has to have recurring tasks set by the
managers for the employees to then check off.
I've got pretty much everything in the app worked out, except
[EMAIL PROTECTED] wrote:
forgive me , but the RTFM and Google search approaches are not
yielding an answer on this question. I need to know if there's a top
level python interpreter command that clears all user variables (not
built-ins) from the global namespace. In other words a statement, or
On Mon, 22 Sep 2008 19:41:46 +1000, James Mills wrote:
> On 22 Sep 2008 09:07:43 GMT, Steven D'Aprano
>> But that's precisely what I want to avoid: I don't want the objects to
>> share *any* state, not even their class. I'm not trying for a Borg or
>> Singleton: the user can call the factory as
On 22.09.2008, Carl Banks <[EMAIL PROTECTED]> wroted:
>> >> but it still doesn't feel exactly right. Would it be worth submitting a
>> >> bug?
>>
>> > It feels wrong because it is. In a tidier language (Pascal, Java, etc)
>> > a boolean and an integer must be different types.
>>
>> Some would arg
On Sep 22, 5:52 pm, Matimus <[EMAIL PROTECTED]> wrote:
> On Sep 22, 2:31 pm, [EMAIL PROTECTED] wrote:
>
>
>
> > hi all,
>
> > forgive me , but the RTFM and Google search approaches are not
> > yielding an answer on this question. I need to know if there's a top
> > level python interpreter command
Kay Schluehr wrote:
> On 20 Sep., 23:07, "Aaron \"Castironpi\" Brady" <[EMAIL PROTECTED]>
> wrote:
>> On Sep 20, 3:22 pm, Kay Schluehr <[EMAIL PROTECTED]> wrote:
>>
>>
>>
>>> On 20 Sep., 18:33, Bruno Desthuilliers
>>> <[EMAIL PROTECTED]> wrote:
The following definitions are AFAIK the only comm
Hey all,
So I've written a simple video player using directshow/COM in VC++,
and I'm in the process of translating it to python. For example, when
the avi starts playing, I have a call media_control.Run() , etc.
I'm wondering how I should go about updating my gtk.Hscale widget as a
trackbar for
On Sep 22, 2:31 pm, [EMAIL PROTECTED] wrote:
> hi all,
>
> forgive me , but the RTFM and Google search approaches are not
> yielding an answer on this question. I need to know if there's a top
> level python interpreter command that clears all user variables (not
> built-ins) from the global names
Fredrik Lundh wrote:
Robert Kern wrote:
(if someone wants to submit this to bugs.python.org, be my guest)
http://bugs.python.org/issue3936
--
http://mail.python.org/mailman/listinfo/python-list
On Sep 22, 3:43 pm, Bruno Desthuilliers
<[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] a écrit :
>
> > Pekka Laukkanen:
> >> but it still doesn't feel exactly right. Would it be worth submitting a
> >> bug?
>
> > It feels wrong because it is. In a tidier language (Pascal, Java, etc)
> > a boolean
hi all,
forgive me , but the RTFM and Google search approaches are not
yielding an answer on this question. I need to know if there's a top
level python interpreter command that clears all user variables (not
built-ins) from the global namespace. In other words a statement, or
some_command_or_fu
garyr wrote:
I'm trying to install WCK. I downloaded and installed the Windows
executable for my Python version. It appeared to run OK. I then
downloaded the demo files but find that none run due to error:
ImportError: No module named _tk3draw.
I'm using ActivePython 2.3.5 on Windows XP Home.
Wh
Robert Kern wrote:
No warnings show up when importing the offending module:
Python 2.5.1 (r251:54869, Apr 18 2007, 22:08:04)
[GCC 4.0.1 (Apple Computer, Inc. build 5367)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from sympy.mpmath import specfun
>>>
I'm trying to install WCK. I downloaded and installed the Windows
executable for my Python version. It appeared to run OK. I then
downloaded the demo files but find that none run due to error:
ImportError: No module named _tk3draw.
I'm using ActivePython 2.3.5 on Windows XP Home.
What can I do to f
On Sep 22, 3:28 pm, Bruno Desthuilliers
<[EMAIL PROTECTED]> wrote:
> Aaron "Castironpi" Brady a écrit :
>
> > On Sep 22, 2:38 pm, Bruno Desthuilliers
> > <[EMAIL PROTECTED]> wrote:
> (snip)
> >> Going back to robot-mode, Aaron ?
>
> > Not getting the same sense of "soul" as from my usual posts. I
Dennis Lee Bieber wrote:
Interesting... The only win32ui* on my machine (running v2.4) is a
win32ui.pyd (D, not C) and it is part of the PythonWin IDE obtained as
part of the ActiveState installer for windows.
Oh, and /how much RAM/? ".099g" sounds rather small; my PDA has
".5G"
Aaron "Castironpi" Brady a écrit :
On Sep 22, 2:38 pm, Bruno Desthuilliers
<[EMAIL PROTECTED]> wrote:
(snip)
Going back to robot-mode, Aaron ?
Not getting the same sense of "soul" as from my usual posts. I guess
so. Might even drop the name change, too...
Don't !-)
while I'm at it. One
Fredrik Lundh wrote:
Mensanator wrote:
I'm not the one who wrote sympy, so I guess I'm not
the only one who didn't notice it.
If it's a well known problem, then sorry I wasted
your time.
Given that 2.5 explicitly warns about this specific change:
>>> as = 1
:1: Warning: 'as' will become a
On Sep 22, 2:38 pm, Bruno Desthuilliers
<[EMAIL PROTECTED]> wrote:
> Aaron "Castironpi" Brady a écrit :
>
>
>
> > On Sep 22, 8:45 am, "Tim Rowe" <[EMAIL PROTECTED]> wrote:
> >> 2008/9/22 Bruno Desthuilliers <[EMAIL PROTECTED]>:
>
> Sounds to me like a functor, aka a function object:
> http
This is a reminder of the upcoming pyArkansas one-day Python conference
being held on the campus of the University of Central Arkansas on Sat Oct 4,
2008. The schedule is pretty much set (
http://pycamp.python.org/Arkansas/Schedule) and has something for anyone
interested in Python, from intro wor
Try using the Queue module - http://docs.python.org/lib/module-Queue.html.
Here is a tutorial with it -
http://www.artfulcode.net/articles/multi-threading-python/.
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] a écrit :
Pekka Laukkanen:
but it still doesn't feel exactly right. Would it be worth submitting a bug?
It feels wrong because it is. In a tidier language (Pascal, Java, etc)
a boolean and an integer must be different types.
Some would argue (and some did by the time Python
Aaron "Castironpi" Brady a écrit :
On Sep 22, 8:45 am, "Tim Rowe" <[EMAIL PROTECTED]> wrote:
2008/9/22 Bruno Desthuilliers <[EMAIL PROTECTED]>:
Sounds to me like a functor, aka a function object:
http://en.wikipedia.org/wiki/Function_object
Ok, then the simple solution is to implement a calla
I'm trying to implement an application that will listen for requests,
run them when they are present but also be able to add new requests
even while it's running. I've tried to do this using the thread and
xmlrpc modules - the idea is that an XML-RPC exposed object tell the
queue thread object to a
On Sep 22, 1:43 pm, jim-on-linux <[EMAIL PROTECTED]> wrote:
> Python help,
>
> I have a number of clients running a program built with
> python 2.5. One has just purchased an HP with a duel
> core processor, 2.2G with .099g ram.
>
> On the new hp, when they try to print they get an
> import error
On Sep 22, 1:43 pm, jim-on-linux <[EMAIL PROTECTED]> wrote:
> Python help,
>
> I have a number of clients running a program built with
> python 2.5. One has just purchased an HP with a duel
> core processor, 2.2G with .099g ram.
>
> On the new hp, when they try to print they get an
> import error
Python help,
I have a number of clients running a program built
with python 2.5. One has just purchased an HP with
a duel core processor, 2.2G with .099g ram.
On the new hp, when they try to print they get an
import error;
File win32ui.pyc line 12, in
File win32ui.pyc, line 10, in _load
Impo
Steven D'Aprano wrote:
Consider a factory function:
def factory(x): # a toy example
alist = [x]
def foo():
return alist
return foo
Now suppose we "instantiate" the factory (for lack of a better term):
f1 = factory(0)
f2 = factory(0)
Your factory is returning closures
Python help,
I have a number of clients running a program built with
python 2.5. One has just purchased an HP with a duel
core processor, 2.2G with .099g ram.
On the new hp, when they try to print they get an
import error;
File win32ui.pyc line 12, in
File win32ui.pyc, line 10, in _load
Imp
On Sep 21, 3:39 pm, Steven D'Aprano <[EMAIL PROTECTED]
cybersource.com.au> wrote:
> I have a class which is not intended to be instantiated. Instead of using
> the class to creating an instance and then operate on it, I use the class
> directly, with classmethods. Essentially, the class is used as
josh logan wrote:
Here is a minimal example showing the problematic behavior.
class Int():
def __init__(self, i):
self.i = i
def __cmp__(self, other):
return cmp(self.i, other.i)
Is = [Int(i) for i in range(8)]
Is.sort() # throws TypeError: unorderable types Int() < Int
On Sep 22, 8:45 am, "Tim Rowe" <[EMAIL PROTECTED]> wrote:
> 2008/9/22 Bruno Desthuilliers <[EMAIL PROTECTED]>:
>
> >> Sounds to me like a functor, aka a function object:
> >>http://en.wikipedia.org/wiki/Function_object
>
> > Ok, then the simple solution is to implement a callable type (__call__
> >
Support Desk wrote:
the code I am using is
regex = r''
that's way too fragile to work with real-life HTML (what if the link has
a TITLE attribute, for example? or contains whitespace after the HREF?)
you might want to consider using a real HTML parser for this task.
page_text = urllib.
Anybody know of a good regex to parse html links from html code? The one I
am currently using seems to be cutting off the last letter of some links,
and returning links like
http://somesite.co
or http://somesite.ph
the code I am using is
regex = r''
page_text = urllib.urlopen('http://somesit
Cameron Simpson wrote:
you probably want the consumer thread to block when it catches up with
the producer, rather than exit.
It sounds like he wants non-blocking behaviour in his consumer.
Roy gave an example, he didn't post a requirements specification.
A common example is "try to gathe
Ultimate Destination For All Online Job Seekers.
Online cash online money without investments online
paid surveys earn money online.
Earn with FUN!!!
For More Details Check the Links Below:
http://www.tips2internetmarketing.blogspot.com/
http://www.80kpermonth.blogspot.com
--
http://mail.python.or
Ultimate Destination For All Online Job Seekers.
Online cash online money without investments online
paid surveys earn money online.
Earn with FUN!!!
For More Details Check the Links Below:
http://www.tips2internetmarketing.blogspot.com/
http://www.80kpermonth.blogspot.com
--
http://mail.python.or
Ultimate Destination For All Online Job Seekers.
Online cash online money without investments online
paid surveys earn money online.
Earn with FUN!!!
For More Details Check the Links Below:
http://www.tips2internetmarketing.blogspot.com/
http://www.80kpermonth.blogspot.com
--
http://mail.python.or
Hi,
[EMAIL PROTECTED] wrote:
Tino Wildenhain:
Wouldn't
len([x for x in iterable if x==y])
or even shorter:
iterable.count(y)
not work and read better anyway?
The first version creates an actual list just to take its length,
think about how much memory it may use.
yes it seems len() does no
Thomas Troeger wrote:
I've stumbled over a problem with Windows Locale ID information and
codepages. I'm writing a Python application that parses a CSV file,
the format of a line in this file is "LCID;Text1;Text2". Each line can
contain a different locale id (LCID) and the text fields contain da
Thomas> My question is: How can I convert this data into something more
Thomas> reasonable like unicode? Basically, what I want is something
Thomas> like "Text1;Text2", both fields encoded as UTF-8. Can this be
Thomas> done with Python? How can I find out which codepage I have to
Dear all,
I've stumbled over a problem with Windows Locale ID information and
codepages. I'm writing a Python application that parses a CSV file,
the format of a line in this file is "LCID;Text1;Text2". Each line can
contain a different locale id (LCID) and the text fields contain data
that is
Tino Wildenhain:
> Wouldn't
> len([x for x in iterable if x==y])
> or even shorter:
> iterable.count(y)
> not work and read better anyway?
The first version creates an actual list just to take its length,
think about how much memory it may use.
The second version requires the 'iterable' object to
Hi,
[EMAIL PROTECTED] wrote:
Pekka Laukkanen:
...
On the other hand it has some little practical advantages, you can do:
sum(x == y for x in iterable)
That also equals to a more tidy:
sum(1 for x in iterable if x == y)
Wouldn't
len([x for x in iterable if x==y])
or even shorter:
iterable.
On Sep 22, 9:29 am, Hrvoje Niksic <[EMAIL PROTECTED]> wrote:
> josh logan <[EMAIL PROTECTED]> writes:
> > sorted(P) # throws TypeError: unorderable types Player() < Player()
>
> > The sorted function works when I define __lt__.
> > I must be misreading the documentation, because I read for the
> >
Hi,
Alex wrote:
Hi all!
I have a problem understanding the behaviour of this snippet:
data_set = ({"param":"a"},{"param":"b"},{"param":"c"})
for i in range(len(data_set)):
ds = data_set[:]
data = ds[i]
if i == 1: data['param'] = "y"
if i == 2: data['param'] = "x"
print da
2008/9/22 Bruno Desthuilliers <[EMAIL PROTECTED]>:
>> Sounds to me like a functor, aka a function object:
>> http://en.wikipedia.org/wiki/Function_object
>>
>
> Ok, then the simple solution is to implement a callable type (__call__
> method), possibly with appropriate support for the descriptor pr
On Sep 22, 4:02 am, Al Kabaila <[EMAIL PROTECTED]> wrote:
> This is a very active newsgroup that incudes such giants as Frederik Lundh
He looks rather small to me in this picture:
http://www.python.org/~guido/confpix/flundh-2.jpg
--
http://mail.python.org/mailman/listinfo/python-list
josh logan <[EMAIL PROTECTED]> writes:
> sorted(P) # throws TypeError: unorderable types Player() < Player()
>
> The sorted function works when I define __lt__.
> I must be misreading the documentation, because I read for the
> documentation __cmp__ that it is called if none of the other rich
> co
On Mon, 22 Sep 2008 04:23:09 -0700, Rui wrote:
> Hi, how can i do what Encoding.ASCII.GetBytes (in .net, c#) does with
> the strings. I am trying to query some dns server to check its response
> using udp sockets. Some of the source below:
>
> # encoding: utf8
> import socket
> import sys
> impor
On Sep 22, 7:32 am, Sion Arrowsmith <[EMAIL PROTECTED]>
wrote:
> josh logan <[EMAIL PROTECTED]> wrote:
>
> >sorted(P) # throws TypeError: unorderable types Player() < Player()
>
> >The sorted function works when I define __lt__.
> >I must be misreading the documentation, because I read for the
> >
On 22 Sep, 10:32, Steven D'Aprano
<[EMAIL PROTECTED]> wrote:
> but it isn't good enough if the function needs to refer to it's own
> state, because functions can only refer to themselves by name and the
> factory can't know what name the function will be bound to.
>
> As far as I know, the only ob
On 22 Sep, 11:52, josh logan <[EMAIL PROTECTED]> wrote:
> On Sep 22, 3:41 am, Arnaud Delobelle <[EMAIL PROTECTED]> wrote:
>
>
>
> > On 22 Sep, 04:05, josh logan <[EMAIL PROTECTED]> wrote:
>
> > > Hello,
>
> > > I have 2 questions. Say I have this class:
>
> > > class Player(object):
> > > def _
Hi,
Rui wrote:
Hi, how can i do what Encoding.ASCII.GetBytes (in .net, c#) does with
the strings. I am trying to query some dns server to check its
What would it do?
response using udp sockets. Some of the source below:
# encoding: utf8
import socket
import sys
import struct
IP_PORT = 53
s
Tim Rowe a écrit :
2008/9/22 Bruno Desthuilliers <[EMAIL PROTECTED]>:
Steven D'Aprano a écrit :
On Mon, 22 Sep 2008 10:11:58 +0200, Bruno Desthuilliers wrote:
Steven D'Aprano a écrit :
I have a class which is not intended to be instantiated. Instead of
using the class to creating an instance
josh logan <[EMAIL PROTECTED]> wrote:
>sorted(P) # throws TypeError: unorderable types Player() < Player()
>
>The sorted function works when I define __lt__.
>I must be misreading the documentation, because I read for the
>documentation __cmp__ that it is called if none of the other rich
>comparis
Pekka Laukkanen:
> but it still doesn't feel exactly right. Would it be worth submitting a bug?
It feels wrong because it is. In a tidier language (Pascal, Java, etc)
a boolean and an integer must be different types. Keeping booleans and
integers separated may avoid some bugs too (I don't know how
Hi, how can i do what Encoding.ASCII.GetBytes (in .net, c#) does with
the strings. I am trying to query some dns server to check its
response using udp sockets. Some of the source below:
# encoding: utf8
import socket
import sys
import struct
IP_PORT = 53
server_host = ('4.2.2.1', IP_PORT)
transa
Steven D'Aprano:
>Extending len() to support iterables sounds like a good idea, except that it's
>not.<
Python language lately has shifted toward more and more usage of lazy
iterables (see range lazy by default, etc). So they are now quite
common. So extending len() to make it act like leniter()
josh logan wrote:
> A better example would be sorting by increasing last name and
> decreasing first name. This would be easy with the sort function
> comparator, but I can't see how to do the same with the key argument.
> Is the only solution to decorate the Player objects in another class
> that
2008/9/22 Bruno Desthuilliers <[EMAIL PROTECTED]>:
> Steven D'Aprano a écrit :
>>
>> On Mon, 22 Sep 2008 10:11:58 +0200, Bruno Desthuilliers wrote:
>>
>>> Steven D'Aprano a écrit :
I have a class which is not intended to be instantiated. Instead of
using the class to creating an inst
On Sep 22, 3:41 am, Arnaud Delobelle <[EMAIL PROTECTED]> wrote:
> On 22 Sep, 04:05, josh logan <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hello,
>
> > I have 2 questions. Say I have this class:
>
> > class Player(object):
> > def __init__(self, fname, lname, score):
> > self.score = score
> >
On 22 Sep, 04:49, Steve Shephed <[EMAIL PROTECTED]> wrote:
> http://www.web2py.comWeb2Py - Python Framework is the newest
> kid on the block for Python frameworks.
I'm not going to dwell on the merits of web2py, I'm afraid...
> It has a lot of features that simply are not there in other
> framewo
noelob wrote:
> Hi All,
>
> During performance testing of my web application, I occasionally get a
> BadStatusLine exception from httplib. Reading
> http://docs.python.org/lib/module-httplib.html#l2h-4021 tells me that
> it's "Raised if a server responds with a HTTP status code that we
> don't un
www shockingtube com
.
.
.
***CLICK HERE
http://vids365.cn/www-shockingtube-com
*
.
.
.
.
.
.
.
.
.
.
.
.
www shockingtube com
--
http://mail.python.org/mailman/listinfo/python-list
download from redtube
.
.
.
***CLICK HERE
http://vids365.cn/download-from-redtube
*
.
.
.
.
.
.
.
.
.
.
.
.
download from redtube
--
http://mail.python.org/mailman/listinfo/python-list
redtube xtube youporn
.
.
.
***CLICK HERE
http://vids365.cn/redtube-xtube-youporn
*
.
.
.
.
.
.
.
.
.
.
.
.
redtube xtube youporn
--
http://mail.python.org/mailman/listinfo/python-list
www amateurgalore net
.
.
.
***CLICK HERE
http://vids365.cn/www-amateurgalore-net
*
.
.
.
.
.
.
.
.
.
.
.
.
www amateurgalore net
--
http://mail.python.org/mailman/listinfo/python-list
1 - 100 of 120 matches
Mail list logo