def gui(): """remove libraries by GUI.""" sel = psidialogs.multi_choice(libraries(), 'select libraries to remove from %s!' % libraries_dir(), title='remove boards') print('%s selected' % sel) if sel: if psidialogs.ask_yes_no('Do you really want to remove selected libraries?\n' + '\n'.join(sel)): for x in sel: remove_lib(x) print('%s was removed' % x)
def gui(): """remove libraries by GUI.""" sel = psidialogs.multi_choice(libraries(), 'select libraries to remove from %s!' % libraries_dir(), title='remove boards') print('%s selected' % sel) if sel: if psidialogs.ask_yes_no( 'Do you really want to remove selected libraries?\n' + '\n'.join(sel)): for x in sel: remove_lib(x) print('%s was removed' % x)
def create_examples_all(): """create arduino/examples/all directory. :rtype: None """ remove_examples_all() examples_all_dir().mkdir() for lib in libraries(): maindir = examples_all_dir() / lib.upper()[0:1] / lib # libraries_dir() / maindir.makedirs_p() for ex in lib_examples(lib): d = lib_example_dir(lib, ex) if hasattr(os, 'symlink'): d.symlink(maindir / ex) else: d.copytree(maindir / ex)
def create_examples_all(): """create arduino/examples/all directory. :rtype: None """ remove_examples_all() examples_all_dir().mkdir() for lib in libraries(): maindir = examples_all_dir() / lib.upper()[0:1] / lib # libraries_dir() / maindir.makedirs_p() for ex in lib_examples(lib): d = lib_example_dir(lib, ex) if hasattr(os, "symlink"): d.symlink(maindir / ex) else: d.copytree(maindir / ex)