background preloader

Python

Facebook Twitter

Python Programming Language – Official Website. PyPI - the Python Package Index. Overview — Python 3.3.3 documentation. Pythonista. Code Like a Pythonista: Idiomatic Python.

In this interactive tutorial, we'll cover many essential Python idioms and techniques in depth, adding immediately useful tools to your belt.

Code Like a Pythonista: Idiomatic Python

There are 3 versions of this presentation: ©2006-2008, licensed under a Creative Commons Attribution/Share-Alike (BY-SA) license. My credentials: I am a resident of Montreal,father of two great kids, husband of one special woman,a full-time Python programmer,author of the Docutils project and reStructuredText,an editor of the Python Enhancement Proposals (or PEPs),an organizer of PyCon 2007, and chair of PyCon 2008,a member of the Python Software Foundation,a Director of the Foundation for the past year, and its Secretary. In the tutorial I presented at PyCon 2006 (called Text & Data Processing), I was surprised at the reaction to some techniques I used that I had thought were common knowledge. Many of you will have seen some of these techniques and idioms before. These are the guiding principles of Python, but are open to interpretation.

Import this. Custom Homescreen Icons with Pythonista. Back in the day, when there was no iPhone SDK, you could already add web apps to your homescreen – basically glorified bookmarks that could specify their own icon and look (more or less) like a native app.

Custom Homescreen Icons with Pythonista

Unfortunately, not all websites specify a proper apple-touch-icon, and sometimes you end up with a static screenshot instead. You also can't override the website's preference of whether it's launched in full-screen mode (without Safari's UI) or not. Another limitation of these Safari "webclips" is that you can only use them to launch web (i.e. http[s]) URLs, not mailto:, tel:, maps:, or any of the myriads of third-party app URL schemes. However, there's one other way of adding webclips to your homescreen: You can install configuration profiles from a web page, or using the iPhone Configuration Utility.

Icons that are installed with configuration profiles can override the website's icon and full-screen settings, and it's also possible to use custom URL schemes. Pythonista and iOS Automation « random($foo) Pythonista 101: The Scripting Community. A real asset to Pythonista is the enthusiastic developer community that’s sprung up around the app.

Pythonista 101: The Scripting Community

The Pythonista Forums are a rich source of support when struggling to debug a script of your own, or when looking to release a script for use by the rest of the Pythonista community. As it has become a common place to post Pythonista scripts, we’ll be showing off a few select examples found in the Pythonista forums to help give you an idea of the sort of thing Pythonista is capable of. We’ll also explain how to integrate a script from the web into your copy of Pythonista. Like this article? Stay up to date with the latest changes by subscribing to our RSS feed or by following us either on Twitter, Facebook, Google+ or App.net. Script Showcase Basic Calculator While this may not seem like the most exciting thing to do with Pythonista, the code behind this simple script is quite elegant, and there’s a lot to be learned from studying it. File Browser Space Shooter Game Top Apps PIL Meme Generator.

Automating iOS: How Pythonista Changed My Workflow. A couple of months ago, I decided to start learning Python.

Automating iOS: How Pythonista Changed My Workflow

I say “start” because, as a hobby to fit in between my personal schedule and work for the site, learning the language is still very much a work in progress. I hope I’ll get to an acceptable level of knowledge someday. Coming from AppleScript, another language I started researching and playing with earlier this year, the great thing about Python is that it’s surprisingly easy to pick up and understand. As someone whose job primarily consists of writing, I set out to find how Python could improve my workflow based on text and Markdown; I found out – and I’m still finding out – that Python allows for more flexible and intelligent string manipulation[1] and that some very smart folks have created excellent formatting tools for Markdown writers.

But this article isn’t strictly about Python. The iOS Workflow A bit of backstory first. I need my iOS devices (and especially my iPad) to allow me to get work done from anywhere.