User Tools

Site Tools


python:cursesfolder

CURSES - Folder operations utility

20.09.2008

This is a small tutorial made with curses. No fancy interface, just a few menus there and some operations on folders (involve os module)

Curses:

  • initialization of curses
  • create a subwindow
  • place some strings inside
  • wait for a keystroke decision

OS Module:

  • create a directory
  • delete a directory
  • recursive function for searching, deleting
  • test with os.path for a file/folder

CODE STRUCTURE

main() + draw_menu() — >

draw_make_dir() + draw_menu_make_dir() – > enter_directory() – > create_directory() draw_delete_dir() + draw_menu_delete_dir() – > enter_directory() – > delete_directory() draw_find_dir() + draw_menu_find_dir() – > enter_directory() – > find_directory()

Download here the python source file

python/cursesfolder.txt · Last modified: 2013/03/16 17:41 (external edit)