python
Python for loop
Wed, 04/14/2010 - 09:29 | bbayer
This example shows simple usage of python for loop syntax..
0
Deamon example in python
Thu, 03/25/2010 - 01:07 | bbayer
Deamonizing a process could be described as simply closing standart i/o files and release it from console. In python this could be achieved by using os module. For details google fork
5
Average: 5 (1 vote)
Parsing config files in Python
Tue, 03/23/2010 - 22:36 | bbayer
In Python standart library there is lots of usefull stuff, ConfigParser parser module is one of them. This module provides lots of functionality for parsing and writing configuration files. In Windows this configuration files called "ini files".
An example ini file is like that
[logging]
log_mode=debug
[properties]
win_height=230
5
Average: 5 (1 vote)
Asynchronous database operations on Twisted
Tue, 03/23/2010 - 22:26 | bbayer
This is very simple async database class for Twisted Python.All CRUD operations returns a Deferred. By default all database calls runs in its own thread. You dont need to worry about thread overhead because Twisted itself handles all threads by using amazing thread pool. Maximum number of threads is an issue.
Please note that there is no escaping on queries. You need to escape all values if you gather user input.
0
Python Twisted Hello World
Fri, 03/19/2010 - 16:23 | bbayer
Twisted is one of most amazing library I have ever used. With this incredible stuff you can create server client applications in seconds. More to come..
source: http://www.twistedcommons.com/2009/01/twisted-python-tutorial-part-1-twi...
3
Average: 3 (1 vote)
Python Slice Notation On Strings
Mon, 03/08/2010 - 16:55 | bbayer
In Python slice notation could be little confusing. Slice notation is very powerful language construct which makes string operation fun. First index and second index could be negative value. You could check example, you will understand it well.
0
Easier to ask for forgiveness than permission.
Sun, 03/07/2010 - 13:03 | bbayer
Easier to ask for forgiveness than permission. This common Python coding style assumes the existence of valid keys or attributes and catches exceptions if the assumption proves false. This clean and fast style is characterized by the presence of many try and except statements.
0
Uniqify list of elements in Python
Sat, 03/06/2010 - 14:17 | bbayer
In Python there is a very good data type called sets which is collection of unique elements. you can use it for uniqify an array efficiently.
0
How to fetch url with Python
Wed, 03/03/2010 - 01:58 | bbayer
Simple code for fetching url with python
4
Average: 4 (2 votes)
Recent comments
-
That is cool!12 weeks 4 days ago
-
sexcam13 weeks 6 days ago
-
thanx26 weeks 4 days ago
-
It is very usefull man thanks26 weeks 4 days ago
-
not at all26 weeks 5 days ago
more

