Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!fdn.fr!usenet-fr.net!nerim.net!novso.com!newsfeed.xs4all.nl!newsfeed3a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.069 X-Spam-Evidence: '*H*': 0.86; '*S*': 0.00; '"my': 0.09; 'cc:addr :python-list': 0.11; 'nameerror:': 0.16; 'received:openend.se': 0.16; 'received:theraft.openend.se': 0.16; 'feb': 0.22; 'import': 0.22; 'cc:addr:python.org': 0.22; 'cc:2**1': 0.23; 'subject:problem': 0.24; 'fine': 0.24; 'defined': 0.27; 'header :In-Reply-To:1': 0.27; 'tried': 0.27; 'function': 0.29; 'url:mailman': 0.30; 'writes:': 0.31; 'url:python': 0.33; 'cc:no real name:2**1': 0.33; 'but': 0.35; 'url:listinfo': 0.36; 'charset :us-ascii': 0.36; 'url:org': 0.36; 'url:mail': 0.40; 'header :Message-Id:1': 0.63; 'email addr:gmail.com': 0.63; 'name': 0.63; 'to:addr:gmail.com': 0.65; '2015': 0.84; 'received:89': 0.85 To: vlyamtsev@gmail.com From: Laura Creighton Subject: Re: function inclusion problem In-Reply-To: Message from vlyamtsev@gmail.com of "Tue, 10 Feb 2015 15:38:02 -0800." References: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <21972.1423613160.1@fido> Content-Transfer-Encoding: quoted-printable Date: Wed, 11 Feb 2015 01:06:00 +0100 Cc: python-list@python.org, lac@openend.se X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 18 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1423613168 news.xs4all.nl 2848 [2001:888:2000:d::a6]:44994 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:85487 In a message of Tue, 10 Feb 2015 15:38:02 -0800, vlyamtsev@gmail.com write= s: >I defined function Fatalln in "mydef.py" and it works fine if i call it f= rom "mydef.py", but when i try to call it from "test.py" in the same folde= r: >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 the right syntax? >Thanks >-- = >https://mail.python.org/mailman/listinfo/python-list from mydef import Fatalln