alphaNNN Posted May 20, 2013 Posted May 20, 2013 How do I get a Python console to install some libraries if there's no SSH?
alphaNNN Posted May 21, 2013 Author Posted May 21, 2013 I need pip, which I then use to install beautifulsoup4 and praw.
Krydos Posted May 21, 2013 Posted May 21, 2013 Which server are you on, and which version of python are you using?
alphaNNN Posted May 21, 2013 Author Posted May 21, 2013 Johnny. I have no idea what Python version, probably the default one. Since I have your attention: how do I schedule the execution of py scripts? Do you provide something similar to cron jobs?
Krydos Posted May 21, 2013 Posted May 21, 2013 Users are allowed to use cron http://johnny.heliohost.org:2082/frontend/x3/cron/index.html Please do not ignore the bold red text though. Each user can run a maximum of two cron jobs per day, and if you exceed this limit your account will be suspended. Here are the versions of python currently available on Johnny: #!/usr/bin/python2.4 Python 2.4.3 #!/usr/bin/python Python 2.4.3 #!/usr/local/bin/python2.7 Python 2.7.4
alphaNNN Posted May 22, 2013 Author Posted May 22, 2013 I'm trying to import a Python lib (praw) from a subdirectory. It works fine on my test machine, but not on Johnny. I'm using the exact same directory structure, with the praw directory (which contains the __init__.py) as a subdir. Since we don't have console access I'm not sure how to troubleshoot this. #!/usr/local/bin/python2.7 from datetime import datetime from praw import Reddit print("content-type: text/html\n\n") print(datetime.today().day)
Shinryuu Posted May 22, 2013 Posted May 22, 2013 Try: import sys sys.path.append("/home/<user>/path/to/praw") import praw
alphaNNN Posted May 22, 2013 Author Posted May 22, 2013 Didn't work. #!/usr/local/bin/python2.7 import sys sys.path.append("/home/<my username>/public_html/cgi-bin/praw") import praw from datetime import datetime print("content-type: text/html\n\n") print(datetime.today().day) Always hangs up on "import praw".
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