Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
jbcodeforce committed Jul 2, 2024
2 parents d5ca7de + f9786b7 commit 57638bd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/python/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@ pipenv acts as pip + virtual environment. It uses Pipfile to replace requirement

## How to get program arguments?

See [getopt](https://docs.python.org/3/library/getopt.html)

```python
import sys,getopt
USER="jbcodeforce"
FILE="./data/export-questions.json"
try:
opts, args = getopt.getopt(argv,"hi:u:",["inputfile=","user="])
opts, args = getopt.getopt(sys.argv,"hi:u:",["inputfile=","user="])
except getopt.GetoptError:
print(usage())
sys.exit(2)
Expand Down

0 comments on commit 57638bd

Please sign in to comment.