---
title: "python把帮助导出到文件当中"
author: "54yuri"
date: "2013-01-14T18:16:20Z"
tags: ["Python"]
categories: ["编程语言"]
slug: "python"
draft: false
lastmod: "2013-01-12T18:35:51Z"
id: 1768752
url: "https://54yuri.iteye.com/blog/1768752"
---

有时候在python 当中使用


```python 
import xxx

help(xxx)
```


太麻烦，




```python 
python -c "import xxx;help(xxx);" > /tmp/1.txt
```


or


```python 
python -c "import xxx;help(xxx.yyy)" > /tmp/2.txt
```



导出成文本之后，可以比较方便的搜索以及复制粘贴出来

爽吧？