>
> So main.py contains:
>
> def get_field(value, start_bit, end_bit):
>
>
> and I see:
>
> >>> import main
> >>> help(get_field)
> Traceback (most recent call last):
>File "", line 1, in
> NameError: name 'get_field' is not defined
>
>
> help(main) works ok but is rather verbose.
Try:
If I have a script called main.py and document a function in it:
def get_value(x):
"""
Some text ...
:param x: Some value
:returns: Something useful
"""
What is the most basic way of showing those docstrings at the
On Thu, Jul 30, 2015 at 04:28:33PM +, David Aldrich wrote:
> So main.py contains:
>
> def get_field(value, start_bit, end_bit):
>
>
> and I see:
>
> >>> import main
> >>> help(get_field)
> Traceback (most recent call last):
>File "", line 1, in
> NameError: name 'get_field' is n
On Thu, Jul 30, 2015 at 08:24:27AM +, David Aldrich wrote:
> I understand that 'help' works with modules that I have imported. But
> if I've just written a script called main.py (which contains
> get_value()) I don't think I can 'import' that. So how would I see the
> docstrings in main.py?
On Thu, Jul 30, 2015 at 4:24 AM, David Aldrich
wrote:
>>> If I have a script called main.py and document a function in it:
>>>
>>> def get_value(x):
>>> """
>>> Some text ...
>>> :param x: Some value
>>> :returns: Something useful
>>> """
>>>
>>> What is the most basic
>> If I have a script called main.py and document a function in it:
>>
>> def get_value(x):
>> """
>> Some text ...
>> :param x: Some value
>> :returns: Something useful
>> """
>>
>> What is the most basic way of showing those docstrings at the Python
>> prompt?
>
> Tr
On Jul 29, 2015 12:45 PM, "David Aldrich"
wrote:
>
> Hi
>
> If I have a script called main.py and document a function in it:
>
> def get_value(x):
> """
> Some text ...
> :param x: Some value
> :returns: Something useful
> """
>
> What is the most basic way of showing
On 7/29/2015 8:45 AM, David Aldrich wrote:
Hi
If I have a script called main.py and document a function in it:
def get_value(x):
"""
Some text ...
:param x: Some value
:returns: Something useful
"""
What is the most basic way of showing those docstrings at the
Hi
If I have a script called main.py and document a function in it:
def get_value(x):
"""
Some text ...
:param x: Some value
:returns: Something useful
"""
What is the most basic way of showing those docstrings at the Python prompt?
For getting started with document