On Tuesday, October 23, 2012 12:25:07 PM UTC+2, Graham Dumpleton wrote: > That is by design. The directory the WSGI script file is in, is not > automatically in the Python module search path. There are various > reasons why but if I explain them it will just confuse you as it ins't > straight forward and needs some knowledge of how Python import system > works. >
ok > > and the module is in the same > > folder as the wsgi script. Or, should I turn all my .py scripts in a > wsgi > > scripts?? > > I would very strongly recommend at this point that you stop going down > the path of having separate WSGI script files in the one directory. > When you do that they by default all run in separate sub interpreters > of the same process. This will be inefficient. > ok I see > I would strongly recommend right now that you go learn how to use > Flask (flask.pocoo.org ), a Python micro framework which will teach you > a better way of creating a Python web application than working at raw > WSGI level. Part of what you will learn is how to structure the code > for your application so that it is out of harms way and not easily > downloadable by the users of your site, but such that modules will be > found when you import them. > I was looking at Flask, and came to two problems: 1) not for python 3.x 2) some guys on other forums believe that it would be an overkill to use flask for what I need, and recommender wsgi scripts > Go learn Flask. Read up how it handles HTML form data if these > arguments are meant to come from a web page. > :) ok, I get your point! but what about python 3? > Also note that to learn Flask you can start by using its inbuilt > development server. You do not need to run it up under mod_wsgi to > learn it and trying to do so will only complicate your life. Worry > about mod_wsgi when you actually need to deploy your site so that > other people can use it. > I am doing this as a part of the small project (that should expand soon)... so for several reasons I should stay with apache server.. and the deployment of the initial simple version will be soon, so... All i need to do is to make it possible to call some scripts .py and return the results... i have never imagined it would be so complicated... (?) -- You received this message because you are subscribed to the Google Groups "modwsgi" group. To view this discussion on the web visit https://groups.google.com/d/msg/modwsgi/-/4sbr_qjXmoMJ. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/modwsgi?hl=en.
