Hi :
Please look at this code:
>>> 'exe.torrent'.rstrip('.torrent')
'ex'<- it should be 'exe', why?
but this is a right answer:
>>> '120.exe'.rstrip('.exe')
'120' <-- this is a right value.
there is a bug in the rstr
Hi:
please look at this code.
def A():
print 'warp in A'
def why(self, *arg, **kw):
print 'in A'
print self
print arg
print kw
#self(*arg, **kw)
return why
class T(obj
Hi all:
When you import psyco in python2.5, you can see the memery grow up near
40MB in linux. but the same version python and
psyco, is only grow up 1MB under windows.
kyo
--
http://mail.python.org/mailman/listinfo/python-list
Hi all:
When you import psyco in python2.5, you can see the memery grow up
near 40MB in linux. but the same version python and psyco, is only grow up 1MB
under windows.
kyo
--
http://mail.python.org/mailman/listinfo/python-list
Hi guys:
I have a question about the this API.
PyObject *
PyString_InternFromString(const char *cp)
{
PyObject *s = PyString_FromString(cp);
if (s == NULL)
return NULL;
PyString_InternInPlace(&s);
return s;
}
Why it always try to call PyS
Hi :
Hi guys:
I have a question about the this API.
PyObject *
PyString_InternFromString(const char *cp) {
PyObject *s = PyString_FromString(cp);
if (s == NULL)
return NULL;
PyString_InternInPlace(&s);
return s;
}
Why it always try to cal
Hi :
python list object like a stl vector, if insert a object in the front
or the middle of it,
all the object after the insert point need to move backward.
look at this code ( in python 2.4.3)
static int
ins1(PyListObject *self, int where, PyObject *v)
{
int i, n = self->ob_siz
Python version 2.4.3
>>> l=range(50*1024*100)
after this code, you can see the python nearly using about 80MB.
then I do this
>>> del l
after this, the python still using more then 60MB, Why the python don't free my
memory?
Is there any way to force the python free my memory?
Thanks.
Kyo.
How to Adding Functionality to a Class by metaclass(not by inherit)
#example:
import inspect
class Foo(object):
def f(self):
pass
def g(self):
pass
class MetaFoo(type):
def __init__(cls, name, bases, dic):
How to Adding Functionality to a Class by metaclass(not by inherit)
#example:
import inspect
class Foo(object):
def f(self):
pass
def g(self):
pass
class MetaFoo(type):
def __init__(cls, name, bases, dic):
Hi All:
Python 2.4.1 (#2, May 5 2005, 11:32:06)
[GCC 3.3.5 (Debian 1:3.3.5-12)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import hotshot,hotshot.stats
Traceback (most recent call last):
File "", line 1, in ?
File "/usr/lib/python2.4/hotshot/stats.py
HI :
I want to test my system's performance. My system has a python embed.
How can I test the proformance like the
python module "profile" or "hotshot" . I can't use the module "profile" because
my system are base callback, so I can't run my
system
like this: profile.run(" "). The
o that? Thanks.
Kyo
> -Original Message-
> From: Skip Montanaro [mailto:[EMAIL PROTECTED]
> Sent: Monday, May 16, 2005 11:09 AM
> To: kyo guan
> Cc: python-list@python.org
> Subject: Re: question about the id()
>
>
> kyo> Can someone explain why the i
HI ALL:
Can someone explain why the id() return the same value, and why these
values are changing? Thanks you.
Python 2.4.1 (#65, Mar 30 2005, 09:13:57) [MSC v.1310 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> class A(object):
...
14 matches
Mail list logo