Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Matt's newb question 1
#2
1. sys is a module that contains "system functionality". sys.argv is a list containing your script's command line arguments. One way to use it would be to write import sys and then sys.argv to access it.

from module import names is an alternative way to import a module that allows you to access the given names without naming the module. That is writing from sys import argv allows you to just write argv whereas import sys would require you to write sys.argv instead.


2.https://stackoverflow.com/questions/13666346/from-sys-import-argv-what-is-the-function-of-script

3-9 are all correct.
Reply


Messages In This Thread
Matt's newb question 1 - by MattSS102 - Aug-28-2017, 03:07 AM
RE: Matt's newb question 1 - by BerlingSwe - Aug-28-2017, 03:27 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Python newb need help Fictile 1 376 Apr-02-2024, 03:28 AM
Last Post: buran
  NameError issue with daughter's newb code MrGonk 2 1,580 Sep-16-2021, 01:29 PM
Last Post: BashBedlam
  Simple newb string question Involute 2 2,354 Sep-08-2019, 12:50 AM
Last Post: Involute
  please help this newb install pygame iofhua 7 6,255 May-15-2019, 01:09 PM
Last Post: buran
  Newb question: Debugging + Linting Python in Visual Studio Code Drone4four 1 2,538 Apr-15-2019, 06:19 AM
Last Post: perfringo
  Newb question about %02d %04d bennylava 30 20,458 Mar-05-2019, 11:23 PM
Last Post: snippsat
  Pthyon 3 question (newb) bennylava 11 6,218 Feb-28-2019, 06:04 PM
Last Post: buran
  newb selfie PatM 5 3,938 Feb-19-2019, 12:20 AM
Last Post: snippsat
  Complete NEWB and openpyxl project Netopia 44 18,453 Jan-18-2019, 08:15 PM
Last Post: Netopia
  Newb Question - Threading in Crons vvarrior 2 2,928 Jul-20-2018, 08:12 PM
Last Post: vvarrior

Forum Jump:

User Panel Messages

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