Re: Import issue in python packages

2018-08-11 Thread Peter Otten
Venkatesh Adiga wrote: > Thanks Peter... What are the ways to update outside of the python program > without defining environment variable for source code path Otherwise > can I do it once in during initialization of sys.path update? I don't understand the question. Your options are - instal

Re: Import issue in python packages

2018-08-11 Thread Venkatesh Adiga
Thanks Peter... What are the ways to update outside of the python program without defining environment variable for source code path Otherwise can I do it once in during initialization of sys.path update? On Fri, 10 Aug 2018, 10:56 pm Peter Otten, <[email protected]> wrote: > Venkatesh Adiga

Re: Import issue in python packages

2018-08-10 Thread Peter Otten
Venkatesh Adiga wrote: > Hi All, > > I am facing issue with python package import. > In my project, I have many directories with different python classes > defined within them. I am trying to import those classes in another python > program, but not able to import them. > Here are my directories

Re: import issue with classes

2012-01-03 Thread Terry Reedy
On 1/3/2012 11:13 PM, Terry Reedy wrote: On 1/3/2012 10:06 PM, Andrew Berg wrote: On 1/3/2012 8:50 PM, Rodrick Brown wrote: Import FooA doesn't work and I need to use from FooA import FooA instead? This puzzles me. Thanks. If you have a module called FooA with a class called FooA, then import

Re: import issue with classes

2012-01-03 Thread Benjamin Kaplan
On Tue, Jan 3, 2012 at 9:50 PM, Rodrick Brown wrote: > I have a class FooB that derives from FooA > > i.e. > class FooB(FooA): >   FooA.__init__(self,...) > > Can someone explain why > > Import FooA doesn't work and I need to use from FooA import FooA instead? > This puzzles me. > Thanks. > > > >

Re: import issue with classes

2012-01-03 Thread Terry Reedy
On 1/3/2012 10:06 PM, Andrew Berg wrote: On 1/3/2012 8:50 PM, Rodrick Brown wrote: Import FooA doesn't work and I need to use from FooA import FooA instead? This puzzles me. Thanks. If you have a module called FooA with a class called FooA, then import FooA imports the /module/. The class would

Re: import issue with classes

2012-01-03 Thread Andrew Berg
On 1/3/2012 8:50 PM, Rodrick Brown wrote: > Import FooA doesn't work and I need to use from FooA import FooA > instead? This puzzles me. > Thanks. If you have a module called FooA with a class called FooA, then import FooA imports the /module/. The class would be FooA.FooA, just as the variable x

Re: Import Issue

2006-06-29 Thread Steve Holden
[EMAIL PROTECTED] wrote: > Hi All, > > What is the difference between >import string > and >from string import * > [EMAIL PROTECTED] ~/Projects/dbimp $ python Python 2.4.1 (#1, May 27 2005, 18:02:40) [GCC 3.3.3 (cygwin special)] on cygwin Type "hel

Re: Import Issue

2006-06-29 Thread Duncan Booth
wrote: > Hi All, > > What is the difference between >import string > and >from string import * > > Regards, > Praveen > "import string" is effectively the same as doing: string = sys.modules['string'] "from string import *" is effectively the

Re: Import Issue

2006-06-29 Thread Ravi Teja
[EMAIL PROTECTED] wrote: > What is the difference between >import string > and >from string import * Here is an explanation. http://effbot.org/zone/import-confusion.htm -- http://mail.python.org/mailman/listinfo/python-list

Re: Import Issue

2006-06-02 Thread Maric Michaud
Le Vendredi 02 Juin 2006 08:42, [EMAIL PROTECTED] a écrit : > Hi all, >After doing import file i am updating that file. Later i am > accessing a dictionary contained in that >file. Eventhough changes are reflected in the file... When i > access a dictionary those changes are

Re: Import Issue

2006-06-02 Thread A.T.Hofkamp
On 2006-06-02, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hi all, > After doing import file i am updating that file. Later i am > accessing a dictionary contained in that > file. Eventhough changes are reflected in the file... When i > access a dictionary those changes are > not there. I believ