mirror of
https://github.com/chatmail/core.git
synced 2026-04-18 22:16:30 +03:00
progress
This commit is contained in:
32
python/x.py
Normal file
32
python/x.py
Normal file
@@ -0,0 +1,32 @@
|
||||
|
||||
import deltachat
|
||||
import os
|
||||
import shutil
|
||||
from deltachat.capi import lib
|
||||
|
||||
try:
|
||||
os.remove("/tmp/db")
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
shutil.rmtree("/tmp/db-blobs")
|
||||
except:
|
||||
pass
|
||||
|
||||
|
||||
acc = deltachat.Account("/tmp/db", logging=True)
|
||||
acc.set_config("addr", "tmp.hjfcq@five.chat")
|
||||
acc.set_config("mail_pw", "aihWNtLuRJgV")
|
||||
acc.start() # lib.dc_configure + lib.dc_context_run
|
||||
assert acc.is_configured()
|
||||
acc.stop_scheduler()
|
||||
|
||||
while 1:
|
||||
print("starting scheduler")
|
||||
acc.start()
|
||||
print("stopping scheduler")
|
||||
acc.stop_scheduler()
|
||||
|
||||
contact = acc.create_contact("holger@deltachat.de")
|
||||
chat = acc.create_chat_by_contact(contact)
|
||||
chat.send_text("hello")
|
||||
Reference in New Issue
Block a user