View Active Threads
View Today's Posts
Home
Forums
View New Posts
View Today's Posts
My Discussions
Unanswered Posts
Unread Posts
Active Threads
Mark all forums read
Staff List
Member List
Help
Calendar
Search
Statistics
Interpreter
IRC
input-external program-output
Python Forum
Python Coding
General Coding Help
Thread Rating:
1 Vote(s) - 3 Average
1
2
3
4
5
Thread Modes
input-external program-output
baolevani
Unladen Swallow
Posts:
4
Threads:
3
Joined:
Feb 2017
Reputation:
0
#1
Feb-24-2017, 02:22 PM
(This post was last modified: Feb-24-2017, 11:57 PM by
Ofnuts
.)
Hi All,
How can I call an external program in python, feed .txt file and retrieve the output.
Thanks!
Reply
Find
Reply
Larz60+
aetate et sapientia
Posts:
11,859
Threads:
472
Joined:
Sep 2016
Reputation:
450
#2
Feb-24-2017, 02:26 PM
Could you please elaborate, this is not a very detailed description of what you'd like to do
Reply
Find
Reply
nilamo
Last Thursdayist
Posts:
3,458
Threads:
101
Joined:
Sep 2016
Reputation:
143
#3
Mar-27-2017, 04:34 PM
1)
subprocess module
2)
with open("somefile.txt") as fin: for line in fin: print(line.swapcase())
Reply
Find
Reply
Possibly Related Threads…
Thread
Author
Replies
Views
Last Post
Help with to check an Input list data with a data read from an external source
sacharyya
3
317
Mar-09-2024, 12:33 PM
Last Post
:
Pedroski55
output provide the filename along with the input file processed.
arjunaram
1
903
Apr-13-2023, 08:15 PM
Last Post
:
menator01
serial input/output
barryjo
3
2,374
Dec-27-2021, 11:57 PM
Last Post
:
barryjo
How to input & output parameters from command line argument
shantanu97
1
2,506
Apr-13-2021, 02:12 PM
Last Post
:
Larz60+
Code giving same output no matter the input.
Yort
2
2,465
Dec-20-2020, 05:59 AM
Last Post
:
buran
Handling multi-input/output audio in python
bor1904
4
3,495
Nov-04-2020, 08:25 AM
Last Post
:
CHLOVRL
single input infinite output problem
Chase91
2
1,906
Sep-23-2020, 10:01 PM
Last Post
:
Chase91
waiting for barcode scanner output, while main program continues to run
lightframe109
3
4,581
Sep-03-2020, 02:19 PM
Last Post
:
DeaD_EyE
How to get program output from subprocess.Popen?
glestwid
1
2,333
Aug-19-2020, 05:44 AM
Last Post
:
buran
how can we record a video file from our program output (moving object)
Zhaleh
0
1,779
Aug-03-2020, 02:47 PM
Last Post
:
Zhaleh
Users browsing this thread: 3 Guest(s)
View a Printable Version
Forum Jump:
Private Messages
User Control Panel
Who's Online
Search
Forum Home
Python Coding
-- General Coding Help
-- Data Science
-- Homework
-- GUI
-- Game Development
-- Networking
-- Web Scraping & Web Development
General
-- News and Discussions
-- Tutorials
---- Tutorial Requests and Submissions
---- Python Installation and Execution
---- Fundamentals
---- Common pitfalls and what to do
---- Web Scraping
---- Web Tutorials
---- GUI tutorials
---- Game Tutorials
---- Networking Tutorials
-- Code sharing
-- Code Review
-- Jobs
Forum & Off Topic
-- Board
---- Weekly Top Picks
-- Bar
User Panel
Messages
Log Out
My Profile
Pay your profile a visit
User Control Panel
Do some changes on your profile
My Messages
View private messages
unread
Avatar
Change avatar
Signature
Change signature
Announcements
Announcement #1
8/1/2020
Announcement #2
8/2/2020
Announcement #3
8/6/2020
Login to Python Forum
Enter your details to login to your account:
Remember me
Lost Password?
Login
Don't have an account yet?
Sign Up!
Linear Mode
Threaded Mode