From kveroneau at gmail.com Wed Jan 12 23:03:33 2011 From: kveroneau at gmail.com (Kevin Veroneau) Date: Wed, 12 Jan 2011 22:03:33 -0600 Subject: [Python Wpg] Distributing Python applications to Windows users Message-ID: Hello everyone, Does anybody have experience in deploying a Python application to Windows users, assuming they do not have Python installed? Is it possible to make the installation seamless using InnoSetup? The only issues I can think of, would be if the Python application was developed using Qt4, GTK, or SDL, how would one also install these required dependencies? Is there a native Windows GUI module for Python? If so, one could try to import the various front-end GUI toolkits until one is successfully imported without raising an exception. It would then use that front-end to display the application GUI for the user, and use the same models and application controllers globally for all front-ends. I see this being a huge advantage to coding multi-platform applications in Python, since it is an interpreted language, during start-up it can automatically determine the optimum front-ends and back-ends to use during program execution, without requiring to dynamically linking to each Library(like a traditional compiler does). Is it possible to bind an entire Python application and the interpreter into a single EXE for easy deployment, or a similar method? Thanks, Kevin Veroneau -------------- next part -------------- An HTML attachment was scrubbed... URL: From stuart at swilliams.ca Wed Jan 12 23:16:12 2011 From: stuart at swilliams.ca (Stuart Williams) Date: Wed, 12 Jan 2011 22:16:12 -0600 Subject: [Python Wpg] Distributing Python applications to Windows users In-Reply-To: References: Message-ID: I have experience. The py2exe program is good with a InnoSetup config in the setup.py code to create a Windows installer. I'll send a simple example tomorrow. Remind me if I forget - I'm very busy this week. Stuart. On Wed, Jan 12, 2011 at 10:03 PM, Kevin Veroneau wrote: > Hello everyone, > > Does anybody have experience in deploying a Python application to Windows > users, assuming they do not have Python installed? Is it possible to make > the installation seamless using InnoSetup? > > The only issues I can think of, would be if the Python application was > developed using Qt4, GTK, or SDL, how would one also install these required > dependencies? Is there a native Windows GUI module for Python? If so, one > could try to import the various front-end GUI toolkits until one is > successfully imported without raising an exception. It would then use that > front-end to display the application GUI for the user, and use the same > models and application controllers globally for all front-ends. > > I see this being a huge advantage to coding multi-platform applications in > Python, since it is an interpreted language, during start-up it can > automatically determine the optimum front-ends and back-ends to use during > program execution, without requiring to dynamically linking to each > Library(like a traditional compiler does). > > Is it possible to bind an entire Python application and the interpreter > into a single EXE for easy deployment, or a similar method? > > Thanks, > Kevin Veroneau > > > _______________________________________________ > Winnipeg Python Users Group mailing list > http://WinniPUG.ca > Winnipeg at python.org > http://mail.python.org/mailman/listinfo/winnipeg > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kveroneau at gmail.com Thu Jan 13 16:09:12 2011 From: kveroneau at gmail.com (Kevin Veroneau) Date: Thu, 13 Jan 2011 15:09:12 -0600 Subject: [Python Wpg] An interesting project I am working on in Django Message-ID: Hello everyone, If you remember the mod_python module for Apache, then you might recall a nifty mod_python handler called "mod_python.Publisher". I am currently working on a native Django implementation of this mod_python handler. Since mod_python is no longer being developed, and some websites may need to use legacy code from mod_python, but need to upgrade to a newer framework, this solution may work. At the moment, I got the basics complete, the importer and some introspection components. It can, at the moment take in URL paths such as: /module.py/func_name, as did the mod_python.Publisher. To make this routine safe, it is confined to modules in a specific path under the django project root. Furthermore, it uses Django's great urlpatterns to make sure that no badly formed URLs are being used. I enjoyed using mod_python.Publisher, as it was incredibly quick to develop an application without needing to deal with a urls.py file or similar. It basically exposes functions in a Python module to be published to the web. This can also come in handy for creating a simple RPC system using AJAX. At the moment, it is very basic, and does not support GET/POST methods the same way which mod_python.Publisher does. However, this feature is planned in the near future. As an example of this: def contact(request, name=None, email=None, etc...): It will basically parse through the GET and POST, and pass them as kwargs to the function. I hope to add decorates to make some functions only accessible from a POST method, and others only from a GET method. For anybody interested, I currently have a subversion repo set-up at this location: svn://kveroneau.info/publisher There is currently no web access to the SVN, and none is planned. However, I do plan on releasing a downloadable ZIP/TGZ for those without SVN binaries. In the SVN is a completely working Django 1.2.4 project, just rename settings.EXAMPLE.py to settings.py and run a server using manage.py. I plan on creating a Django middleware for dispatching to the publisher, similar to how Flatpages works. My next focus is setting kwargs for the function being called to simplify access to form variables. Although, the standard request Django object is passed through. I also hope to develop a PSP handler in Django as well, which would work similar to mod_python.PSP handler. PSP pages are very similar to PHP or ASP, but render Python code instead. I found this to be easiest way to start in Python web application programming, from someone who came from PHP. PHP developers are a used to coding in a very unethical way, in my opinion, however this is the way they unfortunately prefer. With the PSP pages, I hope to be-able to develop restricted sandbox environments safe for webhosts to use. Most webhosts seem to choose PHP over Python, due to it's ease of manageability and simple set-up. Upload your single or multiple PHP pages and your all set. Whereas Python requires much more work to be had, I hope that PSP may be a viable solution to ease new developers and hosts to Python. With that said, has anybody developed an embedded Python interpreted into their applications? This can either be desktop or web. Are there ways in Python to limit users access to functions such as import and sys.path manipulation? Google App Engine did a wonderful job at sandboxing Python and still making it usable. This what I want to do, but for traditional webhosting. I believe Google re-wrote many Python modules to secure it for their infrastructure, I'm guessing under a Linux environment, one can run Python in a chroot and have a collection of "secured" modules in there for the application to use. Let me know what you think, Kevin Veroneau -------------- next part -------------- An HTML attachment was scrubbed... URL: From stuart at swilliams.ca Thu Jan 13 19:15:16 2011 From: stuart at swilliams.ca (Stuart Williams) Date: Thu, 13 Jan 2011 18:15:16 -0600 Subject: [Python Wpg] Distributing Python applications to Windows users In-Reply-To: References: Message-ID: See this for starters: https://py2exe.svn.sourceforge.net/svnroot/py2exe/trunk/py2exe/py2exe/samples/extending/setup.py It's probably more than you need. I also found some similar examples via codesearch.google.com looking for specific strings from the comments in that file, because lots of projects have copied that file and modified it in various ways. Stuart. On Wed, Jan 12, 2011 at 10:16 PM, Stuart Williams wrote: > I have experience. The py2exe program is good with a InnoSetup config in > the setup.py code to create a Windows installer. I'll send a simple example > tomorrow. Remind me if I forget - I'm very busy this week. > > Stuart. > > On Wed, Jan 12, 2011 at 10:03 PM, Kevin Veroneau wrote: > >> Hello everyone, >> >> Does anybody have experience in deploying a Python application to Windows >> users, assuming they do not have Python installed? Is it possible to make >> the installation seamless using InnoSetup? >> >> The only issues I can think of, would be if the Python application was >> developed using Qt4, GTK, or SDL, how would one also install these required >> dependencies? Is there a native Windows GUI module for Python? If so, one >> could try to import the various front-end GUI toolkits until one is >> successfully imported without raising an exception. It would then use that >> front-end to display the application GUI for the user, and use the same >> models and application controllers globally for all front-ends. >> >> I see this being a huge advantage to coding multi-platform applications in >> Python, since it is an interpreted language, during start-up it can >> automatically determine the optimum front-ends and back-ends to use during >> program execution, without requiring to dynamically linking to each >> Library(like a traditional compiler does). >> >> Is it possible to bind an entire Python application and the interpreter >> into a single EXE for easy deployment, or a similar method? >> >> Thanks, >> Kevin Veroneau >> >> >> _______________________________________________ >> Winnipeg Python Users Group mailing list >> http://WinniPUG.ca >> Winnipeg at python.org >> http://mail.python.org/mailman/listinfo/winnipeg >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kveroneau at gmail.com Sat Jan 15 16:15:46 2011 From: kveroneau at gmail.com (Kevin Veroneau) Date: Sat, 15 Jan 2011 15:15:46 -0600 Subject: [Python Wpg] Working on a Django Subversion client Message-ID: Hello, I noticed that while searching through Google, I was unable to find a Django app for Subversion access. So I took it upon myself to build one. So far, it supports a very basic feature set. It works for simple browsing of the current repo online. It uses the pysvn module, which I must admit is very simple and easy to use. For those interested in web-based Python programming, I have a website up, which is a fairly basic Python Django website. It displays most of Django's core features. My current Subversion client project is also there in a live state. It currently does not catch every exception, so expect a few 500 error pages, if you try something which is not supported. As for my last post, regarding a mod_python.publisher port to Django, this can now also be viewed online via my Subversion client. My next example on this django site will be a JSONProxy example, done completely in Python, using Pyjamas as the WebUI, and Django as the back-end service provider. The site can be found here: http://django.kveroneau.info/ The Repo for the Publisher can now be viewed online from: http://django.kveroneau.info/svn/node1/publisher/trunk/ls The source code for the Django site can be viewed from: http://django.kveroneau.info/svn/node1/ajaxsite/trunk/ls The Django SVN client can be viewed from here: http://django.kveroneau.info/svn/node1/ajaxsite/trunk/svnclient/ls If you would like to check out the Django Subversion client: svn:// kveroneau.info/ajaxsite/trunk/svnclient Hopefully these nice examples will help anybody new to Python web programming, it's not the best example, but it's something to start with. Kevin. -------------- next part -------------- An HTML attachment was scrubbed... URL: From kveroneau at gmail.com Sat Jan 15 21:03:04 2011 From: kveroneau at gmail.com (Kevin Veroneau) Date: Sat, 15 Jan 2011 20:03:04 -0600 Subject: [Python Wpg] Many demo Python apps available for viewing online Message-ID: Hello, This is probably the most posts this list has gotten in a single day for quite some time. Anyways, this post can be for anybody here, it is not specific to Django or anything. I have decided to upload all my Python demos I built last year as I was in the process of learning Python. Be warned, as these are apps from when I first started, they are fairly bad, but may help others when first learning how to code in Python. The demos include examples from many different Python modules, such as GTK+, Qt, and of course Tk. There are many demos which interface a UI with a back-end database, an sqllite database to be exact. There are a few demos for pygame in there too. There are also many socket demos, such as HTTP servers and WSGI servers, as well as a JSON server and client(both stand-alone). The source code can be viewed online from my Django website: http://django.kveroneau.info/svn/node1/python/ls A file without an extension is more than likely a directory. There is also a directory there called rb-py, which contains two of my very first python scripts, these were made while I was debating on learning either Ruby or Python... Obviously, I choose Python over Ruby. I believe it was due to the overall Syntax of the language, which made me choose Python. If your curious about the Pyjamas toolkit(a port of GWT to Python), I have some interesting examples for it as well: http://django.kveroneau.info/svn/node1/pyjamas/ls I may commit more changes to these SVNs in the future, they will only be populated with test-bed/learning apps. Basically apps which help me learn a new Python module, so if your curious about which Python modules I am learning next, take a look in my subversion for new files. It might even help you in the end, as most of these apps are incredibly simple and right to the point. My next Python module I aim to learn soon is PyBison: http://www.freenet.org.nz/python/pybison/ I need to create a interpreter for an interpreted language I am working on. I plan on porting sdlBasic to Python, to see if the speed is different. You can take a look at my sdlBasic project page here: http://www.sdlbasic.net/ I recently took over the GPL'd project as the original maintainer has gone missing, and the application has shown some neglect. Porting sdlBasic to Python, will allow sdlBasic applications to run anywhere Python can. sdlBasic is a huge pain to cross-compile. It compiles easily on my Linux box, but took me a few days to finally get it to compile on Windows. Compiling on Mac OS X appears near impossible without psychical access to a Mac. Porting it to Python would enable easier cross-platform compilation. All I'm hoping is that the speed isn't noticeable when going from C to Python. Has anyone else attempted to port a native C application to Python? Were there any speed issues, or did everything still run nicely? Thanks, Kevin Veroneau -------------- next part -------------- An HTML attachment was scrubbed... URL: From ernestoferro at gmail.com Mon Jan 17 14:55:42 2011 From: ernestoferro at gmail.com (Ernesto Ferro) Date: Mon, 17 Jan 2011 16:55:42 -0300 Subject: [Python Wpg] Newcomer Message-ID: Hello everybody. My name is Ernesto and I'll be arriving in Winnipeg on February 15 and I would like to join your group. Let me tell you a little bit about me. I'm a Computer Engineer with a strong background in software development. I've worked in a very wide array of technologies. From embedded system in C and assembly to cloud computing going through video game, web development and infrastructure design. I've been working with python for 5 years now. In my last job I've done a few web applications with Django and the client and server side of a game called HomeFest ( http://apps.facebook.com/homefest/ check it out). The server side is pure python and runs on Amazon EC2 along with Amazon SimpleDB and S3. The deployment procedure is done with fabric and the environment was setup with virtualenv. The webapps were experiments that never saw the light but anyway they interacted API from facebook, picasa, yql (this is pure gold) and flick. I think that's enough for now and I hope to see all of you soon. Best regards, Ernesto -------------- next part -------------- An HTML attachment was scrubbed... URL: From brian.curtin at gmail.com Thu Jan 27 15:51:22 2011 From: brian.curtin at gmail.com (Brian Curtin) Date: Thu, 27 Jan 2011 14:51:22 -0600 Subject: [Python Wpg] PSF Sprints - Call For Applications Message-ID: Hello Winnipeg Python Users! On behalf of the Python Software Foundation?s sponsored sprint group, I wanted to drop your group a quick note introducing us. If you?re already familiar with our sponsored sprints, you?ll be happy to know we made a few changes to help both sprint groups and Python even more. The PSF recently set aside funding to be distributed to groups who spend time contributing to the Python ecosystem, often in the form of development sprints. Our goal is to help you help Python, so whether it?s buying meals or renting meeting space for your all-day hackathon, we have a budget set aside to reimburse your expenses up to $300 USD (up from $250). If your goal is to make the Python world a better place, and you work on the problems facing Python today, we want to help you. We?re looking for groups of hackers that spend their time fixing and expanding the wide variety of Python interpreters, libraries, tools, and anything else affecting the community.We?re also looking for groups who want to help and get started but don?t have the resources to get together. Whether your group is separated by a train ride or lacking a shared space, we want to help you. On-boarding new contributors to open source Python projects is an especially important area that we?d like to work with.This means if you have a Python project and you want to sprint -- we want to help you.Some sprints we?ve sponsored include the porting of Genshi to Python 3, improvements to packaging (Distribute/distutils), and most recently, the PyPy winter sprint in Switzerland. If your group is interested in hosting a sprint, check out the full details of our call for applications at http://www.pythonsprints.com/cfa/ and contact us at sprints at python.org. Thanks for your time, and happy sprinting! Brian Curtin Jesse Noller http://www.pythonsprints.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: