This might have something to do with the class being derived from file.
I've written it so that it doesn't derive from file, and it works.
class File_and_console():
def __init__(self, *args):
self.fileobj = open(*args)
def write(self, s):
self.fileo
One way to get this to work is:
def inc(jj):
def dummy(jj = jj):
jj = jj + 1
return jj
return dummy
h = inc(33)
print h()
It's not very pretty though, especially when you have many variables
you want to have in the inner scope.
-Ben
On 1/9/08, Mi
I am trying to learn the best way to do intra-package references. My
package looks like this:
PackageName
__init__.py
/a
__init__.py
a.py
...
/b
__init__.py
...
/c
__init__.py
...
/d
__init__.py
...
I have l