package import
ok, what am i doing wrong? in current working directory i have: t.py sub/t1.py t.py is: import sub.t1 i get: ImportError: No module named sub.t1 t.py is import sub i get: ImportError: No module named sub.t1 -- i am obviously missing something really basic here. have tried on multiple machines, linux and mac os x. thanks in advance. -- http://mail.python.org/mailman/listinfo/python-list
Re: package import
Thanks. Found that 10 minutes after I sent. On Feb 6, 2008, at 4:57 AM, Diez B. Roggisch wrote: > Sean Allen wrote: > >> ok, what am i doing wrong? >> >> in current working directory i have: >> >> t.py >> sub/t1.py >> >> t.py is: >> >> import sub.t1 >> >> i get: >> >> ImportError: No module named sub.t1 >> >> t.py is >> >> import sub >> >> i get: >> >> ImportError: No module named sub.t1 >> >> -- >> >> i am obviously missing something really basic here. >> have tried on multiple machines, linux and mac os x. > > http://docs.python.org/tut/node8.html#SECTION00840 > > Diez > -- > http://mail.python.org/mailman/listinfo/python-list -- http://mail.python.org/mailman/listinfo/python-list
Re: mod_python Unable to create file
On Mar 2, 2008, at 3:24 AM, kaush wrote: > On Mar 1, 11:24 pm, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: >> On Sat, 01 Mar 2008 22:47:02 -0800, kaush wrote: >>> I am using Apache and mod_python to service POST/GET requests on MAC >>> OS. My script tries to create a file >> >>> file = open(file_path, 'w') >> >>> This fails with the following error >> >>> EACCES >>> Permission denied >> >>> What is missing? >> >> To state the ovious: the rights to create a file at `file_path`. >> Remember >> that web servers usually have their own "user". >> >> Ciao, >> Marc 'BlackJack' Rintsch > > Thanks Marc. > In Apache what are the ways/directives to set the rights to a folder? none. you set permissions via the operating system. chmod would be the command from terminal you are looking for. or you can do get info on the folder in question via the finder and set perms there. -- http://mail.python.org/mailman/listinfo/python-list
Re: Urgent : How to do memory leaks detection in python ?
On Mar 17, 2008, at 3:21 AM, Pradeep Rai wrote: Thanks for your inputs !!! I have installed python v 2.5 on my Linux machine and executing the tool again. I would like to share the memory status( using free -m command ) before and after the execution of the tool. BEFORE EXECUTION total used free shared buffers cached Mem: 1006148858 0 8 92 -/+ buffers/cache: 46960 Swap: 2047 0 2047 AFTER EXECUTION === total used free shared buffers cached Mem: 1006940 66 0 49846 -/+ buffers/cache: 44962 Swap: 2047 0 2047 I am unable to find out why 66 MB system memory is left after tool execution ? If python does not have memory leaks then where this memory is going ? the free you are looking at is not a good indication of 'actual memory available' in linux. the number you are intersted is this one: -/+ buffers/cache: 46960 vs -/+ buffers/cache: 44962 before execution you had 960 available for use by applications after execution you had 962 available. here is one of many pages explaining memory under linux: http://gentoo-wiki.com/FAQ_Linux_Memory_Management -- http://mail.python.org/mailman/listinfo/python-list
Re: Apache binary error?
On Mar 17, 2008, at 10:55 AM, Michael Wieher wrote: > have simple webpage running > > apache, mod_python > > the error is binary > ...binary as in "every other" time I load the page, Firefox keeps > telling me I'm downloading a python script, and asks to open it in > WINE, which is really strange. > > then, alternately, it loads the page just fine. any clues as to why > this is happening? > -- for anything like mod_perl, mod_python etc the first thing i do when i get really weird errors it move to having only one apache process for testing. might want to start there. -- http://mail.python.org/mailman/listinfo/python-list
Re: What Programming Languages Should You Learn Next?
> Haven't found that killer problem so far ... for Haskell, check out HAppS. They have some great web application stuff going on. -- http://mail.python.org/mailman/listinfo/python-list
Re: Python is slow
On May 24, 2008, at 1:56 AM, cm_gui wrote: okay, maybe Python is only slightly slower than PHP, but it APPEARS to be much slower. there is a distinct waiting time whenever you access a python web page before the page starts loading. but once it loads, it is fast. php page starts loading immediately once you access it, but you can see the page slowly loading. because you see the page starts loading immediately, you feel it is fast. that is a product your html. in fact, there are entire books written about it. for example, if i put a external script in the head of the page that is a large script, rendering of the entire page will pause. if that script isnt needed to display the intial page, by moving the script tag to the end of the body of the page, rendering will proceed quicker in terms of time to display to user although overall speed will be the same. -- http://mail.python.org/mailman/listinfo/python-list