Hi,
I have a class which is a subclass of builtin-type list.
#--
class clist(list):
def __new__(cls, values, ctor):
val = []
for item in values:
item = ctor(item)
val.append(item
On Wed, Jan 7, 2009 at 11:59 PM, srinivasan srinivas
wrote:
> Hi,
> I have a class which is a subclass of builtin-type list.
>
> #--
> class clist(list):
> def __new__(cls, values, ctor):
> val = []
> f
FYI: the '/*.*' is part of the error message returned.
-Original Message-
From: ch...@rebertia.com [mailto:ch...@rebertia.com] On Behalf Of Chris
Rebert
Sent: Wednesday, January 07, 2009 6:40 PM
To: Per Olav Kroka
Cc: python-list@python.org
Subject: Re: listdir reports [Error 1006] The vo
On Wed, 07 Jan 2009 03:45:00 -0800, sturlamolden wrote:
> On Jan 7, 2:02 am, Steven D'Aprano
> wrote:
>
>> In Python code, there are no references and no dereferencing.
>
> The why does CPython keep track of reference counts?
Two different levels of explanation. At the level of Python code, yo
On Jan 7, 8:14 pm, Neal Becker wrote:
> Problem is, AFAIK a string can only be created as a copy of some other data.
> Say I'd like to take some large object and read/write to/from mmap object. A
> good way to do this would be the buffer protocol. Unfortunately, mmap only
> supports string.
--> 964 self.__tmp_data = copy.deepcopy(self.__data)
965
/usr/local/python-2.5.1/lib/python2.5/copy.py in deepcopy(x, memo, _nil)
160 copier = _deepcopy_dispatch.get(cls)
161 if copier:
--> 162 y = copier(x, memo)
163 else:
164 try:
/usr/local
On Thu, 08 Jan 2009 13:29:37 +0530, srinivasan srinivas wrote:
> Hi,
> I have a class which is a subclass of builtin-type list.
>
>
#--
> class clist(list):
> def __new__(cls, values, ctor):
> val = []
>
On Wed, 07 Jan 2009 20:31:23 +0100, excord80 wrote:
Does Python work with Tk 8.5? I'm manually installing my own Python
2.6.1 (separate from my system's Python 2.5.2), and am about to
install my own Tcl/Tk 8.5 but am unsure how to make them talk to
eachother. Should I install Tk first? If I put
Sibtey Mehdi wrote:
> I use multiprocessing to compare more then one set of files.
>
> For comparison each set of files (i.e. Old file1 Vs New file1)
> I create a process,
>
> Process(target=compare, args=(oldFile, newFile)).start()
>
> It takes 61 seconds execution time.
>
> When I do the sam
J. Cliff Dyer wrote:
> I want to be able to create an object of a certain subclass, depending
> on the argument given to the class constructor.
>
> I have three fields, and one might need to be a StringField, one an
> IntegerField, and the last a ListField. But I'd like my class to
> delega
I am baffled by this:
IDLE 1.2.2 No Subprocess
>>> input()
07
7
>>> input()
08
Traceback (most recent call last):
File "", line 1, in
input()
File "", line 1
08
^
SyntaxError: invalid token
of course, I can work around this using raw_input() but I want to
underst
Hi,
07 is octal. That's way 08 is invalid. Try this:
===> python
>>> print 011
9
>>> print int('011')
11
--
Thomas Guettler, http://www.thomas-guettler.de/
E-Mail: guettli (*) thomas-guettler + de
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
for debugging I want to raise an exception if an attribute is
changed on an object. Since it is only for debugging I don't want
to change the integer attribute to a property.
This should raise an exception:
myobj.foo=1
Background:
Somewhere this value gets changed. But I don't now where.
On Jan 8, 9:31 am, Alex van der Spek wrote:
> >>> eval('07')
> 7
> >>> eval('08')
>
> Traceback (most recent call last):
> File "", line 1, in
> eval('08')
> File "", line 1
> 08
> ^
> SyntaxError: invalid token
An integer literal with a leading zero is
interpreted as an octal
On Thu, Jan 8, 2009 at 7:31 PM, Nick Craig-Wood wrote:
(...)
> How many projects are you processing at once? And how many MB of zip
> files is it? As reading zip files does lots of disk IO I would guess
> it is disk limited rather than anything else, which explains why doing
> many at once is a
On Thu, Jan 8, 2009 at 1:38 AM, Thomas Guettler wrote:
> Hi,
>
> for debugging I want to raise an exception if an attribute is
> changed on an object. Since it is only for debugging I don't want
> to change the integer attribute to a property.
>
> This should raise an exception:
>
> myobj.foo=1
>
The issue is that I am on Python 2.4 which doesnt support func name.
I am using filename and lineno now. That does serve the purpose.
Thank you, I had not checked all the parameters.
Regards
K
Vinay Sajip wrote:
> On Jan 6, 4:17 pm, Kottiyath wrote:
> > I dont want the whole traceback. I just wa
Is there a way to read C# serialized objects into Python?
I know the definition and structure of the C# objects. The Python docs
say that pickle is specific to Python, which does not give me much hope.
There may be a library however that I haven't come across yet.
Thanks much,
Alex van der Spek
Dear Matt,
Thank you for your answer.
This script is just a kind of test script so as to actually get it started
on doing any simple job. The actual process would be much more complicated
where in I would like to extract the tar file and search for a file with
certain extension and this file would
Alex van der Spek wrote:
> Is there a way to read C# serialized objects into Python?
>
> I know the definition and structure of the C# objects. The Python docs
> say that pickle is specific to Python, which does not give me much hope.
> There may be a library however that I haven't come across ye
On Jan 8, 1:45 am, Steven D'Aprano
wrote:
> On Wed, 07 Jan 2009 10:17:55 +, Mark Wooding wrote:
snip
> > The `they're just objects' model is very simple, but gets tied up in
> > knots explaining things. The `it's all references' model is only a
> > little more complicated, but explains everyt
Thanks folks. Will write my own class Andrew
PS So for the record, this works and isn't as ugly/verbose as I was
expecting:
class TaggedWrapper():
def __init__(self, generator, logMixin, stream):
self.__generator = generator
self.__tag = '%...@%s' % (logMixin.describe()
ru...@yahoo.com wrote:
> I thought you were objecting to Python's use of the term "binding"
> when you wrote:
[snip]
> in response to someone talking about "...all those who use the term
> \"name binding\" instead of variable assignment...".
Oh, that. Well, the terms are `binding' and `assign
Thomas Guettler wrote:
> for debugging I want to raise an exception if an attribute is
> changed on an object. Since it is only for debugging I don't want
> to change the integer attribute to a property.
Why?
> This should raise an exception:
>
> myobj.foo=1
>
> Background:
> Somewhere this v
Ben Finney recently wrote:
> Paul McNett writes:
[...]
>> I always end up sending the first reply to the sender, then going
>> "oops, forgot to hit reply-all'", and sending another copy to the
>> list.]
[...]
> Thanks to the Python mailing list administrators for conforming to the
> standards and
Aaron Brady wrote:
> On Jan 8, 1:45 am, Steven D'Aprano
> wrote:
>> On Wed, 07 Jan 2009 10:17:55 +, Mark Wooding wrote:
> snip
>>> The `they're just objects' model is very simple, but gets tied up in
>>> knots explaining things. The `it's all references' model is only a
>>> little more compli
Alex van der Spek wrote:
> Is there a way to read C# serialized objects into Python?
>
> I know the definition and structure of the C# objects. The Python docs
> say that pickle is specific to Python, which does not give me much hope.
> There may be a library however that I haven't come across y
Adal Chiriliuc a écrit :
On Jan 7, 10:15 pm, Bruno Desthuilliers
wrote:
This being said, I can only concur with other posters here about the
very poor naming. As far as I'm concerned, I'd either keep the argument
as a boolean but rename it "ascending" (and use a default True value),
or keep the
On Sat, Jan 3, 2009 at 11:22 PM, Luke Kenneth Casson Leighton
wrote:
> secondly, i want a python25.lib which i can use to cross-compile
> modules for poor windows users _despite_ sticking to my principles and
> keeping my integrity as a free software developer.
If this eventually leads to being a
Thanks Nick.
It processes 10-15 projects(i.e. 10-15 processes are started) at once. One
Zip file size is 2-3 MB.
When I used dual core system it reduced the execution time from 61 seconds
to 55 seconds.
My dual core system Configuration is,
Pentium(R) D CPU 3.00GHz, 2.99GHz
1 GB RAM
Regards,
Go
On Thu, Jan 8, 2009 at 9:42 PM, Simon Cross
wrote:
> On Sat, Jan 3, 2009 at 11:22 PM, Luke Kenneth Casson Leighton
> wrote:
>> secondly, i want a python25.lib which i can use to cross-compile
>> modules for poor windows users _despite_ sticking to my principles and
>> keeping my integrity as a fr
On Thu, Jan 8, 2009 at 12:42 PM, Simon Cross
wrote:
> On Sat, Jan 3, 2009 at 11:22 PM, Luke Kenneth Casson Leighton
> wrote:
>> secondly, i want a python25.lib which i can use to cross-compile
>> modules for poor windows users _despite_ sticking to my principles and
>> keeping my integrity as a f
In Python empty container equals False in 'if' statements:
# prints "It's ok"
if not []:
print "It's ok"
Let's create a simple Foo class:
class Foo:
pass
Now I can use Foo objects in 'if' statements:
#prints "Ouch!"
f=Foo()
if f:
print "Ouch!"
So, default __nonzero__ impl is to re
On Thu, Jan 8, 2009 at 1:11 PM, David Cournapeau wrote:
> On Thu, Jan 8, 2009 at 9:42 PM, Simon Cross
> wrote:
>> On Sat, Jan 3, 2009 at 11:22 PM, Luke Kenneth Casson Leighton
>> wrote:
>>> secondly, i want a python25.lib which i can use to cross-compile
>>> modules for poor windows users _despi
On Thu, Jan 8, 2009 at 11:02 PM, Luke Kenneth Casson Leighton
wrote:
> On Thu, Jan 8, 2009 at 1:11 PM, David Cournapeau wrote:
>> On Thu, Jan 8, 2009 at 9:42 PM, Simon Cross
>> wrote:
>>> On Sat, Jan 3, 2009 at 11:22 PM, Luke Kenneth Casson Leighton
>>> wrote:
secondly, i want a python25.l
Hi,
I am getting the error TypeError: seek() takes exactly 2 arguments (3 given),
namely:
$ ./_LogStream.py
Traceback (most recent call last):
File "./_LogStream.py", line 47, in
log_stream.last_line_loc_and_contents()
File "./_LogStream.py", line 20, in last_line_loc_and_contents
s
On Jan 7, 9:35 am, tryg.ol...@gmail.com wrote:
> Hello -
>
> This is my first attempt at python cookies. I'm using the Cookie
> module and trying to set a cookie. Below is my code. The cookie does
> not get set. What am I doing wrong?
>
> print "Cache-Control: max-age=0, must-revalidate, no-sto
On Jan 7, 9:35 am, tryg.ol...@gmail.com wrote:
> Hello -
>
> This is my first attempt at python cookies. I'm using the Cookie
> module and trying to set a cookie. Below is my code. The cookie does
> not get set. What am I doing wrong?
>
> print "Cache-Control: max-age=0, must-revalidate, no-sto
wrote in news:053df793-9e8e-4855-aba1-f92482cd8922
@v31g2000vbb.googlegroups.com in comp.lang.python:
> class TaggedWrapper():
>
> def __init__(self, generator, logMixin, stream):
> self.__generator = generator
> self.__tag = '%...@%s' % (logMixin.describe(), stream)
>
Hi!
I have certain design problem, which I cannot solve elegantly. Maybe
you know some good design patterns for this kind of tasks.
Task:
We have a model which has two kinds of objects: groups and elements.
Groups can hold other groups (subgroups) and elements. It's a simple
directory tree, for
On Jan 7, 12:00 pm, Paul McGuire wrote:
> On Jan 7, 10:38 am, "J. Cliff Dyer" wrote:
>
> > I want to be able to create an object of a certain subclass, depending
> > on the argument given to the class constructor.
>
> > I have three fields, and one might need to be a StringField, one an
> > Integ
> anyway, i'm floundering around a bit and making a bit of a mess of the
> code, looking for where LONG_MAX is messing up.
fixed with this:
PyObject *
PyInt_FromSsize_t(Py_ssize_t ival)
{
if ((long)ival >= (long)LONG_MIN && (long)ival <= (long)LONG_MAX)
{
return PyInt_FromLong((l
Absolutely.
Trivially and at a high level,
teaching python to kids who are learning programming as introductory
material
teaching python to motivated college graduate students
teaching python to adult non-professional programmers with a need to learn
python (like for instance, frustrated account
Okay, I'm currently stuck with VBA / Excel in work and the following
paradigm:
VB (6? .NET? not sure) ==> VBA ==> Excel 2003 and Access
Where I'd like to be is this
Python ==> X ==> Open Office / (MySQL or other) for some sufficiently
useful value of X.
Does it exist? Is it just a set of mod
"Barak, Ron" wrote in message
news:7f0503cd69378f49be0dc30661c6ccf602494...@enbmail01.lsi.com...
Hi,
I am getting the error TypeError: seek() takes exactly 2 arguments (3
given), namely:
$ ./_LogStream.py
Traceback (most recent call last):
File "./_LogStream.py", line 47, in
log_str
> next bug: distutils.sysconfig.get_config_var('srcdir') is returning None (!!)
ok ... actually, that's correct. oops.
sysconfig.get_config_vars() only returns these, on win32:
{'EXE': '.exe', 'exec_prefix': 'Z:\\mnt\\src\\python2.5-2.5.2',
'LIBDEST': 'Z:\\mnt\\src\\python2.5-2.5.2\\Lib', 'pr
Hello -
I managed to get a cookie set. Now I want to delete it but it is not
working.
Do I need to do another 'set-cookie' in the HTTP header? I tried
(code below setting expires to 0) and it didn't work.
c = Cookie.SimpleCookie(os.environ["HTTP_COOKIE"])
c["mycook"]["expires"] = 0
print c
In
On Thu, 08 Jan 2009 08:42:55 -0600, Rob Williscroft wrote:
>
> def mydecorator( f ):
> def decorated(self, *args):
> logging.debug( "Created %s", self.__class__.__name__ )
> for i in f(self, *args):
> yield i
> return decorated
>
can optionally be written as:
def mydecorator
On Thu, Jan 8, 2009 at 10:07 AM, Dan Esch wrote:
> Okay, I'm currently stuck with VBA / Excel in work and the following
> paradigm:
>
> VB (6? .NET? not sure) ==> VBA ==> Excel 2003 and Access
>
> Where I'd like to be is this
>
> Python ==> X ==> Open Office / (MySQL or other) for some sufficie
Jonathan Gardner writes:
> On Jan 7, 9:16 am, "Chris Mellon" wrote:
>>
>> The OP wants a Ruby-style DSL by which he means "something that lets
>> me write words instead of expressions". The ruby syntax is amenable to
>> this, python (and lisp, for that matter) syntax is not and you can't
>> impl
-
(Apologies for cross-posting)
Symposium on “Visualization and Human-Computer”
7th EUROMECH Solid Mechanics Conference (ESMC2009)
Instituto Superior Técnico
[Python 2.6.1]
Hi,
to test existing Python code, I ran "python -3" ("warn about Python 3.x
incompatibilities") against a test file that only contains "print
'test'".
Unfortunately I saw no warnings about print becoming a function in
Python 3 ("print()"). Where is the problem?
Thorsten
--
htt
Hi Mark,
I think my open_file() - that is called in __init__ - assures that
self.input_file is a regular text file,
regardless if filename is a gz or a regular text file.
My Python is Python 2.5.2.
Bye,
Ron.
-Original Message-
From: Mark Tolonen [mailto:metolone+gm...@gmail.com]
Sent:
Shane wrote:
Consider a network of 3 fully-connected boxes i.e. every box as a TCP-
IP connection to every other box.
Suppose you start a python program P on box A. Is there a Python
mechanism for P to send a copy of itself to box B or C then start that
program P on B or C by running a method p
I have countered a problem while using wx.RichTextCtrl. I want to do some
check when user presss Ctrl+C to paste. But i found that i can not get the
wx.EVT_CHAR event while Ctrl+C is pressed. And I have tried many methods but
all failed.
So anybody can tell me some tips?Thank you!
--
http://mail.p
Scott David Daniels wrote:
Ross wrote:
There seems to be no shortage of information around on how to use the
time module, for example to use time.ctime() and push it into strftime
and get something nice out the other side, but I haven't found
anything helpful in going the other way.
As to a
On 2009-01-08, Alex van der Spek wrote:
> Thanks much, that makes sense!
Well, that's the correct explanation.
Whether that feature makes sense or not is debatable. Even I'm
not old-school enough that I ever use octal literals -- and I
used Unix on a PDP-11 for years (actually had my own PDP-1
On 8 Jan., 16:25, J Kenneth King wrote:
> As another poster mentioned, eventually PyPy will be done and then
> you'll get more of an "in-Python" DSL.
May I ask why you consider it as important that the interpreter is
written in Python? I see no connection between PyPy and syntactical
Python exte
Have been browsing through this list and reading documentation and tutorials
for python self-study. I have, apparently, teh stupid. Google is my
friend. Off I go. Thanks.
On 1/8/09, Benjamin Kaplan wrote:
>
>
>
> On Thu, Jan 8, 2009 at 10:07 AM, Dan Esch wrote:
>
>> Okay, I'm currently stuck
Filip Gruszczyński wrote:
Hi!
I have certain design problem, which I cannot solve elegantly. Maybe
you know some good design patterns for this kind of tasks.
Task:
We have a model which has two kinds of objects: groups and elements.
Groups can hold other groups (subgroups) and elements. It's a
Hi!
The mountain Python-3000 gave birth to a mouse Python-3.
You must waiting for Python-4000...
@+
MCI
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I need to write a simple Python script that I can connect to a FTP
server and download files from the server to my local box. I am
required to go through a FTP Proxy and I don't see any examples on how
to do this. The FTP proxy doesn't require username or password to
connect but the FTP serv
On 2009-01-06, Jeremy.Chen wrote:
> ftp.storbinary("STOR ftp-tst/ftp-file\n", fl)
> --
> I think the params after STOR should't be a path,should be splited.
> ftp.cwd("ftp-tst")
> ftp.storbinary("STOR ftp-file\n", fl)
No that isn't the problem. The problem is the '\n' at the end of the
On Tue, 06 Jan 2009 10:44:39 -0700, Joe Strout wrote:
> Not that I have anything against Flash; I've started learning it just
> last week, and apart from the nasty C-derived syntax, it's quite nice.
> It has a good IDE, good performance, great portability, and it's easy to
> use. It just surprise
Can find nothing in the on-line docs or a book.
Groping in the dark I attempted :
script24
import io
io.open('stdprn','w') # accepted
stdprn.write('hello printer') # fails < stdprn is not defined >
Thanks to all responders I'm inching up on the snake.
Dave WB3DWE
--
http:
Thanks Chris and Diez for the quick pointers... Very helpful
Ross.
--
http://mail.python.org/mailman/listinfo/python-list
Is it possible to use sftp without a password from python?
--
http://mail.python.org/mailman/listinfo/python-list
Thanks much, that makes sense! Alex van der Spek
--
http://mail.python.org/mailman/listinfo/python-list
Is there a module where you could figure week of the day, like where
it starts and end. I need to do this for a whole year. Thanks.
--
http://mail.python.org/mailman/listinfo/python-list
What? Sounds a bit unlikely unless its Virgin..
I'd imagine it might be that your isp needs to get itself off a black list.
Brian
--
My Hotmail Account
mildew_spo...@hotmail.com
"simonh" wrote in message
news:fd0bd7d3-ad1d-43c2-b8e5-642a95c21...@t26g2000prh.googlegroups.com...
> Hi. Not sure i
You could look at something like the following to turn the class
iteslf into a decorator (changed lines *-ed):
> class TaggedWrapper():
>
* def __init__(self, logMixin, stream):
> self.__tag = '%...@%s' % (logMixin.describe(), stream)
> logMixin._debug('Created %s' % self)
>
>
here are a few tuts that go into more detail
http://effbot.org/librarybook/datetime.htm
http://seehuhn.de/pages/pdate
--
http://mail.python.org/mailman/listinfo/python-list
class Element(object):
>operations = "Element operations"
>
>
class Group(object):
>operations = "Group operations"
>
>
e = Element()
g = Group()
e.operations
> 'Element operations'
g.operations
> 'Group operations'
But this is the same as asking
> ... nd, that means disabling setup.py or hacking it significantly
> to support a win32 build, e.g. to build pyexpat, detect which modules
> are left, etc. by examining the remaining vcproj files in PCbuild.
>
> ok - i'm done for now.
> if anyone wants to play with this further, source
On Thu, 08 Jan 2009 16:38:53 +0100, Thorsten Kampe wrote:
> [Python 2.6.1]
>
> Hi,
>
> to test existing Python code, I ran "python -3" ("warn about Python 3.x
> incompatibilities") against a test file that only contains "print
> 'test'".
>
> Unfortunately I saw no warnings about print becoming
Filip Gruszczyński wrote:
class Element(object):
operations = "Element operations"
class Group(object):
operations = "Group operations"
e = Element()
g = Group()
e.operations
'Element operations'
g.operations
'Group operations'
But this is the same as asking for a clas
Filip Gruszczyński wrote:
> Hi!
>
> I have certain design problem, which I cannot solve elegantly. Maybe
> you know some good design patterns for this kind of tasks.
>
> Task:
>
> We have a model which has two kinds of objects: groups and elements.
> Groups can hold other groups (subgroups) and
On Jan 7, 3:56 pm, jakecjacobson wrote:
> On Jan 7, 2:11 pm, jakecjacobson wrote:
>
>
>
> > On Jan 7, 12:32 pm, jakecjacobson wrote:
>
> > > Hi,
>
> > > I need to write a simple Python script that I can connect to a FTP
> > > server and download files from the server to my local box. I am
> > >
David Hláčik wrote:
> Hi,
>
> so okay, i will create a helping set, where i will be adding elements
> ID, when element ID will be allready in my helping set i will stop and
> count number of elements in helping set. This is how long my cycled
> linked list is.
> But what if i have another condi
I'm writing a small program which uses different threads to monitor an
IMAP mailbox and an RSS feed. If network is not available when the
program starts, both threads will sleep for a while and try again. It
seems that the first thread succeeds when the network becomes
available will cause the othe
On Jan 8, 9:16 am, tryg.ol...@gmail.com wrote:
> Hello -
>
> I managed to get a cookie set. Now I want to delete it but it is not
> working.
>
> Do I need to do another 'set-cookie' in the HTTP header? I tried
> (code below setting expires to 0) and it didn't work.
> c = Cookie.SimpleCookie(os.en
Thorsten Kampe wrote:
> [Python 2.6.1]
>
> Hi,
>
> to test existing Python code, I ran "python -3" ("warn about Python 3.x
> incompatibilities") against a test file that only contains "print
> 'test'".
>
> Unfortunately I saw no warnings about print becoming a function in
> Python 3 ("print()
Ross wrote:
> Scott David Daniels wrote:
>> Ross wrote:
>>> There seems to be no shortage of information around on how to use the
>>> time module, for example to use time.ctime() and push it into
>>> strftime and get something nice out the other side, but I haven't
>>> found anything helpful in goi
Nick Craig-Wood schrieb:
> Thomas Heller wrote:
>> Nick Craig-Wood schrieb:
>> > Interesting - I didn't know about h2xml and xml2py before and I've
>> > done lots of ctypes wrapping! Something to help with the initial
>> > drudge work of converting the structures would be very helpful.
>> >
>>
I am not a #python operator, but do note that #python is +r so you must be
registered and identified to join the channel, see
http://freenode.net/faq.shtml#userregistration . Otherwise, giving the
exact ban that is affecting you or your hostmask would probably be helpful
to the operators.
On Wed
tryg.ol...@gmail.com wrote:
Hello -
I managed to get a cookie set. Now I want to delete it but it is not
working.
Why struggle with this manually? Isn't it better to learn a bit of
framework like Pylons and have it all done for you (e.g. in Pylons you
have response.delete_cookie method)?
In article ,
Unknown wrote:
> On 2009-01-08, Alex van der Spek wrote:
> > Thanks much, that makes sense!
> Well, that's the correct explanation.
> Whether that feature makes sense or not is debatable.
The debate is over! In Py 3.0, octal literals changed from 07 to 0o7;
the old format gets an
I am trying to download a file within a very large zipfile. I need two
partial downloads of the zipfile. The first to get the file byte
offset, the second to get the file itself which I then inflate.
I am implementing the partial downloads as follows:
con = ftp.transfercmd('RETR ' + filename, res
> c["mycook"]["expires"] = 0
Set ["expires"] using the following format to any time less than
current (which causes the browser to delete the cookie).
Here's a function I use to return a cookie expiry timestamp, negative
values passed in result in cookie being deleted.
def cookie_expiry_date(numd
On Jan 7, 3:23 pm, "Martin v. Löwis" wrote:
> > Thanks for the responses. What I mean is when a python process is
> > interrupted and does not get a chance to clean everything up then what
> > is a good way to do so? For instance, I have a script that uses child
> > ptys to facilitate ssh connec
On Jan 7, 12:42 pm, Eric Snow wrote:
> I was reading in the documentation about __del__ and have a couple of
> questions. Here is what I was looking at:
>
> http://docs.python.org/reference/datamodel.html#object.__del__
>
> My second question is about the following:
>
> "It is not guaranteed that
Thanks for your patience waiting for me to isolate the problem.
| Package
--__init__.py ->empty
--Package.py ->empty
--Module.py
import cPickle
class C(object):
pass
def fail():
return cPickle.dumps(C(), -1)
import Package.Module
Package.Module.fail()
The failure s
Okay, found it on my own. ftp.voidresp() is what is needed, and it
does _not_ seem to be in the Python documentation for ftplib.
On Jan 8, 1:58 pm, Brendan wrote:
> I am trying to download a file within a very large zipfile. I need two
> partial downloads of the zipfile. The first to get the file
On Jan 8, 1:16 pm, Jose C wrote:
> > c["mycook"]["expires"] = 0
>
> Set ["expires"] using the following format to any time less than
> current (which causes the browser to delete the cookie).
> Here's a function I use to return a cookie expiry timestamp, negative
> values passed in result in cooki
Ben Finney wrote:
Paul McNett writes:
But arguing about this here isn't going to change anything: opinions
differ just like tabs/spaces and bottom-post/top-post.
In cases like this, one side can simply be wrong :-)
Best of luck getting your programs behaving as you want them to!
BTW, I agr
Steve Holden holdenweb.com> writes:
> Thorsten Kampe wrote:
> > Unfortunately I saw no warnings about print becoming a function in
> > Python 3 ("print()"). Where is the problem?
> >
> I *believe* that's not flagged because 2to3 will fix it automatically.
This is correct; there's not much point
[Steven's message hasn't reached my server, so I'll reply to it here.
Sorry if this is confusing.]
Aaron Brady wrote:
> On Jan 8, 1:45 am, Steven D'Aprano
> wrote:
> > On Wed, 07 Jan 2009 10:17:55 +, Mark Wooding wrote:
> >
> > > The `they're just objects' model is very simple, but gets tied
On Jan 7, 6:21 pm, Scott David Daniels wrote:
> Adal Chiriliuc wrote:
> > On Jan 7, 10:15 pm, Bruno Desthuilliers
> > wrote:
> >> ... I'd either keep the argument as a boolean but rename it "ascending" ...
>
> > Well, I lied a bit :-p
> > But what if we can't solve it as elegantly, and we n
On Jan 8, 10:39 am, loial wrote:
> Is it possible to use sftp without a password from python?
Yes you can use keys you preestablish between the server and client so
you dont need passwords, i do this on all my servers then lock off the
ability to accept passwords at all, this way no one can dicti
I have a decorator in a class to be used by that class and by inheriting classes
##
class C(object):
@staticmethod # With this line enabled or disabled usage in either C
or D will be broken. To see that D works remember to remove usage in C
def decorateTest(func):
1 - 100 of 193 matches
Mail list logo