Can you import the time module from the Python interactive prompt?

--S.

On Jan 31, 2013, at 04:55, Nathan Wright wrote:

> Greeting group,
> 
> I am experiencing an odd error when Apache (as www) tries to import time 
> through modwsgi.  I am using the QNX 6.5 operating system.  Their community 
> has a pkgsrc project and I'm using their packages hosted at 
> ftp://ftp.netbsd.org/pub/pkgsrc/packages/QNX/i386/6.5.0_head_20110826/All/.  
> I'm running QNX in a VirtualBox VM.
> 
> I'm running...
>       • Apache 2.2.19 (apache-2.2.19.tgz)
>       • Python 2.5 (included in QNX distribution)
>       • modwsgi 3.3 (ap22-py25-wsgi-3.3.tgz)
> This simple test app works fine...
> 
> import sys
> import os
> 
> def application(environ, start_response):
> status = '200 OK'
> output = 'Hello World!\n'
> response_headers = [('Content-type', 'text/plain'),
>  ('Content-Length', str(len(output)))]
> start_response(status, response_headers)
> return [output]
> 
> However this app doesn't...
> 
> import time
>  
> def application(environ, start_response):
> status = '200 OK'
> output = 'The time is %s\n' % repr(time.ctime())
> response_headers = [('Content-type', 'text/plain'),
>  ('Content-Length', str(len(output)))]
> start_response(status, response_headers)
> return [output]
>  
> It fails on import time.  At first I spent time attempting to figure how my 
> permissions were wrong, and where this darn time module was.  I discovered 
> that it is apparently built in to the python binary (I think)?  I am baffled 
> why modwsgi could import sys and os but not time.  
> 
> Anyone have any suggestions on next steps?
> 
> Much appreciated,
> Nathan
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "modwsgi" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/modwsgi?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/modwsgi?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to