<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Uncertain Binary Thoughts &#187; Python</title>
	<atom:link href="http://ankurs.com/tag/python/feed/" rel="self" type="application/rss+xml" />
	<link>http://ankurs.com</link>
	<description>01110100110101010101011101100010</description>
	<lastBuildDate>Sun, 01 Jan 2012 18:20:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Begining Python workshop</title>
		<link>http://ankurs.com/2010/01/begining-python-workshop/</link>
		<comments>http://ankurs.com/2010/01/begining-python-workshop/#comments</comments>
		<pubDate>Tue, 26 Jan 2010 21:09:33 +0000</pubDate>
		<dc:creator>Ankur Shrivastava</dc:creator>
				<category><![CDATA[Stuff]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://ankurs.com/?p=593</guid>
		<description><![CDATA[LUG Manipal is organising a workshop on python, Workshop is aimed at people interested in beginning programming with python.No programming experience required. Details are -&#62; Time: 5:30 pm Place: NLH 103 Date: 29th JAN to 3rd FEB PS :- Slides for the workshop are available Begining Python Slides]]></description>
			<content:encoded><![CDATA[<div id="attachment_594" class="wp-caption aligncenter" style="width: 222px"><a href="http://ankurs.com/wp-content/uploads/2010/01/python.jpg"><img class="size-medium wp-image-594" title="LUG Manipal python workshop" src="http://ankurs.com/wp-content/uploads/2010/01/python-212x300.jpg" alt="LUG Manipal python workshop" width="212" height="300" /></a><p class="wp-caption-text">LUG Manipal python workshop poster</p></div>
<p>LUG Manipal is organising a workshop on python, Workshop is aimed at people interested in beginning programming with python.No programming experience required.</p>
<p>Details are -&gt;<br />
Time: 5:30 pm<br />
Place: NLH 103<br />
Date: 29th JAN to 3rd FEB</p>
<p>PS :- Slides for the workshop are available <a href="http://ankurs.com/wp-content/uploads/2010/01/python.pdf">Begining Python Slides</a></p>
]]></content:encoded>
			<wfw:commentRss>http://ankurs.com/2010/01/begining-python-workshop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A simple python socket chat example</title>
		<link>http://ankurs.com/2009/07/a-simple-python-socket-chat-example/</link>
		<comments>http://ankurs.com/2009/07/a-simple-python-socket-chat-example/#comments</comments>
		<pubDate>Wed, 29 Jul 2009 19:08:34 +0000</pubDate>
		<dc:creator>Ankur Shrivastava</dc:creator>
				<category><![CDATA[Stuff]]></category>
		<category><![CDATA[Chat]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[socket]]></category>

		<guid isPermaLink="false">http://ankurs.com/?p=557</guid>
		<description><![CDATA[i was trying to explain sockets to one of my friend and this is what i used, the code should be self explanatory, this is a very simple application of sockets&#8230; download here]]></description>
			<content:encoded><![CDATA[<p>i was trying to explain sockets to one of my friend and this is what i used, the code should be self explanatory, this is a very simple application of sockets&#8230;</p>
<p><script src="http://gist.github.com/145536.js"></script></p>
<p>download <a href="http://gist.github.com/raw/145536/753a6d62042163710647574ea723c42807f44aef/python-socket-chat.py">here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://ankurs.com/2009/07/a-simple-python-socket-chat-example/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Get updates of completed torrents via SMS</title>
		<link>http://ankurs.com/2009/04/get-updates-of-completed-torrents-via-sms/</link>
		<comments>http://ankurs.com/2009/04/get-updates-of-completed-torrents-via-sms/#comments</comments>
		<pubDate>Mon, 06 Apr 2009 12:13:16 +0000</pubDate>
		<dc:creator>Ankur Shrivastava</dc:creator>
				<category><![CDATA[fedora]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Special]]></category>
		<category><![CDATA[dbus]]></category>
		<category><![CDATA[ktorrent]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[sms]]></category>
		<category><![CDATA[torrent]]></category>
		<category><![CDATA[twit]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://ankurs.com/?p=489</guid>
		<description><![CDATA[This Sunday when i was giving DBUS a look and thinking about all the cool things possible with it, one of my friend came asking how can he control his torrents from anywhere and i thought controlling is ok, do you want SMS updates??, i fired up qdbusviewer and there it was a simple way&#8230;]]></description>
			<content:encoded><![CDATA[<p>This Sunday when i was giving <a href="http://www.freedesktop.org/wiki/Software/dbus">DBUS</a> a look and thinking about all the cool things possible with it, one of my friend came asking how can he control his torrents from anywhere and i thought controlling is ok, do you want SMS updates??, i fired up qdbusviewer and there it was a simple way to get sms notifications of finished torrents using well twitter and ktorrent, so here are the steps<br />
1) setup your cell phone to recieve SMS updates in twitter,<br />
2) get one more twitter account lets say ktorrent, follow ktorrent and turn device updates on,<br />
3) now save the script below say as torrenttwit.py<br />
4) now enter this ktorrent account username and password in the script below,<br />
5) start ktorrent if not already started, now run the script by typing &#8220;python torrenttwit.py&#8221;</p>
<pre>import dbus,base64,urllib2,urllib
from dbus.mainloop.glib import DBusGMainLoop

DBusGMainLoop(set_as_default=True)
username="username"
password="password"

def tweet(msg):
        request = urllib2.Request('http://twitter.com/statuses/update.json')
        request.add_header('Authorization', 'Basic %s' % base64.encodestring('%s:%s' % (username,password))[:-1])
        request.add_data(urllib.urlencode({'status': msg.encode('utf-8')}))
        opener = urllib2.build_opener()
        req= opener.open(request)

s = dbus.SessionBus()
kt = s.get_object("org.ktorrent.ktorrent","/core")

def update(k):
        torrent = s.get_object("org.ktorrent.ktorrent","/torrent/"+k)
        name = torrent.get_dbus_method("name","org.ktorrent.torrent")
        tweet("ktorrent: finished " +name())

kt.connect_to_signal("finished",update)

import gobject
loop = gobject.MainLoop()
loop.run()
</pre>
<p>you are done, now whenever a torrent finishes the script will twit and you will receive an SMS update<br />
enjoy</p>
]]></content:encoded>
			<wfw:commentRss>http://ankurs.com/2009/04/get-updates-of-completed-torrents-via-sms/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>LUG Manipal&#8217;s Python Workshop</title>
		<link>http://ankurs.com/2009/01/lug-manipals-python-workshop/</link>
		<comments>http://ankurs.com/2009/01/lug-manipals-python-workshop/#comments</comments>
		<pubDate>Mon, 26 Jan 2009 07:56:13 +0000</pubDate>
		<dc:creator>Ankur Shrivastava</dc:creator>
				<category><![CDATA[Stuff]]></category>
		<category><![CDATA[lug]]></category>
		<category><![CDATA[manipal]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[workshop]]></category>

		<guid isPermaLink="false">http://ankurs.com/?p=449</guid>
		<description><![CDATA[LUG Manipal is organising a workshop on Python, which is a dynamic object-oriented programming language that can be used for many kinds of software development. It runs on Windows, Linux/Unix, Mac OS X, OS/2, Amiga, Palm Handhelds, and Nokia mobile phones. It comes with extensive standard libraries, and can be learned in a few days.&#8230;]]></description>
			<content:encoded><![CDATA[<div id="attachment_116" class="wp-caption aligncenter" style="width: 222px"><a href="http://www.lugmanipal.org/wordpress/wp-content/uploads/2009/01/python1.jpg"><img class="size-medium wp-image-116" title="Python Workshop" src="http://www.lugmanipal.org/wordpress/wp-content/uploads/2009/01/python1-212x300.jpg" alt="Python Workshop Poster" width="212" height="300" /></a><p class="wp-caption-text">Python Workshop Poster</p></div>
<p>LUG Manipal is organising a workshop on Python, which is a dynamic object-oriented programming language that can be used for many kinds of software development. It runs on Windows, Linux/Unix, Mac OS X, OS/2, Amiga, Palm Handhelds, and Nokia mobile phones. It comes with extensive standard libraries, and can be learned in a few days.<br />
The workshop requires no prerequisites, even knowledge of C is not required, it is aimed at people interested in beginning programming with Python.<br />
There is no charge for the workshop and no registration is required, everyone is invited.<br />
People using Windows are requested to Install the Following Software before coming to the workshop<br />
1) Python 2.6.1 from <a href="http://python.org/download/">here</a><br />
2) Notepad++ from <a href="http://notepad-plus.sourceforge.net/uk/site.htm">here</a></p>
<p>Note: These will also be distributed on the first day of the workshop, If you are not able to install/download them you can get them there&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://ankurs.com/2009/01/lug-manipals-python-workshop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Perl, Django and hopefully a new blog</title>
		<link>http://ankurs.com/2008/12/perl-django-and-hopefully-a-new-blog/</link>
		<comments>http://ankurs.com/2008/12/perl-django-and-hopefully-a-new-blog/#comments</comments>
		<pubDate>Sun, 21 Dec 2008 11:15:33 +0000</pubDate>
		<dc:creator>Ankur Shrivastava</dc:creator>
				<category><![CDATA[Stuff]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://ankurs.com/?p=435</guid>
		<description><![CDATA[Almost 15days have passed since my vacations and i am really enjoying it, i get great Home cooked Food, enjoy pastries and stuff form a not so far bakery can sleep for as much as i want ( which is mostly around 7-9 hrs ) spend my whole time watching Movies, Series and Learning new&#8230;]]></description>
			<content:encoded><![CDATA[<p>Almost 15days have passed since my vacations and i am really enjoying it, i get great Home cooked Food, enjoy pastries and stuff form a not so far bakery can sleep for as much as i want ( which is mostly around 7-9 hrs ) spend my whole time watching Movies, Series and Learning new things and well my results are out got more GPA then what i got till now with attending around half the classes in a regular sem because of the attendances that i got&#8230;.</p>
<p>Now talking about the Important Things, What All i have Done Till now</p>
<p>Perl &#8211; after asking many people about how to begin with Perl and hearing all sorts of answers i finally decided its time for me to go for it, So in Bangalore i bought myself the Llama Book and started Perl, the Llama Book from what i feel is perfect for beginning Perl it clearly explains everything and after that you have Google to help to everywhere. So i now can say happily that i know Basic Perl</p>
<p>And well after that i started with <a href="http://djangoproject.com">Django</a> and i really like it at first  MTV  (Model Template View) seemed strange but i got it looks gr8, so after my new found love for Django i wanted to shift my blog from wordpress to Django but was not able to find anything that would allow me setup a simple blog, so i have started writing code for my own blog and write now trying to find a way for importing existing wordpress entries to my blog and hope to release the code as soon it starts working without a glitch and move to it, i am plannig to keep compatibility all the post urls if someone has got some link to my wordpress blog they wont break&#8230;..</p>
]]></content:encoded>
			<wfw:commentRss>http://ankurs.com/2008/12/perl-django-and-hopefully-a-new-blog/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>MobiVision, Techtatva 08, LUG Manipal and lots more&#8230;.</title>
		<link>http://ankurs.com/2008/10/mobivision-techtatva-08-lug-manipal-and-lots-more/</link>
		<comments>http://ankurs.com/2008/10/mobivision-techtatva-08-lug-manipal-and-lots-more/#comments</comments>
		<pubDate>Sun, 19 Oct 2008 20:36:06 +0000</pubDate>
		<dc:creator>Ankur Shrivastava</dc:creator>
				<category><![CDATA[college]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[Stuff]]></category>
		<category><![CDATA[08]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[ankur]]></category>
		<category><![CDATA[institute]]></category>
		<category><![CDATA[manipal]]></category>
		<category><![CDATA[mobivision]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[shrivastava]]></category>
		<category><![CDATA[technonogy]]></category>
		<category><![CDATA[techtatva]]></category>

		<guid isPermaLink="false">http://ankurs.com/?p=417</guid>
		<description><![CDATA[I am posting to my blog after a long long time and a lot has happened, first Lets start with MobiVision. MobiVision (Brain child of Subhendra Bhaiya) was a workshop conducted by people from LUG Manipal ( well not officially but everyone involved in it was from LUG Manipal ) as the name suggests it&#8230;]]></description>
			<content:encoded><![CDATA[<p>I am posting to my blog after a long long time and a lot has happened, first Lets start with MobiVision.</p>
<div id="attachment_421" class="wp-caption aligncenter" style="width: 310px"><a href="http://ankurs.com/wp-content/uploads/2008/10/01092008.jpg"><img class="size-medium wp-image-421" title="MobiVision Workshop" src="http://ankurs.com/wp-content/uploads/2008/10/01092008-300x225.jpg" alt="People in MobiVision Workshop" width="300" height="225" /></a><p class="wp-caption-text">People in MobiVision Workshop</p></div>
<p>MobiVision (Brain child of Subhendra Bhaiya) was a workshop conducted by people from LUG Manipal ( well not officially but everyone involved in it was from LUG Manipal ) as the name suggests it was on developing Application for mobile Plateform, basicly targeting Python for Series 60 and Android, We were expecting turnout of around 100 people and more the double turnout took us by surprise, it saw a partisipation of over 200 which comprised of guys/gals from First to Fourth year which was really amazing we even had people doing PG showing Interest, we had some trouble managing them in 2 rooms which were alloted to us but in the end every thing turned out pretty well. We had 2 Teams ready one for Python S60 and one for Android, Both teams did a great job and made Mobivision the most sucessfull Workshop in Techtatva 08.</p>
<div id="attachment_419" class="wp-caption aligncenter" style="width: 310px"><a href="http://ankurs.com/wp-content/uploads/2008/10/06092008078.jpg"><img class="size-medium wp-image-419" title="Team MobiVision" src="http://ankurs.com/wp-content/uploads/2008/10/06092008078-300x225.jpg" alt="Yeaaaa we did it!!!!!!" width="300" height="225" /></a><p class="wp-caption-text">Team MobiVision</p></div>
<p>Next was Techtatva 08 which is the annual Technical Fest of Manipal Institue of Technology, Manipal, Here again LUG Manipal was in full control ( and again not officially!!! ) we were to conduct events for the Computer / IT Catagory called &#8221; PARAM &#8221; and we planned to change the previously conducted events so as to make them fit in the 4 basic catagories of people &#8211;<br />
1) &#8221; MobiVision &#8221; for Inovators here teams where to come up with a inovative Idea for Mobile Application and a prototype<br />
2) &#8221; Jour &#8221; for Developers here teams were to make any one of the three Projects and give a Presentation and Demonstration of their product<br />
3) &#8221; CodeBytes &#8221; for Programers the usual problem solving event with not so usual questions<br />
4) &#8221; Puzzle Mania &#8221; for Every Day internet users comprising of all sorts of Puzzels<br />
all the events saw good participation from all years and were prased for not having a single glitch.</p>
<div class="wp-caption alignnone" style="width: 510px"><a href="http://www.flickr.com/photos/ankurkingofnet/2935538660/"><img title="Techtatva 08" src="http://farm4.static.flickr.com/3139/2935538660_d02b09fe35.jpg" alt="Raunaq, Me and Nishant" width="500" height="334" /></a><p class="wp-caption-text">Raunaq, Me and Nishant</p></div>
<p>I also made a Deligate and Event Registration system for managing and registering all the people coming for Techtatva 08 and also a CBT ( Computer Based Test ) system for priliminary rounds of some events, it was all basicly made in PHP and used MySQL as primary Database and was hosted on a Fedora 9 ( for those of you who dont know what it is &#8212; Its a GNU/Linux Distribution and also my Primary OS ) based server running Apache in Student Councels room because we/I were/was denined permition to host it on the main Manipal University server, they said &#8220;You are a Threat for our Network!!!&#8221; ??? which left me wonder what kind of stuff they do there and what did i do to them??? ( reason for which i got to know later ) anyways we managed to get a lab computer for using as a server, it had a AMD Athlon x3800 CPU, 80 GB HDD and 1GB RAM, which was all i needed for my work, the PC was formatted and fresh Fedora 9 was installed on it, after this all updates were applied which didn&#8217;t took much time as the connection there is not at all like I-ON and is at least 10 times faster ( well it was MAHE LAN and I-ON is WiFi but still!!! ) some changes in http.conf and iptables and it was ready. The System ran without a glitouch except when someone made the LAN cable for the server loose which made all on Registration Desks shouting but luckly everything was back online in 2-3 mins. The CBT&#8217;s also ran very good and results were decleared as soon as the alloted time was over and there were no objections.</p>
<div class="wp-caption alignnone" style="width: 510px"><a href="http://www.flickr.com/photos/ankurkingofnet/2955101765/"><img title="Techtatva 08, CBT" src="http://farm4.static.flickr.com/3249/2955101765_4ae099ebec.jpg" alt="CBT - updates, running on a lab PC for real time updates" width="500" height="375" /></a><p class="wp-caption-text">CBT - updates, running on a lab PC for real time updates</p></div>
<div class="wp-caption alignnone" style="width: 510px"><a href="http://www.flickr.com/photos/ankurkingofnet/2955101755/"><img title="Techtatva 08, CBT" src="http://farm4.static.flickr.com/3022/2955101755_91daab61c4.jpg" alt="Monitoring people in CBT" width="500" height="334" /></a><p class="wp-caption-text">Monitoring people in CBT</p></div>
<div class="wp-caption alignnone" style="width: 510px"><a href="http://www.flickr.com/photos/ankurkingofnet/2955101757/"><img title="Techtatva 08, CBT" src="http://farm4.static.flickr.com/3277/2955101757_5b7a268be7.jpg?v=0" alt="ginni ( back ), piyush and me ( during CBT )" width="500" height="334" /></a><p class="wp-caption-text">ginni ( back ), piyush and me ( during CBT )</p></div>
<p>Well this is enough for a post now 3rd Sessionals are approaching and i need to study as i screwed my 2nd sessionals, so bye<br />
Ankur Shrivastava</p>
]]></content:encoded>
			<wfw:commentRss>http://ankurs.com/2008/10/mobivision-techtatva-08-lug-manipal-and-lots-more/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Ion Auto Login script in Python</title>
		<link>http://ankurs.com/2008/09/ion-auto-login-script-python/</link>
		<comments>http://ankurs.com/2008/09/ion-auto-login-script-python/#comments</comments>
		<pubDate>Tue, 16 Sep 2008 17:28:42 +0000</pubDate>
		<dc:creator>Ankur Shrivastava</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[college]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[Indore]]></category>
		<category><![CDATA[Special]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[auto]]></category>
		<category><![CDATA[ION]]></category>
		<category><![CDATA[login]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://ankurs.com/?p=399</guid>
		<description><![CDATA[i was just thinking about making the very famous IAL script of DJ in python and here is it and its damn simple import urllib, urllib2, time username = "Your username" password = "Your Password" interval = 10 data = {"loginID":username,"loginpassword":password,"flag":"0","popcheck":"0","submit":"Sign In"} value = urllib.urlencode(data) request = urllib2.Request("http://192.168.150.2:8080/clntAuth/clntAuth_main.jsp",value) print "Logging In\nMade by Ankur - http://ankurs.com"&#8230;]]></description>
			<content:encoded><![CDATA[<p>i was just thinking about making the very famous IAL script of DJ in python and here is it and its damn simple</p>
<pre><code>import urllib, urllib2, time
username = "Your username"
password = "Your Password"
interval = 10
data = {"loginID":username,"loginpassword":password,"flag":"0","popcheck":"0","submit":"Sign In"}
value = urllib.urlencode(data)
request = urllib2.Request("http://192.168.150.2:8080/clntAuth/clntAuth_main.jsp",value)
print "Logging In\nMade by Ankur - http://ankurs.com"
while (1):
        open = urllib2.urlopen(request)
        responce = open.read()
        for i in range (1,interval):
                print (interval-i),"min Till Next Login"
                time.sleep(60)
        print "Logging In\nMade by Ankur - http://ankurs.com"
</code></pre>
<p>or <a href="http://fb.ankurs.com/ial.py">downlaod</a><br />
run it by typing <code>python ial.py</code><br />
it uses urllib, urllib2 and time which are the default module, you have to change the username and password to your username and password, changing the interval changes the time interval in which auto login takes place. enjoy!!<br />
PS &#8211; current it does no check if your connection is active or not, will add that soon</p>
]]></content:encoded>
			<wfw:commentRss>http://ankurs.com/2008/09/ion-auto-login-script-python/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Creating a Simple Chat Application with Python</title>
		<link>http://ankurs.com/2008/05/creating-a-simple-chat-application-with-python/</link>
		<comments>http://ankurs.com/2008/05/creating-a-simple-chat-application-with-python/#comments</comments>
		<pubDate>Thu, 01 May 2008 13:27:59 +0000</pubDate>
		<dc:creator>Ankur Shrivastava</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Special]]></category>
		<category><![CDATA[application]]></category>
		<category><![CDATA[Chat]]></category>
		<category><![CDATA[Creating]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Simple]]></category>
		<category><![CDATA[sockets]]></category>

		<guid isPermaLink="false">http://ankurs.com/?p=370</guid>
		<description><![CDATA[Creating application with Python is very simple, here is a simple chat application made by using the socket module, it has 2 parts First Server and Second client, you run the server first and then connect the client to it, here is the code Here is the Server Code #!/usr/bin/env python from socket import *&#8230;]]></description>
			<content:encoded><![CDATA[<p>Creating application with Python is very simple, here is a simple chat application made by using the socket module, it has 2 parts First Server and Second client, you run the server first and then connect the client to it, here is the code</p>
<p>Here is the Server Code<br />
<code><br />
#!/usr/bin/env python</p>
<p>from socket import *<br />
from time import time, ctime</p>
<p>IP = ''<br />
PORT = 23456<br />
ADS = (IP, PORT)</p>
<p>tcpsoc = socket(AF_INET, SOCK_STREAM)<br />
tcpsoc.bind(ADS)<br />
tcpsoc.listen(5)</p>
<p>while 1:<br />
	print "Waiting for connection"<br />
	tcpcli, addr = tcpsoc.accept()<br />
	print "connected from:", addr<br />
	while 1:<br />
		data = tcpcli.recv(1024)<br />
		if not data : break<br />
		print data<br />
		data1 = raw_input(">>")<br />
		if data1 == "q;t": break<br />
		tcpcli.send(data1)<br />
	tcpcli.close()<br />
tcpsoc.close()<br />
</code></p>
<p>Here is the client code<br />
<code><br />
#!/usr/bin/env python</p>
<p>from socket import *</p>
<p>IP = ''<br />
PORT = 23456<br />
ADS = (IP, PORT)</p>
<p>tcpsoc = socket(AF_INET, SOCK_STREAM)<br />
tcpsoc.connect(ADS)</p>
<p>while 1:<br />
	data = raw_input("msg>>")<br />
	if not data : break<br />
	tcpsoc.send(data)<br />
	data = tcpsoc.recv(1024)<br />
	if not data: break<br />
	print data<br />
tcpsoc.close()<br />
</code><br />
the code above might not be properly intended so you can download the code from <a href="http://fb.ankurs.com/tcp_server.py">http://fb.ankurs.com/tcp_server.py</a> and <a href="http://fb.ankurs.com/tcp_client.py">http://fb.ankurs.com/tcp_client.py</a><br />
enjoy!!!</p>
]]></content:encoded>
			<wfw:commentRss>http://ankurs.com/2008/05/creating-a-simple-chat-application-with-python/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Google announces AppEngine</title>
		<link>http://ankurs.com/2008/04/google-announces-appengine/</link>
		<comments>http://ankurs.com/2008/04/google-announces-appengine/#comments</comments>
		<pubDate>Tue, 08 Apr 2008 16:42:58 +0000</pubDate>
		<dc:creator>Ankur Shrivastava</dc:creator>
				<category><![CDATA[Special]]></category>
		<category><![CDATA[app]]></category>
		<category><![CDATA[CampFireOne]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[engine]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://ankurs.com/?p=353</guid>
		<description><![CDATA[GoogleCode at their second CampFireOne announced App Engine a developer tool that enables anyone to run their web applications on Google&#8217;s infrastructure , which will be a closed beta with with only 10000 developers having access on first come first serve basis. its similar to AWS (Amazon Web Services) but takes every thing further. Google&#8230;]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a href="http://ankurs.com/wp-content/uploads/2008/04/appengine_lowres.jpg"><img class="alignnone size-medium wp-image-354" title="appengine_lowres" src="http://ankurs.com/wp-content/uploads/2008/04/appengine_lowres.jpg" alt="" width="100" height="79" /></a></p>
<p>GoogleCode at their second CampFireOne announced App Engine a developer tool that enables anyone to run their web applications on Google&#8217;s infrastructure , which will be a closed beta with with only 10000 developers having access on first come first serve basis. its similar to AWS (Amazon Web Services) but takes every thing further. Google App Engine applications are implemented using the Python programming language.  The runtime environment includes the full Python language and most of the Python standard library. App Engine also includes a scalable datastore, Django templating system and an open-source Python logging system. Its also provides authentication, analytics and access to Google service APIs. There is also a SDK available for local development. It also has the ability to move apps to the web in just a single command.<br />
Google will also provide 500 MBs of storage and enough bandwidth and processing power to serve 5 Million pages per month along with a free subdomain on appspot.com or you can also use google apps to server the app on your domain</p>
<p>If you&#8217;d like to try it out, <a href="http://appengine.google.com/">sign up</a> for access to the preview release (well 10,000 limit has been reached sry hard luck) but you can <a href="http://code.google.com/appengine">download the SDK</a> and try building the apps locally till you get an invite. You can also check out their blog <a href="http://googleappengine.blogspot.com/">http://googleappengine.blogspot.com/</a> for more updates and info</p>
]]></content:encoded>
			<wfw:commentRss>http://ankurs.com/2008/04/google-announces-appengine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

