How to Start

Discussion in 'Python' started by Michael R. Copeland, Sep 13, 2007.

  1. I've decided that Python is a language/environment I'd like to learn
    (I've been a professional programmer for 45+ years), but I really don't
    know where and how to start! I have a number of books - and am buying
    some more - but because of the bewildering number of after-market
    packages, environments, and add-ons, I am really quite perplexed about
    starting. 8<{{
    Yes, I could fire up the interactive mode and play with some
    statements...but I consider that sort of thing for programming neophytes
    or experimenting with specific issues. First, I want to develop a
    simple Windows application, and because of the plethora of "stuff" the
    Python world offers, I don't know where to begin.
    For example, what basic, easy-to-use interface might I start with to
    build a simple text file parsing and analysis program? That is, I'd
    like to start with a simple Windows shell that prompts for a file name,
    processes it, and then displays some result.
    I am certainly impressed with the apparent experience and openness of
    the regular players here, but the discussions here (and in
    c.l.p.announce) truly presume knowledge and experience with Python I
    don't yet have. Yes, for even a very experienced programmer, entering
    the Python world is very daunting - but I want to get started.
    Please advise. TIA
    Michael R. Copeland, Sep 13, 2007
    #1
    1. Advertising

  2. On Sep 13, 2:59 pm, (Michael R. Copeland) wrote:
    > I've decided that Python is a language/environment I'd like to learn
    > (I've been a professional programmer for 45+ years), but I really don't
    > know where and how to start! I have a number of books - and am buying
    > some more - but because of the bewildering number of after-market
    > packages, environments, and add-ons, I am really quite perplexed about
    > starting. 8<{{
    > Yes, I could fire up the interactive mode and play with some
    > statements...but I consider that sort of thing for programming neophytes
    > or experimenting with specific issues. First, I want to develop a
    > simple Windows application, and because of the plethora of "stuff" the
    > Python world offers, I don't know where to begin.
    > For example, what basic, easy-to-use interface might I start with to
    > build a simple text file parsing and analysis program? That is, I'd
    > like to start with a simple Windows shell that prompts for a file name,
    > processes it, and then displays some result.
    > I am certainly impressed with the apparent experience and openness of
    > the regular players here, but the discussions here (and in
    > c.l.p.announce) truly presume knowledge and experience with Python I
    > don't yet have. Yes, for even a very experienced programmer, entering
    > the Python world is very daunting - but I want to get started.
    > Please advise. TIA


    I like Wing IDE ( http://www.wingware.com ) . They have a free version
    and Personal and Professional versions.

    The free version description says:
    "Wing IDE 101

    Wing IDE 101 is a free basic edition of Wing IDE that was originally
    designed with the University of Toronto Computer Science Department
    for teaching entry level computer science courses. It is not open
    source but is free for use by educators, students, and hobbyists.

    Note that Wing IDE 101 omits auto-completion and most other code
    intelligence features in the other Wing IDE products. This was by
    design, so that students are more conscious of the details of the
    language and modules they are learning about."
    TheFlyingDutchman, Sep 13, 2007
    #2
    1. Advertising

  3. Michael R. Copeland

    Tom Brown Guest

    On Thursday 13 September 2007 14:59, Michael R. Copeland wrote:
    > I've decided that Python is a language/environment I'd like to learn
    > (I've been a professional programmer for 45+ years), but I really don't
    > know where and how to start! I have a number of books - and am buying
    > some more - but because of the bewildering number of after-market
    > packages, environments, and add-ons, I am really quite perplexed about
    > starting. 8<{{
    > Yes, I could fire up the interactive mode and play with some
    > statements...but I consider that sort of thing for programming neophytes
    > or experimenting with specific issues. First, I want to develop a
    > simple Windows application, and because of the plethora of "stuff" the
    > Python world offers, I don't know where to begin.
    > For example, what basic, easy-to-use interface might I start with to
    > build a simple text file parsing and analysis program? That is, I'd
    > like to start with a simple Windows shell that prompts for a file name,
    > processes it, and then displays some result.
    > I am certainly impressed with the apparent experience and openness of
    > the regular players here, but the discussions here (and in
    > c.l.p.announce) truly presume knowledge and experience with Python I
    > don't yet have. Yes, for even a very experienced programmer, entering
    > the Python world is very daunting - but I want to get started.
    > Please advise. TIA


    A good book, a link to the module index, a good text editor and a command
    prompt will get you started. Sounds like you have some books. Those should
    help a lot. A good text editor is a matter of taste. I prefer gvim. However,
    gvim has a steep learning curve to become productive. There is eric4, which
    is an IDE. I has a debugger. That may be the place to start.

    Good luck,
    Tom
    Tom Brown, Sep 13, 2007
    #3
  4. On Sep 13, 5:59 pm, (Michael R. Copeland) wrote:
    > I've decided that Python is a language/environment I'd like to learn
    > (I've been a professional programmer for 45+ years), but I really don't
    > know where and how to start! I have a number of books - and am buying
    > some more - but because of the bewildering number of after-market
    > packages, environments, and add-ons, I am really quite perplexed about
    > starting. 8<{{
    > Yes, I could fire up the interactive mode and play with some
    > statements...but I consider that sort of thing for programming neophytes
    > or experimenting with specific issues. First, I want to develop a
    > simple Windows application, and because of the plethora of "stuff" the
    > Python world offers, I don't know where to begin.
    > For example, what basic, easy-to-use interface might I start with to
    > build a simple text file parsing and analysis program? That is, I'd
    > like to start with a simple Windows shell that prompts for a file name,
    > processes it, and then displays some result.
    > I am certainly impressed with the apparent experience and openness of
    > the regular players here, but the discussions here (and in
    > c.l.p.announce) truly presume knowledge and experience with Python I
    > don't yet have. Yes, for even a very experienced programmer, entering
    > the Python world is very daunting - but I want to get started.
    > Please advise. TIA


    Michael,

    I suggest starting with Python's core documentation. Its rather well
    written and contains many examples. If nothing else, a thorough
    review of the Library reference may help you evaluate the
    "after-market packages, environments, and add-ons" you describe.

    http://docs.python.org/tut/tut.html (Tutorial)
    http://docs.python.org/lib/lib.html (Library Reference)
    http://docs.python.org/ref/ref.html (Language Reference)

    The simple text parsing and analysis program you are considering seems
    unlikely to require either "Extending and Embedding" or the Python/C
    API, but if you find yourself drawn to either topic I again suggest
    starting with the core documentation.

    http://docs.python.org/ext/ext.html (Extending and Embedding)
    http://docs.python.org/api/api.html (Python/C API)

    You may also find it useful to examine others' programs. The Python
    Package Index and ActiveState's Python Cookbook are both excellent
    resources.

    http://cheeseshop.python.org/pypi (Package Index)
    http://aspn.activestate.com/ASPN/Python/Cookbook/

    Every new Python user should read David Goodger's "Idiomatic Python"
    tutorial.

    http://python.net/~goodger/projects/pycon/2007/idiomatic/handout.html

    I've benefited greatly from HOWTOs available at A.M. Kuchling's
    website.

    http://www.amk.ca/python/howto/

    Be sure to consider the optparse and cmd modules if you decide to
    develop the simple shell you've described.

    I hope this helps,
    Brandon
    Brandon Barry, Sep 13, 2007
    #4
  5. In article <>,
    (Michael R. Copeland) wrote:

    > I've decided that Python is a language/environment I'd like to learn
    > (I've been a professional programmer for 45+ years), but I really don't
    > know where and how to start! I have a number of books - and am buying
    > some more - but because of the bewildering number of after-market
    > packages, environments, and add-ons, I am really quite perplexed about
    > starting. 8<{{


    > For example, what basic, easy-to-use interface might I start with to
    > build a simple text file parsing and analysis program? That is, I'd
    > like to start with a simple Windows shell that prompts for a file name,
    > processes it, and then displays some result.


    Hi Michael
    I am a relative newbie to the field having only been in front of a
    keyboard for about half as long as you. I've been using Python for a
    couple of years now and I like it. My $.02 for someone such as yourself
    is to deal with Python and as little else as possible. So write your
    code in a simple text editor like UltraEdit or Notepad if you're
    hardcore or edlin if you're really trying to impress someone (does that
    still ship with Windows?) and run your program from the command line by
    typing 'python MyProgram.py'. Once you're more familiar with the
    language you can graduate to fancier tools but you will take with you a
    fundamental understanding of what Python needs/gives and what the IDE
    needs/gives.

    I think writing code is a great way to learn a language, so it sounds
    like you've already got some incentive there. Dive into Python is a
    popular reference. (It's free online.)

    I'm sure you'll get other good suggestions from this group.

    Have fun!

    --
    Philip
    http://NikitaTheSpider.com/
    Whole-site HTML validation, link checking and more
    Nikita the Spider, Sep 14, 2007
    #5
  6. Michael R. Copeland

    James Stroud Guest

    Michael R. Copeland wrote:
    > Yes, I could fire up the interactive mode and play with some
    > statements...but I consider that sort of thing for programming neophytes
    > or experimenting with specific issues.


    The interactive interpreter is *the fastest* way to learn, expert,
    novice, or somewhere in-between. Let me do a quick count of the number
    of instances I have running just on the machine I'm at right now...ok,
    only 1, but that's because I just switched over to a Mac at work and it
    doesn't support multiple desktops--yet. I basically test just about
    every idea I have in the interactive interpreter before I lay it down in
    a text file.

    First, I want to develop a
    > simple Windows application, and because of the plethora of "stuff" the
    > Python world offers, I don't know where to begin.


    Pseudocode (~ python code).

    > For example, what basic, easy-to-use interface might I start with to
    > build a simple text file parsing and analysis program? That is, I'd
    > like to start with a simple Windows shell that prompts for a file name,
    > processes it, and then displays some result.


    #! /usr/bin/env python

    def main():
    file_name = prompt_for_name()
    result = process(file_name)
    display(result)

    def prompt_for_name():
    [fill in here]

    [etc.]

    > I am certainly impressed with the apparent experience and openness of
    > the regular players here, but the discussions here (and in
    > c.l.p.announce) truly presume knowledge and experience with Python I
    > don't yet have. Yes, for even a very experienced programmer, entering
    > the Python world is very daunting - but I want to get started.
    > Please advise. TIA


    Here's your recipe:

    1. begin coding until you hit a wall
    2. read official tutorial until you figure out a solution
    3. experiment in interactive interpreter
    4. goto 1.

    I know this sounds obvious, but its the best way to jumpstart.

    James
    James Stroud, Sep 14, 2007
    #6
  7. Michael R. Copeland

    Paul McGuire Guest

    On Sep 13, 4:59 pm, (Michael R. Copeland) wrote:

    > Yes, I could fire up the interactive mode and play with some
    > statements...but I consider that sort of thing for programming
    > neophytes or experimenting with specific issues.


    To misquote Francis Bacon, "you would have fish, but dare not get your
    fingernails dirty."

    Back in '62-minus, when you started programming, there was no such
    thing as "just dive in and try stuff." Imagine if someone had said,
    "Just punch some random holes in this computer card and feed it in -
    you'll get the hang of it," you would have thought they were crazy.
    So you probably read a whole bunch of books first, before you punched
    your very first card, and then stood in line to feed your deck to the
    card reader on "the mainframe," then waited anywhere from 15 minutes
    to an hour or more to get your job output. The length of this cycle
    was itself a deterrent to interactive experimentation - you had to
    *know* what you were doing and do it right, or risk wasting an hour
    because you accidentally punched a character in column 6 instead of
    column 7. In fact, much of the software development process from that
    era was oriented around avoiding as many needless compile/run cycles
    as possible.

    Well, in 45+ years, things have progressed a bit. Nowadays, I don't
    pore over my code looking for that stray or missing brace or closing
    paren - the compiler will tell me in about 3 seconds where these
    syntax errors are.

    And so too with Python. Do "neophytes" just dive in and try stuff?
    What of it? You have chosen a nice simple little problem space, well
    within the fairway of the vanilla, batteries-included Python. In your
    noobiness you might write some code that duplicates the features of a
    standard built-in module, but so what? Isn't your goal to learn the
    language as well as the libraries? And you would not be the first
    (nor the last) to post a question to this group along the lines of
    "can you look at this code and see what I'm doing wrong?" and get back
    the answer of "what you're doing wrong is writing your own code
    instead of just using standard module X" - it happens to many
    newcomers and nearly all survive this early trauma. Just because I
    can convert a list of data into a histogram in a single line of code
    if I use itertools.groupby, doesn't invalidate my learning how to do
    it in 4 lines with a defaultdict, or 6 lines with an explicit for
    loop.

    In your shoes, I would pursue a minimalist approach, learning the
    basic language features, and then browsing through the standard lib
    docs to get familiar with the available modules. Get a no-frills IDE
    with a short learning curve - I like SciTE for this, although there is
    no auto-completion - to help automate your code/run cycle (note: just
    code/run, no compile step!). I also suggest you go to the Python.org
    wiki and look for the documentation for experienced programmers who
    are starting to switch over to Python (http://wiki.python.org/moin/
    BeginnersGuide/Programmers) - others have trod this path before, and
    some have left bread crumbs behind.

    Best of luck!
    -- Paul
    Paul McGuire, Sep 14, 2007
    #7
  8. On 9/14/07, James Stroud <> wrote:
    >
    > Here's your recipe:
    >
    > 1. begin coding until you hit a wall
    > 2. read official tutorial until you figure out a solution
    > 3. experiment in interactive interpreter
    > 4. goto 1.
    >
    > I know this sounds obvious, but its the best way to jumpstart.
    >
    > James
    > --


    What a beautiful way of putting it! That's what I do all the time,
    although sometimes my bookshelf or Google is a stand-in for #2. I try
    not to post to the list before I have working code.

    You know, if you could make that process into a haiku, you could just
    make that your sig and answer nearly every question that hits this
    list. ^_^

    I wonder whether lists like this hurt more people than they help,
    because it's too easy to ask for help too soon. Those of you who
    consistently give the best advice didn't learn by asking for help
    every step along the way, did you? Is it really teaching a man to fish
    if you bait his line and tell him where to cast?

    Shawn
    Shawn Milochik, Sep 14, 2007
    #8
  9. Michael R. Copeland

    Guest

    On Sep 13, 4:02 pm, Nikita the Spider <>
    wrote:
    > My $.02 for someone such as yourself
    > is to deal with Python and as little else as possible. So write your
    > code in a simple text editor like UltraEdit or Notepad


    Second that opinion. Use _your_ favorite basic text editor and run on
    command line. Don't clutter your attention with complex tools, yet,
    Python's not J2EE for Pete's sake. I started on Kedit, but mostly use
    Eclipse + pydev now, with KEdit as a backup.

    Do use one of the interactive interpreters (pythonwin, python prompts,
    etc...) to try out one liners and short pieces of code. But I've
    never really liked them for writing full programs.

    And I would just do the tutorial or Dive Into Python (http://
    www.diveintopython.org/toc/index.html). If you are as experienced as
    you say, you should have very little trouble working through them,
    really quickly (3-4 hours?) and you'll have a good tour of the
    features. I picked up Python on a Montreal to Vancouver flight, doing
    just that.

    For your problem domain. Modules: optparse, regular expressions.
    Perhaps the "Text Processing in Python" book by Mertz. I don't like
    it much myself, but it does cover text processing in depth and it
    refers to a number of existing specialized libraries.

    Cheers
    , Sep 14, 2007
    #9
  10. Michael R. Copeland

    James Stroud Guest

    Paul McGuire wrote:
    > Do "neophytes" just dive in and try stuff?


    I think a lot of us coming from other fields actually slithered in, in
    true python style.
    James Stroud, Sep 14, 2007
    #10
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Lucas Tam
    Replies:
    0
    Views:
    483
    Lucas Tam
    Jun 17, 2005
  2. Anup
    Replies:
    1
    Views:
    2,750
    Mark Rae
    May 9, 2006
  3. Noam Raphael
    Replies:
    17
    Views:
    496
    Noam Raphael
    May 26, 2004
  4. Jon Davis
    Replies:
    0
    Views:
    810
    Jon Davis
    Nov 14, 2006
  5. Ravi

    start join start

    Ravi, Mar 6, 2007, in forum: Java
    Replies:
    4
    Views:
    296
    Patricia Shanahan
    Mar 7, 2007
Loading...

Share This Page