Ejemplo n.º 1
0
def add(options):
    if len(argv) != 3:
        templatetools.print_usage(options['dialog'])
        sys.exit(4)

    try:
        dialog_name = templatetools.quickly_name(argv[2])
    except templatetools.bad_project_name, e:
        print(e)
        sys.exit(1)
Ejemplo n.º 2
0
def add(options):
    if len(argv) != 3:
        templatetools.print_usage(options['help-topic'])
        sys.exit(4)

    try:
        topic_name = templatetools.quickly_name(argv[2])
    except templatetools.bad_project_name, e:
        print(e)
        sys.exit(1)
Ejemplo n.º 3
0
$ cd path/to/project-name

2. Edit the UI with Glade:
$ quickly design

3. Edit the Python code:
$ quickly edit
""")
templatetools.handle_additional_parameters(sys.argv, help, usage=usage)


path_and_project = sys.argv[1].split('/')
project_name = path_and_project[-1]

try:
    project_name = templatetools.quickly_name(project_name)
except:
    # user friendly message already caught in pre_create
    sys.exit(1)

if len(path_and_project) > 1:
    os.chdir(str(os.path.sep).join(path_and_project[0:-1]))

os.chdir(project_name)

templatetools.copy_dirs_from_template()

# add it to revision control
print _("Creating bzr repository and committing")
bzr_instance = subprocess.Popen(["bzr", "init"], stdout=subprocess.PIPE)
bzr_instance.wait()
Ejemplo n.º 4
0
2. Edit the UI with Glade:
$ quickly design

3. Edit the Python code:
$ quickly edit
""")


templatetools.handle_additional_parameters(sys.argv, help, usage=usage)

path_and_project = sys.argv[1].split('/')
project_name = path_and_project[-1]

try:
    project_name = templatetools.quickly_name(project_name)
except:
    # user friendly message already caught in pre_create
    sys.exit(1)

if len(path_and_project) > 1:
    os.chdir(str(os.path.sep).join(path_and_project[0:-1]))

os.chdir(project_name)

templatetools.copy_dirs_from_template()

# add it to revision control
print _("Creating bzr repository and committing")
bzr_instance = subprocess.Popen(["bzr", "init"], stdout=subprocess.PIPE)
bzr_instance.wait()