[Webware-discuss] Library Dirs and Python 2.5
Hello all, I have a directory named lib in my working directory where I keep a SitePage.py file and call from lib.SitePage import SitePage at the top of all of my pages like it is described in some of the docs. This has always worked fine use Python 2.4. I recently upgraded to Python 2.5 and am now getting an error: ImportError: No module named lib.SitePage Here's where the bizarreness starts... I put a breakpoint right before the call to from lib.SitePage import SitePage so I can see what is going on. The directory that contains the lib package *IS* in sys.path. I can import all other packages in that same directory (except for the lib package and one other package I have in there called etc). I can also start a python shell from the working directory in question and import lib just fine. Is Webware (0.9.2) doing anything funny with the __import__ mechanism? It only occurs in Python 2.5... Python 2.4 seems to function as expected. -Seth __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __ - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Webware-discuss mailing list Webware-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/webware-discuss
Re: [Webware-discuss] Library Dirs and Python 2.5
Seth Remington wrote: Is Webware (0.9.2) doing anything funny with the __import__ mechanism? It only occurs in Python 2.5... Python 2.4 seems to function as expected. Yes, Webware employs an ImportSpy so that the AutoReloadAppServer knows when to restart. Python 2.5 changed some subtle details of the import mechanisms which can cause such problems in Webware 0.9.2. I have already fixed this in Webware 0.9.3. Can you try with the new version and let me know how it works? -- Christoph - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Webware-discuss mailing list Webware-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/webware-discuss
Re: [Webware-discuss] Library Dirs and Python 2.5
On Mon, 2007-04-30 at 23:07 +0200, Christoph Zwerschke wrote: Seth Remington wrote: Is Webware (0.9.2) doing anything funny with the __import__ mechanism? It only occurs in Python 2.5... Python 2.4 seems to function as expected. Yes, Webware employs an ImportSpy so that the AutoReloadAppServer knows when to restart. Python 2.5 changed some subtle details of the import mechanisms which can cause such problems in Webware 0.9.2. I have already fixed this in Webware 0.9.3. Can you try with the new version and let me know how it works? -- Christoph Thank you for the quick response Christoph. I tried Webware 0.9.3 and it works fine. -Seth __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __ - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Webware-discuss mailing list Webware-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/webware-discuss