Hi all,
Is there any good step by step online tutorial on OOPS concepts in python ?
i have checked some on the python.org.__doc__ page but couldnt make much sense.
especially i need help on newstyle classes.
regards,
KM
--
http://mail.python.org/mailman/listinfo/python-list
I suggest You to use base 64 encoded strings
something like
password = 'aGlkZGVuX3Bhc3N3b3Jk\n'
password = pasword.decode("base64")
--
http://mail.python.org/mailman/listinfo/python-list
I get a digest several times a day.
When I wish to respond to an item I must
cut and paste the item and the subject line.
Is there something to click on for a simple reply?
Using an old mozilla mail.
Thanks
--
http://mail.python.org/mailman/listinfo/python-list
I know how to open a system file with Python, but is there some way to
create one if it's not there?
Dan
--
http://mail.python.org/mailman/listinfo/python-list
On 3 May 2005 19:22:52 -0700, "Gensek" <[EMAIL PROTECTED]>
wrote:
>I want to use mod_python, but I'm having trouble. Here's what I have in
>my config:
I've been using cherrypy (cherrypy.org) instead of apache with
mod_python. In a lot of cases, apache is overkill. With cherrypy you
can build a
Try this online book, it may help, the url is: http://www.byteofpython.info
> Hi all,
>
> Is there any good step by step online tutorial on OOPS concepts in python
?
> i have checked some on the python.org.__doc__ page but couldnt make much
sense. especially i need help on newstyle classes.
>
>
I install the original python(www.python.org), it works with wxpython and
DrPython very very well.
But your case seem to be due to DrPython is not programed for Cygwin. You
should read through the system requirement of DrPython. As remember, it
stated the www.python.org only ( ;
> Hi,
>
> Did some
George Sakkis wrote:
> Bruno Desthuilliers wrote:
>
>>JZ a Ãcrit :
>>
>>>Probuje zainstalowac modul php pod zope i tam napisali dziwna rzecz
>
> ze
>
>>>potrzebuje "PHP CGI program" a nie PHP CLI. Kompilacja php 5.0.4
>
> pod
>
>>>linuksem daje mi w wyniku mod_php + 5 plikow binarnych: pear, p
Josef Meile wrote:
[Non-English/non-Polish answers to a post in Polish]
> I don't find this two replies funy :-(. I think it is impolite to make
> fun of the OP. You could say: "The official language is english" or
> something like that. And if somebody knows the language he speaks, then
> a poin
> this is a Qt app. app should watch for changes in /var/log/isdn.log and
> on file change (like new line was added to isdn.log) it should activate
> event in my app.
>
> i'm trying to fetch last line in file whenever isdnlog logs something
> so that i can parse that line for a number and store it
George Sakkis wrote:
> ÎÏÎ Î ÎÏÏÏÎÎÏÎ ÎÎÏÎÏÏÎÏÎ ÏÎÏÎÎ ÏÎ
> ÎÎÏÎÎÎÏ ÏÏ, Î ÎÎÎ ÎÎ ÏÎÏÎÎ
> ÎÏÏÏ Î ÎÏÏ Î ÎÏÎÎÏ ÎÏ
> ÎÏÎÏÎÎÎÏ ÏÏÎ ÎÎÏÏÎ...
Yeah, spreading that ole SCO source code again...
Peter
--
http://mail.python.org/mailman/listinfo/python-list
Dan wrote:
>
> I know how to open a system file with Python, but is there some way to
> create one if it's not there?
As in any other language I know : just open it in write mode !-)
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in '[EMAIL PR
Peter Otten wrote:
> Josef Meile wrote:
>
> [Non-English/non-Polish answers to a post in Polish]
>
>>I don't find this two replies funy :-(. I think it is impolite to make
>>fun of the OP. You could say: "The official language is english" or
>>something like that. And if somebody knows the langua
This newsgroup is in general very helpful, but there are some
exceptions; one of them is when the problem appears blatantly to be a
homework. Perhaps if you showed that you worked on it and made some
progress, but it's not quite right, someone may help you.
George
--
http://mail.python.org/mailm
Josef Meile wrote:
(snip)
>
> I don't find this two replies funy :-(. I think it is impolite to make
> fun of the OP.
My intent was not to make fun *of* the OP. Now I'm willing to admit that
my answer may not be as (kindly) funny as intended, and so I hope the OP
has a better sens of humor tha
Gensek wrote:
>
> I want to use mod_python, but I'm having trouble. Here's what I have in
> my config:
>
> LoadModule python_module /usr/local/apache2/modules/mod_python.so
>
>
> AddHandler mod_python .py
> PythonHandler mptest
> PythonDebug On
>
My guess is that you need to add an A
"bruno modulix" <[EMAIL PROTECTED]> wrote:
> Josef Meile wrote:
> (snip)
> >
> > I don't find this two replies funy :-(. I think it is impolite to
make
> > fun of the OP.
>
> My intent was not to make fun *of* the OP. Now I'm willing to admit
that
> my answer may not be as (kindly) funny as intend
Does it matter whether it is a homework?
Why do you look down upon homework?
Everyone can do his homework well without any problems in your logic?
It's a problem I met. I tried a lot and I can't work it out,
so I came here for help.
I saw someone complained that a question is too lengthy,
and I saw
On Wed, 04 May 2005 10:24:23 +0200, bruno modulix <[EMAIL PROTECTED]>
wrote:
>As in any other language I know : just open it in write mode !-)
Easy when you know how.
Thanks
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, 03 May 2005 17:05:46 +, Operation Latte Thunder wrote:
> I am playing around with Jabber with Twisted. I can receive messages just
> fine, and thats great, however, I am a bit confused about how to actually
> _send_ messages. From what I've seen, I need to call send() on the
> xmlstr
On Wednesday 04 May 2005 11:34, could ildg wrote:
> Does it matter whether it is a homework?
Yes, it does matter. We're not your CS-class homework monkeys... :-) We're a
forum of Python programmers who aid each other at thinking about solutions,
we don't present solutions (normally), for a beaut
Hi all,
I posted the following on the python tutor list 3 days ago ... and
haven't heard a peep from anyone - which is highly unusual on that list.
[Apologies for the slightly longer post due to code
with tests cases included at the end .]
I have created a "severely restrict
On 3 May 2005 22:43:02 -0700, aljosa <[EMAIL PROTECTED]> wrote:
> i'm trying to fetch last line in file whenever isdnlog logs something
> so that i can parse that line for a number and store it somewhere else,
> is there a standard solution for this?
> i'm using python2.3 on linux with PyQt3.
Use
On 5/3/05, Timothy Smith <[EMAIL PROTECTED]> wrote:
> exactly what i just stated, i don't want py2exe to zip up it's
> library's, but to put them in a sub dir.
> the reason for this, is so that when users login and update from svn,
> they only have to download some tiny pyc files, not a great big z
Op 2005-05-04, could ildg schreef <[EMAIL PROTECTED]>:
> Does it matter whether it is a homework?
Yes, because if other do your homework for you, you wont
have learned anything from it.
> Why do you look down upon homework?
Who says he does. That he is not willing to do your homework
for you, do
On 5/4/05, Timothy Smith <[EMAIL PROTECTED]> wrote:
> Simon Brunning wrote:
> >The zip file is a generated artifact. I've always found it a good rule
> >of thumb that you should keep source artifacts in your version control
> >system, not generated artifacts.
> >
> >
> >
> version control systems a
Hi,
is there any python bindings for sha-2 or sha-512?
Pycrypto seems to have only sha-1 bindings and I can't see any other package
on net...
Thanks,
--
Lukas "Almad" Linhart
[:: http://www.almad.net/ ::]
[:: Humans are too complicated to be described with words. ::]
[:: PGP/GNUPg key: http
Simon Brunning wrote:
>On 5/4/05, Timothy Smith <[EMAIL PROTECTED]> wrote:
>
>
>>Simon Brunning wrote:
>>
>>
>>>The zip file is a generated artifact. I've always found it a good rule
>>>of thumb that you should keep source artifacts in your version control
>>>system, not generated artifacts.
Dan wrote:
> On Wed, 04 May 2005 10:24:23 +0200, bruno modulix <[EMAIL PROTECTED]>
> wrote:
>
> >As in any other language I know : just open it in write mode !-)
>
> Easy when you know how.
>
> Thanks
e = file('c:/file.txt', 'w')
By the way, check out the Python tutor service...
http://mail.pyth
This is what you are looking for.
http://kodos.sourceforge.net/
--
http://mail.python.org/mailman/listinfo/python-list
Florian Lindner wrote:
>Traceback (most recent call last):
> File "ConfigReader.py", line 40, in ?
>c = ConfigReader(f)
> File "ConfigReader.py", line 32, in __init__
>print sourceNode.getElementsByTagName("filename")[0].nodeValue()
>TypeError: 'NoneType' object is not callable
>
>
Thi
Dear all,
I have a project that is conversion
of Php Web applications into Python cgi
applications. In my mind compare python-cgi
php is better. But I want to know clearly.
which one is better. so kindly show me the
advantages of python-cgi compare to Php
regards
PRaba
__
Sylvain Thenault <[EMAIL PROTECTED]> wrote:
> you can find some examples in our fatima project, a jabber bot testing
> client, available at http://www.logilab.org/projects/fatima/0.1
> You'll find a jabber.py module in the distribution containing jabber
> related code.
>
> hope that helps
thanks,
Hi all,
I'm trying to use popen3 to call cdrdao from within python, it gets half way
through though then hangs. This is easy to replicate from the interpreter.
import popen2
child = popen2.Popen3('cdrdao disk-info --device 0,0,0'.split(' '), 1, 100)
child.fromchild.read()
The above code works f
Timothy Smith wrote:
> Peter Hansen wrote:
>> Anything's possible. Maybe you could explain what you're actually
>> trying to accomplish (or the reasons) so we can better understand
>> where you're going with this...
>>
> exactly what i just stated, i don't want py2exe to zip up it's
> library's
could ildg wrote:
> I need a regular expression to check if a string matches it.
Why do you think you need a regular expression?
If another approach that involved no regular expressions worked much
better, would you reject it for some reason?
-Peter
--
http://mail.python.org/mailman/listinfo/p
phil wrote:
> I get a digest several times a day.
> When I wish to respond to an item I must
> cut and paste the item and the subject line.
> Is there something to click on for a simple reply?
> Using an old mozilla mail.
You are forced to cut and paste if you want to get the messages in a
digest
Maniac wrote:
> Florian Lindner wrote:
>
>>Traceback (most recent call last):
>> File "ConfigReader.py", line 40, in ?
>>c = ConfigReader(f)
>> File "ConfigReader.py", line 32, in __init__
>>print sourceNode.getElementsByTagName("filename")[0].nodeValue()
>>TypeError: 'NoneType' object
Lee Cullens wrote:
> Been here before, but can't remember what I used and anyway that was a
> PC platform.
>
> So, if you use a Regular Expression tool (PCRE standard) for Python
> programming and your development platform is Mac OS X, would you please
> help narrow down the search for me. All
v wrote:
> Please help. I'm new with Python.
> Using Boa (or Pythoncard) and pysqlite, how can I read/write from/to
> database, thanks
First learn how to read/write data from your db (without any gui stuff).
Then learn how to use your gui (without any db stuff). Then make the two
working tog
Tim Henderson:
> I am not quite sure what you want. However if you are looking for
> Python's regular expression module it is the re module. Just go to
> interactive help and view the api for it.
Thanks Tim,
I found RegexPlor - not as full as I was thinking of, but it does the
job.
Lee C
--
h
Florian Lindner wrote:
>But I don't really understand the logic:
>
>given I have the node A
>
>path
>
>A.firstChild.nodeValue == path
>
>How would the second child of A look like? (ok, None in this case)
>
Yes. It's actually required by DOM standard: NodeList (which is returned
from getElementsBy
Peter Hansen wrote:
>Timothy Smith wrote:
>
>
>>Peter Hansen wrote:
>>
>>
>>>Anything's possible. Maybe you could explain what you're actually
>>>trying to accomplish (or the reasons) so we can better understand
>>>where you're going with this...
>>>
>>>
>>>
>>exactly what i just st
Hello,
In Tkinter, is it safe to call widget.after(time, callback) from another
thread (other than the gui thread)?
Thanks,
Nir
--
http://mail.python.org/mailman/listinfo/python-list
A python interpreter embedded in a cherrypy webserver and controlled by
webbrower. Powered by AJAX. Currently only version 0.10 and only works
with firefox.
http://john.thetrotter.net
Also example of using cherrypy with AJAX (jsonrpc)
--
http://mail.python.org/mailman/listinfo/python-list
so something like,
x = sock.recv(1024)
while (len(x) > 0):
# do stuff
x = sock.recv(1024)
??
So what if the client sends 4 bytes, and then sends 8000 bytes? WIll I
get the first 4 bytes as a separate msg so to speak? Basically i want
to catch each message from the client as a whole.
Hey folks,
I wanna know more about encapsulation in python. Is it fully suported?
How can I define the encapsulation statements for methods and attributes?
Regards!
[]'s!
--
Adriano Monteiro Marques
www.gopython.com.br
[EMAIL PROTECTED]
I'm FREE... Are you?
(PYTHON powered)
--
http://mail.
Hello,
I'm using the PyXML Package.
My XML document looks like that:
/home/florian/visualizer/testdata.csv
print sourceNode.getElementsByTagName("filename")[0]
print sourceNode.getElementsByTagName("filename")[0].nodeValue()
gives:
Traceback (most recen
I can tell you that this is not any homework at all,
I think it by myself.
I like this maillist, it helped me a lot. but some guys as you look
weird.
On 4 May 2005 10:25:20 GMT, Antoon Pardon <[EMAIL PROTECTED]> wrote:
> Op 2005-05-04, could ildg schreef <[EMAIL PROTECTED]>:
> > Does it matter wh
Thank you.
I just learned how to use re, so I want to find a way to settle it by
using re. I know that split it into pieces will do it quickly.
On 5/4/05, Peter Hansen <[EMAIL PROTECTED]> wrote:
> could ildg wrote:
> > I need a regular expression to check if a string matches it.
>
> Why do you
codecraig wrote:
> so something like,
>
> x = sock.recv(1024)
> while (len(x) > 0):
> # do stuff
> x = sock.recv(1024)
>
>
> ??
>
> So what if the client sends 4 bytes, and then sends 8000 bytes? WIll I
> get the first 4 bytes as a separate msg so to speak? Basically i want
> to catch
Almad wrote:
> Hi,
>
> is there any python bindings for sha-2 or sha-512?
>
> Pycrypto seems to have only sha-1 bindings and I can't see any other package
> on net...
>
> Thanks,
On Debian GNU\Linux Testing, Python2.3-crypto contains sha256 hashing.
http://packages.debian.org/testing/python
yep, I'm using SimpleRPCServer, but something is getting messed up
between the receipt of the XML stream and the delivery to my function.
The "normal" entity references (like < and &) are handled OK,
but the character references are not working. For instance,
"André" is received by the server, bu
From: "Terje Johan Abrahamsen" <[EMAIL PROTECTED]>
Date: May 4, 2005 6:49:14 AM EDT
To: python-list@python.org
Subject: Re: Regular Expression tools?
This is what you are looking for.
http://kodos.sourceforge.net/
I've seen that and it looks great, but I don't have the Trolltech Qt applicat
> "Praba" == praba kar <[EMAIL PROTECTED]> writes:
Praba> Dear all,
Praba> I have a project that is conversion of Php Web applications
Praba> into Python cgi applications. In my mind compare
You might want to look into mod_python and psp (python server pages)
for a more straight
In article <[EMAIL PROTECTED]>,
Peter Hansen <[EMAIL PROTECTED]> wrote:
> [ ... ] (Note to self: check if zip files that can
> be in sys.path can be compressed,
Yes.
> and if py2exe compresses them.)
Don't know, but I assume yes.
Just
--
http://mail.python.org/mailman/listinfo/python-list
You mean private, protected, public, that kind of stuff ?
They do not exist in Python. Conventionally if you don't want
the user of a class to access a method or attribute, you use
the prefix _ ;
class K(object):
_a = 1
def __init__(self, val):
self.arg = val
self._hidde
[Peter Hansen]
> You are forced to cut and paste if you want to get the messages in a
> digest. I doubt any mail program has been designed to know how to do
> anything smarter,
Lars Magne Ingebrigtsen's wonderful Gnus (a much boosted, combined
news/mail reader, running within or over Emacs) kn
Personally I'd use groups.
--
http://mail.python.org/mailman/listinfo/python-list
Dan Bishop wrote:
> Andrew Dalke wrote:
>
>>Mike Meyer wrote:
>>
>>>Someone want to tell me the procedure for submitting FAQ entries,
>
> so I
>
>>>can do that for this?
>>
>>You mean more than what already exists at
>>
>
> http://www.python.org/doc/faq/general.html#why-are-floating-point-calcu
Leo 4.3 beta 1 is now available at http://sourceforge.net/projects/leo/
Leo 4.3 beta 1 completes all major features of Leo 4.3. There are no known
significant bugs.
The defining features of Leo 4.3:
-
1. Leo now stores options in @settings trees, that is, outline
Timothy Smith <[EMAIL PROTECTED]> writes:
> is it possible instead of py2exe putting all library's in a zip file,
> to just put them in a sub dir?
You can subclass the build_exe command (the extending sample shows how
to do this, althoutgh for a different purpose), and copy the files into
a sub d
Just <[EMAIL PROTECTED]> writes:
> In article <[EMAIL PROTECTED]>,
> Peter Hansen <[EMAIL PROTECTED]> wrote:
>
>> [ ... ] (Note to self: check if zip files that can
>> be in sys.path can be compressed,
>
> Yes.
>
>> and if py2exe compresses them.)
>
> Don't know, but I assume yes.
There's an op
On 2005-05-03, phil <[EMAIL PROTECTED]> wrote:
> I get a digest several times a day.
> When I wish to respond to an item I must
> cut and paste the item and the subject line.
> Is there something to click on for a simple reply?
> Using an old mozilla mail.
Instead of accessing the newsgroup throu
"Dan Bishop" <[EMAIL PROTECTED]> writes:
> Andrew Dalke wrote:
>> Mike Meyer wrote:
>> > Someone want to tell me the procedure for submitting FAQ entries,
> so I
>> > can do that for this?
>>
>> You mean more than what already exists at
>>
> http://www.python.org/doc/faq/general.html#why-are-float
François Pinard <[EMAIL PROTECTED]> writes:
> [Peter Hansen]
>
>> You are forced to cut and paste if you want to get the messages in a
>> digest. I doubt any mail program has been designed to know how to do
>> anything smarter,
>
> Lars Magne Ingebrigtsen's wonderful Gnus (a much boosted, combi
I might be wrong, but my experience is to keep all tkinter calls in the main
thread and use queues to have other threads tell the main one what to do.
Regards,
Philippe
Nir Aides wrote:
> Hello,
>
> In Tkinter, is it safe to call widget.after(time, callback) from another
> thread (other than
Isn't it a better idea to manipulate the import statement with use of
of the 'imp' module to get a restriction on the import statement?
--
http://mail.python.org/mailman/listinfo/python-list
Hello,
I am using SWIG-1.3.24 to make an extension (called SHIP) to Python2.4.1 and
then running under IDLE (if that makes any difference) but when I "import
SHIP" I get:
>>> import SHIP
Traceback (most recent call last):
File "", line 1, in -toplevel-
import SHIP
ImportError: dynamic mo
Jeremy Bowers wrote:
> def __init__(self, generator):
> self.generator = generator
You'll want to use iter(generator) there in order to handle reiterables.
--
http://mail.python.org/mailman/listinfo/python-list
Hi all,
I'm new to Python. I'm trying to create a fast function to do the following:
t = [['a1','a2'],['b1'],['c1'],['d1']]
l = [1,2,3,4,5]
>>> create_nested_list(t,l)
[[1, 2], [3], [4], [5]]
t is some sort of template. This is what I have now:
def create_nested_list(template,l_orig):
'''Us
Hello,
how can I give an arbitrary number of options in a automated way to a
function?
Example.
I've the list A =
[
1
2
3
...
]
Now I want to give this list to a function so that it is the same for
function like:
f(1, 2, 3, ...)
How can I do that?
Thanks,
Flor
On 5/4/05, Florian Lindner <[EMAIL PROTECTED]> wrote:
> Hello,
> how can I give an arbitrary number of options in a automated way to a
> function?
>
> Example.
>
> I've the list A =
>
> [1, 2, 3]
>
> Now I want to give this list to a function so that it is the same for
> function like:
>
> f(1
Are there only a few, unchanging templates? If so, (dynamiclly) create
a function for each template. This will be nearly the fastest you can
go in Python, excluding the time to create and byte-compile the nesting
function.
# This code is in the public domain
def make_nesting_expression(l, s):
Hello,
I was wondering if someone could explain the following situation to me
please:
>>> class C(object):
def f(self):
pass
>>> c = C()
>>> c.f
>
>>> C.__dict__['f'].__get__(c,C)
>
>>> c.f == C.__dict__['f'].__get__(c,C)
True
>>> c.f is C.__dict__['f'].__get__(c,C)
False
On Wed, 04 May 2005 07:13:22 -0300, =?ISO-8859-1?Q?Andr=E9_Roberge?= <[EMAIL
PROTECTED]> wrote:
>Hi all,
>
>I posted the following on the python tutor list 3 days ago ... and
>haven't heard a peep from anyone - which is highly unusual on that list.
>
>[Apologies for the slightly longer post due
dcrespo wrote:
> Does PySQLite run on Linux?
Yes!
>From my Gentoo laptop:
andyvaio root # emerge -av pysqlite
These are the packages that I would merge, in order:
Calculating dependencies ...done!
[ebuild R ] dev-python/pysqlite-0.5.1 0 kB
Total size of downloads: 0 kB
Do you want me to
You asked for parsing, here's some pyparsing. Download pyparsing at
http://pyparsing.sourceforge.net.
-- Paul
from pyparsing import *
IMPORT = Keyword("import")
AS = Keyword("as")
FROM = Keyword("from")
ident = Word(alphas+"_", alphanums+"_")
import1 = Group( IMPORT + ident + Optional( AS + ide
Hello everyone,
I am happy to announce the first stable release of CherryPy-2.
CherryPy-2 is a pythonic, object-oriented web development framework.
CherryPy-2 is a redesign of CherryPy-1 (the unpythonic features have
been removed): no more compilation step, pure python source code (no
more "Cher
Here is the solution. Incidentally, the client is Cold Fusion.
import re
import logging
import logging.config
import os
import SimpleXMLRPCServer
logging.config.fileConfig("logging.ini")
class
LoggingXMLRPCRequestHandler(S
We are pleased to announce the foundation of the Zope Italia
Association (AZI - Associazione Zope Italia).
It was created by a couple of mailing list users in the last months
(since march).
Main goals are to manage the Zope.IT community activities, to contribute
to the diffusion and to improve th
Hi, people. I hope someone would like to enlighten me.
For any application handling Unicode internally, I'm usually careful
at properly converting those Unicode strings into 8-bit strings before
writing them out.
However, this morning, I mistakenly forgot to do so before using one
Unicode string
phil wrote:
>>
>> By the way, what is 'rb' and 'wb' ?
>>
>
> Read Binary, Write Binary
> In Win32 the default is text mode which
> will screw up binary files
>
In fact, this is not just for Windows. Linux / Unix is unusual
using the originally non-standards-conforming line feed ('\n')
character
François Pinard <[EMAIL PROTECTED]> writes:
> Hi, people. I hope someone would like to enlighten me.
>
> For any application handling Unicode internally, I'm usually careful
> at properly converting those Unicode strings into 8-bit strings before
> writing them out.
>
> However, this morning, I m
>>
>>So what if the client sends 4 bytes, and then sends 8000 bytes? WIll I
>>get the first 4 bytes as a separate msg so to speak? Basically i want
>>to catch each message from the client as a whole.
>>
IF YOU WANT SEPARATE MESSAGES:
Modify the client to send an end of record, then:
On Server:
On 3 May 2005 08:07:06 -0700, "Chris Curvey" <[EMAIL PROTECTED]> wrote:
>I'm writing an XMLRPC server, which is receiving a request (from a
>non-Python client) that looks like this (formatted for legibility):
>
>
>
>echo
>
>
>
>Le Martyre de Saint André
avec inscription
>'Le Dominiquain.' et
Hello!
create or replace function trigger_keywords_maintain() returns trigger as $$
return 'MODIFY'
$$ language plpythonu;
update table set id = id where id = 7;
ERROR: invalid input syntax for type timestamp: "2005-05-03
14:07:33,279213"
I see that Python's timestamp format is n
Yup ?!? Weird ... especially as:
>>> id(c.f) == id(C.__dict__['f'].__get__(c,C))
True
I was pretty sure that 'id(a) == id(b)' iff 'a is b' ...
I thought initially that you had two *copies* of the
same method bot obviously it's not true ...
SB
--
http://mail.python.org/mailman/listinfo/python
On Wed, May 04, 2005 at 09:14:18AM -0700, Sébastien Boisgérault wrote:
>
> Yup ?!? Weird ... especially as:
>
> >>> id(c.f) == id(C.__dict__['f'].__get__(c,C))
> True
Here, c.f is discarded by the time the right-hand-side of == is
executed. So the object whose id() is being calculated on the
ri
I'm writing a web app whereby a user uploads a tar acrhive which is then
opened and processed. My web form reads the file like this:
while 1:
data = value.file.read(1024 * 8) # Read blocks of 8KB at a time
if not data: break
which leaves me with data as a string obj. The problem that I ha
Jeff Epler wrote:
> Are there only a few, unchanging templates? If so, (dynamiclly)
create
> a function for each template. This will be nearly the fastest you
can
> go in Python, excluding the time to create and byte-compile the
nesting
> function.
>
> # This code is in the public domain
> def m
Matthew Thorley wrote:
>I'm writing a web app whereby a user uploads a tar acrhive which is then
>opened and processed. My web form reads the file like this:
>
>while 1:
>data = value.file.read(1024 * 8) # Read blocks of 8KB at a time
>if not data: break
>
>which leaves me with data as a s
john wrote:
> Why do c.f and C.__dict__['f'].__get__(c,C) compare as equal under ==
> but not under *is* ?
These variations are equivalent. Every attribute access gives you a new
bound method:
>>> class C(object):
... def f(self): pass
...
>>> c = C()
>>> c.f is c.f
False
>>> c.f == c.f
Tr
Hi,
I have a zip file structured like this:
mymodule.zip\
module1.py
submodule\
submodule1.py
I tried to load submodule.submodule1 using this pice of code:
import zipimport
z = zipimport.zipimporter("mymodule.zip")
z.load_module("submodule.submodule1")
but it does not work (load_mod
John Abel wrote:
> Matthew Thorley wrote:
>
>> I'm writing a web app whereby a user uploads a tar acrhive which is then
>> opened and processed. My web form reads the file like this:
>>
>> while 1:
>>data = value.file.read(1024 * 8) # Read blocks of 8KB at a time
>>if not data: break
>>
>>
Hello,
I was wondering if there is any other way to securly connect to an
FTP site using SSL or TLS? I dont have the option of purchasing
M2Crypto from the site. Any help/suggestions would help. Thanks!
--Barry
--
http://mail.python.org/mailman/listinfo/python-list
Jeff Epler wrote:
> > >>> id(c.f) == id(C.__dict__['f'].__get__(c,C))
> > True
>
> Here, c.f is discarded by the time the right-hand-side of == is
> executed. So the object whose id() is being calculated on the
> right-hand-side could turn out to be the same, since the two objects
> have disjoint
I don't have direct experience by Google turned this up:
http://trevp.net/tlslite/
Larry Bates
scrimp wrote:
> Hello,
>I was wondering if there is any other way to securly connect to an
> FTP site using SSL or TLS? I dont have the option of purchasing
> M2Crypto from the site. Any help/sugg
Wow, thanks very much Ive been searching on google for a few days now
and have never seen this yet. Thanks ill take a look at what I can do
with this
--Barry
--
http://mail.python.org/mailman/listinfo/python-list
Lonnie Princehouse wrote:
> Non-trivial:
> Any time the user decides to (1) cache intermediary results for a cmp
> function or (2) define a __cmp__ function for the key return value.
> These arise when comparison of partial keys is often sufficient to
> establish order between two objects.
If yo
1 - 100 of 182 matches
Mail list logo