<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Aydin Sener on Medium]]></title>
        <description><![CDATA[Stories by Aydin Sener on Medium]]></description>
        <link>https://medium.com/@aydinsener?source=rss-27464b0599ee------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Stories by Aydin Sener on Medium</title>
            <link>https://medium.com/@aydinsener?source=rss-27464b0599ee------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 03:04:39 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@aydinsener/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Quick Python Console]]></title>
            <link>https://medium.com/@aydinsener/quick-python-console-14b4b4ff48ad?source=rss-27464b0599ee------2</link>
            <guid isPermaLink="false">https://medium.com/p/14b4b4ff48ad</guid>
            <dc:creator><![CDATA[Aydin Sener]]></dc:creator>
            <pubDate>Mon, 14 Feb 2022 20:07:20 GMT</pubDate>
            <atom:updated>2022-02-14T20:07:20.651Z</atom:updated>
            <content:encoded><![CDATA[<p>Once or twice a day, I need to run python console. I end up importing some modules and set some ipython magic. I have setup few configurations for this purpose. This applies to Linux machines.</p><p><strong>Create Virtual Environment</strong></p><p>python -m venv ~/venvs/local-console</p><p>Install modules</p><p>~/venvs/local-console/bin/python -m pip install pandas seaborn</p><p><strong>Setup Python startup script</strong></p><p>Create .pythonrc in ~/venvs/local-console/bin/</p><p>touch ~/venvs/local-console/bin/.pythonrc</p><p>Fill with file with your initialization requirements</p><pre>get_ipython().magic(&quot;%matplotlib auto&quot;) <br>import pandas<br>import seaborn<br>#...</pre><p><strong>Setup Batch File for Python Initialization</strong></p><p>Create py.sh ~/venvs/local-console/bin/</p><p>touch ~/venvs/local-console/bin/py.sh</p><p>Fill with startup conditions</p><pre>PYTHONSTARTUP=~/venvs/local-console/bin/.pythonrc ~/envs/local-console/bin/python3.9 -m IPython</pre><p>PYTHONSTARTUP environment variable defines the startup script. -m option loads the given module (ipython)</p><p>Do not forget to make file executable:</p><p>chmod u+x py.sh</p><p><strong>Create an Allias</strong></p><p>Add the allias to your shell initialization script for Bash ~/.bashrc</p><p>alias py=~/venvs/local-console/bin/py.sh</p><p>Now you can just run py</p><p><strong>Test</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/794/1*4Wmr7rw3ImEIkHEvIQNmFg.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=14b4b4ff48ad" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>