Re: How to import a function from another module...

2015-08-04 Thread marco . nawijn
On Tuesday, August 4, 2015 at 3:11:41 PM UTC+2, Dwight GoldWinde wrote: > Thank you, Steven. > I am a newbie with Python? so I really want to learn how to do it the easy > way. > Yes, could you tell me how to put the py.file that contains the function > in the Python search path??? > > > > BIG S

Re: How to import a function from another module...

2015-08-04 Thread Dwight GoldWinde
> Thank you, Steven. > I am a newbie with Python? so I really want to learn how to do it the easy > way. > Yes, could you tell me how to put the py.file that contains the function > in the Python search path??? > BIG SMILE... > Always, Dwight > www.3forliving.key.to (video playlist on YouTube) > w

Re: How to import a function from another module...

2015-08-03 Thread Steven D'Aprano
On Tue, 4 Aug 2015 09:57 am, Dwight GoldWinde wrote: > I am trying to import a function defined in another module. You can't use spaces in the name of importable Python modules: change the name from "Simulate typing.py" to "simulate_python.py". You can use spaces in file names if they are only us

How to import a function from another module...

2015-08-03 Thread Dwight GoldWinde
I am trying to import a function defined in another module. The code is this: name = 'Jim' sex = 'm' coach = 'Dwight' import importlib sentence = 'Hi, there, ' + name + '. My name is ' + coach + '. I will be your coach today.' importlib.import_module ('humprint', 'Macintosh HD/Users/dwightgoldwin