Python Forum
converting scripts to be functions
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
converting scripts to be functions
#1
i have many scripts that output text of what they find or figure out. i'd like to re-implement them as functions so other script can access the same information. that means some means to send the output to the caller. there are so many ways to do this. i'd like to know which is the recommended pythonic way. would that be to make a generator to yield the output one line at a time?

what if the original script does some of its output by running commands and letting their output just mix in at the right place?
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 scripts to be functions - by Skaperen - Jul-29-2020, 10:06 PM
RE: converting scripts to be functions - by buran - Jul-30-2020, 05:10 AM

Forum Jump:

User Panel Messages

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