0
我想爲以下python代碼生成文檔。我猜測它工作正常。因爲它生成了以下html文檔。如何使用pydoc添加到python庫的鏈接
問題
的問題是,當我點擊任何一個模塊(argparse,操作系統,SYS,壓縮文件),它給出了一個空白頁面。我如何在文檔中添加模塊的鏈接,以便當我點擊其中的任何一個指向他們的網頁時?
假設我點擊壓縮文件可我被引導到https://docs.python.org/2/library/zipfile.html
源代碼」
#!/usr/bin/env python
import os
import sys
import argparse
import zipfile
from ftplib import FTP
from os.path import basename
def is_route(record, routes):
"""
Check if route belongs to any of the 14 routes
:param record: name of route
:param routes: list of routes
:return: True if routes exists else False
"""
for route in routes:
if route in record:
return True
return False
def download(username, password, searchDate, routes, output):
"""
Download files from FTP server
:param username: username of FTP server
:param password: password of FTP server
:param searchDate: date of previous day
:param routes: list of routes
:output: directory where downloaded files are saved
:return: returns nothing
"""
if __name__ == "__main__":
#download routes
download("", "", "", "", "")