473,397 Members | 1,969 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,397 software developers and data experts.

optparse examples

Hi list,

I'm trying to understand how really optparse work
..
I've already read the documentation so please don't answer RTFM because I
already did it twice :)

Maybe someone have some examples of code for the *real world*?

Any help will be appreciated.

Thanks in advance and happy new week.
GMTaglia
Jul 18 '05 #1
4 1723
Hi,
below is the link to programme i made 6 months ago when i started
using linux and found no visual type of display of memory in text
mode. this programme displays number and a bar showing the memory
usage. i have used optparse in it may be it will help you.
the file is zipped becuase geocities dont allow .py files ;). and i
have no webspace some where else.
http://geocities.com/hameedkhaan/meminfo.zip

Hope this will help you.
On Sun, 17 Oct 2004 17:24:10 GMT, GMTaglia <li****@kuht.it> wrote:
Hi list,

I'm trying to understand how really optparse work
.
I've already read the documentation so please don't answer RTFM because I
already did it twice :)

Maybe someone have some examples of code for the *real world*?

Any help will be appreciated.

Thanks in advance and happy new week.
GMTaglia
--
http://mail.python.org/mailman/listinfo/python-list

--
Hameed U. Khan
Jul 18 '05 #2
GMTaglia wrote:
Maybe someone have some examples of code for the *real world*?


Give a look to this:

http://aspn.activestate.com/ASPN/Coo.../Recipe/278844

I hope it can help you.

Bye
--
Don't you know why your Python application has crashed?
Take a look to http://www.pycrash.org
My Home Page http://cnoviello.altervista.org
Jul 18 '05 #3
>
Give a look to this:

http://aspn.activestate.com/ASPN/Coo.../Recipe/278844
Carmine, I know this recipe of Michele but I was hoping in a few more
examples, thanks anyway for your help :)
Bye


Ciao
Jul 18 '05 #4
Hameed U. Khan wrote:
Hi,
below is the link to programme i made 6 months ago when i started
using linux and found no visual type of display of memory in text
mode. this programme displays number and a bar showing the memory
usage. i have used optparse in it may be it will help you.
the file is zipped becuase geocities dont allow .py files ;). and i
have no webspace some where else.
http://geocities.com/hameedkhaan/meminfo.zip


Thanks for this recipe Hameed, I will use it to learn more :)

cheers
GMTaglia
Jul 18 '05 #5

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

Similar topics

8
by: Hans-Joachim Widmaier | last post by:
I was really pleased when the Optik module found its way into the standard Python battery compartment, as it matched all my option parsing requirements. But, as always, there's really nothing that...
3
by: washu | last post by:
Hi, I'm was going through the module help located on http://docs.python.org/lib/optparse-store-action.html and I tried modifying it a tiny bit and things don't work. If someone could tell me...
7
by: Henry Ludemann | last post by:
I've been writing an optparse alternative (using getopt) that is at a stage where I'd be interested in people's opinions. It allows you to easily creating command line interfaces to existing...
3
by: Karlo Lozovina | last post by:
If I create a file with only one line: --- from optparse import OptionParser --- I get this when I try to run it from "DOS" prompt: Traceback (most recent call last): File "optparse.py",...
3
by: Bob | last post by:
I'd like to setup command line switches that are dependent on other switches, similar to what rpm does listed below. From the grammar below we see that the "query-options" are dependent on the...
0
by: Steven Bethard | last post by:
I feel like I must be reinventing the wheel here, so I figured I'd post to see what other people have been doing for this. In general, I love the optparse interface, but it doesn't do any checks...
1
by: Pupeno | last post by:
Hello, I am doing some extreme use of optparse, that is, extending it as explained on http://docs.python.org/lib/optparse-other-reasons-to-extend-optparse.html I have subclassed OptionParser and...
4
by: Count László de Almásy | last post by:
Is there a standard way with optparse to include a blurb of text after the usage section, description, and the list of options? This is often useful to include examples or closing comments when...
0
by: Robert Kern | last post by:
Jeff Keasler wrote: If you code it up with unit tests and documentation, it has a good chance. But in the meantime, you can tell optparse to stop processing options using the standard "--"...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.