JRCondon wrote:
> Sean, if you are asking what I think you are asking (I don't
> think name hiding is the issue), you can use
>
> from module_name import *
Sshh! We're obviously going to great lengths to not tell him about
*.
;)
Robert Brewer
MIS
Amor Ministries
[EMAIL PROTECTED]
--
http:
Sean, if you are asking what I think you are asking (I don't think name
hiding is the issue), you can use
from module_name import *
and you will end up with all of the functions at session scope. You can
use the 'as' to alias the function names if you wish
from module_name import fn1 as myfn1,
Sean wrote:
So what if I have a whole bunch of functions - say 25 of them.
Is there a way to do this without naming each function?
Yes [1], but it's basically deprecated and you shouldn't use it. Consider
refactoring your code.
Refactoring my code? Sorry, I am not sure what you mean here.
'Refact
Sean wrote:
Sean wrote:
Then I would have a script that uses the
print_this function defined in the module
without using the module name in the call.
from module_name import print_this
or, even:
from module_name import print_this as other_nice_name
So what if I have a whole bunch of functions -
"Sean" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> import module_name.py
leave off the .py
Irmen answered your main question.
Terry J. Reedy
--
http://mail.python.org/mailman/listinfo/python-list
Sean wrote:
from module_name import print_this
or, even:
from module_name import print_this as other_nice_name
So what if I have a whole bunch of functions - say 25 of them.
Is there a way to do this without naming each function?
Yes [1], but it's basically deprecated and you shouldn't use it. Co
>>>from module_name import print_this
>>>
>>>or, even:
>>>
>>>from module_name import print_this as other_nice_name
>>
>> So what if I have a whole bunch of functions - say 25 of them.
>> Is there a way to do this without naming each function?
>
> Yes [1], but it's basically deprecated and you shou
Sean wrote:
Sean wrote:
Then I would have a script that uses the
print_this function defined in the module
without using the module name in the call.
from module_name import print_this
or, even:
from module_name import print_this as other_nice_name
So what if I have a whole bunch of functions - say
> Sean wrote:
>
>> Then I would have a script that uses the
>> print_this function defined in the module
>> without using the module name in the call.
>
>
>
> from module_name import print_this
>
> or, even:
>
> from module_name import print_this as other_nice_name
>
So what if I have a whole bunc
Sean wrote:
Then I would have a script that uses the
print_this function defined in the module
without using the module name in the call.
from module_name import print_this
or, even:
from module_name import print_this as other_nice_name
--Irmen
--
http://mail.python.org/mailman/listinfo/python-lis
10 matches
Mail list logo