Thanks so much Marius! It works perfect for me:) The pylons website need to be updated: http://wiki.pylonshq.com/display/pylonscookbook/Getting+Data+from+the+Configuration+File;jsessionid=402A477E05D9266813EE2680E9C91CB9
On Fri, Jan 7, 2011 at 1:37 AM, Marius Gedminas <[email protected]> wrote: > On Fri, Jan 07, 2011 at 01:04:15AM -0800, pan pan wrote: >> Thanks so much Marius! The reason for sending out port, hostname and >> ssl configuration is that there are several pylons running on >> different machines. All of them need to register to a database so that >> latter other client can query the database and then make the >> connection. >> >> I tried to use config[__file__], > > I'm very sorry, I meant config['__file__'] with the quotes. > > Marius Gedminas > -- > The primary purpose of the DATA statement is to give names to constants; > instead of referring to PI as 3.141592653589797, at every appearance, > the variable PI can be given that value with a DATA statement, and > used instead of the longer form of the constant. This also simplifies > modifying the program, should the value of PI change. > -- Fortran manual for Xerox computers > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.10 (GNU/Linux) > > iEYEARECAAYFAk0m3tMACgkQkVdEXeem149pyQCcC16AfitYpG+VIJTIVtq9TKnt > ID0AnA2EM+8Va26rPE/AQj9ILzwv4HXx > =PzEC > -----END PGP SIGNATURE----- > > -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. 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/pylons-discuss?hl=en.
