Python Forum
f-string in command line arguments
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
f-string in command line arguments
#1
i am starting the design of a command i have previously written in C now to be in Python3. this command takes input from stdin and executes a command given in the command line arguments with a certain character being substituted with a line from stdin, repeating for each line in stdin. but, i want to make some changes in the new Python3 version. to start with, i want to support the use of f-strings on the given command argument. what i am wondering is how i might do that. the code will be getting an ordinary string from sys.argv and will need to handle it like it were an f-string. i have not even started the design, yet, or even the code. any suggestions on the direction to go with the f-strings part?

i left out part of the description of the command. it uses one special argument ... the maximum number of parallel processes running commands. if that number is 1 then, obviously, it just does one at a time. if a number less than 1 is given, it outputs the commands it would have run, in the order given.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  review of command line parsers Skaperen 2 2,033 Mar-11-2021, 07:39 PM
Last Post: Skaperen
  command line options Skaperen 5 2,598 Aug-14-2020, 08:48 AM
Last Post: DeaD_EyE
  opening python from the command line takes a long time to load? abdulkaderanwar 4 2,909 Jun-22-2020, 03:42 AM
Last Post: abdulkaderanwar
  my own command line option parser Skaperen 0 1,643 Mar-27-2020, 04:14 AM
Last Post: Skaperen
  i need a module for more involved command line parsing Skaperen 21 6,950 Sep-04-2019, 02:18 AM
Last Post: Skaperen
  python command (2 and 3) ignores extra -c arguments Skaperen 4 2,052 Aug-27-2019, 12:34 AM
Last Post: Skaperen

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020