web2py で検索エンジン スクリプト用のデータベース (.txt 形式) を開く必要があります。
pythonanywhere の無料版を使用しているため、オンライン データベースにアクセスできません。
import urllib
infile=urllib.urlopen('http://database.net')
for line in infile:
データベースを「プライベート」ファイルフォルダーにアップロードしましたが、どうすればアクセスできるのでしょうか。簡単な質問のように見えますが、うまくいかないようです。
私はこのようなものが必要です:
infile = open('searchapp/private/database.txt')
for line in infile:
良い解決策は何ですか?