You are viewing a single comment's thread from:

RE: Execute python code directly from a steem post

in #steemdev7 years ago
#!/usr/bin/python
from beem import Steem
from beem.comment import Comment
import getpass


if __name__ == "__main__":

    wif = getpass.getpass(prompt='Enter your posting key.')
    stm = Steem(keys=[wif])
    account = stm.wallet.getAccountFromPrivateKey(wif)
    comment = Comment("@holger80/execute-python-code-directly-from-a-steem-post")
    print("%s will upvote %s" % (account, comment["permlink"]))
    comment.upvote(voter=account)
    
Sort:  

You can upvote my post after storing the read_python_from_post script from the post by:

python read_python_from_post.py @holger80/re-holger80-execute-python-code-directly-from-a-steem-post-20181123t003450162z 2018-11-23T00:34:51