Changes

Jump to: navigation, search

OPS435 Python Lab 1

22 bytes added, 11:04, 17 May 2017
Using Magic Functions
==== Using Magic Functions ====
:Lets start with trying to run begin by running some python code in a the ipython interactive shell. This is a advanced python shell, similar to the bash shell that you have been using throughout the Linux courses. Throughout these labs the term command can also refer to these "magical functions". 
:'''Perform the following steps:'''
:#To get into access the '''ipython ''' shell type, issue the following command:<source>ipython3ipython</source>Now we are now inside the IPython environment. We can run some basic bash commands in here, within this is done through shell by using issuing IPython magic functions. <br>
:#Lets try a few commands out now:<source>
% ls% pwd% cd ~/% ls
</source>Now hold on. You are not using Python here. These are aliases, that IPython gives you access to. What you are actually using is bash, but not all bash commands are available in the IPython environment.<br><br>
:#Lets find out which ones are available, type the following command into the IPython shell:<source>
13,420
edits

Navigation menu