Feeds:
Posts
Comments

Posts Tagged ‘Python’

About Infix and Postfix
In an expression if the operators are placed between the operands, it is known as infix notation ( eg A+B) . On the other hand if the operators are placed after the operands then the expression is in postfix notation .( eg AB+)
Infix Notation                            Postfix Notation
(A-C)*B                                         [...]

Read Full Post »

My first post in tuxopia is a how-to for writing basic IRC bot in python.Thought of sharing the link here

Read Full Post »

Here is a script to provide weather information of a city with the help of google api.

#!/usr/bin/python
#Rag Sagar <ragsagar @gmail.com>
#Free to copy, modify and redistribute

import sys
from urllib2 import urlopen, URLError
from xml.sax import make_parser
from xml.sax.handler import ContentHandler

class WeatherFinder(ContentHandler):
"""the handler class"""
def __init__(self):
self.weather_list = []
self.go_on = False

def startElement(self, tag, attrs):
"handles the opening tags"
if tag == ‘current_conditions’:
self.go_on = True
if [...]

Read Full Post »

Older Posts »