python |epd ( -bit)(defaultjul : : [gcc (red hat - )on linux type "packages""demoor "enthoughtfor more information the console output of shell command can be stored in variable by assigning the !escaped expression to variable for exampleon my linux-based machine connected to the internet via etherneti can get my ip address as python variablein [ ]ip_info !ifconfig eth grep "inet in [ ]ip_info[ strip(out[ ]'inet addr bcast mask the returned python object ip_info is actually custom list type containing various versions of the console output ipython can also substitute in python values defined in the current environment when using to do thispreface the variable name by the dollar sign $in [ ]foo 'test*in [ ]!ls $foo test py test py test xml the %alias magic function can define custom shortcuts for shell commands as simple examplein [ ]%alias ll ls - in [ ]ll /usr total drwxr-xr- root root : bindrwxr-xr- root root : gamesdrwxr-xr- root root : includedrwxr-xr- root root : libdrwxr-xr- root root : lib lrwxrwxrwx root root : lib -libdrwxr-xr- root root : localdrwxr-xr- root root : sbindrwxr-xr- root root : sharedrwxrwsr- root src : srcmultiple commands can be executed just as on the command line by separating them with semicolonsin [ ]%alias test_alias (cd ch lscd in [ ]test_alias macrodata csv spx csv tips csv you'll notice that ipython "forgetsany aliases you define interactively as soon as the session is closed to create permanent aliasesyou will need to use the configuration system see later in the interacting with the operating system www it-ebooks info