If you want to learn the Python programming language but can’t find a concise and yet full-featured tutorial – this tutorial will attempt to teach you Python in 10 minutes. It’s probably not so much a tutorial as it is a cross between a tutorial and a cheatsheet, so it will just show you some basic concepts to start you off. Obviously, if you want to really learn a language you need to program in it for a while. I will assume that you are already familiar with programming and will, therefore, skip most of the non-language-specific stuff. The important keywords will be highlighted so you can easily spot them. Also,pay attention because, due to the terseness of this tutorial, some things will be introduced directly in code and only briefly commented on. Continue reading Python in 10 minutes
Category: Python
How to add parameters to the URL string in Python
What to do if you want to pass values of parameters intto an URL string? Suppose you need to get the URL like this:
http://127.0.0.1:5000/data?key=xxxx&secret=xxxx
In Python, how can you add the variables to a URL? Continue reading How to add parameters to the URL string in Python
Python 3
What are the differences?
Short version: Python 2.x is legacy, Python 3.x is the present and future of the language
Python 3.0 was released in 2008. The final 2.x version 2.7 release came out in mid-2010, with a statement of extended support for this end-of-life release. The 2.x branch will see no new major releases after that. 3.x is under active development and has already seen over five years of stable releases, including version 3.3 in 2012, 3.4 in 2014, and 3.5 in 2015. This means that all recent standard library improvements, for example, are only available by default in Python 3.x. Continue reading Python 3
Django models relationship
In Django models you could define a set of fields that represent database object relations.
There are three main type of relations: Many to One, Many to Many and One to One. Continue reading Django models relationship
Hosting a Python Django project using uWSGI and nginx
How to setup a webserver to host a Django project? Let’s go through the details of Python hosting process – using uWSGI to host a website based on Django framework.
We will use nginx and uWSGI. Also you’ll have to install PIP and Virtualenv-wrapper, as well as Python dev packages.
I’ll assume that you use Ubuntu Linux, but with small changes you could use this guide on any Linux system. Continue reading Hosting a Python Django project using uWSGI and nginx
Python for Windows
Installation Python for Windows OS
Get Python installer from official site.
The Windows version is provided as an MSI package. To install it manually, just double-click the file. The MSI package format allows Windows administrators to automate installation with their standard tools. Continue reading Python for Windows