0

Possible Duplicate:
Python noob here: On a Python enabled web server, how do I use Python?

I want give web development using Python a shot, but I'm failing hard. I don't even know if I CAN run Python. The webpage for my web host says it supports all kinds of stuff, including Python. I've never touched anything CGI related and this does not appear to be a noob friendly area.

Below is all the information I could think of that might be useful:

  • Shared host: Yes
  • Webhost: dibbsonhosting.com
  • Server OS: linux
  • Python installed: Yes (or so says the webhost)
  • mod_python installed: Don't Know
  • WSGI installed: Don't Know
  • Access to http.conf: No
  • Terminal access: No
  • Cpanel: Yes
  • FTP: Yes
  • Django: downloaded latest stable release, not uploaded anywhere, not sure where to put it.
  • DB: MySQL 5.x

I really want to use Python for web development! Thanks!

6
  • 2
    What hosting plan do you have that comes without shell access? According to dibbsonhosting.com, even FastHost1 has ssh. Commented Jan 3, 2011 at 21:22
  • 1
    "For anyone with free time" is pretty much the tagline for every StackExchange site ;) Commented Jan 3, 2011 at 21:23
  • 1
    You should probably update your original question with this information and delete this one instead. Or delete the original, if that feels better. But as it is now, they are duplicates, (and this one may be a bit too "localized", but just maybe). Commented Jan 3, 2011 at 21:26
  • @Martin v. Löwis yes, there is an SSH spot, but I don't have any idea how to use it, but I'm sure I can figure it out. I've never had to use shell access for any of my web hosts. Just FTP, PHP > upload, DONE. I'll check into the SSH. Commented Jan 3, 2011 at 21:28
  • @Lennart Regebro Yes, I know they are dupes, but my first thread was about "How do I use it?" and then a bunch of answers came that I couldn't follow, so I made this one dedicated for anyone who's willing to friggin hold my hand. I'll delete the orig instead of this, thanks for the protip. Commented Jan 3, 2011 at 21:31

2 Answers 2

4

Alright, I'm not going to hold your hand, but let me suggest:

  1. Start off by installing and running it on your own computer, if at all possible. This lets you see what you can do with Python before you have to worry about the complexities of setting it up with a webserver.

  2. If you've never used Python before, then before you start trying to use it for web development, take a few minutes getting the feel of it: what function definitions look like, the abilities of slicing, the neatest way to do loops, and so on. There are various good tutorials available: Dive into Python claims to be aimed at people with experience programming in other languages.

  3. Start learning with a microframework, rather than Django. When you want to do serious websites, you can take advantage of the power of Django, but for now, keep it straightforward. As was suggested in your other question, Flask and Bottle are good contenders.

Sign up to request clarification or add additional context in comments.

8 Comments

+1: "running it on your own computer". +1: Learn Python first. -1: "microframework". Make this 3rd on the list of things to do. It's almost irrelevant compared with the first two. They're really important.
Thank you for your response! To address your concerns, I will start with Flask. Next, I will try and get it running on my own computer. I've set up Python by itself countless times. Finally, I've used Python a few times and am familiar with the general syntax. My issue isn't so much getting Python to run in general, it's how to set it up on a web server. I will install XAMPP locally, then Python, then mod_python and see if I'm golden. If I succeed here, will I be ready to tackle setting up the web server?
@S.Lott: Good point. The order was more as they came to mind than their importance. Updated.
@MALON: I suggest you try to work out whether your web server has mod_python or mod_wsgi (mod_wsgi is the newer option). The setup will probably be quite different depending on this.
@MALON: "If I succeed here, will I be ready to tackle setting up the web server?" No. You must get your entire application completely running with complete unit tests before you consider putting it on a web server. If your application doesn't work -- and work reliably -- and work well -- you'll never get it debugged on someone else's server. If you're absolutely sure your application absolutely must work, then you stand a chance of getting to work in a hosted environment.
|
0

MALON,

Django has a builtin development server; try it on your local machine first.

The Django tutorial seems to assume that you are running some Unix flavor (like Linux) on your local machine (a Mac would be fine too). If you are running some MS Windows, this page may help. Don't be scared of the command line, setup is only once.

The Django admin app is worth the trouble!

Indeed PHP is synonimous of cheap hosting and very well supported. Write some crap and run. Python support is not as pervasive; at some hosting providers, working with Python is almost as easy as with PHP, and most have instructions about Django in their FAQs.

The mechanics is different: Python frameworks don't reload with each page load like PHP, there is an application always running that responds to HTTP requests. That is why you are advised to start on your local machine, just to acquaint the new paradigm.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.