hehe00's recent timeline updates
hehe00

hehe00

V2EX member #185432, joined on 2016-08-04 16:33:40 +08:00
hehe00's recent replies
好像有个什么逐行加载设置来着
Feb 21, 2017
Replied to a topic by wang9706 求职 震惊!今年可能是前端最难的就业季
你这个 demo 是想表达个啥?
Feb 21, 2017
Replied to a topic by wang9706 求职 震惊!今年可能是前端最难的就业季
@amon 笑尿
@ITOutsider 岂不美哉
Feb 17, 2017
Replied to a topic by beric 问与答 PHP 执行 PYTHON 脚本问题
@beric 谢谢你!
Feb 17, 2017
Replied to a topic by ecmadao 奇思妙想 有什么将网页转换为 PDF 的方法?
倒是有 word 转 PDF 的
Feb 15, 2017
Replied to a topic by beric 问与答 PHP 执行 PYTHON 脚本问题
@beric 同样的路径在 cmd 中执行 python 或者 cmd 中执行 PHP 去调用 python 都是可以的, 权限的话设置的 Everyone 获取全部权限
Feb 14, 2017
Replied to a topic by beric 问与答 PHP 执行 PYTHON 脚本问题
@beric 我也是通过 web(wmap)在 PHP 里调用执行 python,传的参数是一个 doc 文件的路径,在 web 方式执行就不行,在 python 里能够正确得到这个参数(sys.argv[1]),

import sys
import os
from win32com import client as wc
if (os.path.exists(sys.argv[1])):
word = wc.DispatchEx('Word.Application')
doc = word.Documents.Open(sys.argv[1])
html_list_first = sys.argv[1].split('.' , 1)
html_list_second = html_list_first[0].split('.')
html_name = html_list_second[-1] + '.html'
doc.SaveAs(html_name, 10)
doc.Close()
word.Quit()
print("OK")
else:
print("No file exists!")

print(sys.argv[1])的时候正确输出文件的路径,但是在 doc = word.Documents.Open(sys.argv[1]) 这一行的时候就不对了,print(doc) 输出的是 none.然而这一切在 cmd 中执行的时候又是成功的.麻烦帮我看下这怎么解决,我找了好久也不知道怎么弄下去
Feb 13, 2017
Replied to a topic by ecmadao 奇思妙想 有什么将网页转换为 PDF 的方法?
@woshilala1988 请问 word(.doc .docx)转 PDF 或 HTML,有什么办法吗
支持哈,之前在你的网站还是学了很多东西
About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3293 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 11ms · UTC 12:58 · PVG 20:58 · LAX 05:58 · JFK 08:58
♥ Do have faith in what you're doing.