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

how to do -vv for very verbose?

I'm using optparse.Optionparser to take switches for a script I'm
writing, but I can't see how to give it -vv for very verbose.

the option for -v is simply set to True by the option parser if present,
whereas I really want a numeric value, 1 if there is -v and 2 if there
is -vv.

Any ideas on how to do this?

I think I'll have to stop using action="store_true".

-h
Jun 27 '06 #1
0 915

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

Similar topics

4
by: Pascal | last post by:
Hello, I've a function like this: def myfunction(data, verbose = False): dothis... if verbose: print 'I do this' dothisother if verbose: print 'I do this other' ...
1
by: mitchell | last post by:
Is it possible to store doctest's verbose output to a variable? For example: import doctest, my_test_module a = doctest.testmod(my_test_module) The contents of 'a' is the tuple of passed...
7
by: Mick | last post by:
Hi All I'm fairly certain this topic has been discussed before in this forum before, and I would appreciate your patience in this matter. I like XML and use it for various things, but haven't...
1
by: Jeremy | last post by:
I am using regular expressions and I would like to use both re.IGNORECASE and re.VERBOSE options. I want to do something like the following (which doesn't work): matsearch = r'''^\ {0,4}(\d+)...
9
by: Eric Lilja | last post by:
Hello, I'm a novice C++ programmer and now I have the task of converting a number of C++ functions to C. Some of the functions I'm converting takes a parameter of type reference-to-std::string...
2
by: Sam | last post by:
Does anyone know how I can call vbc.exe from a Windows Application and return the output messages? I thought I might be able to do it using the System.Diagnostics.Process object. I have got it...
4
by: hawat.thufir | last post by:
Just for posterity: $ pwd /home/thufir/xalon/w3school $ whoami thufir $ ll total 24 -rw-rw-r-- 1 thufir thufir 239 Feb 19 09:16 foo.xml
3
by: mast2as | last post by:
In the same vein as the topic that I started on exception handling ;-) .... If I have read (not all of them though) the documents that you guys pointed me to, the try/throw/catch mechanism should...
12
by: Les Caudle | last post by:
I've got a .NET 2.0 app that works quite well on all of my test boxes. However, at the client's site, it crashes with 'has encounted a problem' basic dialog. No useful info. I've yet to see...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
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...

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.