I have two python script the first once contains my def callers and my command line arguments. The second one contains my defs that i want to use the command line arguments in. I was wondering if there was a way to call the command line arguments into the second script cause they do call some of the items that are needed in the second one from the comman line.
abaddon2031
0
Junior Poster in Training
Recommended Answers
Jump to PostI would honestly just pass them as arguments. Nice and simple.
Jump to PostYour explanation is unclear. I don't think there is an issue. For example if the first file contains
args = parser.parse_args()
you can later call
foo(args)
and it doesn't matter if functionfoo()
was defined in the first or the second script.
All 8 Replies
Hiroshe
499
Posting Whiz in Training
Gribouillis
1,391
Programming Explorer
Team Colleague
abaddon2031
0
Junior Poster in Training
Gribouillis
1,391
Programming Explorer
Team Colleague
abaddon2031
0
Junior Poster in Training
Gribouillis
1,391
Programming Explorer
Team Colleague
abaddon2031
0
Junior Poster in Training
Gribouillis
1,391
Programming Explorer
Team Colleague
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.