Wednesday, May 2, 2012

Google AppEngine start


- Works with 2.5 or 2.7 python versions.
- Sometimes python path is not saved, just execute command to set a python path:

defaults write com.google.GoogleAppEngineLauncher Python "YOUR_PATH"


- Application name should be conformed with regex   '^(?:[a-z\d\-]{1,100}\~)?(?:(?!\-)[a-z\d\-\.]{1,100}:)?(?!-)[a-z\d\-]{1,100}$'


This is an example error for a project with capital letters in the name:


*** Running dev_appserver with the following flags --admin_console_server= --port=8088

Python command: /usr/bin/python2.5

WARNING  2012-04-30 11:39:22,839 urlfetch_stub.py:111] No ssl package found. urlfetch
will not be able to validate SSL certificates.
WARNING  2012-04-30 11:39:23,686 rdbms_mysqldb.py:74] The rdbms API is not available
because the MySQLdb library could not be loaded.
ERROR    2012-04-30 11:39:24,296 dev_appserver_main.py:580] Fatal error when loading
application configuration:

Unable to assign value 'Test' to attribute 'application':
Value 'Test' for application does not match expression '^(?:[a-z\d\-]{1,100}\~)?(?:(?!\-)[a-z\d\-\.]{1,100}:)?(?!-)[a-z\d\-]{1,100}$'
  in "/Users/MYNAME/Test/app.yaml", line 1, column 14

Sample app.yaml

application: simply-should-work
version: 1
runtime: python27
api_version: 1
threadsafe: yes


handlers:
- url: /favicon\.ico
  static_files: favicon.ico
  upload: favicon\.ico


- url: .*
  script: main.app


libraries:
- name: webapp2
  version: "latest"

Current State of Python Packaging

Note: this is a draft description, to be updated...

Packages: Distribute, Easy_install, PIP...

Installation process on Mac OS 10.5.8 with Python 2.5 - Python 3.2

Default version of pip is installed into Python 2.5 path.
This is an installation process of pip 3 version.


PIP can be installed with:
- standalone packet from command line 
- easy_install which is installed with Distribute: Distribute ->  Easy_install  ->  PIP

Common pip installation process:

  1. Download the last pip version from here: http://pypi.python.org/pypi/pip#downloads
  2. Uncompress it
  3. go to the uncompressed pip directory and execute: python3 setup.py install
  4. Add your python to the $PATH (if necessary)

Install pip with Easy_installer

(from windows forum)

  1. Download the latest easy_installer for Windows: (download the .exe at the bottom of http://pypi.python.org/pypi/setuptools ). Install it.
  2. Install PIP from easy_installer ( http://guide.python-distribute.org/installation.html#distribute )

Pip 3 version installation with Distribute (Distribute is a fork of the Setuptools project)
  1. Install Distribute http://pypi.python.org/pypi/distribute
  2. easy_install pip
  3. PIP usage: http://www.pip-installer.org/en/latest/index.html


Distribute documentation: 

More:

Review of packages:




Thursday, March 22, 2012

Compression

Friday, March 2, 2012

Coffeephysics

Wednesday, February 29, 2012

The Python Controlled Microcontroller

http://www.pymcu.com/index.html

Monday, February 20, 2012

Web goodies, collection, references


One of the great things about modern web development is that we have so many useful tools and frameworks that not only help take the drudgery out of coding, but also make sure you get started coding the right way. One example is the new HTML5 Boilerplate 3.0 released just last week, and Favbulous offers a roundup of 6 Useful Web Development Boilerplates for HTML email, mobile web apps and more.
Another new release is the JavaScript framework Modernizr 2.5, which is designed to simplify feature detection and make sure your site runs smoothly in all browsers.
If you prefer something like Backbone.js, but want to make sure you’re using it right, check out Backbone patterns by Rico Sta. Cruz.
Similarly, Marlon Grech at C# Disciples demonstrates MVVM in the web world using Knockout.js.
Another week, another dust-up in the web standards world: now that the IE6-compatibility issues are almost vanquished, the ubiquity of WebKit has raised news issues. Daniel Glazman has issued a Call for Action and you can read further commentary about these issues from .net magazinePeter van der ZeeAaron GustafsonBruce LawsonRemy Sharp Ian Elliot and Chris Heilmann.
Speaking of prefixes and CSS browser weirdness, Paul Irish tackles the issue of widths and padding and suggests some universal border box sizing tweaks that will simplify your life. Even with jQuery.
Here’s some potentially handy CSS trivia: What’s the Maximum Z-Index? Michael Mahemoff shows you how Z-index works in the popular browsers and how you might even use it to do some tricky browser detection.
Getting back to frameworks, how about some jQuery? Dan Wahlin offers a handy tip for Defining a Context When Using Selectors and Ben Howdle provides A Beginner’s Guide To jQuery-Based JSON API Clients at Smashing Magazine.
If you find these frameworks exciting and want even more advanced features and greater challenges, James Ward introduces you toNext Gen Web Apps with Scala, BlueEyes, and MongoDB. The future is now. Don’t wait.
Maybe you just want the quiet life, though – simple HTML and CSS you can wrap your head around and be done. Well WebInterfaceLab has a small-but-growing library of free HTML5 & CSS3 snippets you can use.

References:

HTML5 boilerplate
svg.js - A lightweight JavaScript library for manipulating and animating svg 

Powered by Blogger.