View Single Post
  #23   Spotlight this post!  
Unread 07-01-2008, 16:08
hdanak hdanak is offline
Registered User
FRC #2584 (Reseda Regents Robotics)
Team Role: Programmer
 
Join Date: Dec 2007
Rookie Year: 2007
Location: California
Posts: 13
hdanak is an unknown quantity at this point
Re: Programming in Python and Explaination of Programming

Quote:
Originally Posted by techwizrd View Post
Sadly, our team wants to use C too. I personally suggest, being an experienced Python programmer (whatever that's worth ), using CPython to write the code. You can import the header files and write the code with Python syntax. If I am correct, you'll get nice compiled code at the end, that theoretically should work. I personally am not very experienced with CPython, as I do not normally need to write C-like code with toolkits like PyGTK out.
I think that you are referring to Pyrex or Psyco. But remember, when your talking about compiled code, you mean compiled for a PC. Writing C on the PICmicro is not the same C in comparison to that used on a pc (different compiler, different libraries). Something written for a PC won't just run on a PIC.

However, I did find this Python to PIC assembly translator : http://pyastra.sourceforge.net/
It should run closer to native speed than an interpreter, but its not all that efficient, even if it doesn't use an interpreter.

By the way, we have decided on using microchip C for our robot, mostly because this year's competition is basically an RC race (even in Autonomous --hybrid-- mode), and partly because we weren't sure enough to allocate sufficient funds (including time) for buying/testing a coprocessor.

EDIT: heres a useful link: http://www.piclist.com/techref/microchip/languages.htm

Last edited by hdanak : 07-01-2008 at 16:14.