Difference between revisions of "Python"

From Ever changing code
Jump to navigation Jump to search
Line 1: Line 1:
Learning Python scratch pad
Learning Python scratch pad
= Vim as Python IDE =
Ubuntu comes with vim-tiny package that has most of things disabled, so get it uninstalled
sudo apt-get purge vim-tiny
sudo apt-get install vim        #py3 support
sudo apt-get install vim-nox-py2 #py2 support
vim --version | grep python  #verify you should see eg: +python -python3
Optimally you may need to set alternatives
  sudo update-alternatives --set vim /usr/bin/vim.nox-py2
Now, open vim and check <code>:python import sys; print(sys.version)</code> you should see similar output
2.7.12 (default, Nov 19 2016, 06:48:10)
[GCC 5.4.0 20160609]


=References=
=References=

Revision as of 23:05, 3 May 2017

Learning Python scratch pad

Vim as Python IDE

Ubuntu comes with vim-tiny package that has most of things disabled, so get it uninstalled

sudo apt-get purge vim-tiny
sudo apt-get install vim         #py3 support
sudo apt-get install vim-nox-py2 #py2 support
vim --version | grep python  #verify you should see eg: +python -python3

Optimally you may need to set alternatives

 sudo update-alternatives --set vim /usr/bin/vim.nox-py2

Now, open vim and check :python import sys; print(sys.version) you should see similar output

2.7.12 (default, Nov 19 2016, 06:48:10)
[GCC 5.4.0 20160609]

References