Fwd: Namespace question
- From: "Andrii V. Mishkovskyi" <mishok13@xxxxxxxxx>
- Date: Wed, 31 Oct 2007 17:19:25 +0300
2007/10/31, Frank Aune <Frank.Aune@xxxxxxxxxxxx>:
Hello,
Is it possible writing custom modules named the same as modules in the
standard library, which in turn use the same module from the standard
library?
Say I want my application to have a random.py module, which in turn must
import the standard library random.py module also, to get hold of the randint
function for example.
My attempts so far only causes my random.py to import itself instead of the
standard library random.py
Receipt for disaster? :)
You mean something like this:
.... print '42'import random
def foo():
42random.randit = foo
random.randit()
am I right?
--
Wbr, Andrii Mishkovskyi.
He's got a heart of a little child, and he keeps it in a jar on his desk.
.
- Prev by Date: Re: _tkinter installation in python 2.5 on mandriva with a default 2.4
- Next by Date: Re: shouldn't 'string'.find('ugh') return 0, not -1 ?
- Previous by thread: Re: Namespace question
- Next by thread: Re: Fwd: Namespace question
- Index(es):