background preloader

PyDev

PyDev

virtualenv 1.7.2 Introduction virtualenv is a tool to create isolated Python environments. The basic problem being addressed is one of dependencies and versions, and indirectly permissions. Or more generally, what if you want to install an application and leave it be? Also, what if you can’t install packages into the global site-packages directory? In all these cases, virtualenv can help you. Dive Into Python 3 Web Services Made Easy — WSME 0.6 Web Service Made Easy (WSME) simplify the writing of REST web services by providing simple yet powerful typing which removes the need to directly manipulate the request and the response objects. WSME can work standalone or on top of your favorite python web (micro)framework, so you can use both your preferred way of routing your REST requests and most of the features of WSME that rely on the typing system like: Alternate protocols, including ones supporting batch-callsEasy documentation through a Sphinx extension WSME is originally a rewrite of TGWebServices with focus on extensibility, framework-independance and better type handling. How Easy ? Here is a standalone wsgi example: from wsme import WSRoot, expose class MyService(WSRoot): @expose(unicode, unicode) # First parameter is the return type, # then the function argument types def hello(self, who=u'World'): return u"Hello {0} !". Main features Install or, if you do not have pip on your system or virtualenv

Django To get started with Django in PyDev, the pre-requisite is that Django is installed in the Python / Jython / IronPython interpreter you want to use (so, "import django" must properly work – if you're certain that Django is there and PyDev wasn't able to find it during the install process, you must go to the interpreter configuration and reconfigure your interpreter so that PyDev can detect the change you did after adding Django). If you don't have Django installed, follow the steps from Note that this tutorial won't teach you Django. It'll only show how the Django integration is available in PyDev, so, if you're not familiar with Django, it's useful to learn a bit about how it works and then use this help to know how the PyDev Django integration can help you. The Django integration in PyDev works through 3 main configurations: 1. 2. 3. Use the new project wizard through Ctrl+N > PyDev Django Project to create a new Django based project.

IronPython.net / Introduction and History — Pecan 0.6.1 documentation Welcome to Pecan, a lean Python web framework inspired by CherryPy, TurboGears, and Pylons. Pecan was originally created by the developers of ShootQ while working at Pictage. Pecan was created to fill a void in the Python web-framework world – a very lightweight framework that provides object-dispatch style routing. Although it is lightweight, Pecan does offer an extensive feature set for building HTTP-based applications, including: Object-dispatch for easy routingFull support for REST-style controllersExtensible security frameworkExtensible template language supportExtensible JSON supportEasy Python-based configuration

peewee 0.9.9 Peewee is a simple and small ORM. It has few (but expressive) concepts, making it easy to learn and intuitive to use. New to peewee? Here is a list of documents you might find most helpful when getting started: Quickstart guide – this guide covers all the essentials. For flask helpers, check out the flask_utils extension module. Examples Defining models is similar to Django or SQLAlchemy: from peewee import *from playhouse.sqlite_ext import SqliteExtDatabaseimport datetime db = SqliteExtDatabase('my_database.db') class BaseModel(Model): class Meta: database = db class User(BaseModel): username = CharField(unique=True) class Tweet(BaseModel): user = ForeignKeyField(User, related_name='tweets') message = TextField() created_date = DateTimeField(default=datetime.datetime.now) is_published = BooleanField(default=True) Connect to the database and create tables: db.connect()db.create_tables([User, Tweet]) Create a few rows: Queries are expressive and composable:

setuptools 1.4 Installation Instructions The recommended way to bootstrap setuptools on any system is to download ez_setup.py and run it using the target Python environment. Different operating systems have different recommended techniques to accomplish this basic routine, so below are some examples to get you started. Setuptools requires Python 2.6 or later. The link provided to ez_setup.py is a bookmark to bootstrap script for the latest known stable release. Windows 8 (Powershell) For best results, uninstall previous versions FIRST (see Uninstalling). Using Windows 8 or later, it's possible to install with one simple Powershell command. > (Invoke-WebRequest | python - You must start the Powershell with Administrative privileges or you may choose to install a user-local installation: > (Invoke-WebRequest | python - --user Unix (wget) Unix including Mac OS X (curl)

The Python Tutorial — Python v2.6.9 documentation Python is an easy to learn, powerful programming language. It has efficient high-level data structures and a simple but effective approach to object-oriented programming. Python’s elegant syntax and dynamic typing, together with its interpreted nature, make it an ideal language for scripting and rapid application development in many areas on most platforms. The Python interpreter and the extensive standard library are freely available in source or binary form for all major platforms from the Python Web site, and may be freely distributed. The same site also contains distributions of and pointers to many free third party Python modules, programs and tools, and additional documentation. The Python interpreter is easily extended with new functions and data types implemented in C or C++ (or other languages callable from C). This tutorial introduces the reader informally to the basic concepts and features of the Python language and system.

python - Django mysql error Excel VBA Tutorial - Easy Excel Macros VBA (Visual Basic for Applications) is the programming language of Excel and other Office programs. 1 Create a Macro: With Excel VBA you can automate tasks in Excel by writing so called macros. In this chapter, learn how to create a simple macro. 2 MsgBox: The MsgBox is a dialog box in Excel VBA you can use to inform the users of your program. 3 Workbook and Worksheet Object: Learn more about the Workbook and Worksheet object in Excel VBA. 4 Range Object: The Range object, which is the representation of a cell (or cells) on your worksheet, is the most important object of Excel VBA. 5 Variables: This chapter teaches you how to declare, initialize and display a variable in Excel VBA. 6 If Then Statement: Use the If Then statement in Excel VBA to execute code lines if a specific condition is met. 7 Loop: Looping is one of the most powerful programming techniques. 8 Macro Errors: This chapter teaches you how to deal with macro errors in Excel. 12 Array: An array is a group of variables.

Mechanical Girl : Installing Django with MySQL on Mac OS X Django's official installation instructions are here: However, they get a little vague around the section titled "Get your database running". I followed this post and, aside from a few missing notes, got the Django/MySQL install done in about 15 minutes: how-to-install-django-with-mysql-on-mac-os-x/ Installing Django I followed the convention this blogger used and just put the Django install in my user directory, under a folder called "Code": /Users/myusername mkdir Code cd Code/ svn co django_trunk To tell Python where to find Django: cd /Library/Python/2.5/site-packages/ vi django.pth Paste this single line: /Users/myusername/Code/django_trunk And add it to your path: vi .bash_profile PATH=$PATH:$HOME/bin:/Users/myusername/Code/django_trunk/django/bin Installing MySQL Download MySQL-python-1.2.2.tar.gz to your home directory (/Users/yourusername/) - get it here:

Related: