Ok. To be more clear, consider the real python package Pandas.
This package defines a Series class and a DataFrame class.
The DataFrame is a matrix that can have columns of
different type.
If I write
import pandas as pd
df = pd.DataFrame({'A':[1,2,3],'B':[4,5,6]})
a data frame with two cols na
Hello,
I wish to extend the functionality of an existing python package by creating
a new package that redefines the relevant classes of the old package. Each
new class inherits the equivalent old class and adds new methods.
In the new package there is something like the following.
import old_p
Hi,
I work on the python module AVC (http://avc.inrim.it) useful for the
development of applications with GUIs. AVC is based on the property
mechanism: any a variable controlled by AVC is set as a property, so
when it is assigned by the application program, the __set__ function
is called and AVC do
Jeff wrote:
Can you be more specific? modA and modB don't import from each other
but both need to access objects in the global namespace of what
module? The controlling application?
Or do you mean that, for
example, modA needs to access some functions in modB, but does not
have import statem
Hi,
just an import problem:
a program imports two modules, modA and modB, each module do not known anything
about the other module (i.e. no cross imports in them), both modules needs to
refer to some functions that are defined in the global namespace of the other
module. There is a possible so
Data descriptors are set as attributes of object types. So if one has many
instances of the same class and wants each instance to have a different
property
(data descriptor) that can be accessed with a unique attribute name, it seems
to
me that there is no solution with data descriptors. There
My code is the following:
from Tkinter import *
def tk_dummy_call(*args):
return
root = Tk()
# save call address
original_tk_call = root.tk.call
# disable tcl command execution (this is the read-only attribute)
root.tk.call = tk_dummy_call
... some code ...
# restore tcl command execution
Hello,
it is possible to force in some way a write to a read-only attribute of
a python object? In which case?
Thanks for any answer.
F. Pollastri
--
http://mail.python.org/mailman/listinfo/python-list
Hello,
in mixed python-tcl programming I found the following different
behaviours of the same tcl script.
If I type manually in the python interpreter the following lines
>>> from Tkinter import *
>>> w = Tk()
>>> w.tk.evalfile('my_tcl_script.tcl')
where my_tcl_script.tcl is
#!/bin/sh
Hello,
I am trying to override a method of a class defined into an imported
module, but keeping intact the namespace of the imported module.
For example, let suppose
import module_X
and in module_X is defined something like
class A:
...
def method_1():
10 matches
Mail list logo