Simple question. If I have the following code:
class A:
def __init__(self, s):
self.s = s
self.m2 = m1
def m1(self):
pass
if __name__ == '__main__':
a = A("ads")
a.m1()
a = None
The object is not garbage collected, since there appears to be a cycle
(b
Remember the mantra, "Explitic is better than implicit." ;-)
~/santa
On Tue, Mar 8, 2011 at 7:15 PM, Martin De Kauwe wrote:
> On Mar 9, 12:53 pm, "Rhodri James"
> wrote:
> > On Wed, 09 Mar 2011 01:00:29 -, Martin De Kauwe
>
> > wrote:
> >
> > > class BaseClass(object):
> > >def __ini
Terry Reedy writes:
> For that type of feature, I am pretty sure the answer is no. There are
> developers from other implementations that have cpython commit rights
> and they have contributed new tests. Modules? I have never seen 'We
> first did this with xpython on the tracker, but it is possibl
On Mar 9, 12:53 pm, "Rhodri James"
wrote:
> On Wed, 09 Mar 2011 01:00:29 -, Martin De Kauwe
> wrote:
>
> > class BaseClass(object):
> > def __init__(self, a, b, c, d):
> > self.a = a
> > self.b = b
> > self.c = c
> > self.d = d
>
> > class NewClass(BaseCla
On Wed, 09 Mar 2011 01:00:29 -, Martin De Kauwe
wrote:
class BaseClass(object):
def __init__(self, a, b, c, d):
self.a = a
self.b = b
self.c = c
self.d = d
class NewClass(BaseClass):
def __init__(self):
super(NewClass, self).__init__(new)
Here's how you do inheritance:
C:\>python
Python 2.7.1 (r271:86832, Nov 27 2010, 17:19:03) [MSC v.1500 64 bit (AMD64)]
on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> class BaseClass(object):
... def __init__(self, a, b, c, d):
... self.a = a
... self.b = b
...
On 3/8/2011 4:39 PM, Larry Hastings wrote:
Adding to my previous response, extended slices and ellipses were added
for numerical python, but that is cpython extension, not alternative.
The 3.x memoryview came from there too, I believe.
--
Terry Jan Reedy
--
http://mail.python.org/mailman/list
On 3/8/2011 4:39 PM, Larry Hastings wrote:
I'm doing a talk at PyCon about changes to the Python language. I'm
wondering: are there any Python language changes that first shipped in
an implementation of Python besides CPython?
The sort of answer I'm looking for: "set literals first shipped in
J
On Mar 9, 11:50 am, "Rhodri James"
wrote:
> On Wed, 09 Mar 2011 00:29:18 -, Martin De Kauwe
> wrote:
>
>
>
>
>
>
>
> > On Mar 9, 10:20 am, Ethan Furman wrote:
> [snip]
> >> Just make sure and call the parent's constructor, either with
>
> >> class NewClass(BaseClass):
> >> def __init_
On Wed, 09 Mar 2011 00:29:18 -, Martin De Kauwe
wrote:
On Mar 9, 10:20 am, Ethan Furman wrote:
[snip]
Just make sure and call the parent's constructor, either with
class NewClass(BaseClass):
def __init__(self, ):
BaseClass.__init__(self, other_params)
or
class NewC
On Wed, Mar 9, 2011 at 9:20 AM, Ethan Furman wrote:
> Just make sure and call the parent's constructor, either with
>
> class NewClass(BaseClass):
> def __init__(self, ):
> BaseClass.__init__(self, other_params)
>
> or
>
> class NewClass(BaseClass):
> def __init__(self, ):
>
On Wed, Mar 9, 2011 at 9:20 AM, Danny Shevitz wrote:
> Is there any way to attach to an already running process by pid? I want to
> send
> commands from python to an application that is already running. I don't want
> to
> give the command name to subprocess.Popen.
Unless I'm missing something
On Mar 9, 10:20 am, Ethan Furman wrote:
> Martin De Kauwe wrote:
> > Hi,
>
> > I think this might be obvious? I have a base class which contains X
> > objects which other classes inherit e.g.
>
> > class BaseClass(object):
> > def __init__(self, something, something_else):
> > self.som
On 3/8/2011 3:34 PM, Philip Semanchuk wrote:
On Mar 8, 2011, at 3:25 PM, Sheng wrote:
This looks like a tornado problem, but trust me, it is almost all
about the mechanism of multiprocessing module.
[snip]
So the workflow is like this,
get() --> fork a subprocess to process the query re
At my work place I still use py2exe but I do not rely on its automatic
discovery and packaging.
The setup.py lists all the dependencies explicitly in "packages" and "includes"
parameters. These end up in library.zip.
Then the source file paths with the actual business logic are gathered with
On Mar 8, 2011, at 3:25 PM, Sheng wrote:
> This looks like a tornado problem, but trust me, it is almost all
> about the mechanism of multiprocessing module.
[snip]
> So the workflow is like this,
>
> get() --> fork a subprocess to process the query request in
> async_func() -> when async_fun
Howdy,
Is there any way to attach to an already running process by pid? I want to send
commands from python to an application that is already running. I don't want to
give the command name to subprocess.Popen.
thanks,
Danny
--
http://mail.python.org/mailman/listinfo/python-list
On 07-03-11 17:38, Rogerio Luz wrote:
import sys
import pickle
class MyClass:
teste = 0
nome = None
lista = ["default"]
def __init__(self):
for reg in range(1,10):
self.lista.append(reg)
^^
This probably doesn't do w
Martin De Kauwe wrote:
Hi,
I think this might be obvious? I have a base class which contains X
objects which other classes inherit e.g.
class BaseClass(object):
def __init__(self, something, something_else):
self.something = something
self.something_else = something_else
On Mar 8, 2011 6:02 PM, "Martin De Kauwe" wrote:
>
> Hi,
>
> I think this might be obvious? I have a base class which contains X
> objects which other classes inherit e.g.
>
> class BaseClass(object):
>def __init__(self, something, something_else):
>self.something = something
>
Hi,
I think this might be obvious? I have a base class which contains X
objects which other classes inherit e.g.
class BaseClass(object):
def __init__(self, something, something_else):
self.something = something
self.something_else = something_else
# etc
Typically I w
On Monday 2011 March 07 18:41, yuan zheng wrote:
> Hello, everyone:
>
> I encouter a question when implementing a commmand line(shell).
> I have implemented some commands, such as "start", "stop", "quit",
> they are easily implemented by "do_start", "do_stop" and "do_quit".
> there are no troub
I'm doing a talk at PyCon about changes to the Python language. I'm
wondering: are there any Python language changes that first shipped in
an implementation of Python besides CPython?
The sort of answer I'm looking for: "set literals first shipped in
Jython 2.2, six months before they ship
On 3/8/2011 2:00 PM, Matt Chaput wrote:
On 08/03/2011 8:58 AM, Cross wrote:
I know meta tags contain keywords but they are not always reliable. I
can parse xhtml to obtain keywords from meta tags; but how do I verify
them. To obtain reliable keywords, I have to parse the plain text
obtained from
This looks like a tornado problem, but trust me, it is almost all
about the mechanism of multiprocessing module.
I borrowed the idea from http://gist.github.com/312676 to implement an
async db query web service using tornado.
p = multiprocessing.Pool(4)
class QueryHandler(tornado.web.RequestHandl
On Mar 8, 7:21 am, Stefan Behnel wrote:
> Cliff Scherer, 08.03.2011 12:42:
>
> > I am looking for a Python library, which can handle the modelling of
> > material flows in Supply Chains.
>
> Note that TLAs do not always uniquely identify a subject. "SCM" is easily
> read as "source code managemen
On 3/8/2011 4:06 AM, bruce bushby wrote:
Hi
I've been playing with running python on embedded linux. I thought I
would run some "straces" to see how the install went when I noticed
python attempts to "open"
loads of files that don't exist.is there a way to prevent these
"open" attemptsth
Thanks all for the input, the remark about printing intermediate steps was a
very good one (and so obvious I can't believe it took me this long to get
there...)
The error was in my loop where I multiply by the "b" or "beta" coefficients.
The range for this loop (marked by j) is set up properly in
William S. wrote:
> I will answer myself. For those interested, because rpm will break the
> dependencies on the OS, you can install 2.7 with a simple bash script:
> http://willsani.com/2011/03/02/centos-5-5-x86_64-install-python-2-7/
If you use a spec file for the original RPM and modify it for
2011/3/8 Cross :
> On 03/08/2011 06:09 PM, Heather Brown wrote:
>>
>> The keywords are an attribute in a tag called , in the section
>> called
>> . Are you having trouble parsing the xhtml to that point?
>>
>> Be more specific in your question, and somebody is likely to chime in.
>> Although
>> I'm
I will answer myself. For those interested, because rpm will break the
dependencies on the OS, you can install 2.7 with a simple bash script:
http://willsani.com/2011/03/02/centos-5-5-x86_64-install-python-2-7/
Regards,
Will
--
http://mail.python.org/mailman/listinfo/python-list
On Mar 8, 6:49 pm, MRAB wrote:
> On 08/03/2011 18:12, yoro wrote:
>
>
>
> > Hello,
>
> > I am having a little trouble writing Dijkstra's Algorithm, at the
> > point where I have to calculate the distance of each node from the
> > source - here is my code so far:
>
> > infinity = 100
> > invali
On 08/03/2011 8:58 AM, Cross wrote:
I know meta tags contain keywords but they are not always reliable. I
can parse xhtml to obtain keywords from meta tags; but how do I verify
them. To obtain reliable keywords, I have to parse the plain text
obtained from the URL.
I think maybe what the OP is
Jean-Michel Pichavant wrote:
> I'm trying to autoexpand values as well as arguments using the builtin
> cmd.Cmd class.
>
> I.E.
> Consider the following command and arguments:
>
> > sayHello target=Georges
> 'Hello Georges !'
>
> I can easily make 'tar' expand into 'target=' however I'd like t
On 08/03/2011 18:12, yoro wrote:
Hello,
I am having a little trouble writing Dijkstra's Algorithm, at the
point where I have to calculate the distance of each node from the
source - here is my code so far:
infinity = 100
invalid_node = -1
startNode = 0
class Node:
distFromSource = in
We have written a cross-platform monitoring system that we have deployed
on our Linux servers and wish to put on our Windows servers too.
In the past I've played with py2exe and similar packages. However the
frequent updates to the monitoring suite mean that reinstalling an exe
for each update wou
Hello,
I am having a little trouble writing Dijkstra's Algorithm, at the
point where I have to calculate the distance of each node from the
source - here is my code so far:
infinity = 100
invalid_node = -1
startNode = 0
class Node:
distFromSource = infinity
previous = invalid_node
At 10:03 AM 3/8/2011, Tim Golden wrote:
On 08/03/2011 15:58, Tim Golden wrote:
On 08/03/2011 14:55, Edward Diener wrote:
I have multiple versions of Python installed under Vista. Is there any
easy way of switching between them so that invoking python and file
associations for Python extensions
Hello folks,
I'm trying to autoexpand values as well as arguments using the builtin
cmd.Cmd class.
I.E.
Consider the following command and arguments:
> sayHello target=Georges
'Hello Georges !'
I can easily make 'tar' expand into 'target=' however I'd like to be
able to expand the value as
Edward Diener wrote:
> I have multiple versions of Python installed under Vista. Is there any
> easy way of switching between them so that invoking python and file
> associations for Python extensions files work automatically ?
These associations are stored in the registry. Just cut out the accord
On 08/03/2011 15:58, Tim Golden wrote:
On 08/03/2011 14:55, Edward Diener wrote:
I have multiple versions of Python installed under Vista. Is there any
easy way of switching between them so that invoking python and file
associations for Python extensions files work automatically ?
Well, the an
On 08/03/2011 14:55, Edward Diener wrote:
I have multiple versions of Python installed under Vista. Is there any
easy way of switching between them so that invoking python and file
associations for Python extensions files work automatically ?
Well, the answer depends a bit on how au fait you ar
I have multiple versions of Python installed under Vista. Is there any
easy way of switching between them so that invoking python and file
associations for Python extensions files work automatically ?
--
http://mail.python.org/mailman/listinfo/python-list
On 03/08/2011 06:09 PM, Heather Brown wrote:
The keywords are an attribute in a tag called , in the section called
. Are you having trouble parsing the xhtml to that point?
Be more specific in your question, and somebody is likely to chime in. Although
I'm not the one, if it's a question of par
yuan zheng wrote:
> Hello, everyone:
>
> I encouter a question when implementing a commmand line(shell).
> I have implemented some commands, such as "start", "stop", "quit",
> they are easily implemented by "do_start", "do_stop" and "do_quit".
> there are no troubles.
> But I want to imp
On 05/03/2011 05:20, sathe...@e-ndicus.com wrote:
Hi All,
I am using python's reportlab to print some unicode Tamil characters
'பே'. I added necessary unicode font to reportlab. But It
prints the output as 'ேப' (in reverse order). This issue
happens for multi-byte characters, whereas for cha
On 01/-10/-28163 02:59 PM, Cross wrote:
Hello
I have got a project in which I have to extract keywords given a URL. I
would like to know methods for extraction of keywords. Frequency of
occurence is one; but it seems naive. I would prefer something more
robust. Please suggest.
Regards
Cross
--
On 01/-10/-28163 02:59 PM, yuan zheng wrote:
Hello, everyone:
I encouter a question when implementing a commmand line(shell).
I have implemented some commands, such as "start", "stop", "quit",
they are easily implemented by "do_start", "do_stop" and "do_quit".
there are no troubles.
B
Cliff Scherer, 08.03.2011 12:42:
I am looking for a Python library, which can handle the modelling of material
flows in Supply Chains.
Note that TLAs do not always uniquely identify a subject. "SCM" is easily
read as "source code management" or "software configuration management" on
a progra
On Tue, Mar 8, 2011 at 3:42 AM, Cliff Scherer wrote:
> Hi,
> I am looking for a Python library, which can handle the modelling of
> material flows in Supply Chains.
>
> Any idea ?
Some googling turned up https://sites.google.com/a/logopt.com/www/
If you're doing simulations, GarlicSim might be u
Hi,
I am looking for a Python library, which can handle the modelling of material
flows in Supply Chains.
Any idea ?
Thx
--
http://mail.python.org/mailman/listinfo/python-list
Thanks for both the suggestions. I haven't yet had time to try them
out but will do so and report back.
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, Mar 8, 2011 at 2:36 PM, bruce bushby wrote:
> Hi
> I've been playing with running python on embedded linux. I thought I would
> run some "straces" to see how the install went when I noticed python
> attempts to "open"
> loads of files that don't exist.is there a way to prevent these "o
Cross wrote:
> On 03/08/2011 01:27 PM, Chris Rebert wrote:
> Well Chris, my implementation is in Python. :) That is as much
> python-specific as it gets.
>
> Well the question is general of course and I want to discuss the problem
> here.
If you have anything written in Python yet and want to pre
Hi
I've been playing with running python on embedded linux. I thought I would
run some "straces" to see how the install went when I noticed python
attempts to "open"
loads of files that don't exist.is there a way to prevent these "open"
attemptsthey're responsible for 40% of my scripts exe
On Sat, Mar 5, 2011 at 5:28 PM, Tom Zych wrote:
> sathe...@e-ndicus.com wrote:
> >I am using python's reportlab to print some unicode Tamil characters
> > 'பே'. I added necessary unicode font to reportlab. But It
> > prints the output as 'ேப' (in reverse order). This issue
> > happens for mul
On Mon, Mar 7, 2011 at 6:30 AM, n00m wrote:
> Remind me this piece of humor:
>
> One man entered a lift cabin at the 1st floor,
> lift goes to the3rd floor, opens and ... it's empty!
> Physicist, Chemist and Mathematician were asked:
> what happened to the man?
>
> Physicist: he was squashed to th
On 03/08/2011 01:27 PM, Chris Rebert wrote:
Complaint: This question is not Python-specific in any way.
Regards,
Chris
Well Chris, my implementation is in Python. :) That is as much python-specific
as it gets.
Well the question is general of course and I want to discuss the problem here.
On Mon, Mar 7, 2011 at 11:18 PM, Cross wrote:
> Hello
>
> I have got a project in which I have to extract keywords given a URL. I
> would like to know methods for extraction of keywords. Frequency of
> occurence is one; but it seems naive. I would prefer something more robust.
> Please suggest.
>
59 matches
Mail list logo