bmeyer Posted July 1, 2020 Posted July 1, 2020 Have searched much for how to access Python within HelioHost but no luck.-Can you help? Thanks.
Sn1F3rt Posted July 1, 2020 Posted July 1, 2020 You can put the "#!/usr/bin/python3.6" shebang at the top of any Python file, set it's permissions to 755 and execute it via the browser/cron job. 1
wolstech Posted July 1, 2020 Posted July 1, 2020 File needs to be in cgi-bin as well. If it's not, you need to enable CGI in whatever folder you use with .htaccess. 1
bmeyer Posted July 1, 2020 Author Posted July 1, 2020 You can put the "#!/usr/bin/python3.6" shebang at the top of any Python file, set it's permissions to 755 and execute it via the browser/cron job. Sayan,Thank you for your help and quick response. Would have been lost without them. Just joined HelioHost 2 days ago so learning curve is still kind of vertical and never learned much Unix as well.-Thanks to your guidance, entered the ‘shebang’ at the top of the file (without quotes – hope this is good) and reset the permissions. Could not find how to execute the job, however – could you help with a few more words? Also did not see how to execute the job.-Thank you again for your guidance.Best, Bruce
Krydos Posted July 1, 2020 Posted July 1, 2020 You can put the "#!/usr/bin/python3.6" shebang at the top of any Python file, set it's permissions to 755 and execute it via the browser/cron job.Please make sure you check the user's server before you recommend a shebang. Python3.6 will only work on Ricky. Johnny and Tommy have Python3.7. This user is on Johnny. Have searched much for how to access Python within HelioHost but no luck.Check out this post https://www.helionet.org/index/topic/29540-solved-total-beginner-need-help-running-a-python-script/?p=133810 @Flazepe/Sohamb03, if you're not too busy could you adapt that forum post into a wiki article and submit a pull request? 1
bmeyer Posted July 1, 2020 Author Posted July 1, 2020 You can put the "#!/usr/bin/python3.6" shebang at the top of any Python file, set it's permissions to 755 and execute it via the browser/cron job.Please make sure you check the user's server before you recommend a shebang. Python3.6 will only work on Ricky. Johnny and Tommy have Python3.7. This user is on Johnny. Have searched much for how to access Python within HelioHost but no luck.Check out this post https://www.helionet.org/index/topic/29540-solved-total-beginner-need-help-running-a-python-script/?p=133810 @Flazepe/Sohamb03, if you're not too busy could you adapt that forum post into a wiki article and submit a pull request? Krydos,Thank you for your help!-The instructions in your link look very detailed -- just the thing needed for a new user to learn his way around this part of HelioHost. This is my first public server experience so the help will be especially valuable.Best, Bruce MeyerEarly Education Research Foundation.
bmeyer Posted July 1, 2020 Author Posted July 1, 2020 Went through the steps in Krydos' link.-The following steps seemed useful:Step 7 – Right click the test.py file and click Change Permissions.Step 11 – Highlight test.py and click EditStep 12 – Leave UTF-8 as the encoding. [Or maybe just omit this step.] Could not go beyond Step 14 since the links in the instructions no longer worked. Would be glad if anyone has the link for the the final step. Thank you all again for your help in this -- am much closer than would ever have been on my own.
Krydos Posted July 1, 2020 Posted July 1, 2020 Step 15 is just to open the page in your browser. Your domain isn't currently hosted by us. If you purchased earlyedresearch.org then you need to change your nameservers to ns1.heliohost.org and ns2.heliohost.org to host that domain with us. If this isn't your domain I recommend changing your main domain to something free like earlyedresearch.heliohost.org with this link https://www.heliohost.org/classic/support/scripts/domain
Flaze Posted July 1, 2020 Posted July 1, 2020 @Flazepe/Sohamb03, if you're not too busy could you adapt that forum post into a wiki article and submit a pull request?Created a quick one, might remake it later. https://github.com/HelioNetworks/heliohost-wiki/pull/5
bmeyer Posted July 2, 2020 Author Posted July 2, 2020 Step 15 is just to open the page in your browser. Your domain isn't currently hosted by us. If you purchased earlyedresearch.org then you need to change your nameservers to ns1.heliohost.org and ns2.heliohost.org to host that domain with us. If this isn't your domain I recommend changing your main domain to something free like earlyedresearch.heliohost.org with this link https://www.heliohost.org/classic/support/scripts/domainAhh, now I understand. Thank you for explaining. We own the EarlyEdResearch.org website but that is for our company and not yet built. We're here to build a special project web site. Now I understand what the domain name question was when we joined. We have yet to decide on the name for the project and would be glad to use a temporary name as you suggest. I'll revise our settings in the morning (assuming that is the right way to correct this) and now I know where to find the pages we generate as well. Thank you once more for your help -- and if any of this does not yet seem correct, please let me know. Best regards, Bruce Meyer, Early Education Research Foundation.
Krydos Posted July 2, 2020 Posted July 2, 2020 Created a quick one, might remake it later. https://github.com/HelioNetworks/heliohost-wiki/pull/5Looks good https://wiki.helionet.org/tutorials/python It might be useful for non-Johnny users to have the Tommy and Ricky module links too. Ricky: https://krydos1.heliohost.org/cgi-bin/modules27.py https://krydos1.heliohost.org/cgi-bin/modules36.py Tommy: https://krydos.heliohost.org/cgi-bin/modules27.py https://krydos.heliohost.org/cgi-bin/modules37.py
Sn1F3rt Posted July 2, 2020 Posted July 2, 2020 @Krydos https://github.com/HelioNetworks/heliohost-wiki/pull/6 And noted about the shebang. I thought 3.6 was available on all the servers.
Krydos Posted July 2, 2020 Posted July 2, 2020 (edited) The Johnny python2.6 link is broken. It should be python2.7. EDIT: I edited the original forum post that Flazepe got the 2.6 from. Edited July 2, 2020 by Krydos
Sn1F3rt Posted July 2, 2020 Posted July 2, 2020 Yeah that's what I was thinking but I retained it as is. Edit - I've updated the broken links and the PR too.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now