*dots within the name of an imported module do in fact indicate a hierarchy of directories*
I thought it only did that if there was an __init__.py... On Sunday, April 21, 2013 12:04:22 PM UTC-7, Anthony wrote: > > Although web2py is generally easy to use and set up, it does assume some > knowledge of Python, so you might want to learn a little more Python before > proceeding. In Python, dots within the name of an imported module do in > fact indicate a hierarchy of directories -- so, for example, "import > contrib.aes" is expected to import aes.py from the "contrib" folder. You > don't need to make any changes to any of the files -- this will work the > same on Windows as Linux. Just download and unzip the source version of > web2py, and add the top level web2py folder to the Windows PYTHONPATH > environment variable. Of course, to run from source, you must have Python > itself installed on the system (the Windows binary version includes its own > Python interpreter, but the source version requires Python to be installed > on the system). Note, if you install Python on Windows, you should also > install pywin32: http://sourceforge.net/projects/pywin32/. > > Also, note that the book section on running web2py on Windows with Apache > does indicate you must run from source. > > Anthony > > On Sunday, April 21, 2013 11:32:32 AM UTC-4, mke...@halstead.com wrote: >> >> One more note: it seems like there must be more configuration steps >> involved for Windows setup than are documented. In addition to changes in >> wsgihandler.py, it looks like utils.py also has to be modified. It is >> looking for files in the unix directory structure which are named >> differently in the Windows directory structure. For instance, utils.py is >> looking for contrib.aes but on Windows, this is located in the contrib >> directory and calles aes.py. >> >> Is there a whole set of setup configuration instructions needed for a >> Windows/Apache runtime environment that I missed somewhere???? >> >> Thanks again. >> >> On Sunday, April 21, 2013 2:12:43 AM UTC-4, mke...@halstead.com wrote: >>> >>> I'm trying to run my web2py app behind Apache on Windows, however, when >>> Apache loads wsgihandler.py and tries to execute the line: >>> >>> import gluon.main >>> >>> it fails with the error: >>> >>> [Sun Apr 21 00:27:54 2013] [error] [client 127.0.0.1] mod_wsgi >>> (pid=1644): Target WSGI script 'C:/Documents and Settings/mkerins/My >>> Documents/web2py/wsgihandler.py' cannot be loaded as Python module. >>> [Sun Apr 21 00:27:54 2013] [error] [client 127.0.0.1] mod_wsgi >>> (pid=1644): Exception occurred processing WSGI script 'C:/Documents and >>> Settings/mkerins/My Documents/web2py/wsgihandler.py'. >>> [Sun Apr 21 00:27:54 2013] [error] [client 127.0.0.1] Traceback (most >>> recent call last): >>> [Sun Apr 21 00:27:54 2013] [error] [client 127.0.0.1] File >>> "C:/Documents and Settings/mkerins/My Documents/web2py/wsgihandler.py", >>> line 33, in <module> >>> [Sun Apr 21 00:27:54 2013] [error] [client 127.0.0.1] import >>> gluon.main >>> [Sun Apr 21 00:27:54 2013] [error] [client 127.0.0.1] ImportError: No >>> module named gluon.main >>> >>> When I look in the web2py base directory (*this is a Windows >>> installation*) , there is no file named "gluon.main". Should >>> wsgihandler.py be pointing to a different file to load other than >>> "gluon.main" or do I need to get gluon.main from somewhere? >>> >>> If I have to get gluon.main, where do I download it from and why isn't >>> it part of the Windows installation?? >>> >>> Thanks. >>> >>> -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.