def get_ipdir():
 ipdir = pjoin(os.path.dirname(__file__), os.pardir)
 ipdir = os.path.abspath(ipdir)
 cd(ipdir)
 if ((not os.path.isdir('IPython')) and os.path.isfile('setup.py')):
  raise SystemExit(('Invalid ipython directory: %s' % ipdir))
 return ipdir

def get_ipdir ( ) : ipdir = pjoin ( os . path . dirname ( __file__ ) , os . pardir ) ipdir = os . path . abspath ( ipdir ) cd ( ipdir ) if ( ( not os . path . isdir ( 'IPython' ) ) and os . path . isfile ( 'setup.py' ) ) : raise SystemExit ( ( 'Invalid ipython directory: %s' % ipdir ) ) return ipdir
get ipython directory from command line .