Re: Importing is partially working...

2015-08-10 Thread Dwight GoldWinde
Such a simple change, I wouldn¹t think it would work. But it did. You suggested "from Functions import humprint² instead of "from Functions.py import humprint². Thank you, Chris! Now I can define functions all over the place. LOLŠ BIG SMILE... Always, Dwight www.3forliving.key.to (video p

Re: Importing is partially working...

2015-08-10 Thread Steven D'Aprano
On Tue, 11 Aug 2015 01:48 am, MRAB wrote: > On Windows, the extension for Python extension DLLs is ".pyd". I believe that there is a subtle difference in the entry-point depending on whether the file is named .pyd or .dll. http://effbot.org/pyfaq/is-a-pyd-file-the-same-as-a-dll.htm https://docs.

Re: Importing is partially working...

2015-08-10 Thread Chris Angelico
On Tue, Aug 11, 2015 at 1:48 AM, MRAB wrote: >> You're almost there! But in Python, you don't import something from a >> specific file - you import from a module, and the Python interpreter >> is free to locate that file anywhere that it can. It might be >> implemented in C, and be stored in Funct

Re: Importing is partially working...

2015-08-10 Thread MRAB
On 2015-08-10 11:11, Chris Angelico wrote: On Sun, Aug 9, 2015 at 3:45 PM, Dwight GoldWinde wrote: name = 'Jim' coach = 'Dwight' import importlib sentence = 'Hi, there, ' + name + '. My name is ' + coach + '. I will be your coach today.' from Functions.py import humprint humprint (sentence) Tr

Re: Importing is partially working...

2015-08-10 Thread Chris Angelico
On Sun, Aug 9, 2015 at 3:45 PM, Dwight GoldWinde wrote: > name = 'Jim' > coach = 'Dwight' > import importlib > sentence = 'Hi, there, ' + name + '. My name is ' + coach + '. I will be > your coach today.' > from Functions.py import humprint > humprint (sentence) > > Traceback (most recent call las

Importing is partially working...

2015-08-10 Thread Dwight GoldWinde
I am trying to import and function. The function (humprint) is defined in a .py module inside the same folder as the executing code. I am put traces in the Functions.py module to show that it works okay there (Python 3.4). Here is the code of the Functions.py module: try: print (callable(humprin