Python Forum
converting arguments or input numbers
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
converting arguments or input numbers
#5
you can do that faster as a shell command. i won't be doing that on code that needs to run securely. it will be in code that runs with the credentials of who runs it. if you run it and do that, you'll only be doing it to yourself.

(Aug-20-2018, 06:39 AM)Gribouillis Wrote: Besides the questionable use of eval, your code would improve by using a library to parse command line arguments, typically argparse of one of its wrappers argh or click or others.
some of those libraries may be usable for some of my programs. most of my commands have unusual and/or non-standard command syntax. i have seen nothing that am able to use on eve half of my commands. my next program will have a syntax that uses both - and + and can even mix both sets of option within the same argument. and these options have specific influence on how the file names are tested as it goes. and, of course, error messages include argument context for user.

what are your questions about my use of eval()? am i calling it with credentials different than who types in that option? no!
Tradition is peer pressure from dead people

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


Messages In This Thread
converting arguments or input numbers - by Skaperen - Aug-20-2018, 01:31 AM
RE: converting arguments or input numbers - by Skaperen - Aug-20-2018, 08:01 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  ValueError: Found input variables with inconsistent numbers of samples saoko 0 2,568 Jun-16-2022, 06:59 PM
Last Post: saoko
  Found input variables with inconsistent numbers of samples: [1000, 200] jenya56 2 3,003 Sep-15-2021, 12:48 PM
Last Post: jenya56
  converting user input to float troubles RecklessTechGuy 3 2,552 Aug-17-2020, 12:41 PM
Last Post: deanhystad
  square root of 5 input numbers mrityunjoy 1 2,085 Jun-10-2020, 11:08 AM
Last Post: perfringo
  square root of 6 input numbers mrityunjoy 3 2,707 Jun-07-2020, 06:35 AM
Last Post: ndc85430
  Trouble converting numbers to characters Involute 4 2,598 Sep-12-2019, 04:49 AM
Last Post: Involute
  Print Numbers starting at 1 vertically with separator for output numbers Pleiades 3 3,864 May-09-2019, 12:19 PM
Last Post: Pleiades
  converting python list to a list by user input Dante24 1 3,096 Nov-21-2017, 10:10 AM
Last Post: heiner55
  Functions (Arguments Passing,Changing a mutable ,Assignment to Arguments Names) Adelton 2 3,966 Mar-02-2017, 10:23 PM
Last Post: zivoni

Forum Jump:

User Panel Messages

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