background preloader

PyPy

PyPy

TDM-GCC PythonLearn - Self-paced learning Python The environment dictionary A simple but integral aspect of Fabric is what is known as the “environment”: a Python dictionary subclass, which is used as a combination settings registry and shared inter-task data namespace. The environment dict is currently implemented as a global singleton, fabric.state.env, and is included in fabric.api for convenience. Keys in env are sometimes referred to as “env variables”. Below is a list of all predefined (or defined by Fabric itself during execution) environment variables. Note that many of these may be set via fab‘s command-line switches – see fab options and arguments for details. abort_exception Default: None Fabric normally handles aborting by printing an error message to stderr and calling sys.exit(1). Give it a callable which takes a string (the error message that would have been printed) and returns an exception instance. abort_on_prompts Default: False all_hosts Default: [] Set by fab to the full host list for the currently executing command. always_use_pty Default: True cwd

Getting Started with virtualenv (Isolated Python Environments) | Mitch Fournier Like South, virtualenv is a helper utility that I put off using for too long. Looking back, it is so easy to get up and running (just like South, see below) that there is no reason for you to hold off like I did. In a nutshell, virtualenv is a tool for creating isolated Python environments. It is also invaluable if you want to deploy a Django project to a shared host where you don’t have root access to the main “site-packages” directory. Basic virtualenv Start-up Steps sudo pip install virtualenv(or, sudo easy_install virtualenv if you don’t use pip)(or, easy_install –install-dir ~/site-packages/ virtualenv on a shared host)mkdir ~/virtualenvs (a directory for your isolated environments)virtualenv ~/virtualenvs/mysite.com –no-site-packages(–no-site-packages isolates your environment from the main site-packages directory)cd ~/virtualenvs/mysite.com/binsource activate (activates your new environment) A helper alias: Now you can run “ams” to quickly activate your “mysite.com” environment.

Ruby Programming Language VPython Django People Writing your first Django app, part 1 Let’s learn by example. Throughout this tutorial, we’ll walk you through the creation of a basic poll application. It’ll consist of two parts: A public site that lets people view polls and vote in them.An admin site that lets you add, change and delete polls. We’ll assume you have Django installed already. Where to get help: If you’re having trouble going through this tutorial, please post a message to django-users or drop by #django on irc.freenode.net to chat with other Django users who might be able to help. Creating a project If this is your first time using Django, you’ll have to take care of some initial setup. From the command line, cd into a directory where you’d like to store your code, then run the following command: django-admin.py startproject mysite This will create a mysite directory in your current directory. Script name may differ in distribution packages Mac OS X permissions Note You'll need to avoid naming projects after built-in Python or Django components. These files are:

The R Project for Statistical Computing BeginnersGuide New to programming? Python is free and easy to learn if you know where to start! This guide will help you to get started quickly. Chinese Translation/中文版入门 New to Python? Read BeginnersGuide/Overview for a short explanation of what Python is. Getting Python Next, install the Python 3 interpreter on your computer. There are also Python interpreter and IDE bundles available, such as Thonny. At some stage, you'll want to edit and save your program code. Learning Python Next, read a tutorial and try some simple experiments with your new Python interpreter. If you have never programmed before, see BeginnersGuide/NonProgrammers for a list of suitable tutorials. Most tutorials assume that you know how to run a program on your computer. Some sites offer in-browser coding for those who want to learn Python: Print a cheat sheet of the most important Python features and post it to your office wall until you know the basics well. Need Help? Need help with any of this? Complete list of Beginner's Guide pages

python.org Django powered AJAX Chat – Part 1 « The Python Haven In the neverending adventure of developing our game website we have stumbled upon the “live chat” rock. I’ve seen some interesting things here using a pure django implementation for chat and there using django and comet for chat. I browsed the first one and I didn’t like it too much, and the comet implementation is clearly out of the picture for now. We have to finish this project in 4 to 6 weeks and we cannot take the risk of messing around with yet another technology (although I will keep this django+comet link bookmarked for future use). So I decided to make one quick and dirty chat app myself. Client loads HTML + JavascriptClient queries the Server every X seconds for new messagesServer responds messages serialized in JSON formatClient attaches new messages to the message box This does fail regarding performance, so I did a little bit of reading regarding the matter of creating html based chat applications. To save us from that, diverse solutions exists. Simple huh? Until next time!

Related: