Clearly, you are a Python master!
Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Best posts made by iApeiron
Latest posts made by iApeiron
-
RE: Simple UI to run script2 + args
@ccc Here is the project: Savethemblobs_app
What improvements would you make? Please feel free to fork. -
RE: Simple UI to run script2 + args
@ccc Thank you! This works as expected!
The first two args are necessary, the third arg is supposed to be optional. In its current form, (with Trump removed of course,) leaving the third arg blank causes script2 error (citing an invalid arg).
Do you know how to leave an arg as optional? -
RE: Simple UI to run script2 + args
@ccc Thanks. I still get the traceback error "AttributeError: 'tuple' object has no attribute 'remove'"
-
RE: Simple UI to run script2 + args
@JonB Thanks. I really like this dialogue box! If I can get the responses to act as args to control my second script, then I have it made!
-
RE: Simple UI to run script2 + args
@ccc Thank you for the thoughtful answer!
I think this discussion has strayed away from my original intention.
To rephrase my original intention:
A have a command line Python script which would be used as follows "python main.py arg1 arg2 arg" and then proceeds to do and print some predefined functions.
Now, I want use a wrapper script to run main.py with the args input via a prompt, and print what main.py is doing.Thank you for help!
-
RE: Simple UI to run script2 + args
@omz I've got this working based on the ex13 script
from sys import argv script2 = argv first_name = raw_input("What is your first name? ") middle_name = raw_input("What is your middle name? ") last_name = raw_input("What is your last name? ") print "Your full name is %s %s %s." % (first_name, middle_name, last_name)
But I have not got runpy to cooperate.
And this doesn't use the 'raw_input' which I need.Do you have a solution? Thank you for your help
-
RE: Simple UI to run script2 + args
@omz Thank you. I think I have a start now, thanks to coming across this ex13-raw_input.py
-
RE: Simple UI to run script2 + args
Thank you. This is a start. But I also need some way to append user input as arguments for script2.
Essentially, a GUI wrapper for a pre-existing commandline .py -
Simple UI to run script2 + args
Can anybody point me in the right direction?
I'm hoping to find a basic template or example.I need a script1.py to run "script2.py arg1 arg2 arg3"
I'm new to Pythonista, and not sure where to start.
Thank you!