home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2010 November / maximum-cd-2010-11.iso / DiscContents / calibre-0.7.13.msi / file_1729 (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2010-08-06  |  1.6 KB  |  42 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.6)
  3.  
  4.  
  5. def prefilter_shell(self, line, continuation):
  6.     if line:
  7.         l0 = line[0]
  8.         if l0 in '~/.':
  9.             return self._prefilter('!%s' % line, continuation)
  10.         if l0 == '$':
  11.             lrest = line[1:]
  12.             if lrest.startswith('$'):
  13.                 return self._prefilter('%ssc -l %s' % (self.ESC_MAGIC, lrest[1:]), continuation)
  14.             return self._prefilter('%ssc %s' % (self.ESC_MAGIC, lrest), continuation)
  15.         l0 == '$'
  16.         return self._prefilter(line, continuation)
  17.     line
  18.     return self._prefilter(line, continuation)
  19.  
  20. from IPython.iplib import InteractiveShell
  21. InteractiveShell.prefilter = prefilter_shell
  22. del InteractiveShell
  23. del prefilter_shell
  24. import os
  25. import sys
  26. import shutil
  27. from IPython.genutils import system, shell, getoutput, getoutputerror
  28. sout = getoutput
  29.  
  30. lout = lambda cmd: getoutput(cmd, split = 1)
  31.  
  32. def pysh():
  33.     pass
  34.  
  35. __IPYTHON__.default_option('cd', '-q')
  36. __IPYTHON__.magic_rehashx()
  37. __IPYTHON__.magic_unalias('sc')
  38. __IPYTHON__.magic_unalias('sx')
  39. import re
  40. __IPYTHON__.line_split = re.compile('^([\\s*,;/])([\\?\\w\\.\\-\\+]+\\w*\\s*)(\\(?.*$)')
  41. del re
  42.