Becky
Posts: 4
Joined: Thu Jun 25, 2015 10:44 am

The python source code and an executable file??

Sun Jul 05, 2015 2:58 pm

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.

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5853
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: URGENT HELP

Sun Jul 05, 2015 3:03 pm

The .py file is what they mean.

User avatar
B.Goode
Posts: 8219
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: URGENT HELP

Sun Jul 05, 2015 5:08 pm

Also see this previous thread which asked the same question. Noone from the Raspberry Pi Foundation disagreed with the interpretation given.

Becky
Posts: 4
Joined: Thu Jun 25, 2015 10:44 am

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

Sun Jul 05, 2015 5:26 pm

Thanks for the reply.

Becky
Posts: 4
Joined: Thu Jun 25, 2015 10:44 am

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

Sun Jul 05, 2015 6:53 pm

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?

User avatar
joan
Posts: 14175
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

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

Sun Jul 05, 2015 7:47 pm

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.

User avatar
Davespice
Forum Moderator
Forum Moderator
Posts: 1662
Joined: Fri Oct 14, 2011 8:06 pm
Location: The Netherlands
Contact: Twitter

Re: URGENT HELP

Sun Jul 05, 2015 7:53 pm

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 :)

Becky
Posts: 4
Joined: Thu Jun 25, 2015 10:44 am

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

Sun Jul 05, 2015 9:22 pm

Thank you everyone.

Return to “Astro Pi”