|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
The Python Alliance (Lightweight TBA Client in Python)
(this is a CD post of my reddit post here: http://redd.it/4nniua)
Hi everyone, I spent a day out to learn Python a bit (and am utterly disappointed by the lack of overloading methods, but eh.) So I wrote a basic interface for TBA using their API and JSON parsing. Right now, it can do the following things:
With more features as I learn more / get requested! Happy FIRSTing! https://github.com/MC42/the-python-a...honalliance.py Screenshots https://i.imgur.com/zhWc8wb.png https://i.imgur.com/DZ7K7n2.png https://i.imgur.com/rgnUraW.png ![]() Last edited by tjf : 11-06-2016 at 22:46. Reason: removed extra spaces & bracket |
|
#2
|
||||
|
||||
|
Re: The Python Alliance (Lightweight TBA Client in Python)
Looks like great starter code for a TBA API introduction!
Thanks for sharing. |
|
#3
|
|||||
|
|||||
|
Re: The Python Alliance (Lightweight TBA Client in Python)
Nice work!
|
|
#4
|
||||
|
||||
|
Re: The Python Alliance (Lightweight TBA Client in Python)
Update!
New features include:
To be worked on: An entire python library for TBA calls... (v2 only likely) OPR & rank manipulation (depending on what I get around to doing...) Data output (hopefully) Again, the whole project is opensource, so feel free to contribute! (Side note, this only properly works in Python 2.7 because of input() vs raw_input(). If anyone has a solution that works in both, I'd happily accept...) Last edited by tjf : 15-06-2016 at 10:18. |
|
#5
|
||||
|
||||
|
Re: The Python Alliance (Lightweight TBA Client in Python)
Good job, Tim.
Quote:
Code:
def my_input(prompt):
try:
return raw_input(prompt)
except:
return input(prompt)
A similar method can be used for print() vs the print keyword, which should make it compatible with both Python 2.7 and 3.X. Last edited by Brian Maher : 15-06-2016 at 18:41. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|