Re: function inclusion problem

2015-02-27 Thread blue
On Wednesday, February 11, 2015 at 1:38:12 AM UTC+2, vlya...@gmail.com wrote: > I defined function Fatalln in "mydef.py" and it works fine if i call it from > "mydef.py", but when i try to call it from "test.py" in the same folder: > import mydef > ... > Fatalln "my test" > i have NameError: name

Re: function inclusion problem

2015-02-11 Thread Chris Angelico
On Thu, Feb 12, 2015 at 2:07 AM, Dave Angel wrote: > Similarly, if you import from more than one module, and use the import* > form, they could conflict with each other. And the order of importing will > (usually) determine which names override which ones. Never mind about conflicts and order of

Re: function inclusion problem

2015-02-11 Thread Tim Chase
On 2015-02-11 10:07, Dave Angel wrote: > if there are tons of them, you do NOT want to pollute your local > namespace with them, and should do: > > import mydef > > x = mydef.func2() # or whatever or, if that's verbose, you can give a shorter alias: import Tkinter as tk root = tk.Tk()

Re: function inclusion problem

2015-02-11 Thread Dave Angel
On 02/11/2015 08:27 AM, Victor L wrote: Laura, thanks for the answer - it works. Is there some equivalent of "include" to expose every function in that script? Thanks again, -V Please don't top-post, and please use text email, not html. Thank you. yes, as sohcahto...@gmail.com pointed out, yo

Re: function inclusion problem

2015-02-11 Thread Victor L
Laura, thanks for the answer - it works. Is there some equivalent of "include" to expose every function in that script? Thanks again, -V On Tue, Feb 10, 2015 at 7:16 PM, Laura Creighton wrote: > In a message of Wed, 11 Feb 2015 01:06:00 +0100, Laura Creighton writes: > >In a message of Tue, 10 F

Re: function inclusion problem

2015-02-10 Thread Laura Creighton
In a message of Wed, 11 Feb 2015 01:06:00 +0100, Laura Creighton writes: >In a message of Tue, 10 Feb 2015 15:38:02 -0800, vlyamt...@gmail.com writes: >>I defined function Fatalln in "mydef.py" and it works fine if i call it from >>"mydef.py", but when i try to call it from "test.py" in the same f

Re: function inclusion problem

2015-02-10 Thread Laura Creighton
In a message of Tue, 10 Feb 2015 15:38:02 -0800, vlyamt...@gmail.com writes: >I defined function Fatalln in "mydef.py" and it works fine if i call it from >"mydef.py", but when i try to call it from "test.py" in the same folder: >import mydef >... >Fatalln "my test" >i have NameError: name 'Fatall

Re: function inclusion problem

2015-02-10 Thread sohcahtoa82
On Tuesday, February 10, 2015 at 3:38:12 PM UTC-8, vlya...@gmail.com wrote: > I defined function Fatalln in "mydef.py" and it works fine if i call it from > "mydef.py", but when i try to call it from "test.py" in the same folder: > import mydef > ... > Fatalln "my test" > i have NameError: name 'F

Re: function inclusion problem

2015-02-10 Thread Ian Kelly
On Tue, Feb 10, 2015 at 4:38 PM, wrote: > I defined function Fatalln in "mydef.py" and it works fine if i call it from > "mydef.py", but when i try to call it from "test.py" in the same folder: > import mydef > ... > Fatalln "my test" > i have NameError: name 'Fatalln' is not defined > I also tr

Re: function inclusion problem

2015-02-10 Thread Michael Torrie
On 02/10/2015 04:38 PM, vlyamt...@gmail.com wrote: > I defined function Fatalln in "mydef.py" and it works fine if i call it from > "mydef.py", but when i try to call it from "test.py" in the same folder: > import mydef > ... > Fatalln "my test" > i have NameError: name 'Fatalln' is not defined >

Re: function inclusion problem

2015-02-10 Thread Steven D'Aprano
vlyamt...@gmail.com wrote: > I defined function Fatalln in "mydef.py" and it works fine if i call it > from "mydef.py", but when i try to call it from "test.py" in the same > folder: import mydef ... > Fatalln "my test" > i have NameError: name 'Fatalln' is not defined > I also tried include('myde

Re: function inclusion problem

2015-02-10 Thread sohcahtoa82
On Tuesday, February 10, 2015 at 3:38:12 PM UTC-8, vlya...@gmail.com wrote: > I defined function Fatalln in "mydef.py" and it works fine if i call it from > "mydef.py", but when i try to call it from "test.py" in the same folder: > import mydef > ... > Fatalln "my test" > i have NameError: name 'F

function inclusion problem

2015-02-10 Thread vlyamtsev
I defined function Fatalln in "mydef.py" and it works fine if i call it from "mydef.py", but when i try to call it from "test.py" in the same folder: import mydef ... Fatalln "my test" i have NameError: name 'Fatalln' is not defined I also tried include('mydef.py') with the same result... What is