Exemplo n.º 1
0
 def action_add_subfolder(self,item):
     name = utilities.ask_string(_('name :'),_('Give a sub-folder name'),_('folder'))
     folderID = self.treeView.GetPyData(item)
     if database.theBase.folders_add_child_under(name,folderID):
         self.fillDirectories()
         self.notify_selection()
     else:
         utilities.show_message(_('unable to add the sub-folder {0}').format(name))
Exemplo n.º 2
0
 def action_ren_subfolder(self,item):
     folderID = self.treeView.GetPyData(item)
     folderName = self.treeView.GetItemText(item)
     name = utilities.ask_string(_('name :'),_('Give a sub-folder name'),folderName)
     if name=='' : return
     if utilities.ask(_('Are you sure that you want to rename folder "{iniName}" to "{newName}"'.format(iniName=folderName,newName=name))):
         if database.theBase.folders_rename(folderID,name):
             self.fillDirectories()
             self.notify_selection()
         else:
             utilities.show_message(_('unable to remove the subfolder {0}').format(folderName))
Exemplo n.º 3
0
def main():
    characters = ask_string()

    screen = turtle.Screen()

    for character in characters:
        font_size = get_random_font_size()
        position = get_random_position()
        color = get_random_color()

        draw_character(character, font_size, position, color)

    screen.mainloop()