473,396 Members | 2,039 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Re: Module to read input from commandline

James,

Check out the optparse module as well. The optparse module supercedes(?)
the cmd module and offers a lot more functionality.

Malcolm
Jun 27 '08 #1
2 997
On May 6, 2:11*pm, pyt...@bdurham.com wrote:
Check out the optparse module as well. The optparse module supercedes(?)
the cmd module and offers a lot more functionality.
Hi Malcom,

Doesn't the optparse module work by parsing the arguments that are
passed to the script when it is invoked?

What I was looking for was a commandline read loop that executes
within a script that is already running ... or can optparse be used in
this context as well?

Thanks,
James.
Jun 27 '08 #2
Hi James,
What I was looking for was a commandline read loop that executes within a script that is already running ... or can optparse be used in
this context as well?

Apologies. I missed the nuance of the read loop within an already
running script.

Malcolm
Jun 27 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Peter Åstrand | last post by:
There's a new PEP available: PEP 324: popen5 - New POSIX process module A copy is included below. Comments are appreciated. ---- PEP: 324 Title: popen5 - New POSIX process module
9
by: It's me | last post by:
Why do I get an "AttributeError: read" message when I do: import sys r=sys.stdin.read() ?? I've tried: r=sys.stdin.read(80)
3
by: Chris_147 | last post by:
but it seems to depend on from where I start the Python shell. so I've got a module selfservicelabels.py with some variables defined, like this: BtnSave = "link=label.save"...
10
by: Ben Finney | last post by:
Howdy all, Question: I have Python modules named without '.py' as the extension, and I'd like to be able to import them. How can I do that? Background: On Unix, I write programs intended to...
14
by: ccdetail | last post by:
http://www.tiobe.com/index.htm?tiobe_index Python is the 7th most commonly used language, up from 8th. The only one gaining ground besides VB in the top 10. We're glad, our app is written in...
2
by: Nelson | last post by:
Subject: How can I get the input stream in commandline application ? Hi guys! I have to get the input stream in my win32 commandline application. Using another words, I want to catch content of...
21
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Uploading files from a local computer to a remote web server has many useful purposes, the most...
3
by: james | last post by:
Hi all, I did some quick searching but I haven't found anything like I want. It probably has to do with the terms I am searching for so if I describe what I want then I hope someone can point me...
2
by: chrisber | last post by:
using the unittest module in Python 2.3.5, I've written some test code that ends up with if __name__ == "__main__": unittest.main() Since I want to run this code in various environments, I'd...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.