本文整理汇总了Python中mega.Mega.from_ephemeral方法的典型用法代码示例。如果您正苦于以下问题:Python Mega.from_ephemeral方法的具体用法?Python Mega.from_ephemeral怎么用?Python Mega.from_ephemeral使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mega.Mega
的用法示例。
在下文中一共展示了Mega.from_ephemeral方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_upload_file_ephemeral
# 需要导入模块: from mega import Mega [as 别名]
# 或者: from mega.Mega import from_ephemeral [as 别名]
def test_upload_file_ephemeral(self):
self._test_upload_file(Mega.from_ephemeral())
示例2: SET
# 需要导入模块: from mega import Mega [as 别名]
# 或者: from mega.Mega import from_ephemeral [as 别名]
cur.execute("UPDATE links SET (name, ip) = (%s, %s) WHERE fid = %s;", (fileinfo[0], '127.0.0.1', fid[0]))
except psycopg2.IntegrityError, e:
conn.rollback()
except psycopg2.IntegrityError, e:
conn.rollback()
print "%d updated!" % len(links)
cur.close()
def cleanlinks():
cur = conn.cursor()
cur.execute("DELETE FROM links where alive=false;")
cur.execute("DELETE FROM tmplinks;")
cur.close()
m = Mega.from_ephemeral()
conn = psycopg2.connect("dbname=ogatest user=postgres password=1234")
def main():
transferlinks()
updatelinks(getlinks())
cleanlinks()
conn.commit()
conn.close()
if __name__ == "__main__":
main()
示例3: setUp
# 需要导入模块: from mega import Mega [as 别名]
# 或者: from mega.Mega import from_ephemeral [as 别名]
def setUp(self):
unittest.TestCase.setUp(self)
email = os.environ.get('MEGAEMAIL') or sys.argv[0]
password = os.environ.get('MEGAPASSWORD') or sys.argv[1]
self.api_logged = Mega.from_credentials(email, password)
self.api_ephemeral = Mega.from_ephemeral()