S
Stef Mientki
hello,
I'm looking for a way to remove duplicate code.
The problem is this:
In all my modules I've version information,
containing version information, date, author, testconditions etc,
something like this:
Version_Text = [
[ 0.2, '10-02-2008', 'Stef Mientki',
'Test Conditions:', (1,2),
_(0, """
- scaling and offset is set for each individual signal
- Time history window for 1 signal with min/max display
- set attributes for all signals at once
""") ],
[ 0.1, '04-11-2007', 'Stef Mientki',
'Test Conditions:', (1,),
"""
- orginal release
""" ]
]
Now I've made modules that can generate docs, a library manager, etc,
and that even in different languages.
But for the simple case I would like to have a simple function, which
just displays the version number.
So in each module, there is a function:
def version () :
return ( version_text [0] [0] )
But is there a way to avoid the placing of this function "version" in
each module,
and still use a simple call like:
<module>.version()
thanks,
Stef Mientki
I'm looking for a way to remove duplicate code.
The problem is this:
In all my modules I've version information,
containing version information, date, author, testconditions etc,
something like this:
Version_Text = [
[ 0.2, '10-02-2008', 'Stef Mientki',
'Test Conditions:', (1,2),
_(0, """
- scaling and offset is set for each individual signal
- Time history window for 1 signal with min/max display
- set attributes for all signals at once
""") ],
[ 0.1, '04-11-2007', 'Stef Mientki',
'Test Conditions:', (1,),
"""
- orginal release
""" ]
]
Now I've made modules that can generate docs, a library manager, etc,
and that even in different languages.
But for the simple case I would like to have a simple function, which
just displays the version number.
So in each module, there is a function:
def version () :
return ( version_text [0] [0] )
But is there a way to avoid the placing of this function "version" in
each module,
and still use a simple call like:
<module>.version()
thanks,
Stef Mientki