|
by: Peter Abel |
last post by:
I have an application, which is an instance of a class
with a deeply nested object hierarchy. Among others one
method will be executed as a thread, which can be stopped.
Everything works fine except that when deleting the main
instance - after the thread has been stopped -
the __del__ method will not be carried out.
Tough a simple example works as expected:
>>> class A:
.... def __init__(self):
|
by: Emmanuel |
last post by:
Hi,
I run across this problem, and couldn't find any solution (python 2.2.2)
:
Code :
===========
from __future__ import generators
>>> class titi:
|
by: David MacQuigg |
last post by:
I'm __del__() to decrement a count of instances of a class whenever an
instance is deleted, and I'm getting very erratic behavior. This is
in CPython, which I am told has no problem with reference counts
getting out-of-sync with the deletion of instances. The behavior of
__del__() seems to be very sensitive to the exact sequence of
commands.
The example below is a repeatable test case. It might be possible to
simplify this further,...
|
by: Christopher J. Bottaro |
last post by:
I get this exception when I run the following code:
Exception exceptions.TypeError: 'super() argument 1 must be type, not None'
in <bound method Txrposdn.__del__ of <__main__.Txrposdn object at
0xf6f7118c>> ignored
Here is the code:
class Txrposdn(PRI.BasicBatch):
|
by: phil |
last post by:
> you haven't answered my question, btw: why are you using __del__
> to do something that the garbage collector should do for you?
After more reading it seems I have made an ass of my self on this
subject. Here is my problem at length.
I teach high school geometry. I have created a program with a
scalable graph on which to make drawings to illustrate concepts.
This is working well.
|
|
by: Torsten Bronger |
last post by:
Hallöchen!
When my __del__ methods are called because the program is being
terminated, I experience difficulties in calling functions that I
need for a clean shutdown of my instances. So far, there has been
only one of these functions, and a class-local alias solved the
problem. However, now there are many of them.
Is there a way to detect whether the program is being terminated?
(In this case, I wouldn't care and return from...
|
by: Gregor Horvath |
last post by:
Hi,
I do not understand why __del__ does not get executed in the following
example.
test.py:
#!/usr/bin/python
class A(object):
def __init__(self):
|
by: Erwan Adam |
last post by:
Hello all,
Can someone reproduce this bug ... I use :
python
Python 2.4.3 (#2, Sep 18 2006, 21:07:35)
on linux2
Type "help", "copyright", "credits" or "license" for more information.
First test :
|
by: George Sakkis |
last post by:
I'm baffled with a situation that involves:
1) an instance of some class that defines __del__,
2) a thread which is created, started and referenced by that instance,
and
3) a weakref proxy to the instance that is passed to the thread
instead of 'self', to prevent a cyclic reference.
This probably sounds like gibberish so here's a simplified example:
==========================================
|
by: Jason Baker |
last post by:
I have a class that I need to do some finalization on when it dies. I
know I can use the __del__ method, but I seem to recall that it
impedes garbage collection. Is this the case?
(keep in mind that my code aims to be compatible with python 2.3 to
python 2.5)
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
|