Re: from string to raw string
Dan Perl wrote: > Yeah, you're right. I got it all twisted in my mind. It's late and I must > be getting tired. > Perl & Twisted in the same thread, that should fool the search engines :D -- http://mail.python.org/mailman/listinfo/python-list
Re: xmlrpclib question
Have you left localhost/127.0.0.1 in the server command? try replacing it with an empty string. -- http://mail.python.org/mailman/listinfo/python-list
Library Naming Conventions.
Is there any specific naming convention as to capitalisation? Cookies versus cgi for example. -- http://mail.python.org/mailman/listinfo/python-list
Dallas One wire tempreture measurement.
a previous thread http://mail.python.org/pipermail/python-list/2002-June/107616.html discussed this issue, and Dave Moor kindly pointed to his solution. However this is no longer a current link, does anyone know if there is a currently available solution? -- http://mail.python.org/mailman/listinfo/python-list
Re: Library Naming Conventions.
quoting: Modules should have short, lowercase names, without underscores. this still doesn't explain Cookie. [EMAIL PROTECTED] wrote: > see http://www.python.org/peps/pep-0008.html for naming conventions and > other style issues -- http://mail.python.org/mailman/listinfo/python-list
generating objects of a type from a name.
I'm trying to generate visual python objects from django objects and therefore have objects called 'Ring' and 'Cylinder' as django objects and I want to create objects of those names in visual. I can cludge it in varius ways by using dir and lots of if lookups but is there a way of doing this that allows the name to generate a visual object of the appropriate name or fail nicely if the visual object doesn't exist? -- http://mail.python.org/mailman/listinfo/python-list
Re: generating objects of a type from a name.
On Jul 27, 1:59 am, tsuraan <[EMAIL PROTECTED]> wrote: > I'm not sure what a visual object is, but to create an instance of an > object whose name is known, you can use "eval": > > >>> oname = 'list' > >>> obj = eval(oname)() > >>> obj > [] > >>> type(obj) > > > > Hope that helps! > > On 26/07/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > I'm trying to generate visual python objects from django objects and > > therefore have objects called 'Ring' and 'Cylinder' as django objects > > and I want to create objects of those names in visual. > > I can cludge it in varius ways by using dir and lots of if lookups but > > is there a way of doing this that allows the name to generate a > > visual object of the appropriate name or fail nicely if the visual > > object doesn't exist? > > > -- > >http://mail.python.org/mailman/listinfo/python-list Thanks for that. That's the answer. visual python is an fine programme for generating 3D objects (http:// www.vpython.org/) which generates an image from simple python code. import visual a = visual.sphere() generates a window with a 3D lit rendering of a white sphere which you can easily fly around with the mouse. a.blue = 0 makes it a yellow sphere and a.x = 1 moves it one unit along the x axis. I'm using it to create a visual representative of objects stored in the database, so I'm mapping the database objects to visual objects. Thanks once again. I hadn't considered eval, but once it's pointed out, it's obvious. Chris -- http://mail.python.org/mailman/listinfo/python-list
