171 questions
0
votes
0
answers
12
views
How do I format pydoc html output?
I am trying to use pydoc to generate documentation for my code. Basically everything goes smoothly - I input my docstrings and run python -m pydoc on the module and an html file is written.
But the ...
0
votes
1
answer
75
views
How format doc within :param <name>: in reStructuredText markup?
I am trying to document certain :param and want to give examples like
:param mapper_matrix:
lookup table with columns ref_col, ref_col_2 and value.\n
|**Example:**
| ...
0
votes
1
answer
79
views
pydoc error when executed on a file containing SQLAlchemy models
I'm trying to run pydoc on a Python file using my Windows machine. The file contains SQLAlchemy models, but have been struggling with an error.
I appreciate it if I can receive some guidance. Attached ...
0
votes
0
answers
88
views
Python generate documentation using pydoc
I have nested folder structure library and the question is about generating documentation from the source-code files.
Folder Structure
mylib
├── foo
├── __init__.py
│ ├── Foo....
1
vote
0
answers
98
views
Keep Python code safe from execution by Pydoc
This question is related to the question Stop pydoc from running my Python program, except that here I'm not actually trying to document my own code - I'm just trying to use pydoc to look up unrelated ...
1
vote
0
answers
155
views
PyDoc - Write multiple files at the same time
I am trying to use pydoc to output a series of .html files for our project's documentation, however I don't want to have to sit and do this manually so I'm trying to automate it so that pydoc will ...
-1
votes
1
answer
47
views
how to retrive methods pydoc from Generic class
Currently we use vs-code to develop and having pydocs documentation helps a lot to understand the system overall, but the IDE is returning the documentation of the interface rather than the ...
1
vote
2
answers
435
views
Extract text from first page of word document and use it as a folder name, then move the file inside that folder
I have hundreds of word documents that needs to be processed but need to organized them first by versions in subfolders.
I basically get a drop of these word documents within a single folder and need ...
0
votes
2
answers
793
views
when install any package using pip i get error can't import mapping from collection?
I work on python 3.10 i face error and i can't solve it .
this error display when try to install new package or
using any pip related command
python 3.10 already installed but can't add New Package ...
0
votes
2
answers
173
views
Python module implemented like a package
I have an application containing a package, thus:
* fruits/
| citrus/
| | __init__.py
| | oranges.py
| | mandarins.py
| | satsumas.py
| | ... etc
The Python files under fruits/citrus/ ...
1
vote
0
answers
230
views
Multi module pydoc html documentation
I create a single module html documentation using pydoc like:
pdoc --html file.py
Is it possible to generate pydoc documentation for many modules in one html file?
1
vote
0
answers
472
views
Is there a way to get pydoc to generate docs for just a module and its submodules?
I know sphinx and pdoc3 exist, but I'm trying to use pydocs despite my better judgment.
This invocation
python -m pydoc -w .\\
will
generate docs for all modules including things I don't want such ...
1
vote
1
answer
102
views
Pydoc ignores opencv function, just considers python functions defined with def keyword
I want to develop API documentation for my OpenCV project.
But when I ran pydoc - w command on my module, it only created documentation for those function which are declared with the def key word.
...
3
votes
1
answer
226
views
pydoc injecting python submodules content to main module
I have a module dlprim
dlprim/
__init__.py
netconfig.py
_pydlprim.so
its __init__.py incldes:
from ._pydlprim import *
from .netconfig import *
where ._pydlprim is boost.pythom module and ....
0
votes
0
answers
194
views
Google Style Python Docstrings: Dictionary of Multiple Types
I'm working on creating a Google Style Python Docstring for a dictionary that is of multiple types.
Dictionaries of a single type are specified as the following:
"""Takes in a ...
-1
votes
1
answer
247
views
Can pydoc operate on a pyd, or is there an equivalent to pydoc that operates on a pyd
It seems to me that pydoc only works on py source code files.
Can it be used on a compiled pyd file in some way? The error I get in attempting that is
ValueError: source code string cannot contain ...
1
vote
1
answer
1k
views
Overriding function signature (in help) when using functools.wraps
I'm creating a wrapper for a function with functools.wraps. My wrapper has the effect of overriding a default parameter (and it doesn't do anything else):
def add(*, a=1, b=2):
"Add numbers&...
5
votes
0
answers
534
views
PyCharm Docstring :func: and :meth: not working
I am writing a documentation in my project's code but the inline link to a function/method doesn't work. It simply doesn't show up as expected when I use CTRL + Q:
EDIT:
Code:
class Editor:
def ...
0
votes
2
answers
265
views
Store contents of help() in a variable: Python
When we use the help() function it just displays the text and I can't store it in a variable...
h = help ( 'eval' ) # Doesn't work
So what do I do? And if I need to use PyDoc, how do I do it?
1
vote
1
answer
2k
views
How to automatically generate docstrings including nested functions?
How to generate automatically docs for the c_nested function?
Background: I do code documentation for other developers and I would like to automatically generate a summary of all class methods ...
1
vote
1
answer
1k
views
How to extract text and images from a docx file and write it to new docx file with few changes
I am trying to replacing the text using loop on doc.paragrapgh .I got success in replacing the text ,but the images got removed .I want to preserve the images and only want to replace the text . ...
2
votes
1
answer
202
views
The pydoc module doesn't display all documentation for codecs.py
I was looking into how the pydoc module works in Python 3.9 and noticed that if you run pydoc server and go to the codecs.py module documentation, there's no documentation for the ...
0
votes
1
answer
210
views
Should pydoc document automatically created file?
I try to understand how pydoc works, and wanted to have it display the docstring of a file.
I have an unaltered file urls.py (created using Django, but that seems irrelevant for my pydoc question):
&...
6
votes
1
answer
1k
views
read_sql_table in Dask returns NoSuchTableError
I have a read_sql using pandas and it works fine. However, when I tried to re-create the same dataframe under Dask using the same logic. It gives me NoSuchTableError. I know for sure the table exists ...
1
vote
1
answer
1k
views
No Python documentation found for 'file'? [closed]
In Powershell I have typed $ python -m pydoc file but I didn't get the python documentation of file. Instead I got the message No Python documentation found for 'file'. What does it mean and how can I ...
0
votes
1
answer
2k
views
How to generate documentation of own code using pydoc?
I need to generate documentation using Pydoc.
I already wrote some explanation using Docstrings like following example
def function():
'''
this function does something
:return: returns ...
0
votes
2
answers
387
views
Is it possibile to have python PyDoc module to return a string with the content instead of just printing it?
The function pydoc.doc() returns None, but i would like to capture the output the function prints, how can i do that using python code?
0
votes
0
answers
402
views
How to see full signature for `__init__`, when pydoc3 shows `See help(type(self)) for accurate signature.`?
I find pydoc3 very helpful for getting help on classes and functions.
However, it often shows the help for __init__ as: See help(type(self)) for accurate signature. (see below)
Using the python3 ...
3
votes
1
answer
97
views
Why does the python help class interpret sub-classes of the str class as module names?
When the python help function is invoked with an argument of string type, it is interpreted by pydoc.Helper.help as a request for information on the topic, symbol, keyword or module identified by the ...
0
votes
0
answers
142
views
Am having an issue with pydoc it saying "could not convert string to float: 'import'
This is the error that I came up when I ran the pydoc command on the file.
problem in .\semestProj.py - ValueError: could not convert string to float: 'import'
I originally ran this on my Windows ...
3
votes
1
answer
2k
views
Pydoc not finding installed modules
I am trying to generate HTML documentation using pydoc. The project is divided in several subfolders, all of them containing __init__.py files.
The content of __init__.py in my main folder is as ...
0
votes
1
answer
26
views
How to populate various aspects in help()
In looking at help() on a few different modules, it often lists the following items:
Module Docs:
MODULE DOCS
http://docs.python.org/library/os
Classes:
CLASSES
__builtin__.object
...
2
votes
1
answer
1k
views
Write module index to file with pydoc without server
I currently write documentation for my Python library using the following command:
python -m pydoc -w "\\myserver.com\my_library"
This works fine, and I find in my_library HTML files with ...
1
vote
2
answers
2k
views
How to stop pydoc from erroring out on f-strings?
I am using pydoc to automatically build documentation. My code is written for Python 3.6.
It errors out with the following error: <type 'exceptions.SyntaxError'>: invalid syntax. It happens ...
2
votes
0
answers
221
views
Documenting a module interface with multiple implementations
I am a maintainer of a Python module that provides an operating system-agnostic API. There are internal modules that implement this interface for each supported OS.
There is a package and __init__.py ...
-1
votes
2
answers
129
views
What does -w do in pydoc and can it generate .doc output?
What does -w do? Will it always generate an html file? Can I generate a .doc file instead?
When I execute the command below, it generates an ex.html file.
F:\PY>python –m pydoc –w ex
0
votes
2
answers
964
views
Integrate pydoc HTML into Jupyter ignoring styling
I'm wanting a simple way to show rich HTML documentation of a python object in a Jupyter Notebook or JupyterLab context. It's possible this already exists. I basically want what Jupyter/IPython does ...
1
vote
2
answers
398
views
How to force swig to generate the appropriate list of arguments in the help page of a module?
The help page of a module generated with SWIG is not quite helpful. In fact, it doesn't even list the arguments of each function.
Help on module example:
NAME
example
FILE
/home/anon/...
0
votes
0
answers
136
views
Get pydoc help() to ignore reST (sphinx) syntax?
I have some function definitions like this:
def abc(arrg1):
"""
do something
:param arrg1: a string like ``'gogo'``
"""
if arrg1=='gogo':
print('success')
which generates ...
1
vote
1
answer
609
views
Pydoc is not recognized as a command in the windows command line
I am trying to check the documentation for Math module in the command line of windows. However, I am getting this error:
C:\Users\Farhan Hasant\Desktop\HelloWorld>pydoc math
'pydoc' is not ...
1
vote
1
answer
235
views
I can't seem to pydoc raw_input in the terminal(Windows)
I am a newbie in programming and I am using Windows and Python2.7.
I tried to run python -m pydoc raw_input in the terminal, but it says:
'more' is not recognized as an internal or external command, ...
0
votes
1
answer
115
views
How can i make shortcut for pydoc?
I'm trying to add vim shorcut for pydoc.
I use this shortcut now.
nnoremap <buffer> K : <C-u>execute "!python3 -m pydoc " . expand("<cword>")<CR>
But this shortcut doesn't ...
0
votes
0
answers
841
views
How to avoid "Segmentation fault (core dumped)" when I type the command "pydoc tensorflow"?
The pydoc documentation command seems to be working perfectly for every module I have tried but the tensorflow module. It bugs me and I want to figure out why, and hopefully fix it. If I try the ...
3
votes
2
answers
9k
views
How to install pydoc on Windows?
I'm trying to install pydoc on my Windows system using CMD as administrator.
When I put this command:
pip install pydoc
I got this error message:
Could not find a version that satisfies the ...
4
votes
1
answer
220
views
Pydoc: adding sections
I would like to improve the documentation of my python module with additional sections.
For example, let's consider this:
$ cat test.py
"""Some module
This stuff goes to the "DESCRIPTION" section.
"...
2
votes
2
answers
9k
views
How to look up functions of a library in python?
I just installed this library that scrapes twitter data: https://github.com/kennethreitz/twitter-scraper
I wanted to find out the library's functions and methods so I can start interacting with the ...
3
votes
1
answer
2k
views
Is there a structured way to reference function parameter labels in Python docstring?
I am using the tool pydoc to automatically generate documentation. Given the function:
def sum(a, b):
"""Returns the sum of a and b."""
return a + b
I am curious if there is a structured way to ...
5
votes
2
answers
3k
views
How do I recursively generate documentation of an entire project with pydoc?
I have a python project inside a specific folder named "Project 1". I want to extract all the docstrings of all the python files inside this project.
In this project all the modules are ...
3
votes
1
answer
107
views
Continue after running help() in Python interactive session
I run the following code in Python Interactive Session and try to get help on the method 'load' from json but i don't know to continue my instructions after (END),
Here is my code:
import json
help(...
1
vote
1
answer
126
views
Documenting Python params that are duck-typed
I have a function foobar which expects its parameter baz to be any object that implements __gt__ and __eq__.
def foobar(baz, qux):
"""
:type baz: Any object that implements __gt__ and __eq__
...