PyDoc will nicht so recht ...
Verfasst: Dienstag 20. September 2005, 08:23
Hoi
Sagt mal, woran kann es liegen, daß
$ pydoc Data.py
nur "no Python documentation found for 'Data.py'" ergibt, während im interaktiven Modus mit "help(Data)" ganz wunderbar alles herauskommt, was man auch mit PyDoc erwartet? Ich sollte erwähnen, daß ich u. a. scipy importiere, ansonsten aber nur sehr gut dokumentierte Standardmodule.
Oder gibt es irgendwo eine Dokumentation von PyDoc? Alles was ich bisher gefunden habe ist: "Schreibt fleissig Docstrings" und es wird funktionieren. Schön, tut es aber nicht - hier liegt in meinen Augen mal eine deutliche Schwäche der Pythondokumentation ...
Tut mir leid, daß ich nicht mehr Info bieten kann, um das Problem zu lösen, aber vielleicht weiß ja jemand von euch trotzdem spontan Rat.
Vielen Dank vorab,
Christian
PS Der Kopf des in Frage stehenden Moduls sind folgendermaßen aus:
Sagt mal, woran kann es liegen, daß
$ pydoc Data.py
nur "no Python documentation found for 'Data.py'" ergibt, während im interaktiven Modus mit "help(Data)" ganz wunderbar alles herauskommt, was man auch mit PyDoc erwartet? Ich sollte erwähnen, daß ich u. a. scipy importiere, ansonsten aber nur sehr gut dokumentierte Standardmodule.
Oder gibt es irgendwo eine Dokumentation von PyDoc? Alles was ich bisher gefunden habe ist: "Schreibt fleissig Docstrings" und es wird funktionieren. Schön, tut es aber nicht - hier liegt in meinen Augen mal eine deutliche Schwäche der Pythondokumentation ...
Tut mir leid, daß ich nicht mehr Info bieten kann, um das Problem zu lösen, aber vielleicht weiß ja jemand von euch trotzdem spontan Rat.
Vielen Dank vorab,
Christian
PS Der Kopf des in Frage stehenden Moduls sind folgendermaßen aus:
Code: Alles auswählen
"""SPlot & CLI source modules
<snip>
Version History:
0.0 first basic modul containing the following functions:
fromFile, toFile, fromASA, toASA, attributes, swap_axes, scale, normalize, inv, norminv,
log_intensity, log_energy, substractBuffer, _maximum, _maxwhere, fit_gaussian, __residuals,
__peval
0.1 added the following functions:
merge_datasets (outside SAXSraw), _recalculate_error
altered the following functions:
normalize (now new error estimates gets calculated)
"""
#import futures division: prevent floating point and integer division confusion
from __future__ import division
#import auxillary modules
from scipy import *
from scipy.optimize import leastsq
import sys, pickle
import re
#from Utils import MovingSlitLookUp
__author__ = "Christian Meesters"
__version__ = "0.1"
#define exceptions
class SAXSError(Exception):
"""Exception helper class for defining and tuning Exceptions
- for internal use, only"""
def __init__(self,value):
self.value = value
def __str__(self):
return repr(self.value)
class SAXSInputError(SAXSError): pass
class SAXSIOError(SAXSError): pass
class SAXSRangeError(SAXSError): pass
class SAXSKeyError(SAXSError): pass
class SAXSTypeError(SAXSError): pass
class SAXSAttributeError(SAXSError): pass
_attributes = {'name':None, 'date':None, 'operator': 'me','instrument':None,\
'xlabel':'channels', 'ylabel':'Intensity [counts]', \
'energy_channels':None,'position_channels':None,'lower_limit':None,\
'upper_limit':None,'stop_condition':None,'stopped_by_user':False,\
'realtime':None,'lifetime':None,'energy_counts':None,'position_counts':None,\
'concentration':None,'wavelength':None,'origin':None,'comment':'', 'out':sys.stdout}
_supported_formats_ = ['ASA','SPL']
#ASA is belonging to the ASA software
#SPL is the own format
class SAXSraw:
"""
class containing raw SAXS data and some initialization methods
"""
def __init__(self, intensity=None, ichannel=None, energy = None, echannel = None, intensity_error = None, q = None, **kwargs):
"""
Creates SAXSraw instance
Possible input parameters are:
- a list of intensity data (defaults to None)
- the corresponding list of channel data (defaults to None)
- a list of the response ('energy') spectrum (defaults to None)
- the corresponding list of channel data (defaults to None)
- meta data (all default to None)
- outstream buffer (defaults to sys.stdout)
invoke like: x = SAXSraw(intensity data, intensity channels,[name,[meta,[out]]])
e.g. x = SAXSraw([a list of intensity data],[a second list of corresponding channels],\
name="some name", date="some date")
Creates SAXSraw instance
Possible input parameters are:
- a list of numerical data
- a range descriptor (tuple, defaults to (None,None))
- a name (defaults to None)
- meta data (defaults to None)
- a 'date' of the experiment
- outstream buffer (defaults to sys.stdout)
invoke like: x = SAXSraw(intensity data, intensity channels,[name,[meta,[out]]])
e.g. x = SAXSraw([a list of intensity data],[a second list of corresponding channels],\
name="some name", date="some date")
"""