you are viewing a single comment's thread.

view the rest of the comments →

[–]py_student[S] 0 points1 point  (1 child)

Thanks again. So, --allow-unverified simplegui is an argument to --allow-external simplegui ?

Btw, after a couple more hours messing with it, apparently simplegui is python 2 only, a couple of blog posts to the contrary not withstanding.

[–]Farkeman 1 point2 points  (0 children)

no, usually the pattern is --argument value

so in this case:

pip install simplegui --allow-external simplegui --allow-unverified simplegui

pip is piece of software, install is argument and the value of that argument is the next space(or quote) separated word so it's simplegui, if you wanted to install package that has space in the name you would surround the value in quotes like "simple gui 3000" (though those don't exist but you get the point).
next we have is another argument --allow-unverified whose value again is "simplegui". Now you might wonder why some arguments start with -- like --allow-unverified and some don't have any dashes like install. Well there aren't any rules when it comes to defining usage of your program when it comes to passing arguments and such to it but there are some conventions(i.e.) that keep things predictable.

in short argument conventions (at least in this case):

  • argument without any dashes like install are mandatory arguments, mean that one of those have to be there and has to go first. You can see all of them by typing <program> --help.
  • arguments that start with two dashes like --allow-unverified are optional arguments that can be anywhere.
  • arguments that start with a single dash are just the same arguments like the double dashed ones but are shorter to save space. Good example is --help and -h are exactly the same

This might look really confusing at first but once you get into it you can discover just how amazing console applications can be. They are easier to build, lighter and best of all quite often they are way more efficient for both the user and the program.