Ok.  I've graduated to a point where I need
to have multiple directories in my source code,
specifically, the following structure:

/opt               
   /webware    
      /WebKit
        (webkit files)
/site
   index.html    (what you see at http://mysite.com/WK/)
   SitePage.py   (the base page for my site)
   menu.py       (inherits from site page)
   /appone
      func.py    (inherits from SitePage.py)
      boogle.py  (also inherits from SitePage.py)
   /apptwo
      func.py    (inherits from SitePage.py)
      bongya.py  (also inherits from SitePage.py)

Further, I've added an __init__.py to both 
/site/appone and /site/apptwo with the code:


Questions:
  
  1) In func.py I want to write 
     "from ../SitePage import SitePage"

     This obviously won't work, which is why
     I added an __init__.py to both /site/appone
     and /site/apptwo with the following line:

         import sys
         sys.path.append('/site')

     So that "from SitePage import SitePage" 
     will work in func.py and bongya.py
     
     Is there a better way to do this?  Specifically,
     I'd like to keep all of the path specific info
     in the WebKit configuration file; but I didn't
     see how I can do this.

  2) Is it a problem having two "func.py"?  It shouldn't
     be, but I just wanted to check.

Thank you in advance!

Clark, feeling like a novice Python person.


_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to