summaryrefslogtreecommitdiff
path: root/portato/helper.py
diff options
context:
space:
mode:
authornecoro <>2007-07-07 02:27:31 +0000
committernecoro <>2007-07-07 02:27:31 +0000
commit91225d6ff5bc70cd76d0cf54f35a1cf6186b538b (patch)
treecd6514fdf518f4d54beafbbb64fefd8bcbc16bd5 /portato/helper.py
parentd1b6cf6e24b3f2ca310a07313a162bc8f790679f (diff)
downloadportato-91225d6ff5bc70cd76d0cf54f35a1cf6186b538b.tar.gz
portato-91225d6ff5bc70cd76d0cf54f35a1cf6186b538b.tar.bz2
portato-91225d6ff5bc70cd76d0cf54f35a1cf6186b538b.zip
Some documentation work
Diffstat (limited to 'portato/helper.py')
-rw-r--r--portato/helper.py21
1 files changed, 13 insertions, 8 deletions
diff --git a/portato/helper.py b/portato/helper.py
index f327f75..9328223 100644
--- a/portato/helper.py
+++ b/portato/helper.py
@@ -10,6 +10,13 @@
#
# Written by René 'Necoro' Neumann <necoro@necoro.net> et.al.
+"""
+Some nice functions used in the program.
+
+@var DEBUG: Boolean controlling whether to printout debug messages.
+@type DEBUG: boolean
+"""
+
import traceback, os.path, sys, types
DEBUG = True
@@ -30,15 +37,13 @@ def debug(*args, **kwargs):
If debug(obj0, obj1, obj2) is called, the text part of the output
looks like the output from print obj0, obj1, obj2.
- Keywords which can be used:
- - name: Use the given name instead the correct function name.
- - file: output file to use
- - minus: The value given is the amount of frames to ignore in the stack to return the correct function call.
- This should be used if you are wrapping the debug call.
- - warn: Prints the message as a warning. Value of DEBUG is ignored.
- - error: Prints the message as an error. Value of DEBUG is ignored."""
+ @keyword name: Use the given name instead the correct function name.
+ @keyword file: Output file to use.
+ @keyword minus: The value given is the amount of frames to ignore in the stack to return the correct function call.
+ This should be used if you are wrapping the debug call.
+ @keyword warn: Prints the message as a warning. Value of DEBUG is ignored.
+ @keyword error: Prints the message as an error. Value of DEBUG is ignored."""
-
if not DEBUG and not ("warn" in kwargs or "error" in kwargs): return
stack = traceback.extract_stack()
nsertions'>+2 2012-09-04No echo mode.Jason A. Donenfeld2-16/+42 2012-09-04Properly quote the path too.Jason A. Donenfeld1-1/+1 2012-09-04Allow passwords having spaces to go unbroken to the clipboard.Bernardo Freitas Paulo da Costa1-1/+1 2012-09-04Separate out the massive git example.Jason A. Donenfeld1-10/+14 2012-09-04Prepare for debianification.1.0Jason A. Donenfeld9-4/+60 2012-09-03Fix readme typo.Jason A. Donenfeld1-1/+1 2012-09-03Show program name properly in error message.Jason A. Donenfeld1-1/+1 2012-09-03Move examples into manpage.Jason A. Donenfeld4-93/+224 2012-09-03Make into a real project.Jason A. Donenfeld8-5/+173 2012-09-03Support pass gitJason A. Donenfeld2-1/+15 2012-08-31Add remove synonyms.Jason A. Donenfeld1-2/+2 2012-08-31Use basename in usage.Jason A. Donenfeld1-2/+1 2012-08-19now using gpg_id as a varMatthew Ramirez1-2/+2 2012-08-07Forty five seconds.Jason A. Donenfeld1-1/+1 2012-08-06Deal with klipper and new lines.Jason A. Donenfeld1-3/+19 2012-08-06Update examples.Jason A. Donenfeld1-7/+7 2012-08-06Update readme.Jason A. Donenfeld1-11/+13 2012-08-06Be slicker and more like git.Jason A. Donenfeld1-114/+173