[Tutor] self.attribute and import attribute

2010-04-23 Thread Joson
ich way is high efficient? config.py: f = file("test.txt") app1.py: from config import * class App: def __init__(self): self.file = Attr1 def run(self): self.file.write("...") # f.write("...") Regards. Joson _

Re: [Tutor] Linux lib path

2010-04-13 Thread Joson
Thanks. 2010/4/13 Joson > thanks a lot. you've saved my life... > > 2010/4/10 Chris Fuller > > >> I'm using Debian. Used to be etch, but I did a double dist-upgrade >> recently. >> So, whatever the current testing release is. My shell

[Tutor] Linux lib path

2010-04-09 Thread Joson
;..."). I found it didn't work. Best regards, Joson ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

[Tutor] for _ in

2010-03-08 Thread Joson
7;s a library named "divisi". "OrderedSet" is a string set defined in this lib. "ndim" is integer. What's the meaning of "for _ in" ? Joson ___ Tutor maillist - Tutor@python.org To unsubscribe or change su

[Tutor] How to delete the last line from a file efficiently?

2010-02-18 Thread Joson
Hi all, Now I have a text file about 1MB. Sometimes I need to remove the last line. The current method I use is reading all content, finding the last sentence, remove it and write the new content to the file. So, it need to read a 1MB file and write a 1MB file. It's ineffictient, I thi

[Tutor] apache2.2 - django deployment

2010-02-09 Thread Joson
Hi all, I wanna deploy a django program on apache2.2. So I downloaded " mod_wsgi-win32-ap22py26-3.0.so" and copied it into apache2.2/modules/, renamed "mod_wsgi.so". in httpd.conf I appended sentence: LoadModule python_module modules/mod_wsgi.so Then It failed to start the server: httpd.exe: Syn