Graphical Engine
Hi, A few friends and myself were thinking of writing a graphical engine based on OpenGL. Does Python have the required speed for that task? Are there any examples out there of open-source engines which we can look at? A Google search yielded no interesting results, but then again I'm probably missing something. Vlad -- Lisp is to emacs what sex is to STDs. -- http://mail.python.org/mailman/listinfo/python-list
Re: Graphical Engine
Karlo Lozovina wrote: Vlad Dogaru wrote: A few friends and myself were thinking of writing a graphical engine based on OpenGL. Does Python have the required speed for that task? Are there any examples out there of open-source engines which we can look at? A Google search yielded no interesting results, but then again I'm probably missing something. http://www.ogre3d.org/wiki/index.php/PyOgre Ogre is nice at a glance, but we are looking to write our own engine. I realise it's deplicating effort, but we're looking to learn. Vlad -- Lisp is to emacs what sex is to STDs. -- http://mail.python.org/mailman/listinfo/python-list
Re: Convert String to list of chars
On Jan 27, 9:18 am, Neil Cerutti [EMAIL PROTECTED] wrote: On 2007-01-27, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: How can I convert a string to a char list? for example hello -- ['h','e','l','l','o'] I have been searching but I can't find my answers list(hello) Wow, I've been using [c for c in 'hello'] for as long as I can remember needing it. Thanks! Vlad -- http://mail.python.org/mailman/listinfo/python-list
Control-C alternative in Windows
Hello, I've written a simple, standalone wiki server in Python. It runs a BaseHTTPServer's serve_forever() method until a KeyboardInterrupt is caught, at which point it writes changes to a file and exits. This works as expected in Linux. However, in Windows I cannot stop the script with Control-C. I've only been able to stop it with Ctrl-Break, which does not send KeyboardInterrupt. This means no saving to the file and effectively a useless script. Any ideas as to how I might make this work in Windows? Thanks in advance, Vlad -- http://mail.python.org/mailman/listinfo/python-list
BaseHTTPServer - getting POST parameters
Hello, After experimenting for a while, I am still not able to find where the POST data is in the BaseHTTPRequestHandler class. I am trying to write a very simple HTTP server for a project of mine and I need to get the POST data. Certainly I am missing something, as it is a comon task. Thanks in advance, Vlad -- http://mail.python.org/mailman/listinfo/python-list
Re: Session implementation for Python
Bruno Desthuilliers wrote: Vlad Dogaru wrote: Hello, is there any PHP-like implementation for sessions in Python? I fear that writing my own would be seriously insecure, besides I could actually learn a lot by inspecting the code. The reason I am asking is that I would like to implement simple scripts which require login with CGI (no mod_python or Django -- I want to learn CGI first). http://jonpy.sourceforge.net/ Exactly what I was looking for. Thanks a bunch. Vlad -- http://mail.python.org/mailman/listinfo/python-list
Session implementation for Python
Hello, is there any PHP-like implementation for sessions in Python? I fear that writing my own would be seriously insecure, besides I could actually learn a lot by inspecting the code. The reason I am asking is that I would like to implement simple scripts which require login with CGI (no mod_python or Django -- I want to learn CGI first). Thanks in advance, Vlad -- There is nothing more dangerous than an idea when it is the only one you have. -- http://mail.python.org/mailman/listinfo/python-list
Re: Getting and Setting Cookies
John J. Lee wrote: Vlad Dogaru [EMAIL PROTECTED] writes: [...] I am trying to write a simple login script. I understand (or rather I think I understand) how to set a cookie with the Cookie module. My problem is getting the cookies that are currently set. How can I do that? You still haven't explicitly said that you're writing server-side code. If you are: IIRC, you .load() it from the HTTP header value, then you use it as a mapping (though, oddly, that seems undocumented, except in the Example section of the docs). A working CGI-based example (written in a rather retro style for ease of deployment): http://codespeak.net/svn/wwwsearch/ClientCookie/trunk/cookietest.cgi If you want to iterate over all cookies using module Cookie (that script does not), use .keys(), .values() or .items() on your SimpleCookie instance (it's also a little odd that instances of class SimpleCookie do not represent a single cookie, but a collection of cookies). That's pretty much what I was trying to find out. Thanks for the pointer. Vlad -- http://mail.python.org/mailman/listinfo/python-list
Re: Getting and Setting Cookies
John J. Lee wrote: Vlad Dogaru [EMAIL PROTECTED] writes: I am trying to use cookies and Python to create a simple login example. But I am very disoriented at the existence of two cookie libraries, namely Cookie and cookielib. I have seen examples of setting cookies [...] From the cookielib docs: http://docs.python.org/lib/module-cookielib.html | The cookielib module defines classes for automatic handling of HTTP | cookies. It is useful for accessing web sites that require small | pieces of data - cookies - to be set on the client machine by an HTTP | response from a web server, and then returned to the server in later | HTTP requests. (note the *accessing* there) [...] | Module Cookie: HTTP cookie classes, principally useful for server-side | code. The cookielib and Cookie modules do not depend on each | other. Module cookielib is for web client code (writing code that works like a browser). Module Cookie is for server-side code (writing code to make a web site work). You don't make it entirely clear which you're doing, but it sounds like the latter. I am trying to write a simple login script. I understand (or rather I think I understand) how to set a cookie with the Cookie module. My problem is getting the cookies that are currently set. How can I do that? -- http://mail.python.org/mailman/listinfo/python-list
Getting and Setting Cookies
Hello, I am trying to use cookies and Python to create a simple login example. But I am very disoriented at the existence of two cookie libraries, namely Cookie and cookielib. I have seen examples of setting cookies (although I am still not sure about timestamps and cookie lifespan), but no reference to getting the currently set cookies. For instance, I want to see if there is any 'user' value, to check whether the user has logged in. Please, enlighten me. Thanks in advance, Vlad -- http://mail.python.org/mailman/listinfo/python-list
Re: Python CGI Scripting Documentation
Alex Martelli wrote: snip Wow, I'm new in the field, but even I know your name. It's truly inspiring to be aswered to by you. Thank you, all of you, for your suggestions. I will try to look into the matter using the starting points you've given me, as well as read more about Django. Thanks, Vlad. -- http://mail.python.org/mailman/listinfo/python-list
Python CGI Scripting Documentation
Hello, I would like to learn web scripting with Python (sure, everyone uses PHP, but I don't like the syntax and Python is more general-purpose and... well, I guess you people know the advantages better than me). Where can I get a thorough introduction to both CGI and using Python for CGI? That includes installing my own web server (at home, for testing) and starting from scratch (by that I mean I have near null experience with CGI). I have tried looking through the source code of MoinMoin, but it's just too advanced for me -- I simply don't know where to start. Right now, I'll take any and all suggestions. However, please suggest books or articles that are up-to-date on Python programming; I'd hate to see that I'm studying obsolete texts or the like. Thanks in advance, Vlad -- If I make any mistake, be it regarding English or Usenet, do point it out to me. Thank you. -- http://mail.python.org/mailman/listinfo/python-list
Python CGI Scripting Documentation
Hello, I would like to learn web scripting with Python (sure, everyone uses PHP, but I don't like the syntax and Python is more general-purpose and... well, I guess you people know the advantages better than me). Where can I get a thorough introduction to both CGI and using Python for CGI? That includes installing my own web server (at home, for testing) and starting from scratch (by that I mean I have near null experience with CGI). I have tried looking through the source code of MoinMoin, but it's just too advanced for me -- I simply don't know where to start. Right now, I'll take any and all suggestions. However, please suggest books or articles that are up-to-date on Python programming; I'd hate to see that I'm studying obsolete texts or the like. Thanks in advance, Vlad -- If I make any mistake, be it regarding English or Usenet, do point it out to me. Thank you. -- http://mail.python.org/mailman/listinfo/python-list
Using Python as a web scripting language
Hello everyone,I am learning Python and have heard it can be used similarly to PHP for web scripting. Because I find the latter not entirely to my liking, I would like to use Python. How should I configure my web server, what do I need, where should I start at, etc. I realise this sort of question pops up regularly, so just give me a starting point and I'll work my way from there (hopefully). Thanks in advance,Vlad Dogaru--If I have somehow managed to break some sort of rules, either etiquette or English, by all means educate me. -- http://mail.python.org/mailman/listinfo/python-list