4
我需要在web2py中为我的搜索引擎脚本打开一个数据库(采用.txt格式)。从web2py中的私人文件夹打开文本文件
我无法访问在线数据库,因为我使用的是免费版本的pythonanywhere。
import urllib
infile=urllib.urlopen('http://database.net')
for line in infile:
现在我上传数据库到“私人”文件夹,我不知道如何获得它。它看起来像一个简单的问题,但我似乎无法工作。
我需要的是这样的:
infile = open('searchapp/private/database.txt')
for line in infile:
有什么好的解决办法吗?