Hi !
Thanks for return.
Some infos: from a long time, I found that it's often more fast to use
windows's command, instead of develop in high level language (and also,
low level...)
FINDSTR is fast. OK. But internal commands are more fast. Example : DIR
(with all his options)
And it's faste
I have a proxy class that wraps an arbitrary file-like object fp and
reads blocks of data from it. Is it safe to assume that fp.read(-1) will
read until EOF? I know that's true for file.read() and StringIO.read(),
but is it a reasonable assumption to make for arbitrary file-like objects?
To put
On 2008-09-26, nntpman68 <[EMAIL PROTECTED]> wrote:
> - I'm annoyed by any spam.
> It's tough to find good rules, but the incoming spams that I see
> currently on comp.lang.python have certain criteas.
>
> - most email addresses from gmail.
...snip rest of good filter criteria...
Killing all mes
Steven D'Aprano wrote:
> I have a proxy class that wraps an arbitrary file-like object fp and
> reads blocks of data from it. Is it safe to assume that fp.read(-1) will
> read until EOF? I know that's true for file.read() and StringIO.read(),
> but is it a reasonable assumption to make for arbitra
2008/9/26 nntpman68 <[EMAIL PROTECTED]>:
> It's tough to find good rules, but the incoming spams that I see currently
> on comp.lang.python have certain criteas.
>
>
>
> - most email addresses from gmail.
> - all never posted before and then they have multiple posts within a few
> minutes / second
Hi All,
I'm new to this list and hoping that this is not off-topic.
If it is, please point me in the right direction.
I seem to recollect a python module or library for *nix sysadmins,
but I can't for the life of me find it again.
The module (or library) somehow added unix command capabilities
t
Steven D'Aprano <[EMAIL PROTECTED]> writes:
> On Fri, 26 Sep 2008 22:15:43 -0700, Aahz wrote:
> > An ordinary singleton is instantiating the class multiple times
> > yet returning the same instance object; a class singleton is
> > simply using the class directly (like a module).
Where is this "cl
import os
HTH
KM
~~
On Sat, Sep 27, 2008 at 1:35 PM, Lars Stavholm <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> I'm new to this list and hoping that this is not off-topic.
> If it is, please point me in the right direction.
>
> I seem to recollect a python module or library for *nix sysa
Allan wrote:
Terry Reedy <[EMAIL PROTECTED]> writes:
I have not seen this posted, so...
To run IDLE with Python3.0rc1,
edit Python30/Libs/idlelib/run.py,
and change "set_daemon(True)" to "daemon = True" and save.
(This is about line 75, and the only appearance of 'daemon'.)
Otherwise, you get e
km wrote:
> import os
Thanks, but I'm aware of the standard libraries like os, sys,
commands, and whatnot. I'm looking for a non-standard library
that acts like a wrapper for the unix commands. I have seen it,
I just can't find it again.
/L
> On Sat, Sep 27, 2008 at 1:35 PM, Lars Stavholm <[EMAIL
I've been experimenting with the 'with' statement (in __future__), and
so far I like it. However, I can't get it to work with a cStringIO
object. Here's a minimum working example:
###
from __future__ import with_statement
import cStringIO
teststring='this is a test'
with cStringIO.StringIO(tes
Lars Stavholm <[EMAIL PROTECTED]> writes:
> The module (or library) somehow added unix command capabilities
> to the python language. It seemed like a lesser known, perhaps new,
> python library or module.
Which particular Unix commands?
Perhaps you're thinking of the 'shutil' module
http://www.
On Sat, 27 Sep 2008 18:20:17 +1000, Ben Finney wrote:
> Steven D'Aprano <[EMAIL PROTECTED]> writes:
>
>> On Fri, 26 Sep 2008 22:15:43 -0700, Aahz wrote:
>> > An ordinary singleton is instantiating the class multiple times yet
>> > returning the same instance object; a class singleton is simply us
peppergrower wrote:
teststring='this is a test'
with cStringIO.StringIO(teststring) as testfile:
pass
umm. what exactly do you expect that code to do?
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
I'm trying to save an image from a Flash AS3 to my server as a jpg
file. I found some PHP code to do this, but I want to do this in
Python. I'm not quite sure how to convert the following code to
Python. It's mainly the $GLOBALS["HTTP_RAW_POST_DATA"] part I don't
know ho
On Sep 27, 3:58 pm, r0g <[EMAIL PROTECTED]> wrote:
> Ah, just spotted the backticks - they just return whatever's inside them
> as a string.
No, they return the repr() of the object inside. The output of
__repr__ -has- to be a string, but typecasting into string isn't the
intention of repr() (or t
Stef Mientki wrote:
I don't think your suggestion is a good one.
If a filename has uppercase characters in it,
the END-USER has done that for some kind of reason.
I explain how pdb works and show you how to solve the specific
comparison problem you mentioned in your post, and you start rantin
Steven D'Aprano wrote:
> On Fri, 26 Sep 2008 01:46:15 +0200, Stef Mientki wrote:
>
>> Secondly thoughtless copying of current behavior, doesn't bring any
>> progress,
>> and I think that's one of the reasons why we're still burdened by
>> inventions done 20 years ago,
>> e.g. "do you want to save
On Sep 26, 1:04 pm, "Aaron \"Castironpi\" Brady"
<[EMAIL PROTECTED]> wrote:
> On Sep 26, 11:43 am, "Tim Rowe" <[EMAIL PROTECTED]> wrote:
>
> > 2008/9/26 Steven D'Aprano <[EMAIL PROTECTED]>:
>
> > > I don't have any objective numbers, but subjectively it seems to me that
> > > the number of spams is
2008/9/27 Aaron Castironpi Brady <[EMAIL PROTECTED]>:
>> I think in June and July they were selling watches a lot which I
>> haven't noticed recently.
>
> Gucci 104 G-Bandeau Watches - Gucci Watches Discount Rolex Oyster
> Perpetual Lady Datejust Pearlmaster 18kt Yellow Gold Diamond Ladies
> Watch
Hi,
Can some help me with the regular expression. I'm looking to search #
character in my file?
My file has contents:
###
Hello World
###
length = 10
breadth = 20
height = 30
###
##
In article
<[EMAIL PROTECTED]>,
alex23 <[EMAIL PROTECTED]> wrote:
> ' '.join((str(x * x) for x in range(1,6)))
Aren't the outer set of parens redundant? This works just as well:
' '.join(str(x * x) for x in range(1,6))
--
http://mail.python.org/mailman/listinfo/python-list
On Sep 27, 5:33 am, Steven D'Aprano <[EMAIL PROTECTED]
cybersource.com.au> wrote:
> On Sat, 27 Sep 2008 18:20:17 +1000, Ben Finney wrote:
> > Steven D'Aprano <[EMAIL PROTECTED]> writes:
>
> >> On Fri, 26 Sep 2008 22:15:43 -0700, Aahz wrote:
> >> > An ordinary singleton is instantiating the class mu
On Sep 27, 4:16 am, Ben Finney <[EMAIL PROTECTED]>
wrote:
> process <[EMAIL PROTECTED]> writes:
> > ' '.join([`x * x` for x in range(1, 6)])
>
> > exactly what does this symbol do and what does it stand for?
>
> It's an obsolete, deprecated syntactic sugar for (what is now
> implemented as) the bui
[EMAIL PROTECTED] wrote:
import re
fd = open(file, 'r')
line = fd.readline
pat1 = re.compile("\#*")
while(line):
mat1 = pat1.search(line)
if mat1:
print line
line = fd.readline()
I strongly doubt that this is
On Sat, 27 Sep 2008 10:05:01 +0200, Lars Stavholm wrote:
> Hi All,
>
> I'm new to this list and hoping that this is not off-topic. If it is,
> please point me in the right direction.
>
> I seem to recollect a python module or library for *nix sysadmins, but I
> can't for the life of me find it a
On Sep 27, 7:28 am, "Dotan Cohen" <[EMAIL PROTECTED]> wrote:
> 2008/9/27 Aaron Castironpi Brady <[EMAIL PROTECTED]>:
>
> >> I think in June and July they were selling watches a lot which I
> >> haven't noticed recently.
>
> > Gucci 104 G-Bandeau Watches - Gucci Watches Discount Rolex Oyster
> > Per
On Sep 27, 1:44 am, "Dmitry S. Makovey" <[EMAIL PROTECTED]> wrote:
> George Sakkis wrote:
> > Although this works, the second argument to ProxyMethod shouldn't be
> > necessary, it's semantically redundant; ideally you would like to
> > write it as "bmethod = ProxyMethod('b')".
>
> since I'm alre
> So, I'm guessing you can't use the 'with' statement with cStringIO
> objects? Is this a bug, or do I need to use the 'with' statement
> differently to get this to work?
>
> Thanks,
> peppergrower
Neither, just not implemented. Only classes with __enter__ and __exit__
methods(ie context manag
On Sat, Sep 27, 2008 at 1:58 PM, Fredrik Lundh <[EMAIL PROTECTED]>wrote:
> [EMAIL PROTECTED] wrote:
>
> import re
>>
>> fd = open(file, 'r')
>> line = fd.readline
>> pat1 = re.compile("\#*")
>>while(line):
>>mat1 = pat1.search(line)
>>if mat1:
>>
In article <[EMAIL PROTECTED]>,
Ben Finney <[EMAIL PROTECTED]> wrote:
>Steven D'Aprano <[EMAIL PROTECTED]> writes:
>> On Fri, 26 Sep 2008 22:15:43 -0700, Aahz wrote:
>>>
>>> An ordinary singleton is instantiating the class multiple times
>>> yet returning the same instance object; a class singleto
Hi,
Michael Mabin wrote:
so you wouldn't object then to something like
' in (%)' % ','.join([str_edit_for_exploit(x) for x in aList])
if str_edit_for_exploit applied security edits?
Whats an security edit btw? If it is something meant to turn possibly
insecure data into 'secur
On 2008-09-27, Lawrence D'Oliveiro <[EMAIL PROTECTED]> wrote:
> In message <[EMAIL PROTECTED]>, Grant
> Edwards wrote:
>
>> On 2008-09-26, Lawrence D'Oliveiro <[EMAIL PROTECTED]>
>> wrote:
>>> In message <[EMAIL PROTECTED]>, Grant Edwards
>>> wrote:
>>>
Never assume somebody reading the articl
I have always thought this idea very good, but if I download it and
install it (on my MacBook pro) will any conflicts occur with existing
bits and pieces of Python and its libraries?
Thank you,
Christopher Brewster
*
Department of Computer
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Aahz)
wrote:
> One cute reason to prefer class singletons to module singletons is that
> subclassing works well for creating multiple singletons. But really,
> the main reason I use class singletons is that they are the absolute
> simplest way t
George Boutsioukis <[EMAIL PROTECTED]> writes:
> Neither, just not implemented. Only classes with __enter__ and
> __exit__ methods(ie context manager types) can be used in with
> statements. And, correct me if I'm wrong, I think it's pointless for
> a StringIO object to have those.
It's definitel
On Sep 27, 9:23 am, George Sakkis <[EMAIL PROTECTED]> wrote:
> On Sep 27, 1:44 am, "Dmitry S. Makovey" <[EMAIL PROTECTED]> wrote:
>
> > I guess my bias is towards more explicit declarations thus
>
> > bmethod=ProxyMethod('b',B.bmethod)
>
> > looks more attractive to me, but I stand to be correcte
Thanks Black Jack
Working
--
http://mail.python.org/mailman/listinfo/python-list
> CMIIW correct me if I'm wrong. Google Groups is a Usenet/c-l-py
> gateway. Other gateways aren't contributing to spam. What are they
> doing that G-Groups is not?
Actually Google Groups appears to be just displaying the Usenet
newsgroup
comp.lang.python. The spam filtering which is the topic
On Sep 27, 11:27 am, George Sakkis <[EMAIL PROTECTED]> wrote:
> If you want to eliminate completely specifying attributes with
> strings, it's easy to modify the above so that you write instead:
>
> class A(Proxy):
> ...
> bmethod = ProxyMethod(lambda self: self.b1)
> bmethod2 = Proxy
If the inputs are edited prior to the construction of the string and these
fields are used for more than one update then it's not an exploit. It's
simply a matter not repeating yourself when coding.
In this particular case too, we're talking about a list of integers that
gets inserted into a strin
This is probably unrelated to Python, as this is more about design
pattern. I'm asking your comments about this design pattern that is
similar in functionality to Singleton and Borg: to share states.
I'm thinking about this design pattern (I don't know if anyone has
ever thought of this pattern be
import commands ?
On Sat, Sep 27, 2008 at 8:06 AM, George Boutsioukis
<[EMAIL PROTECTED]>wrote:
> On Sat, 27 Sep 2008 10:05:01 +0200, Lars Stavholm wrote:
>
> > Hi All,
> >
> > I'm new to this list and hoping that this is not off-topic. If it is,
> > please point me in the right direction.
> >
>
I've been growing a library of my own functions, that use the names of
unix commands. They are just conveniences, of course, but I'd suggest
the same for sysadmins, it's handy.
--
http://mail.python.org/mailman/listinfo/python-list
On Sat, Sep 27, 2008 at 3:32 PM, Eric Wertman <[EMAIL PROTECTED]> wrote:
> I've been growing a library of my own functions, that use the names of
> unix commands. They are just conveniences, of course, but I'd suggest
> the same for sysadmins, it's handy.
Can you share it?
Best,
SB.
--
http://ma
Hello folks ,
I have a file like this
/T_0_size=105((-bin-ulockmgr_server:0.99[&&NHX:C=0.195.0],(((-bin-hostname:0.00
[&&NHX:C=200.0.0],
(-bin-dnsdomainname:0.00[&&NHX:C=200.0.0],(-bin-domainname:0.00[&&NHX:C=200.0.0],(-bin-nisdomainname:0.00[&&NHX:C=200.0.0],-bin-ypdomainname:0.00[&&NHX:C=200.0.
Hi,
Michael Mabin wrote:
If the inputs are edited prior to the construction of the string and
these fields are used for more than one update then it's not an exploit.
It's simply a matter not repeating yourself when coding.
In python we do not fear that.
In this particular case too, we're t
Aahz wrote:
In article <[EMAIL PROTECTED]>,
Ben Finney <[EMAIL PROTECTED]> wrote:
Steven D'Aprano <[EMAIL PROTECTED]> writes:
I'd like to be able to call [a class] as if it were a function.
Normally calling a class object returns an instance -- I wish to
return something else.
In that case,
What should I look for in a file to determine whether or not it is a
MS Word file or an Excel file or a PDF file, etc., etc.? including Zip
files
I don`t want to check for file extension.
os.path.splitext('Filename.jpg') will produce a tuple of filename and
extension, but some file don`t even have
I have been experimenting with the abc module in py3k and thought
about using the register method of an ABC as a class decorator:
import abc
class MyABC(metaclass=abc.ABCMeta):
pass
@MyABC.register
class MySub():
pass
This doesn't work because the register method returns None. It woul
Hello, this is Milenko Stojadinovic from town Banjaluka,
Bosnia and Herzegovina, also known as Cvrcko
Does anyone know of any bars in town where I can
swallow a bucket of cum? It can be either dog,
horse or human cum. Also, does anyone know of
any sex bars where people will shit in your mouth?
I al
Is there a way to configure python to read/write compiled pyc files for
modules in a directory other than the directory containing the original py
files?
I'm trying trying to secure an Apache server running mod_python and don't
want the process compiling the pyc files to have write access to the f
On Sat, Sep 27, 2008 at 2:43 PM, A. Joseph <[EMAIL PROTECTED]> wrote:
> What should I look for in a file to determine whether or not it is a
> MS Word file or an Excel file or a PDF file, etc., etc.? including Zip
> files
>
> I don`t want to check for file extension.
> os.path.splitext('Filename.jp
Thanks for the help. I'm fairly new to programming (which you
probably could have guessed...). When I realized that you could use a
StringIO instance as if it were a file, I wanted to try some of the
same techniques on it as I would with a file. In this case, I wanted
to use a "for line in testf
> When processing data in parallel you will use up as muchmemoryas
> many datasets you are processing at any given time.
Worker processes eats 2-4 times more than I pass to them.
>If you need to
> reducememoryuse then you need to start fewer processes and use some
> mechanism to distribute the wo
On Sat, Sep 27, 2008 at 5:43 PM, A. Joseph <[EMAIL PROTECTED]> wrote:
> What should I look for in a file to determine whether or not it is a
> MS Word file or an Excel file or a PDF file, etc., etc.? including Zip
> files
>
> I don`t want to check for file extension.
> os.path.splitext('Filename.jp
On Sat, 27 Sep 2008 14:56:07 -0700 (PDT), Milenko Stojadinovic Cvrcko
<[EMAIL PROTECTED]> wrote:
>Hello, this is Milenko Stojadinovic from town Banjaluka,
>Bosnia and Herzegovina, also known as Cvrcko
>Does anyone know of any bars in town where I can
>swallow a bucket of cum? It can be either dog,
On Sat, 27 Sep 2008 18:47:16 -0400, default <[EMAIL PROTECTED]>
wrote:
>On Sat, 27 Sep 2008 14:56:07 -0700 (PDT), Milenko Stojadinovic Cvrcko
><[EMAIL PROTECTED]> wrote:
>
>>Hello, this is Milenko Stojadinovic from town Banjaluka,
>>Bosnia and Herzegovina, also known as Cvrcko
>>Does anyone know
On Sat, Sep 27, 2008 at 3:42 PM, Michael Crute <[EMAIL PROTECTED]> wrote:
> On Sat, Sep 27, 2008 at 5:43 PM, A. Joseph <[EMAIL PROTECTED]> wrote:
>> What should I look for in a file to determine whether or not it is a
>> MS Word file or an Excel file or a PDF file, etc., etc.? including Zip
>> file
On Sat, 27 Sep 2008 15:56:39 -0700, Jim Thompson
<[EMAIL PROTECTED]> wrote:
>Now you know why I blanket kill-file googlegroups.
>
>...Jim Thompson
I knew that!
Every now and then one groper will make it back to the scene of his
crime - but, granted, there
Disclosure: I work for Enthought.
Christopher Brewster wrote:
I have always thought this idea very good, but if I download it and
install it (on my MacBook pro) will any conflicts occur with existing
bits and pieces of Python and its libraries?
For the Mac distribution, we have tried very car
In rec.crafts.metalworking Jim Thompson <[EMAIL PROTECTED]> wrote:
>
> On Sat, 27 Sep 2008 18:47:16 -0400, default <[EMAIL PROTECTED]>
> wrote:
>
>>On Sat, 27 Sep 2008 14:56:07 -0700 (PDT), Milenko Stojadinovic Cvrcko
>><[EMAIL PROTECTED]> wrote:
>>
>>>Hello, this is Milenko Stojadinovic from tow
Aaron "Castironpi" Brady wrote:
class A(type):
... def __call__( self, *ar ):
... print 'call', self, ar
...
class B(object):
... __metaclass__= A
...
B(3)
call (3,)
Overriding the __call__ method of 'type' has the effect of giving you
a static __call__ method on a cla
On Sep 27, 6:16 pm, Terry Reedy <[EMAIL PROTECTED]> wrote:
> Aaron "Castironpi" Brady wrote:
> class A(type):
> > ... def __call__( self, *ar ):
> > ... print 'call', self, ar
> > ...
> class B(object):
> > ... __metaclass__= A
> > ...
> B(3)
> > call (3,)
>
> >
On Sep 27, 4:01 pm, "Chris Rebert" <[EMAIL PROTECTED]> wrote:
> On Sat, Sep 27, 2008 at 3:42 PM, Michael Crute <[EMAIL PROTECTED]> wrote:
> > On Sat, Sep 27, 2008 at 5:43 PM, A. Joseph <[EMAIL PROTECTED]> wrote:
> >> What should I look for in a file to determine whether or not it is a
> >> MS Word
I'm exhausted, so I'll just shut up about this after a few final words.
1. "edits" is used in data warehousing to describe data scrubbing or
filtering of fields in records that are used as input sources for loading
into data warehouses. It's a term that goes way back to batch processing on
the mai
2008/9/27 Aaron Castironpi Brady <[EMAIL PROTECTED]>:
> No way. It's *zero* instead of one, if so, because the only thing C#
> has is a bunch of handcuffs and implicit 'self'. You have a line
> like:
You don't follow what I said, and from your tone I get the feeling you
don't *want* to follow w
On Sat, Sep 27, 2008 at 7:01 PM, Chris Rebert <[EMAIL PROTECTED]> wrote:
> Looking at the docs for the mimetypes module, it just guesses based on
> the filename (and extension), not the actual contents of the file, so
> it doesn't really help the OP, who wants to make sure their program
> isn't mis
Lie wrote:
> This is probably unrelated to Python, as this is more about design
> pattern. I'm asking your comments about this design pattern that is
> similar in functionality to Singleton and Borg: to share states.
>
> I'm thinking about this design pattern (I don't know if anyone has
> ever thou
On Sep 27, 6:55 pm, "Tim Rowe" <[EMAIL PROTECTED]> wrote:
> 2008/9/27 Aaron Castironpi Brady <[EMAIL PROTECTED]>:
>
> > No way. It's *zero* instead of one, if so, because the only thing C#
> > has is a bunch of handcuffs and implicit 'self'. You have a line
> > like:
>
> You don't follow what I s
On Sat, 27 Sep 2008 23:12:59 + (UTC), Cydrome Leader
<[EMAIL PROTECTED]> wrote:
>In rec.crafts.metalworking Jim Thompson <[EMAIL PROTECTED]> wrote:
>>
>> On Sat, 27 Sep 2008 18:47:16 -0400, default <[EMAIL PROTECTED]>
>> wrote:
>>
>>>On Sat, 27 Sep 2008 14:56:07 -0700 (PDT), Milenko Stojadin
Is there any way to attach a docstring to an attribute? I see that PEP-257
talks about attribute docstrings, but it references PDP-258, which was
rejected.
I suppose I could eschew plain attributes in favor of getter functions,
because those give me a place to hang a docstring, but that feels
while as I try to wrap a function using boost-python, I find a strange
situation.
#include
#include
#include
#include
#include
using namespace boost::python;
int printlist(list &l){
std::vector a;
a.push_back("c++");
a.push_back("javascript");
for (std::vector
On Sep 28, 11:50 am, Roy Smith <[EMAIL PROTECTED]> wrote:
> Is there any way to attach a docstring to an attribute? I see that PEP-257
> talks about attribute docstrings, but it references PDP-258, which was
> rejected.
>
> I suppose I could eschew plain attributes in favor of getter functions,
>
On Sat, 27 Sep 2008 11:12:00 -0700, Lie wrote:
> This is probably unrelated to Python, as this is more about design
> pattern. I'm asking your comments about this design pattern that is
> similar in functionality to Singleton and Borg: to share states.
>
> I'm thinking about this design pattern (
On Sat, 27 Sep 2008 17:41:42 -0400, Terry Reedy wrote:
> In 3.0, at least, one does not need a disk file to create a module.
>
> >>> import types
> >>> me = types.ModuleType('me') # type(__builtins__) works, no import
> >>> me
>
> >>> me.a = 1
> >>> me.a
> 1
> >>> me.a + 1
> 2
Seems to wo
On Sat, 27 Sep 2008 23:12:59 + (UTC), Cydrome Leader
<[EMAIL PROTECTED]> wrote:
>In rec.crafts.metalworking Jim Thompson <[EMAIL PROTECTED]> wrote:
>>
>> On Sat, 27 Sep 2008 18:47:16 -0400, default <[EMAIL PROTECTED]>
>> wrote:
>>
>>>On Sat, 27 Sep 2008 14:56:07 -0700 (PDT), Milenko Stojadi
Howdy,
I am working on a small PC game by using pygame. Since there are many
graphical objects to display and intensive user interactions, I would
like to employ MVC pattern to keep the system maintainable.
However, I cannot find a good article which discussing the general
knowledge about MVC, esp
On Sep 27, 4:50 pm, "Mikolai Fajer" <[EMAIL PROTECTED]> wrote:
> I have been experimenting with the abc module in py3k and thought
> about using the register method of an ABC as a class decorator:
>
>
> import abc
> class MyABC(metaclass=abc.ABCMeta):
> pass
>
> @MyABC.register
> class MySub()
George Sakkis wrote:
> It's funny how often you come with a better solution a few moments
> after htting send! The snippet above can (ab)use the decorator syntax
> so that it becomes:
>
> class A(Proxy):
>
> @ProxyMethod
> def bmethod(self):
> return self.b1
>
> @ProxyMethod
Hello all,
To me, this is a somewhat unintuitive behavior. I want to discuss the
parts of it I don't understand.
>>> f= [ None ]* 10
>>> for n in range( 10 ):
... f[ n ]= lambda: n
...
>>> f[0]()
9
>>> f[1]()
9
I guess I can accept this part so far, though it took a little getting
used to.
Hi,
I am trying to use python module smtplib to send my email out on
window xp (localhost).
import smtplib
server = smtplib.SMTP('localhost')
but I got the error information as follows:
Traceback (most recent call last):
File "", line 1, in ?
File "c:\python24\lib\smtplib.py", line 244, in
>From python manual
str( [object])
Return a string containing a nicely printable representation of an
object. For strings, this returns the string itself. The difference
with repr(object) is that str(object) does not always attempt to
return a string that is acceptable to eval(); its goal is to r
In message
<[EMAIL PROTECTED]>, est
wrote:
> The problem is, why the f**k set ASCII encoding to range(128)
Because that's how ASCII is defined.
> while str() is internally byte array it should be handled in
> range(256) !!
But that's for random bytes. How would you convert an a
On Sat, 27 Sep 2008 22:37:09 -0700, est wrote:
> The problem is, why the f**k set ASCII encoding to range(128)
Because that's how ASCII is defined. ASCII is a 7-bit code.
> while str() is internally byte array it should be handled in range(256)
> !!
Yes `str` can handle that,
In message <[EMAIL PROTECTED]>, James
Mills wrote:
> On Fri, Sep 26, 2008 at 8:20 AM, Lawrence D'Oliveiro
> <[EMAIL PROTECTED]> wrote:
>
>> Object orientation IS procedural.
>
> Correction: OOP is Imperative.
No, "procedural".
The functional unit is called an "expression", the encapsulation of
In message
<[EMAIL PROTECTED]>,
Aaron "Castironpi" Brady wrote:
> I understand that formal proof systems, as well as automated
> theorem provers, have been difficult to develop.
The basic problem is: having proved that a program satisfies certain
formally-specified criteria, how do you prove that
On Sat, 27 Sep 2008 21:43:15 -0700, Aaron \"Castironpi\" Brady wrote:
> To me, this is a somewhat unintuitive behavior. I want to discuss the
> parts of it I don't understand.
>
f= [ None ]* 10
for n in range( 10 ):
> ... f[ n ]= lambda: n
> ...
f[0]()
> 9
f[1]()
> 9
`n`
The following link directly discusses using MVC and pygame.
http://ezide.com/games/writing-games.html
--
-Mikolai Fajer-
--
http://mail.python.org/mailman/listinfo/python-list
89 matches
Mail list logo