[google-appengine] Re: Using other python files with my app; importing

2008-12-28 Thread Alexander Kojevnikov

I suggest you to skim through the part of the tutorial that explains
modules and packages:
http://www.python.org/doc/2.5.2/tut/node8.html

On Dec 29, 9:18 am, MajorProgamming  wrote:
> This may be more of a general python question, but what's the best way
> of using many different .py files and importing one into another. For
> example, suppose I want to have one main.py and have a separate file
> that contains like 15 functions which are needed in main.py. First of
> all, what  do I have to include in the function.py file? and secondly,
> what do I have to include in the main.py file?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Using other python files with my app; importing

2008-12-28 Thread Mir Nazim

On Mon, Dec 29, 2008 at 3:48 AM, MajorProgamming  wrote:
>
> This may be more of a general python question, but what's the best way
> of using many different .py files and importing one into another. For
> example, suppose I want to have one main.py and have a separate file
> that contains like 15 functions which are needed in main.py. First of
> all, what  do I have to include in the function.py file? and secondly,
> what do I have to include in the main.py file?

the root of your GAE app is already under the PYTHONPATH. Therefore
you can import any moduleclass/function from anywhere in the directory
tree in a GAE app by referring to them from the root of your GAE app.

> >
>



-- 
Mir Nazim
Cell: +91 9469071855
Blog: http://saunzal.org
Company:http://www.ikraftsoft.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---