You are viewing a single comment's thread from:

RE: Python Wizardry: Fetching Liquidity Pools from Hive Engine with a Simple Script

in Learning Python5 months ago (edited)

I tried the code and it worked perfectly!

test.JPG

Love it! I also read it a few times and now I get how it works: now I have to check how the library "argparse" works because I may also use it in my code, so I'd like to better understand it :) it looks very straightforward, but I'd like to check what "nargs='?" exactly does.

EDIT: found it!

Sort:  

Thanks for the encouragement! Glad you liked it! It's one of my first Hive-related scripts, so I was kind of anxious letting it out of the gates. (I'm kind of slow releasing these, lol, but I might get faster in time.)

I'm currently rewriting parts of the script, because after testing it for a while I noticed it needs better error handling, especially in situations where the servers act up. But from the command line it usually works best, because in case of error, one can always run it again.

About that nargs='?', it just lets the script continue with no arguments, basically it falls back to using the default variable set for account_name.