Any tips on Python web development on Mac OS

  • Thread starter Tim Greening-Jackson
  • Start date
T

Tim Greening-Jackson

Hi there.

I've recently learned Python -- but would by no means describe myself as
expert -- and have a couple of "pet" projects I want to do in my spare
time in order to consolidate what I've learned by using it to solve
"real" problems.

I'd like to create a couple of websites on my Mac at home. I have a very
basic understanding of HTML, but am lazy and would prefer to do the work
either in Python itself or have some package I can use in conjunction
with Python.

So I need some sort of tool which can help me design the "look and feel"
of the website, together with something that will help me generate the
content. So I can produce the template for the pages (i.e. put this
button/text here, and on rollover it changes colour and on click it goes
to...) and also do "smart" things like take user feedback etc. etc.

I've had a very quick look at the Django and Turbogears websites. Is it
worth learning one of these for a small, simple site? Will they actually
help me set up the structure of the site, or are they more geared to its
content.

I've also seen an open-source package for the Mac called Locomotive, but
this appears to be a framework for Ruby on Rails and I don't want to
learn Ruby.

I'm also trying to find/download HTMLgen. If I try to install the
version from macports it tries to downgrade my installation of Python to
one of the previous versions. Is it worth using and where can I find a
copy that I should be able to build/install cleanly on a Mac.

I'm running:

Python 2.5 (r25:51918, Sep 19 2006, 08:49:13)
[GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin

on an elderly iMac G5 which runs Mac OS X 10.5.4 (9E17)

Any tips, pointers etc. would be gratefully received.

T.
 
J

Jeff

Hi there.

I've recently learned Python -- but would by no means describe myself as
expert -- and have a couple of "pet" projects I want to do in my spare
time in order to consolidate what I've learned by using it to solve
"real" problems.

I'd like to create a couple of websites on my Mac at home. I have a very
basic understanding of HTML, but am lazy and would prefer to do the work
either in Python itself or have some package I can use in conjunction
with Python.

So I need some sort of tool which can help me design the "look and feel"
of the website, together with something that will help me generate the
content. So I can produce the template for the pages (i.e. put this
button/text here, and on rollover it changes colour and on click it goes
to...) and also do "smart" things like take user feedback etc. etc.

I've had a very quick look at the Django and Turbogears websites. Is it
worth learning one of these for a small, simple site? Will they actually
help me set up the structure of the site, or are they more geared to its
content.

I've also seen an open-source package for the Mac called Locomotive, but
this appears to be a framework for Ruby on Rails and I don't want to
learn Ruby.

I'm also trying to find/download HTMLgen. If I try to install the
version from macports it tries to downgrade my installation of Python to
one of the previous versions. Is it worth using and where can I find a
copy that I should be able to build/install cleanly on a Mac.

I'm running:

Python 2.5 (r25:51918, Sep 19 2006, 08:49:13)
[GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin

on an elderly iMac G5 which runs Mac OS X 10.5.4 (9E17)

Any tips, pointers etc. would be gratefully received.

T.

Django is nice for home development since it includes a development
server. As far as the layout is concerned, learning some basic HTML
and CSS is not difficult. You don't need to be an expert at CSS to
make a good-looking website. Simple is often as not better with mark-
up. The nuisance is finding a good Python host on the cheap :)
 
B

Bruno Desthuilliers

Tim Greening-Jackson a écrit :
(snip)
I'd like to create a couple of websites on my Mac at home. I have a very
basic understanding of HTML, but am lazy and would prefer to do the work
either in Python itself or have some package I can use in conjunction
with Python.

You're not going to get anywhere without learning (x)html and css IMHO.
Even using a "graphical" html editor like Dreamweaver requires having a
good enough (IOW : being able to do it all by hand) knowledge of these
languages.

(snip)
I've had a very quick look at the Django and Turbogears websites. Is it
worth learning one of these for a small, simple site?

Depends on what your "site" is doing.
Will they actually
help me set up the structure of the site,

Nope, or not much.
or are they more geared to its
content.

Content, definitively.
I'm also trying to find/download HTMLgen. If I try to install the
version from macports it tries to downgrade my installation of Python to
one of the previous versions. Is it worth using and where can I find a
copy that I should be able to build/install cleanly on a Mac.

There are quite a couple other (and more recent) "html generator"
packages. You may want to have a look at brevé:
http://breve.twisty-industries.com/
 
T

Tim Greening-Jackson

Bruno said:
Tim Greening-Jackson a écrit :
(snip)
You're not going to get anywhere without learning (x)html and css IMHO.
Even using a "graphical" html editor like Dreamweaver requires having a
good enough (IOW : being able to do it all by hand) knowledge of these
languages.

Well, to be honest I do know rudimentary HTML and have been playing with
CSS by hand --- the only HTML editor I have is a public domain one
called Taco. I can put together the basic template for the website, and
use CSS to keep tuning the look and feel until it was right.

I have Apache/MySQL already running on my Mac, a fairly fast broadband
connection with a static IP address and a vanity domain to point at the
server. So I could serve it all from home.
Depends on what your "site" is doing.

There are all *sorts* of things I would like it to do, but am not
dogmatic about any of them. For example, having various people being
able to login to it securely to shuttle files between ourselves would be
useful. As would webmail access. And various "robot" functionality...

The exercise is more to see what Python can do to help me develop
websites and get used to some sort of proper development framework,
rather than Apple iWeb which is superficially attractive but
fundamentally crippled and produces unreadable HTML.
There are quite a couple other (and more recent) "html generator"
packages. You may want to have a look at brevé:
http://breve.twisty-industries.com/

Thanks. I'll take a look.
 
B

Bruno Desthuilliers

Tim Greening-Jackson a écrit :
There are all *sorts* of things I would like it to do, but am not
dogmatic about any of them. For example, having various people being
able to login to it securely to shuttle files between ourselves would be
useful. As would webmail access. And various "robot" functionality...

Ok, so this is more a collection of web applications than a
content-oriented site. FWIW, there are existing open-source solutions
(not necessarily written in Python...) for at least the first two features.
The exercise is more to see what Python can do to help me develop
websites and get used to some sort of proper development framework,

Ok. Then to answer one of your initial questions, yes, having a look at
frameworks like Django, Turbogears or Pylons might be a good idea. But
note that these are frameworks, not applications like iWeb.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top