Found a nice snippet at the DjangoSnippets site that shows how to integrate your Django app with PayPal.
See the magic here.
Found a nice snippet at the DjangoSnippets site that shows how to integrate your Django app with PayPal.
See the magic here.
Looks like Python is everywhere – even OpenOffice. The PyUNO Bridge enables you to interact with the OOo API to extend its functionality. Its feature complete but undergoing testing – get involved.
The latest release of Django is here: 1.0.1
Summary of Changes:
I’ve spotted two mentions of Python templates on a well known RSS lately so thought I’d throw together a quick intor of the major ones – partly for me to keep track but I thought I’d help the Pythonistas out too.
So here goes…
This is the replacement for the Myghty template system and is a bit different to all the others – I just don’t like it. In fact it looks plain awful but I guess some people love it. One thing it does have though is speed and in this group it comes a close second to Tenjin featured later on.
<%inherit file="base.html"/>
<%
rows = [[v for v in range(0,10)] for row in range(0,10)]
%>
The winner of the nicest looking site goes to Jinja! Minimal and Japanese-y which is always good in my eyes. They have two versions available – you’ll want version 2. Its shiny. Oh!! I almost forgot to mention they happen to use the best source control system: Mercurial. All the cool kids use Mercurial.
Example:
As you can see its very similar to Django, which is up next…
The framework has a great templating language built into that is so good that Google made it the default in their Google App Engine platform. Although it mixes logic into the engine its quite conservative compared to many others. Its one of my favourites! Though that’s likely down to me using Django exclusively for anything Python web-related. So don’t take my word for it – take Google’s!!
Archive for {{ year }}
{% for date in days %} {% ifchanged %}{{ date|date:"F" }}
{% endifchanged %} {{ date|date:"j" }} {% endfor %}
If you type “Python Templates” into Google then Cheetah features heavily.
So does a page on the Python site that lists all the Python template engines. Therefore making my post pointless and forcing me to dream up something special to make it worthwhile!Anyway, back to Cheetah. The entire world uses it pretty much. Or at least Reddit does and some other unknown companies. But it’s a good one – not the fastest which will be a bit of a shock considering the name but hey: The worlds a whacky place to be.
| $client.surname, $client.firstname | $client.email |
Now this is the one deserving of the fast name as its the fastest engine here according to (their) benchmarks. Its also available for multiple languages and keeps its speed across them all. Take a look.
| #{i} | ${item} |
I have the feeling this has been aorund a while but in case you haven’t already seen it… It’s an e-book all about Python 3. Not much else to say. I guess you should go and read it.
I heard about this at PyCon during the Django talk. Its pink, fluffy, goodness – Pony Power!!!
I’ve only just noticed this and I’ve been coding Python for a couple of years now. I’m talking about BaseHTTPServer. Now why I’m mentioning Nagios too is this: the library works on all OS’s (the ones that matter) and it can perform system commands before returning the output to the user as a simple HTTP response.
Imagine the endless possibilities (except the security risks)!!! You can get full blown system information for a central monitoring server – much like Nagios. But it won’t be really unfriendly and rubbish – like Nagios. It’ll be all nice and Python-y. Just like Python.
So thats my idea – Using BaseHTTPServer to create mini servers on satalite servers/PCs that report back to a central server.
Aren’t I a genius.
Please don’t steal my idea. It’s mine. In fact if I find anyone has built this I will sue. Even if you built it before this post was made – I’ll sue. Because I can and it’ll make me feel special.
Nagios here I come!!!
[I found out about BaseHTTPServer from the Python Cookbook - which I've yet to finish]
Well yesterday saw the release of the much anticipated Django 1.0. Many years in the making its been well worth the wait. Now although there’s been numerous changes I’ve condensed this to the top 5 changes:
Although this has been available in some form for a while it’s recently undergone major changes during the Google Summer of Code which has resulted in a very powerful, yet flexibile comments platform for your Django app.
The admin area has had two major changes that will see a much cleaner and flexible control interface overall. Firstly is the latest newforms code bveing integrated into the admin. Secondly is the decoupling of models from admin interface. So gone are the days of subclasses within the models of your application.
Django’s ORM has had some major additions and clearup recently with some nifty features added including:
I have absolutely no idea what this really is but everyone seems excited so I am too!!!! Woooohoooo!!!!
The average user won’t care much about this but trust me when I say that the refactoriungs done with regard to unicode support will have a great impact.
If you’re wanting to develop a Python GUI anytime soon can I strongly suggest you re/learn Java. I recently wanted to produce a simple yet functional desktop app and decided to give Python a go. I’d later py2exe my creation to create an executable Win32 app. My thinking was that Python is much faster to develop with and so doing a simple GUI app using it must be simple too.
Oh how wrong I was.
First off I tried the oldschool method of developing the GUI by hand using Tkinter as it seemed to have the greatest level of documentation and it was the library used in the Programming Python book. Alas this brought back painful memories of oldschool Java GUI programming with extremely restrictive rules on placement and positioning. After 3 hours of trying to get exactly what I wanted I ended up with GUI cat-sick on my screen – not good.
I tinkered with a couple of ther other libraries wxPython, PyGtk and even EasyGUI (too basic) only to hit the same problem – lack of flexibility.
I decided to try a different approach and find a GUI capable of handling the graphical side of things for me – maybe its a cheaters way out but personally I wanted an app not an education.
Oh dear god in heaven above. This app has been getting developed in a cave by the most hardcore, life-starved, miserable geekjects on the planet. It’s based on an age-old Apple Mac application for developing quick dirty GUI apps. Which is great except its method of working is completely different to any other IDEs out there. It does follow a convention – its just the convention died years ago. That doesn’t deter the developers though and they still have arguments to this day about wether to make tab ordering an easier to access feature or just leave as is (NB: Tab ordering is determined by the ordering of the elements in the frame and so you use “send to back”, “bring forward” commands – very intuitive).
You need a book to operate this and also colour blindness helps because the interface is…well….vile! It’s a painful mess to use and I didn’t even bother trying – I closed it down in disgust. End of story.
You need a full version of Visual Studio – no go.
Project now dead.
This is one hell of a piece of wonder. Its amazing the sub-sorry I can’t be sarcastic any longer. It’s rubbish, it performs a role and thats it. It simply generates your GUI code rather than being a full GUI IDE.
I eventually got onto Glade and there’s a number of options here that Python can exploit however, I’d wasted far too much of my valuable time by this point so I decided to do the only sensible thing:
I left Java many moons ago but from when I’d last used Netbeans I remember the GUI building facilities were absolutely stellar. I wasn’t disappointed this time round either. I can’t believe how far along its now come and developing a GUI app in Netbeans using the Swing and SwingX components is an absolute joy. Its making me want to make more and more – I’ve restarted learning Java and not looking back.
So if you want to create a GUI desktop app – don’t use Python (or Ruby).
PyConUK is just around the corner and the early bird tickets are only on sale until August 4th so be sure to get your tickets soon.
You can get the latest on the talks here: PyCon Talks
The Friday schedule of tutorials is available here: Tutorials.
This year Jacob Caplan Moss will be doing the Django tutorial!
The UK Python Conference is based in Birmingham UK and the website is here: PyCon 2008