Go to Post Most of all, I long to give others a chance to experience what I did with FIRST, to give people from my home town that opportunity, because FIRST really is that once in a lifetime opportunity that so many people dont get a chance to be a part of. It shouldnt be that way. - Jacqui Sutton [more]
Home
Go Back   Chief Delphi > FIRST > General Forum
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 14-06-2016, 18:03
lynca's Avatar
lynca lynca is offline
Andrew Lynch
FRC #2587 (DiscoBots)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2001
Location: Houston, TX
Posts: 1,612
lynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond repute
Send a message via AIM to lynca
Re: The Python Alliance (Lightweight TBA Client in Python)

Looks like great starter code for a TBA API introduction!

Thanks for sharing.
__________________
History: 624 - Cryptonite --> 118 - Robonauts --> 2158 - AusTIN CANS --> 2587 DiscoBots
Bio: Andrew Lynch "How I Work" ---- LinkedIn , Facebook, Twitter
Reply With Quote
  #2   Spotlight this post!  
Unread 14-06-2016, 20:20
plnyyanks's Avatar
plnyyanks plnyyanks is offline
Data wins arguments.
AKA: Phil Lopreiato
FRC #1124 (The ÜberBots), FRC #2900 (The Mighty Penguins)
Team Role: College Student
 
Join Date: Apr 2010
Rookie Year: 2010
Location: NYC/Washington, DC
Posts: 1,114
plnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond repute
Re: The Python Alliance (Lightweight TBA Client in Python)

Nice work!
__________________
Phil Lopreiato - "It's a hardware problem"
Team 1124 (2010 - 2013), Team 1418 (2014), Team 2900 (2016)
FRC Notebook The Blue Alliance for Android
Reply With Quote
  #3   Spotlight this post!  
Unread 15-06-2016, 10:14
tjf's Avatar
tjf tjf is online now
FIRST Year, Best Year
AKA: Tim Flynn
FRC #1257 (Parallel Universe)
Team Role: College Student
 
Join Date: Jun 2016
Rookie Year: 2016
Location: New Jersey
Posts: 131
tjf is a splendid one to beholdtjf is a splendid one to beholdtjf is a splendid one to beholdtjf is a splendid one to beholdtjf is a splendid one to beholdtjf is a splendid one to beholdtjf is a splendid one to behold
Re: The Python Alliance (Lightweight TBA Client in Python)

Update!

New features include:
  • Individual Event Information
  • More modularized code!
  • Unfinished feature to automatically highlight a team in your district rank view.

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...)
__________________

1257 (2016) - Student
1257 (2017) - Business Mentor (up in your business!)
KD2KRT

Last edited by tjf : 15-06-2016 at 10:18.
Reply With Quote
  #4   Spotlight this post!  
Unread 15-06-2016, 12:39
Brian Maher's Avatar
Brian Maher Brian Maher is online now
Questionable Decisionmakers
FRC #2791 (Shaker Robotics), FRC #1257 (Parallel Universe)
Team Role: College Student
 
Join Date: Apr 2014
Rookie Year: 2012
Location: Troy, NY; NJ
Posts: 476
Brian Maher has a reputation beyond reputeBrian Maher has a reputation beyond reputeBrian Maher has a reputation beyond reputeBrian Maher has a reputation beyond reputeBrian Maher has a reputation beyond reputeBrian Maher has a reputation beyond reputeBrian Maher has a reputation beyond reputeBrian Maher has a reputation beyond reputeBrian Maher has a reputation beyond reputeBrian Maher has a reputation beyond reputeBrian Maher has a reputation beyond repute
Re: The Python Alliance (Lightweight TBA Client in Python)

Good job, Tim.
Quote:
Originally Posted by tjf View Post
(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...)
A quick-and-dirty solution that comes to mind is writing your own input function with a try-except block:
Code:
def my_input(prompt):
     try:
          return raw_input(prompt) 
     except:
          return input(prompt)
An alternative, more sophisticated approach would be to check the Python version in your function. This Stack Overflow thread talks about how to use the Python version number in a program.

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.
__________________
2016-present, Mentor, FRC 2791 - Shaker Robotics
2016: Tech Valley SF (5236, 2791, 3624) and Quality, Finger Lakes SF (5254, 2791, 2383), Battlecry@WPI Winner (195, 2791, 501), Robot Rumble Winner (2791, 195, 6463)

2016-present, Mentor, FRC 1257 - Parallel Universe
2016: Mount Olive Winner (1257, 5624, 1676), Bridgewater-Raritan Finalist (1257, 25, 3340, 555) and GP, MAR CMP Winner (225, 341, 1257), Archimedes SF (4003, 4564, 5842, 1257), IRI Invite

2012-2015, Student, FRC 1257 - Parallel Universe
2015: Mount Olive QF (1257, 1811, 1923) and Safety Award, North Brunswick Finalist (11, 193, 1257) and Team Spirit and Safety Awards
2014: Clifton Winner (1626, 869, 1257), MAR CMP QF (1257, 293, 303)
2013: TCNJ Safety Award
2012: Mount Olive QF (204, 303, 1257)

Last edited by Brian Maher : 15-06-2016 at 18:41.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 09:04.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi