"Pythoner",Wish me luck!

Discussion in 'Python' started by Linuxwell, Apr 3, 2009.

  1. Linuxwell

    Linuxwell Guest

    Starting today I would like to study Python,Wish me luck!
    Linuxwell, Apr 3, 2009
    #1
    1. Advertising

  2. Linuxwell

    Matteo Guest

    On Apr 3, 9:05 am, Linuxwell <> wrote:
    > Starting today I would like to study Python,Wish me luck!


    Good luck!

    Don't forget to...

    >>> print 'Hello World!'




    ;)
    Matteo, Apr 3, 2009
    #2
    1. Advertising

  3. "Matteo" <> wrote:


    On Apr 3, 9:05 am, Linuxwell <> wrote:
    >> Starting today I would like to study Python,Wish me luck!

    >
    >Good luck!
    >
    >Don't forget to...
    >
    >>>> print 'Hello World!'


    This is better advice than what you may think,
    because the interactive interpreter is your very
    best friend when studying the language.

    You get there by typing "python" at the command
    line, and pressing enter.

    Using it, you will save yourself many hours of
    misunderstanding.

    - Hendrik
    Hendrik van Rooyen, Apr 3, 2009
    #3
  4. Linuxwell

    MRAB Guest

    Matteo wrote:
    > On Apr 3, 9:05 am, Linuxwell <> wrote:
    >> Starting today I would like to study Python,Wish me luck!

    >
    > Good luck!
    >
    > Don't forget to...
    >
    >>>> print 'Hello World!'

    >

    Or:

    >>> print('Hello World!')


    if using Python 3.
    MRAB, Apr 3, 2009
    #4
  5. Linuxwell

    barisa Guest

    On Apr 3, 11:39 am, "Hendrik van Rooyen" <> wrote:
    > "Matteo" <> wrote:
    >
    > On Apr 3, 9:05 am, Linuxwell <> wrote:
    >
    > >> Starting today I would like to study Python,Wish me luck!

    >
    > >Good luck!

    >
    > >Don't forget to...

    >
    > >>>> print 'Hello World!'

    >
    > This is better advice than what you may think,
    > because the interactive interpreter is your very
    > best friend when studying the language.
    >
    > You get there by typing "python" at the command
    > line, and pressing enter.
    >
    > Using it, you will save yourself many hours of
    > misunderstanding.
    >
    > - Hendrik


    Hi,
    I'm also begginer in python;
    i did few basic programs about graph etc..

    my question is : what benefit is using interactive intrepreter ?

    i come from java backround, so I use eclipse for python as well.
    I start my program, it does it's job, and that's it. (after some
    debugging ofc)
    barisa, Apr 3, 2009
    #5
  6. Linuxwell

    Guest

    On Apr 3, 12:33 pm, barisa <> wrote:
    > On Apr 3, 11:39 am, "Hendrik van Rooyen" <> wrote:
    >
    >
    >
    > > "Matteo" <> wrote:

    >
    > > On Apr 3, 9:05 am, Linuxwell <> wrote:

    >
    > > >> Starting today I would like to study Python,Wish me luck!

    >
    > > >Good luck!

    >
    > > >Don't forget to...

    >
    > > >>>> print 'Hello World!'

    >
    > > This is better advice than what you may think,
    > > because the interactive interpreter is your very
    > > best friend when studying the language.

    >
    > > You get there by typing "python" at the command
    > > line, and pressing enter.

    >
    > > Using it, you will save yourself many hours of
    > > misunderstanding.

    >
    > > - Hendrik

    >
    > Hi,
    > I'm also begginer in python;
    > i did few basic programs about graph etc..
    >
    > my question is : what benefit is using interactive intrepreter ?
    >
    > i come from java backround, so I use eclipse for python as well.
    > I start my program, it does it's job, and that's it.  (after some
    > debugging ofc)


    I'm also a beginner in Python, but from my own experience the
    interactive interpreter is great for experimenting with new modules
    and output formatting because it allows you to see the immediate
    output of a function before you write it into your program. The
    immediate result is that you'll see any errors and be able to fix them
    before they end up in your script.

    Nick Ballard
    http://90daysofpython.blogspot.com
    , Apr 3, 2009
    #6
  7. Linuxwell

    barisa Guest

    On Apr 3, 8:58 pm, wrote:
    > On Apr 3, 12:33 pm, barisa <> wrote:
    >
    >
    >
    > > On Apr 3, 11:39 am, "Hendrik van Rooyen" <> wrote:

    >
    > > > "Matteo" <> wrote:

    >
    > > > On Apr 3, 9:05 am, Linuxwell <> wrote:

    >
    > > > >> Starting today I would like to study Python,Wish me luck!

    >
    > > > >Good luck!

    >
    > > > >Don't forget to...

    >
    > > > >>>> print 'Hello World!'

    >
    > > > This is better advice than what you may think,
    > > > because the interactive interpreter is your very
    > > > best friend when studying the language.

    >
    > > > You get there by typing "python" at the command
    > > > line, and pressing enter.

    >
    > > > Using it, you will save yourself many hours of
    > > > misunderstanding.

    >
    > > > - Hendrik

    >
    > > Hi,
    > > I'm also begginer in python;
    > > i did few basic programs about graph etc..

    >
    > > my question is : what benefit is using interactive intrepreter ?

    >
    > > i come from java backround, so I use eclipse for python as well.
    > > I start my program, it does it's job, and that's it.  (after some
    > > debugging ofc)

    >
    > I'm also a beginner in Python, but from my own experience the
    > interactive interpreter is great for experimenting with new modules
    > and output formatting because it allows you to see the immediate
    > output of a function before you write it into your program.  The
    > immediate result is that you'll see any errors and be able to fix them
    > before they end up in your script.
    >
    > Nick Ballardhttp://90daysofpython.blogspot.com


    thanks, i'll give it a try
    barisa, Apr 3, 2009
    #7
  8. Linuxwell

    Krishnakant Guest

    confused with creating doctest in xmlrpc server

    hello all,
    I am thinking of using the doctest module for my unit testing code in
    python.
    I have no problems doing this in usual classes but I am a bit confused
    with my twisted based rpc classes.

    given that I directly take the output of running functions on a python
    prompt for the dockstrings, how do I get them for my twisted class which
    has a published object?

    What I mean is that in normal classes I would just start the python
    prompt, import the module, create the object and run the methods to get
    the output.

    Then I take the output and put it into a file and then use those
    dockstrings for my tests.
    As you all know an rpc server app can't be run like this. To my
    knowledge an rpc server is a service that listens on a port on the given
    ip address.

    So how do I extract the dockstrings from the functions inside my xmlrpc
    class?
    obviously it is not run on a python prompt, so what is the solution?

    happy hacking.
    Krishnakant.
    Krishnakant, Apr 3, 2009
    #8
  9. Linuxwell

    Linuxwell Guest

    Thanks everyone,thank you very much!!!
    Linuxwell, Apr 4, 2009
    #9
  10. On Apr 3, 3:47 pm, barisa <> wrote:
    > On Apr 3, 8:58 pm, wrote:
    >
    >
    >
    > > On Apr 3, 12:33 pm, barisa <> wrote:

    >
    > > > On Apr 3, 11:39 am, "Hendrik van Rooyen" <> wrote:

    >
    > > > > "Matteo" <> wrote:

    >
    > > > > On Apr 3, 9:05 am, Linuxwell <> wrote:

    >
    > > > > >> Starting today I would like to study Python,Wish me luck!

    >
    > > > > >Good luck!

    >
    > > > > >Don't forget to...

    >
    > > > > >>>> print 'Hello World!'

    >
    > > > > This is better advice than what you may think,
    > > > > because the interactive interpreter is your very
    > > > > best friend when studying the language.

    >
    > > > > You get there by typing "python" at the command
    > > > > line, and pressing enter.

    >
    > > > > Using it, you will save yourself many hours of
    > > > > misunderstanding.

    >
    > > > > - Hendrik

    >
    > > > Hi,
    > > > I'm also begginer in python;
    > > > i did few basic programs about graph etc..

    >
    > > > my question is : what benefit is using interactive intrepreter ?

    >
    > > > i come from java backround, so I use eclipse for python as well.
    > > > I start my program, it does it's job, and that's it.  (after some
    > > > debugging ofc)

    >
    > > I'm also a beginner in Python, but from my own experience the
    > > interactive interpreter is great for experimenting with new modules
    > > and output formatting because it allows you to see the immediate
    > > output of a function before you write it into your program.  The
    > > immediate result is that you'll see any errors and be able to fix them
    > > before they end up in your script.

    >
    > > Nick Ballardhttp://90daysofpython.blogspot.com

    >
    > thanks, i'll give it a try


    Or even better, install IPython [1], a python interpreter on steroids.
    It's the first 3rd party python package I install on every new system
    I work on; it's so powerful and versatile, it has almost displaced the
    regular linux shell for me. I highly recommend it.

    George

    [1] http://ipython.scipy.org/
    George Sakkis, Apr 4, 2009
    #10
  11. "barisa" <> wrote:

    >Hi,
    >I'm also begginer in python;
    >i did few basic programs about graph etc..
    >
    >my question is : what benefit is using interactive intrepreter ?
    >
    >i come from java backround, so I use eclipse for python as well.
    >I start my program, it does it's job, and that's it. (after some
    >debugging ofc)
    >

    The Interactive Interpreter is not intended to be a development
    environment, (although you can use it like that for small things)
    but it is very handy to do simple tests in when you are not sure
    that you understand what some new (to you) language feature
    does exactly.
    In this way you can "test bench" small snippets of code, which
    makes subsequent debugging of your program less onerous,
    and makes it more likely that the "job" your program does is
    in fact the "job" that you imagined it should do when you started
    to write it.
    So, for instance, lets say that it is the first time that you use
    the append method of the built in list class, and you are not sure
    what it returns.
    you have two basic options - you can either go look for the
    documentation and RTFM, or you can go into your active
    interpreter and just try it.
    The second alternative is often the quickest, and it is definitely
    the safest, because what happens is the definitive behaviour
    of your installation.
    Reading the manual carries the following risks:
    - It could be the wrong manual
    - The manual and the code may not be congruent

    Another reason for using the II is to help you discover stuff.
    Calling dir(something) can teach you quite a lot that is of
    practical import.

    And then there is the help system too.

    hth - Hendrik
    Hendrik van Rooyen, Apr 4, 2009
    #11
  12. -On [20090403 20:35], barisa () wrote:
    >my question is : what benefit is using interactive intrepreter ?


    Install ipython.

    It's an extension wrapper around the interactive shell and allows a lot of
    very nice features in additional to the standard shell, such as tab
    completion.

    The benefit is easily testing code snippets, inspecting the contents of
    various variables, modules, classes, and so on.

    --
    Jeroen Ruigrok van der Werven <asmodai(-at-)in-nomine.org> / asmodai
    イェルーン ラウフロック ヴァン デル ウェルヴェン
    http://www.in-nomine.org/ | http://www.rangaku.org/ | GPG: 2EAC625B
    I must be cruel, only to be kind...
    Jeroen Ruigrok van der Werven, Apr 5, 2009
    #12
    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. Barry

    VS.NET major bug or bad luck?

    Barry, Aug 14, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    326
    S. Justin Gengo
    Aug 15, 2003
  2. Edwin Knoppert

    Session expires, but no luck to jump

    Edwin Knoppert, Oct 10, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    293
    Edwin Knoppert
    Oct 10, 2005
  3. Edwin Knoppert
    Replies:
    0
    Views:
    315
    Edwin Knoppert
    Nov 14, 2005
  4. Talking with Tonz - Emery Z. Balint Jr.

    Re: Still no luck with Web App

    Talking with Tonz - Emery Z. Balint Jr., Jul 25, 2003, in forum: Java
    Replies:
    2
    Views:
    440
    Talking with Tonz - Emery Z. Balint Jr.
    Jul 26, 2003
  5. metaperl
    Replies:
    6
    Views:
    298
    metaperl
    Sep 23, 2006
Loading...

Share This Page