Hacker News new | ask | show | jobs
by uncr3ative 5182 days ago
with ipython you do get some of that auto completion for python. It'll autocomplete the module name for you, but you do have to figure out you want that module first, so you'd need to google and realize you want shutil for dealing with files. I use it a lot when I'm interacting with new APIs or even just for writing the code as I go.

  In [1]: import sh
  sha     shelve  shlex   shutil  
  In [1]: import shutil
  In [2]: shutil.
  ...
  shutil.copy  shutil.errno  shutil.move
  In [2]: help(shutil.move)
To do other more powerful automation kind of stuff, this is pretty nifty: http://sikuli.org/
1 comments

check out path.py

https://github.com/dottedmag/path.py

it's awesome for dealing with paths instead of having to do stuff like

    os.path.abspath(os.path.join(os.path.join(x,y),z)) 
everytime, it gives you nice abstractions like

    path('/home/me').files('*.jpg')
Os.path.join can take more than two arguments. So it's not as bad as that example.