Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Programming in Python and Explaination of Programming (http://www.chiefdelphi.com/forums/showthread.php?t=60489)

hdanak 03-01-2008 03:10

Re: Programming in Python and Explaination of Programming
 
Does anyone have a cached version of the code (all or in part)? Thanks in advance.

jtdowney 03-01-2008 05:12

Re: Programming in Python and Explaination of Programming
 
I have a copy of their code on my home machine. I am still at my parents on vacation right now but I'll be back at Purdue for kickoff and can get it to anyone who wants it.

jtdowney 04-01-2008 13:05

Re: Programming in Python and Explaination of Programming
 
1 Attachment(s)
Since their repository is down I've attached what I had on my computer. Please note I didn't write this and all credit goes to AdamBots. However since it is under the GPL, I am within my rights to redistribute the code.

hdanak 04-01-2008 21:50

Re: Programming in Python and Explaination of Programming
 
Thanks a lot for the code.

roboxking 04-01-2008 22:39

Re: Programming in Python and Explaination of Programming
 
Yes, we at Team 2584 thank you!

techwizrd 07-01-2008 00:05

Re: Programming in Python and Explaination of Programming
 
Quote:

Originally Posted by roboxking (Post 665679)
Our team has decided to use Python for programming, instead of C. Does anyone know how to do that. I also need a general explanation of how programming works in general. This is our first year in FRC, and in FVC (now FTC) all we did was use EasyC, so how programming worked wasn't an issue. Thanks for the help anyone can give me.

Sadly, our team wants to use C too. I personally suggest, being an experienced Python programmer (whatever that's worth :P ), 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.

jtdowney 07-01-2008 08:14

Re: Programming in Python and Explaination of Programming
 
Quote:

Originally Posted by techwizrd (Post 670701)
Sadly, our team wants to use C too. I personally suggest, being an experienced Python programmer (whatever that's worth :P ), 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.

CPython is just the name of the standard Python interpreter (Just as JPython is the interpreter written in Java). It does not mean you can produce C code from your Python code.

hdanak 07-01-2008 16:08

Re: Programming in Python and Explaination of Programming
 
Quote:

Originally Posted by techwizrd (Post 670701)
Sadly, our team wants to use C too. I personally suggest, being an experienced Python programmer (whatever that's worth :P ), 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


All times are GMT -5. The time now is 18:40.

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