Did I find the right examples for you? yes no

All Samples(17)  |  Call(17)  |  Derive(0)  |  Import(0)

        def isFileOrDir (obj):
  log.debug ("isFileOrDir: " + str(obj))
  obj_str = str(obj)
  if ' ' in obj_str:
    return False
  elif os.path.isfile(obj_str) or os.path.isdir(obj_str):
    return True
  return False
        


src/g/i/gists.cli-0.351/gists_cli/gists.py   gists.cli(Download)
    if util.parseBool( cmd ) != None:
      return False
    if util.isFileOrDir( cmd ) == True:
      return False
    if str( cmd ).strip().isalnum() == False:
    cmd = "list"
  elif alen == 1:
    if util.isGistIdent(args[0]) == True and util.isFileOrDir( args[0] ) == False  and util.parseBool( args[0] ) == None:
      # view ID
      cmd = "view"
    elif util.isFileOrDir( args[0] ) == True:
      # create File
      # create Content
      if util.isFileOrDir(args[0]) == True:
        actions.new( filename = args[0] )
      else:
      # create Description and Content 
      if util.parseBool( args[0] ) != None:
        if util.isFileOrDir(args[1]) == True:
          actions.new( public=util.parseBool( args[0] ), filename=args[1] )
        else:

src/g/i/gists.cli-0.351/gists_cli/bak.gists.py   gists.cli(Download)
    cmd = "list"
  elif alen == 1:
    if args[0].strip().isalnum() == True and util.isFileOrDir( args[0] ) == False  and util.parseBool( args[0] ) == None:
      # view ID
      cmd = "view"
    elif util.isFileOrDir( args[0] ) == True:
      # create File
      # create Content
      if util.isFileOrDir(args[0]) == True:
        actions.create( filename = args[0] )
      else:
      # create Description and Content 
      if util.parseBool( args[0] ) != None:
        if util.isFileOrDir(args[1]) == True:
          actions.create( public=util.parseBool( args[0] ), filename=args[1] )
        else:
          actions.create( public=util.parseBool( args[0] ), content=args[1] )
      else:
        if util.isFileOrDir(args[1]) == True: