Environmental Variables Problems with Coding

in #steemdevelopers6 years ago

Hello Steem Developers,

I would like to "unlock" my cli wallet automatically in steem-python so I can exchange some Sbd/steem without having to manually enter it when the "Passphrase:" request comes up. Anyone know how to do this?

I have set an environment variable which looks like UNLOCK =MyPassword.

Then I try to do the conversion with dex.sell(amount=0.01, quote_symbol='STEEM', rate=(1), expiration=200, killfill=False, account="MyUserName")

Still getting asked for password. Any thoughts?

1download (1).jpg

Sort:  

If you cannot get rid of the interactive prompt have a look at the pexpect library.

You should be able to program the input of the password automatically.

@tony10 you were flagged by a worthless gang of trolls, so, I gave you an upvote to counteract it! Enjoy!!

Congratulations @tony10! You have received a personal award!

1 Year on Steemit
Click on the badge to view your Board of Honor.

Do not miss the last post from @steemitboard:

Presentamos el Ranking de SteemitBoard
Introducing SteemitBoard Ranking

Support SteemitBoard's project! Vote for its witness and get one more award!

Congratulations @tony10! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

Award for the number of upvotes

Click on the badge to view your Board of Honor.
If you no longer want to receive notifications, reply to this comment with the word STOP

Do not miss the last post from @steemitboard:

SteemitBoard Ranking update - Resteem and Resteemed added

Support SteemitBoard's project! Vote for its witness and get one more award!

Congratulations @tony10! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 2 years!

You can view your badges on your Steem Board and compare to others on the Steem Ranking

Do not miss the last post from @steemitboard:

The new SteemFest⁴ badge is ready
Vote for @Steemitboard as a witness to get one more award and increased upvotes!