<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1011237708354477536</id><updated>2024-10-05T07:48:07.692+05:30</updated><category term="python programming language"/><category term="basics of python"/><category term="python coding"/><category term="scripting programming language"/><category term="coding practices in python"/><category term="coding style in python"/><category term="exception handling in python"/><category term="exception handling syntax"/><category term="python data structures"/><title type='text'>Python Django WebFrameWork</title><subtitle type='html'>Programming scripting languages python django web framework ,practical explanation of concepts in python</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://pythonfundamentals.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1011237708354477536/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://pythonfundamentals.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Vinil</name><uri>http://www.blogger.com/profile/16364698093053910442</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>3</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1011237708354477536.post-9077800750345771366</id><published>2012-03-31T19:07:00.000+05:30</published><updated>2012-04-14T22:58:20.483+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="coding practices in python"/><category scheme="http://www.blogger.com/atom/ns#" term="coding style in python"/><category scheme="http://www.blogger.com/atom/ns#" term="exception handling in python"/><category scheme="http://www.blogger.com/atom/ns#" term="exception handling syntax"/><category scheme="http://www.blogger.com/atom/ns#" term="python programming language"/><title type='text'>Exception Handling in Python</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;i&gt;&amp;nbsp;Mechanism of Exception in Python&lt;/i&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Exception  !!! the term when occurs in code, may crash your code, make your program quit undesirably, forcefully. This exception arises due to the program written like DivideByZeroException, IOError etc. Each computer language has its own way to tackle the Exceptions. Python is no longer an exception in this regards. It has a beautiful &lt;b&gt;Try-Except&lt;/b&gt; mechanism to deal with run time errors in the code.Following is the syntax 

&lt;/div&gt;
&lt;blockquote&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;try:&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
#&lt;sup&gt;&lt;a class=&quot;footnote&quot; href=&quot;http://www.blogger.com/blogger.g?blogID=1011237708354477536#fn1333200340749n&quot; id=&quot;fn1333200340749&quot;&gt;1&lt;/a&gt;&lt;/sup&gt; code goes here&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;except:&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
#code goes here to handle the situation&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
#in case you may want some operations happen  ,use Finally block &lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;finally:&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
#code goes here to perform operations like memory handling, file closing etc &lt;/div&gt;
&lt;/blockquote&gt;
&lt;ol class=&quot;footnotes&quot;&gt;
&lt;li id=&quot;fn1333200340749n&quot; style=&quot;text-align: justify;&quot;&gt;This  refers to single line comment in Python [&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=1011237708354477536#fn1333200340749&quot;&gt;back&lt;/a&gt;]&lt;/li&gt;
&lt;li id=&quot;fn1333200340749n&quot; style=&quot;text-align: justify;&quot;&gt;Dont FORGET to put : at the end of try-except and finally statements or interpreter gives you error&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;Remember &lt;/b&gt;when an error or exception occurs ,&amp;nbsp;there&amp;nbsp;comes &lt;b&gt;track-stack&lt;/b&gt; as output. It states the type of error,along with certain other information &amp;nbsp;about the error. Also it defines the line where exception occurs .&amp;nbsp;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Also do try to use try-except block in your code always ,in order to provide security to code .Also some time it happens the after closing the file in python,it crashes ,thereby the data may lost.To protect code from such&amp;nbsp;situation&amp;nbsp;,it is Strongly recommended to use try-except block always.&lt;b&gt;Have a happy coding&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pythonfundamentals.blogspot.com/feeds/9077800750345771366/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pythonfundamentals.blogspot.com/2012/03/exception-handling-in-python.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1011237708354477536/posts/default/9077800750345771366'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1011237708354477536/posts/default/9077800750345771366'/><link rel='alternate' type='text/html' href='http://pythonfundamentals.blogspot.com/2012/03/exception-handling-in-python.html' title='Exception Handling in Python'/><author><name>Vinil</name><uri>http://www.blogger.com/profile/16364698093053910442</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1011237708354477536.post-6639991708639963989</id><published>2012-03-29T23:35:00.003+05:30</published><updated>2012-04-14T22:58:41.739+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="basics of python"/><category scheme="http://www.blogger.com/atom/ns#" term="python coding"/><category scheme="http://www.blogger.com/atom/ns#" term="python data structures"/><category scheme="http://www.blogger.com/atom/ns#" term="python programming language"/><category scheme="http://www.blogger.com/atom/ns#" term="scripting programming language"/><title type='text'>Basics of Python</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;table cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container zemanta-img&quot; style=&quot;float: right; margin-right: 1em; text-align: justify;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://commons.wikipedia.org/wiki/File:GooglePythonClass_Day1_Part3_Pic.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-bottom: 1em; margin-left: auto; margin-right: auto; text-align: clear:right;&quot;&gt;&lt;img alt=&quot;It shows the data structure concept of a dicti...&quot; border=&quot;0&quot; class=&quot;zemanta-img-inserted&quot; height=&quot;140&quot; src=&quot;http://upload.wikimedia.org/wikipedia/commons/thumb/5/5b/GooglePythonClass_Day1_Part3_Pic.jpg/300px-GooglePythonClass_Day1_Part3_Pic.jpg&quot; style=&quot;border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; font-size: 0.8em;&quot; width=&quot;300&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption zemanta-img-attribution&quot; style=&quot;text-align: center; width: 300px;&quot;&gt;It shows the data structure concept of a dictionary in python (Photo credit: &lt;a href=&quot;http://commons.wikipedia.org/wiki/File:GooglePythonClass_Day1_Part3_Pic.jpg&quot; target=&quot;_blank&quot;&gt;Wikipedia&lt;/a&gt;)&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;color: #0b5394; font-size: x-large;&quot;&gt;&lt;b&gt;&lt;i&gt;Basics of Python -A look&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;Learning python is not a tough work if you know what are programming languages,had deal with some of them. When I started working with python language,today professionally, I found it to be easy to begin with python docs itself. The docs are fully functional and easy to get in . The main thing in python to learn is &lt;b&gt;&lt;a href=&quot;http://pythonfundamentals.blogspot.in/&quot;&gt;Data structures&lt;/a&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;the main data structures are -dictionary ,Sets,tuple,List,stacks,Queue. The Dictionary is what you are watching in the image here. It is based on &lt;b&gt;&lt;u&gt;Key:Value&lt;/u&gt;&lt;/b&gt;&amp;nbsp;relationship.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;zemanta-pixie&quot; style=&quot;height: 15px; margin-top: 10px;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;Also the fastest&amp;nbsp;data structures&amp;nbsp;in language are&amp;nbsp;dictionaries&amp;nbsp;itself ,retrieve data from a list of millions of data ,in seconds with the help of key. To create &amp;nbsp;a&amp;nbsp;dictionary&amp;nbsp;in python ,the following syntax is used :-&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;zemanta-pixie&quot; style=&quot;height: 15px; margin-top: 10px;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;zemanta-pixie&quot; style=&quot;height: 15px; margin-top: 10px;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;d=(&#39;ABC&#39;:111 )&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;zemanta-pixie&quot; style=&quot;height: 15px; margin-top: 10px;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;where&amp;nbsp;ABC&amp;nbsp;refers to Key and 111 refers t its values&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;zemanta-pixie&quot; style=&quot;height: 15px; margin-top: 10px;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;One important thing we can have here in dictionary is &lt;b&gt;&lt;u&gt;Link comprehensions&lt;/u&gt;.&lt;/b&gt;It is somewhat like the following code&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;zemanta-pixie&quot; style=&quot;height: 15px; margin-top: 10px;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;zemanta-pixie&quot; style=&quot;height: 15px; margin-top: 10px;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;d=(x,x**2) for x in (2,4,6)&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;zemanta-pixie&quot; style=&quot;height: 15px; margin-top: 10px;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;this code is easy to read an manipulate as well .hence the programming deals with such code also .&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;zemanta-pixie&quot; style=&quot;height: 15px; margin-top: 10px;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pythonfundamentals.blogspot.com/feeds/6639991708639963989/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pythonfundamentals.blogspot.com/2012/03/basics-of-python.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1011237708354477536/posts/default/6639991708639963989'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1011237708354477536/posts/default/6639991708639963989'/><link rel='alternate' type='text/html' href='http://pythonfundamentals.blogspot.com/2012/03/basics-of-python.html' title='Basics of Python'/><author><name>Vinil</name><uri>http://www.blogger.com/profile/16364698093053910442</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1011237708354477536.post-291628214275541142</id><published>2012-03-17T22:43:00.000+05:30</published><updated>2012-03-17T22:43:41.027+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="basics of python"/><category scheme="http://www.blogger.com/atom/ns#" term="python coding"/><category scheme="http://www.blogger.com/atom/ns#" term="python programming language"/><category scheme="http://www.blogger.com/atom/ns#" term="scripting programming language"/><title type='text'>Python Programming language Basics</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://www.symbian-freeware.com/img2/python_logo.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://www.symbian-freeware.com/img2/python_logo.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
Introducing another great language this time -Python.Yeah it is good too because it can deal with bigger challenges including making a web crawlers also.Python is a scripting language where there is no compiler working at all.All the execution is done by interpreter alone.So this reduces time in running an application/program in python.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pythonfundamentals.blogspot.com/feeds/291628214275541142/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pythonfundamentals.blogspot.com/2012/03/python-programming-language-basics.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1011237708354477536/posts/default/291628214275541142'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1011237708354477536/posts/default/291628214275541142'/><link rel='alternate' type='text/html' href='http://pythonfundamentals.blogspot.com/2012/03/python-programming-language-basics.html' title='Python Programming language Basics'/><author><name>Vinil</name><uri>http://www.blogger.com/profile/16364698093053910442</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>