<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="/assets/xml/rss.xsl" media="all"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Code Ghar (python کے بارے میں تحاریر)</title><link>https://codeghar.com/</link><description></description><atom:link href="https://codeghar.com/ur/categories/python.xml" rel="self" type="application/rss+xml"></atom:link><language>ur</language><copyright>Contents © 2019 &lt;a href="mailto:@aikchar"&gt;Hamza Sheikh&lt;/a&gt; License</copyright><lastBuildDate>Fri, 08 Feb 2019 07:14:11 GMT</lastBuildDate><generator>Nikola (getnikola.com)</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>Package Python in a Snap</title><link>https://codeghar.com/ur/blog/package-python-in-a-snap.html</link><dc:creator>Hamza Sheikh</dc:creator><description>&lt;div&gt;&lt;p&gt;Getting newer versions of Python on long term support releases of Linux
distributions, such as Ubuntu or CentOS, without interfering with the system
Python can be pretty involved. Doing it on multiple instances is even harder.
Fortunately, it is possible and quite easy by using &lt;tt class="docutils literal"&gt;snapd&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://codeghar.com/ur/blog/package-python-in-a-snap.html"&gt; Read more …&lt;/a&gt; (2 منٹ کا مطالعہ باقی)&lt;/p&gt;&lt;/div&gt;</description><guid>https://codeghar.com/ur/blog/package-python-in-a-snap.html</guid><pubDate>Tue, 09 Jan 2018 04:20:24 GMT</pubDate></item><item><title>How to Use Python Virtualenv</title><link>https://codeghar.com/ur/blog/how-to-use-python-virtualenv.html</link><dc:creator>Hamza Sheikh</dc:creator><description>&lt;div&gt;&lt;p&gt;A Python virtualenv is an isolated directory that serves as the root filesystem
(kind of) for an installation of Python. In simpler terms, Python is installed
in a non-privileged directory by a regular user. Anything installed for that
instance of Python does not affect any other Python instance installed on the
system.&lt;/p&gt;
&lt;p&gt;This guide will show you how each instance of a Python interpreter differs from
others and how to use this to your advantage.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://codeghar.com/ur/blog/how-to-use-python-virtualenv.html"&gt; Read more …&lt;/a&gt; (8 منٹ کا مطالعہ باقی)&lt;/p&gt;&lt;/div&gt;</description><guid>https://codeghar.com/ur/blog/how-to-use-python-virtualenv.html</guid><pubDate>Wed, 01 Nov 2017 01:43:30 GMT</pubDate></item><item><title>Use select() in Python Socket Programming at Your Own Risk</title><link>https://codeghar.com/ur/blog/use-select-in-python-socket-programming-at-your-own-risk.html</link><dc:creator>Hamza Sheikh</dc:creator><description>&lt;div&gt;&lt;p&gt;When one reads the
&lt;a class="reference external" href="https://docs.python.org/3/howto/sockets.html"&gt;Python Socket Programming HOWTO&lt;/a&gt;,
non-blocking sockets are mentioned along with &lt;tt class="docutils literal"&gt;select&lt;/tt&gt;. This is a tale of
when &lt;tt class="docutils literal"&gt;select&lt;/tt&gt; can cause issues if you're not careful.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://codeghar.com/ur/blog/use-select-in-python-socket-programming-at-your-own-risk.html"&gt; Read more …&lt;/a&gt; (5 منٹ کا مطالعہ باقی)&lt;/p&gt;&lt;/div&gt;</description><guid>https://codeghar.com/ur/blog/use-select-in-python-socket-programming-at-your-own-risk.html</guid><pubDate>Fri, 07 Jul 2017 21:38:20 GMT</pubDate></item><item><title>Essential pkgsrc - The Missing Mini Handbook</title><link>https://codeghar.com/ur/blog/essential-pkgsrc-the-missing-mini-handbook.html</link><dc:creator>Hamza Sheikh</dc:creator><description>&lt;div&gt;&lt;p&gt;pkgsrc is a cross operating system package manager. It supports -- among many
others -- NetBSD, Minix, SmartOS, Linux, and macOS. I like it because of this
portability. It also has the additional, and I would say the best, benefit of
being installed in the home directory and run completely without needing root
access. I also like that I don't have to depend on binary packages built by
someone else, say Joyent, although there's absolutely nothing wrong with it.
Finally, it provides a large number of different packages. I have never
encountered a package that I needed but was not available. In short pkgsrc is a
portable, featureful, and flexible package manager. What's not to like?&lt;/p&gt;
&lt;p&gt;pkgsrc can sometimes be a little behind native package managers, such
as MacPorts on macOS, but it catches up quickly. For my use case -- getting
access to multiple versions of Python -- it works well enough if I closely
follow its trunk branch.&lt;/p&gt;
&lt;p&gt;There's generally good and detailed documentation available for pkgsrc but an
introductory guide that pulled in some essential starter information was
lacking. This guide fills that void by making it easy to get started with
pkgsrc and learn about some of its core concepts. Thus, I dubbed it the mini
handbook or the missing starter handbook.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://codeghar.com/ur/blog/essential-pkgsrc-the-missing-mini-handbook.html"&gt; Read more …&lt;/a&gt; (8 منٹ کا مطالعہ باقی)&lt;/p&gt;&lt;/div&gt;</description><guid>https://codeghar.com/ur/blog/essential-pkgsrc-the-missing-mini-handbook.html</guid><pubDate>Sat, 25 Mar 2017 19:29:16 GMT</pubDate></item><item><title>Install Latest Python on CentOS 7</title><link>https://codeghar.com/ur/blog/install-latest-python-on-centos-7.html</link><dc:creator>Hamza Sheikh</dc:creator><description>&lt;div&gt;&lt;p&gt;There are many options to install newer Python on CentOS, including building
from source, installing from
&lt;a class="reference external" href="https://fedoraproject.org/wiki/EPEL"&gt;EPEL&lt;/a&gt;,
installing from
&lt;a class="reference external" href="https://www.softwarecollections.org/en/"&gt;Software Collections&lt;/a&gt; (SCL),
installing third party rpm package, etc. These all work to some degree of
success. I had a different use case and could not find a pre-built rpm
package to fit it.&lt;/p&gt;
&lt;p&gt;My use case had these restraints:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;Install newer Python alongside the default system version&lt;/li&gt;
&lt;li&gt;Install multiple Python versions simultaneously&lt;/li&gt;
&lt;li&gt;Install the latest release from upstream Python project not just the latest release from a repository (repo)&lt;/li&gt;
&lt;li&gt;Do not build from source unless absolutely necessary&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="https://codeghar.com/ur/blog/install-latest-python-on-centos-7.html"&gt; Read more …&lt;/a&gt; (4 منٹ کا مطالعہ باقی)&lt;/p&gt;&lt;/div&gt;</description><guid>https://codeghar.com/ur/blog/install-latest-python-on-centos-7.html</guid><pubDate>Wed, 13 Apr 2016 05:07:07 GMT</pubDate></item><item><title>Python readline Bug</title><link>https://codeghar.com/ur/blog/python-readline-bug.html</link><dc:creator>Hamza Sheikh</dc:creator><description>&lt;div class="section" id="problem"&gt;
&lt;h2&gt;Problem&lt;/h2&gt;
&lt;p&gt;In the Python interpreter whenever I hit enter it would show a blank line
without a prompt and I'd have to press enter again to see the prompt. When
I exited the interpreter the terminal would not show anything I typed.
Pressing the return key would show my shell prompt on the same line. Up arrow
or down arrow keys did not make any difference. &lt;cite&gt;reset&lt;/cite&gt; was a last resort.&lt;/p&gt;
&lt;p&gt;For example,&lt;/p&gt;
&lt;pre class="literal-block"&gt;
Python 3.4.3 (default, Aug 26 2015, 18:29:14)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.56)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
&amp;gt;&amp;gt;&amp;gt; abs(1-0)
&amp;gt;&amp;gt;&amp;gt; 1

&amp;gt;&amp;gt;&amp;gt; ^D&amp;gt;&amp;gt;&amp;gt;
~ $ ~ $ ~ $ reset
&lt;/pre&gt;
&lt;p&gt;&lt;a href="https://codeghar.com/ur/blog/python-readline-bug.html"&gt; Read more …&lt;/a&gt; (1 منٹ کا مطالعہ باقی)&lt;/p&gt;&lt;/div&gt;</description><guid>https://codeghar.com/ur/blog/python-readline-bug.html</guid><pubDate>Tue, 06 Oct 2015 22:23:12 GMT</pubDate></item><item><title>Echo Server and Client with Twisted</title><link>https://codeghar.com/ur/blog/echo-server-and-client-with-twisted.html</link><dc:creator>Hamza Sheikh</dc:creator><description>&lt;div class="section" id="echo-server-and-client-with-twisted"&gt;
&lt;h2&gt;Echo Server and Client with Twisted&lt;/h2&gt;
&lt;p&gt;This is an introduction to Twisted using an echo server and client as an example.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://codeghar.com/ur/blog/echo-server-and-client-with-twisted.html"&gt; Read more …&lt;/a&gt; (4 منٹ کا مطالعہ باقی)&lt;/p&gt;&lt;/div&gt;</description><guid>https://codeghar.com/ur/blog/echo-server-and-client-with-twisted.html</guid><pubDate>Wed, 11 Feb 2015 00:59:32 GMT</pubDate></item><item><title>Install Python from Source in Linux</title><link>https://codeghar.com/ur/blog/install-python-from-source-in-linux.html</link><dc:creator>Hamza Sheikh</dc:creator><description>&lt;div class="section" id="install-python-from-source-in-linux"&gt;
&lt;h2&gt;Install Python from Source in Linux&lt;/h2&gt;
&lt;p&gt;This guide is for when you need to install a Python release different from what comes with your distribution in the repos. We'll install it to our home directory. This guide was tested to be working on Ubuntu 14.04.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://codeghar.com/ur/blog/install-python-from-source-in-linux.html"&gt; Read more …&lt;/a&gt; (2 منٹ کا مطالعہ باقی)&lt;/p&gt;&lt;/div&gt;</description><guid>https://codeghar.com/ur/blog/install-python-from-source-in-linux.html</guid><pubDate>Wed, 11 Feb 2015 00:36:10 GMT</pubDate></item><item><title>Setup New Python Project with pyscaffold</title><link>https://codeghar.com/ur/blog/setup-new-python-project-with-pyscaffold.html</link><dc:creator>Hamza Sheikh</dc:creator><description>&lt;div class="section" id="setup-new-python-project-with-pyscaffold"&gt;
&lt;h2&gt;Setup New Python Project with pyscaffold&lt;/h2&gt;
&lt;p&gt;This guide shows you how to setup a new Python project. This package can then be uploaded to PyPI to make it available to everyone.&lt;/p&gt;
&lt;p&gt;The examples used in this guide were run and tested on Ubuntu 14.04 with Python 3.4.0. If you're using a different platform you may have to tweak the instructions accordingly.&lt;/p&gt;
&lt;p&gt;This guide was possible thanks to &lt;a class="reference external" href="http://pyvideo.org/video/2992/how-to-setup-a-new-python-project"&gt;How to Setup a new Python Project&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://codeghar.com/ur/blog/setup-new-python-project-with-pyscaffold.html"&gt; Read more …&lt;/a&gt; (1 منٹ کا مطالعہ باقی)&lt;/p&gt;&lt;/div&gt;</description><guid>https://codeghar.com/ur/blog/setup-new-python-project-with-pyscaffold.html</guid><pubDate>Tue, 28 Oct 2014 04:10:01 GMT</pubDate></item><item><title>Install Nikola in virtualenv</title><link>https://codeghar.com/ur/blog/install-nikola-in-virtualenv.html</link><dc:creator>Hamza Sheikh</dc:creator><description>&lt;div&gt;&lt;p&gt;Nikola is a static website/blog generator written in Python. You can
install it in a virtualenv. Although it supports Python 2 and Python 3
I had trouble using Nikola version 7.1 with Python 3.4. Python 2.7
(tested on Ubuntu 14.04) and Python 3.3 (tested on Mac OS X Mavericks)
worked fine.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://codeghar.com/ur/blog/install-nikola-in-virtualenv.html"&gt; Read more …&lt;/a&gt; (1 منٹ کا مطالعہ باقی)&lt;/p&gt;&lt;/div&gt;</description><guid>https://codeghar.com/ur/blog/install-nikola-in-virtualenv.html</guid><pubDate>Tue, 14 Oct 2014 17:01:36 GMT</pubDate></item><item><title>Create Sequence Diagrams Using seqdiag</title><link>https://codeghar.com/ur/blog/create-sequence-diagrams-using-seqdiag.html</link><dc:creator>Hamza Sheikh</dc:creator><description>&lt;div&gt;&lt;p&gt;Have you ever needed to create &lt;a class="reference external" href="https://en.wikipedia.org/wiki/Sequence_diagram"&gt;sequence diagrams&lt;/a&gt;? If you're like me
you constantly have to. Up to now I have always used a manual process
using pen/paper or Visio. But I wanted an easier way and found
&lt;a class="reference external" href="http://blockdiag.com/en/seqdiag/index.html"&gt;seqdiag&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://codeghar.com/ur/blog/create-sequence-diagrams-using-seqdiag.html"&gt; Read more …&lt;/a&gt; (1 منٹ کا مطالعہ باقی)&lt;/p&gt;&lt;/div&gt;</description><guid>https://codeghar.com/ur/blog/create-sequence-diagrams-using-seqdiag.html</guid><pubDate>Wed, 01 Oct 2014 18:06:44 GMT</pubDate></item><item><title>SaltStack Quickstart Guide on Mac OS X</title><link>https://codeghar.com/ur/blog/saltstack-quickstart-guide-on-mac-os-x.html</link><dc:creator>Hamza Sheikh</dc:creator><description>&lt;div&gt;&lt;p&gt;As always, refer to the official &lt;a class="reference external" href="http://docs.saltstack.com/en/latest/"&gt;SaltStack documentation&lt;/a&gt; &lt;strong&gt;first&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;To
get up and running with SaltStack on Mac OS X can be a daunting task.
I have found it much easier to use &lt;a class="reference external" href="https://www.macports.org/"&gt;MacPorts&lt;/a&gt; to accomplish any such
tasks.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://codeghar.com/ur/blog/saltstack-quickstart-guide-on-mac-os-x.html"&gt; Read more …&lt;/a&gt; (1 منٹ کا مطالعہ باقی)&lt;/p&gt;&lt;/div&gt;</description><guid>https://codeghar.com/ur/blog/saltstack-quickstart-guide-on-mac-os-x.html</guid><pubDate>Sun, 03 Aug 2014 21:32:20 GMT</pubDate></item><item><title>gevent Quickstart Guide</title><link>https://codeghar.com/ur/blog/gevent-quickstart-guide.html</link><dc:creator>Hamza Sheikh</dc:creator><description>&lt;div&gt;&lt;p&gt;This is a simple list of steps on how to get started with installing
gevent on openSUSE (tested on openSUSE 13.1 with gevent 1.0.1). We'll
use virtualenv instead of a system-wide install.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://codeghar.com/ur/blog/gevent-quickstart-guide.html"&gt; Read more …&lt;/a&gt; (1 منٹ کا مطالعہ باقی)&lt;/p&gt;&lt;/div&gt;</description><guid>https://codeghar.com/ur/blog/gevent-quickstart-guide.html</guid><pubDate>Fri, 01 Aug 2014 18:28:44 GMT</pubDate></item></channel></rss>