You are invited to Log in or Register a free Frihost Account!

Python support

I have found another way to make Python work on Server 4.

The problem was that mod_python didn't function anymore due to the upgrade to Apache 2.4 and the mod_python project is dead. Python as a cgi (pretty slow) is normally still working too.

Anyway, I got mod_wsgi working on Server 4 (or at least my test file seemed to work). Please test it out. If there are no problems, I will most likely add the same option for Server 2/3.

Edit I now enabled it on Server 2/3.

Test pages:
Server 2/3:
Server 4:

.htaccess file:
Options ExecCGI

AddHandler cgi-script .cgi
AddHandler wsgi-script .wsgi
AddHandler wsgi-script .py

DirectoryIndex file:
def application(environ, start_response):
    status = '200 OK'
    output = 'Hello World!'

    response_headers = [('Content-type', 'text/plain'),
                        ('Content-Length', str(len(output)))]
    start_response(status, response_headers)

    return [output]

35 blog comments below

Thanks for the support admin
abhizz on Tue May 08, 2012 4:27 am
Shocked can't use Python now?
90dota on Wed May 09, 2012 11:13 am
Good to hear there's progress being made, cant' wait until this is on server 2.
wombatrpgs on Tue May 15, 2012 12:43 am
how can we?
benjietimogan on Fri Jun 01, 2012 4:00 am
that is nice
benjietimogan on Fri Jun 01, 2012 4:06 am
Not much of a coder but I will look into it!
lockwoodman on Mon Jun 04, 2012 2:48 am
Thanks for this post ! But i want to have one hosting free sr i reply may be don't relationship with this topic ^^
backtrack on Mon Jun 04, 2012 6:34 pm
That's not a great way to post if you're looking to get your hosting account set up... But good luck to you anyway, Frihost is a great place to be.
wombatrpgs on Fri Jun 08, 2012 6:19 am
Thanks for support Admin!

This is really good host for running python which is limited free host over the world, as specially CGI and WSGI mod.
Actually, I'm trying to use Plone and Python as a practice and I do a search that brought me here. That is nice!

Thanks again!
hungdamduy on Mon Jun 11, 2012 11:58 am
thanks for support admin..!
andro_king on Tue Jun 12, 2012 3:32 pm
Thanks for the info. Admin Smile
im new here.
daizuke05 on Thu Jun 14, 2012 2:29 am
diwasblack on Tue Jul 03, 2012 5:58 am
thank for website!
I am finding a hosting free that support Python.
Yeah....Now starting!
Haha Smile
chiconguyen on Wed Jul 04, 2012 8:55 pm
jorgeuy on Fri Jul 06, 2012 2:41 pm
Just a quick couple questions...

do we get to pick servers? ie if I only ended up here for the python, is there a chance I can explicitly ask for it?

also, is there any sort of guidance for app deployment here somewhere? I haven't been able to find one.

Thanks as always for the awesome concept!
cfvergara on Tue Jul 10, 2012 1:46 am
@cfvergara, all new accounts are currently put on Server 4. It is also the best server for Python.

I don't know what you mean by app deployment? Do you mean a Python application?
Bondings on Tue Jul 10, 2012 8:14 am

What I'm saying is basically, I have this Flask apps laying around various media, and since their deployment process usually involves mucking with server settings (this meaning they pretty much asume I'm on a VPS or something like that) I'm not sure what steps should I follow to drop them here in frihost.

Any ideas?
cfvergara on Fri Jul 13, 2012 6:40 am
@cfvergara, I think it is possible but would need some work. Take a look at and . It seems to be that the most work is in installing mod_wsgi (which is already installed) and then Flask should pretty much run immediately.
Bondings on Fri Jul 13, 2012 9:38 am
Awesome! thank you very much
cfvergara on Fri Jul 13, 2012 2:29 pm
I have enabled it in Server 2/3 (my apologies for the delay) and also posted some code examples to make use of mod_wsgi.
Bondings on Mon Jul 23, 2012 9:55 am
Thanks a bunch! Working well over here
Theopolisme on Mon Jul 23, 2012 1:35 pm
both work very well, and i want one
cnmdlb007 on Thu Jul 26, 2012 5:22 am
Thank Shocked
pythonvnn on Mon Jul 30, 2012 11:54 am
useful, thanks
michat34 on Wed Aug 29, 2012 3:11 pm
nanan02 on Thu Sep 13, 2012 4:06 am
Thanks! Very Happy
NgocHuyPAV on Wed Sep 19, 2012 10:19 am
didn't try it out yet
gonna do it tonight Wink
PrinceMatilda on Wed Sep 19, 2012 12:23 pm
We have to do this to get python working?? OMG!
patoram1 on Tue Oct 02, 2012 12:07 am
YAY Python! Thank you very much Very Happy
celebi269 on Thu Oct 11, 2012 7:27 am
good to know that python is supported. It would be nicer if a way to speed the server on python could be found
marqx on Sun Nov 18, 2012 2:54 am
From your post, I'm not sure: Was python running as a CGI script (which is slow) and now it's running in C, like PHP does? Or is it that you have set up a CGI script to run python?
KensukiCentral on Sun Nov 18, 2012 4:57 pm
Server 2/3:
is off
neiesc on Fri Jul 26, 2013 6:18 am
Hope all is working now! I plan on using python for my site. Its my first time working with python and with using a free server to host a site. It’ll be interesting to see how this all goes for me!
7110kemmerk on Wed Sep 18, 2013 3:38 pm
Hope that everything works fine now. Want to use your hosting
python4eg on Wed Oct 23, 2013 12:34 pm
nice. my webapp has a new home
corefinder00 on Fri Mar 21, 2014 2:20 pm

© 2005-2011 Frihost, forums powered by phpBB.