Page 1 of 1

The python source code and an executable file??

Posted: Sun Jul 05, 2015 2:58 pm
by Becky
The AstroPi competition submission asks for:
"The python source code and an executable file", please can you tell me what they mean by this?
We are beginners so are unfamiliar with the language. By 'executable' file do they just mean the .py file? Or does it need changing into another format?

Thanks.

Re: URGENT HELP

Posted: Sun Jul 05, 2015 3:03 pm
by ShiftPlusOne
The .py file is what they mean.

Re: URGENT HELP

Posted: Sun Jul 05, 2015 5:08 pm
by B.Goode
Also see this previous thread which asked the same question. Noone from the Raspberry Pi Foundation disagreed with the interpretation given.

Re: The python source code and an executable file??

Posted: Sun Jul 05, 2015 5:26 pm
by Becky
Thanks for the reply.

Re: The python source code and an executable file??

Posted: Sun Jul 05, 2015 6:53 pm
by Becky
I've just seen that earlier post which suggests you have to add a couple of lines to the code.
We've just got the .py file that we created and run on the astro pi.
Should we have changed it?

Re: The python source code and an executable file??

Posted: Sun Jul 05, 2015 7:47 pm
by joan
Becky wrote:I've just seen that earlier post which suggests you have to add a couple of lines to the code.
We've just got the .py file that we created and run on the astro pi.
Should we have changed it?
If it was my post I suggested that the executable might just be a two line file to call the Python script.

i.e. if you your Python script is in a file called astro.py then the executable may just be a file called astro.sh containing the two lines

Code: Select all

#!/bin/bash
python astro.py
However this is all guess work as no one involved with the project has commented.

If I was you I'd just forget the requirement, it is ambiguous, and I can not see that anyone would be disadvantaged because of this lack of clarity.

Re: URGENT HELP

Posted: Sun Jul 05, 2015 7:53 pm
by Davespice
joan wrote:However this is all guess work as no one involved with the project has commented.
ShiftPlusOne did reply with:
ShiftPlusOne wrote:The .py file is what they mean.
Which is correct, you just need the .py file if you're submitting Python code.
That comment about executable files is only on the website for people who might be using C or C++, so far it looks like no one is.

Even if you submit your code without the hash-bang (#!) line it'll be fine, we know what to do to make it run :)

Re: The python source code and an executable file??

Posted: Sun Jul 05, 2015 9:22 pm
by Becky
Thank you everyone.