[Tutor] I am a web designer wanting to learn Python

2008-05-28 Thread Michael yaV
Where should I begin/go to learn how to create web apps using Python?  
I would like to create a dynamic "content managed" website and I have  
chosen Python as my language of choice. Can anybody show me, a Mac  
user, where I, a programming beginner, can find tutorials for using  
Python for web apps?


Thank you for any help.

Michael 
  
___

Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] I am a web designer wanting to learn Python

2008-05-28 Thread Michael yaV

Wesley,
I have been wanting to learn a language for the last 10 years, I am  
now just getting around to it. I did some research on languages,  
because I decided if I was going learn one, I wanted to learn  
something that I could use for many different applications (web being  
one). Python seemed to offer all I was looking for, plus, I have been  
told, it is rather easy to learn. Why?

Michael


On May 28, 2008, at 2:04 PM, wesley chun wrote:

Where should I begin/go to learn how to create web apps using  
Python?  I
would like to create a dynamic "content managed" website and I  
have  chosen
Python as my language of choice. Can anybody show me, a Mac  user,  
where I,
a programming beginner, can find tutorials for using  Python for  
web apps?



hi, and welcome to Python!

out of curiosity, how did you arrive at the conclusion that you should
use Python?


If you expect to write several apps you should choose a Web  
Framework.

The two most poular are TurboGears and Django. Both have websites,
search Google...


you *could*, or we can just say http://djangoproject.com and
http://turbogears.org

if you are new to Python, i would suggest Django over TurboGears, not
that Django is "better than" TG, but because those who favor TG are
usually already familiar with Python, esp. the best-of-breed
components of which it serves as the "glue", i.e.
SQLObject/SQLAlchemy, CherryPy, MochiKit, Genshi/Kid. Django is an
"all-in-one" package and requires "less overhead" if you're new to
Python.

on a related note, if you're interested solely in creating, running,
managing, developing, and/or supporting a "content managed" site, i.e.
run by a "content management system" (or CMS), you may also wish to
look at Plone -- http://plone.org ... this is its speciality.

all 3 of these frameworks have documentation as well as video clips on
"how easy it is to use them" on their websites.

if you're looking for reading, we can also recommend some books for
you, but it will depend on your previous/current programming
experience.

best of luck!
-- wesley
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"Core Python Programming", Prentice Hall, (c)2007,2001
   http://corepython.com

wesley.j.chun :: wescpy-at-gmail.com
python training and technical consulting
cyberweb.consulting : silicon valley, ca
http://cyberwebconsulting.com



___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] I am a web designer wanting to learn Python

2008-05-28 Thread Michael yaV

Thanks... I have my-work-cut-out-for-me.
Michael

On May 28, 2008, at 3:50 PM, wesley chun wrote:

I have been wanting to learn a language for the last 10 years, I am  
now
just getting around to it. I did some research on languages,  
because I
decided if I was going learn one, I wanted to learn something that  
I could
use for many different applications (web being one). Python seemed  
to offer
all I was looking for, plus, I have been told, it is rather easy to  
learn.

Why?


the community is interested in knowing how new members came to the
Python family.  :-)

sounds like you're new to programming.  there are few good books on
this subject:
- Python Programming: An Introduction to Computer Science (John Zelle)
- Python Programming for the Absolute Beginner (Michael Dawson)
- Python For Dummies (Stef and Aahz Maruch)
- How To Think Like a Computer Scientist (Allen Downey, Jeffrey
Elkner, Chris Meyers)
- Introduction to Computing and Programming in Python (Mark Guzdial)
- Learn to Program Using Python (Alan Gauld)
- Python: Visual QuickStart Guide (Chris Fehily)

there are also some great online tutorials:
- Python.org tutorial http://docs.python.org/tut
- Instant Hacking http://www.hetland.org/python/instant-hacking.php
- How to Think Like a Computer Scientst http://openbookproject.net/thinkCSpy/
- Learning to Program http://www.freenetpages.co.uk/hp/alan.gauld/

here is a link to a more comprehsnvie list of Python-related  
tutorials:

- Python Tutorials http://awaretek.com/tutorials.html

cheers,
-- wesley
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"Core Python Programming", Prentice Hall, (c)2007,2001
   http://corepython.com

wesley.j.chun :: wescpy-at-gmail.com
python training and technical consulting
cyberweb.consulting : silicon valley, ca
http://cyberwebconsulting.com



___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


[Tutor] How to Think Like a Computer Scientist...

2008-06-03 Thread Michael yaV
The green horn that I am, last week I started to go through the "How  
to Think Like a Computer Scientist" tutorial. I have gotten to Chapter  
3 --Functions' 3.8 Exercises. I think I have the 1st exercise correct  
but I'm really not sure. Is their any answer sheet I can go to to make  
sure i am getting the right answers the correct way?


Thanks for any help, Michael
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] IDE

2008-06-10 Thread Michael yaV

How about for the Mac platform?


On Jun 10, 2008, at 8:26 AM, Alan Gauld wrote:


"Sean Novak" <[EMAIL PROTECTED]> wrote


I'm looking for the perfect IDE, preferably open source.


Aren't we all! :-)

We used to have editor wars, now its IDE wars...

someone has tried a few different IDEs and found the one that they  
love..  I'd be interested in your insight!


I've tried many and liked several but none ae perfect.
And some suit different tasks better than others.

The best of all is probably the Dolphin Smalltalk IDE, but it has
the disadvantage of only doing Smalltalk on a Windows box...

I also liked the Borland Delphi IDE around version 3. The later
versions are based on Eclipse with which I have a love/hate
relationship! But Delphi is commercial and doesn't do Python!

I liked ObjectCenter on my Sun workstation, but it costs big
bucks and doesn't do Python.

For Python work, since I assume that's what you are really
interested in, I use Pythonwin for small projects. For bigger jobs
I use vim with a command prompt and an interactive session.
3 windows and Unix or Cygwin to provide the other tools.

Old fashioned, but it's the most productive route for me.

Alan G

___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor



___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] IDE

2008-06-10 Thread Michael yaV

Thanks. What do you think of IDLE?


On Jun 10, 2008, at 11:39 AM, Hansen, Mike wrote:





-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Michael yaV
Sent: Tuesday, June 10, 2008 8:45 AM
To: Alan Gauld
Cc: tutor@python.org
Subject: Re: [Tutor] IDE

How about for the Mac platform?



Textmate(not open source) but most who program on the mac love it.

TextWrangler(not open source, but free)

Open source
---
VIM
Emacs(Aquamacs)
Eclipse

Probably not considered IDEs

Smultron
SubEthaEdit

Mike
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor



___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] IDE

2008-06-10 Thread Michael yaV

Since I'm on a mac, how about using Xcode?


On Jun 10, 2008, at 2:07 PM, Kent Johnson wrote:

On Tue, Jun 10, 2008 at 1:30 PM, Michael yaV <[EMAIL PROTECTED]>  
wrote:

Thanks. What do you think of IDLE?


It's primitive.

Kent



___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] IDE

2008-06-10 Thread Michael yaV

Thanks, I'll give it look.


On Jun 10, 2008, at 2:48 PM, Wim De Hul wrote:


What about Wingware,

I use Wingware professional at ork and the free version at home.

Here's the link: http://www.wingware.com


Cheers!

Wim

On 10 Jun 2008, at 20:13, Michael yaV wrote:


Since I'm on a mac, how about using Xcode?


On Jun 10, 2008, at 2:07 PM, Kent Johnson wrote:

On Tue, Jun 10, 2008 at 1:30 PM, Michael yaV  
<[EMAIL PROTECTED]> wrote:

Thanks. What do you think of IDLE?


It's primitive.

Kent



___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor





___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


[Tutor] wanting to learn

2008-06-11 Thread Michael yaV
A little background on myself. I am a web designer so I am a Mac  
person. I have taught myself HTML and flash by reading manuals and a  
lot of trial and error over the last 11 years. I have always wanted to  
learn a language like php, asp, .net but I never took the time to  
learn them. I have recently found Python and  believe this is the  
language that I will "hang-my-hat-on" and learn.
I don't have any formal training in any coding language but I do have  
the "will" to learn.
Since my background is web, I want to learn Python and how it relates  
to the web. I have been told that I need to learn and understand the  
basics in "standard/general" Python before I move onto something like  
"django" but really, how much Python do I need to know before I can  
head down the web path?
Is Python a language a total beginner/tutorial reader like myself can  
learn or do I need to take classes at a local college? Is their is  
just too much to learn to do this on my own. I am starting to get a  
bit over whelmed with all of the information I'm finding.

So, can anybody head me in the right direction with my endeavor?
Since I am on an intel/Mac which IDE should I be using? Which one will  
be robust enough to take me through my journey? I have started with  
IDLE but I have been told that it is a bare bones IDE. So, if I need  
to learn how to use a IDE, I want to learn one that I will not have to  
discard as I become more familiar with the Python language.


Thanks for any help.
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Question about string

2008-07-03 Thread Michael yaV
This is in the " Snake Wrangling For Kids" Learning to Program with  
Python by Jason R Briggs

Thought this would help.
Michael

What’s the difference between 10 and ‘10’?
Not much apart from the quotes, you might be thinking. Well, from  
reading
the earlier chapters, you know that the first is a number and the  
second is a string.
This makes them differ more than you might expect. Earlier we compared  
the value

of a variable (age) to a number in an if-statement:
>>> if age == 10:
... print ’you are 10’
If you set variable age to 10, the print statement will be called:
>>> age = 10
>>> if age == 10:
... print ’you are 10’
...
you are 10
However, if age is set to ’10’ (note the quotes), then it won’t:
>>> age = ’10’
>>> if age == 10:
... print ’you are 10’
...
Why is the code in the block not run? Because a string is different  
from a

number, even if they look the same:
>>> age1 = 10
>>> age2 = ’10’
>>> print age1
10
>>> print age2
10
See! They look exactly the same. Yet, because one is a string, and the  
other is
a number, they are different values. Therefore age == 10 (age equals  
10) will never

be true, if the value of the variable is a string.
Probably the best way to think about it, is to consider 10 books and  
10 bricks.
The number of items might be the same, but you couldn’t say that 10  
books are
exactly the same as 10 bricks, could you? Luckily in Python we have  
magic functions
which can turn strings into numbers and numbers into strings (even if  
they won’t
quite turn bricks into books). For example, to convert the string ’10’  
into a number

you would use the function int:
4.5. WHAT’S THE DIFFERENCE. . .? 43
>>> age = ’10’
>>> converted_age = int(age)
The variable converted age now holds the number 10, and not a string.  
To convert

a number into a string, you would use the function str:
>>> age = 10
>>> converted_age = str(age)
converted age now holds the string 10, and not a number. Back to that  
if-statement

which prints nothing:
>>> age = ’10’
>>> if age == 10:
... print ’you are 10’
...
If we convert the variable before we check, then we’ll get a different  
result:

>>> age = ’10’
>>> converted_age = int(age)
>>> if converted_age == 10:
... print ’you are 10’
...
you are 10






On Jul 3, 2008, at 12:29 PM, Dong Li wrote:




Date: Thu, 3 Jul 2008 10:18:23 +0100
From: "Alan Gauld" <[EMAIL PROTECTED]>
Subject: Re: [Tutor] Question about string
To: tutor@python.org
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; format=flowed; charset="iso-8859-1";
reply-type=original


"Dong Li" <[EMAIL PROTECTED]> wrote


I am new to python, so what I ask may be so basic. I don't know the
difference between

s = 'a' 'b'
and
s = 'a'+'b'

They have the same results. Thanks for relying!


I think the differencec is that the first is purely a syntax thing so
the interpreter does the work of joining the strings together before
processing the result as a single string whereas the second the
two strings are treated separately and actual string addition
(concatenation) is done which is a much more expensive
operation in terms of computer power.

The first is only possible if you have literal strings but the second
can be used for variables:

s1 = 'a'
s2 = 'b'
s = s1 s2 # doesn't work
s = s1 + s2   # works

HTH,

--
Alan Gauld
Author of the Learn to Program web site
http://www.freenetpages.co.uk/hp/alan.gauld




--



Date: Thu, 3 Jul 2008 09:53:07 +
From: "Monika Jisswel" <[EMAIL PROTECTED]>
Subject: Re: [Tutor] Question about string
To: tutor@python.org
Message-ID:
<[EMAIL PROTECTED]>
Content-Type: text/plain; charset="iso-8859-1"

Python is one of the smartest languages, it does many things for the
programmer  (I don't know but this might be what they mean with
Batteries-Included) , & you have just scratched the surface of it,   
here
python concatenated your strings together for you, later you will  
meet list
comprehention & other stuff that actually does most of the  
programing logic

for you for free.
-- next part --
An HTML attachment was scrubbed...
URL: 


--


Thank you for excellent explanations! I have been attracted by python
more and more!

___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor



___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


[Tutor] newbee needs direction

2008-10-01 Thread Michael yaV
Here is my problem and my coding knowledge consists of html. I have  
all the time in the world to play with this so I thought I would at  
least ask how to get started.
I want to create a web base program that would output team standings.  
The only given will be the names of each team and their division (ie:  
division 1, division 2). What will be supplied is the score of an  
event (game played between 2 teams), and weather it is a division game  
(two teams in the same division playing each other) or out of division  
game (two teams in different divisions playing each other). The out- 
put will then be, the team with the highest percent of winnings will  
show up at the top of a list and the worst win/loss percentage team  
will show up at the bottom of a list. Also, for out-put, their will be  
a total of 7 columns beside each team name. 4 columns for Division  
play, a win column, a loss column, a tie column and then the win/loss  
percentage column. then their will be 3 columns for Non-Division play,  
a win column, a loss column, a tie column.
So, based on an entered score, a number will be added to one of the  
columns, the win column, loss column or tie column and will also be  
used to compute a win/loss percentage. The win loss percentage will be  
total games won, divided by total games played (ie: A team that is 3-2  
has a .600 win percentage because 3 divided by five equals .600). For  
ties you would have to Add up the number of wins and half the number  
of ties, and divide by the total number of games played. (ie: For  
instance, a team with a 10-5-1 record would have a 10.5/16 or .656  
winning percentage). If a team plays in a non-division game it will  
have no barring to the standings unless their are two or more teams  
with the same record. Therefore, if 2 teams have the same division  
wins (win/loss percentage) but one team has more non-division wins,  
that team should show up higher on the list.
I would also like that all teams' scores would have to be added before  
a standings change would be calculated and made week to week. However,  
their might have to be a "bye" button or just add zeros, in case a  
particular team does in fact have a bye while other teams play. Also,  
this way I will know which teams need their scores to be added.
I will most likely be adding the scores to an admin page and the  
results will them be posted on a website.

OK... how should I get started and how tough will this be?

Thanks, Mike
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor