#1
  1. Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2002
    Posts
    0
    Rep Power
    0

    Question A newbie question about Python


    Hello all,
    I am new to Python.
    -I would like to know please what editor do you recommend to
    work with Python.
    -Do we compile the programs in Python like we do in C or C++ ?
    -Besides this great forum is there another good place for online
    documentation regarding Python?

    Thank-you in advance,
    LIOR
  2. #2
  3. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2002
    Posts
    32
    Rep Power
    13
    editor: use IDLE which comes with Python... or you can use vim or emacs (Unix)

    compilation: no you dun really compile Python scripts... Python scripts are run like Perl scripts (passed to the Python interpreter) which _also_ compiles your .py files into Python bytecode .pyc... but no - there is no compile step like in C/C++

    online docs: check the main site www.python.org... the best documentation is all there
  4. #3
  5. Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2002
    Posts
    0
    Rep Power
    0

    thanks...!


    Well that was a quick reply, thank-you for that.
    What is this IDLE editor?
    I guess actually any good editor will do if no compiling is needed here.
    I currently use Visual Slick Edit which is quite a nice tool for any editing actually, I guess I will wtick to that one.

    Thanks again,
    LIOR
  6. #4
  7. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2002
    Posts
    32
    Rep Power
    13
    heh i just happened to pop by just after you posted i guess

    IDLE stands for Integrated DeveLopment Environment... it's an editor that comes with Python and is written by one of the Python guys... it comes with most distributed Python binaries...

    read more about it here -> http://www.python.org/idle/

    and yes just about any editor would do, though one thing you have to be careful of is that you don't mix tabs and spaces, since Python is scoped using whitespace (i'm sure you already know that)
  8. #5
  9. Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2002
    Posts
    0
    Rep Power
    0

    Thank-you again...


    Hi there...
    Thanks for the additional information.
    Actually I do not know of what you said about whitespaces and tabs.....
    Could you please explain more about this.
    I am sorry to be so ignorant here, but I really am ...!
    Thank you again, and you can contact me via ICQ or my regular e-mail...

    LIOR
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2002
    Posts
    259
    Rep Power
    13

    editor...


    I use TextPad (www.textpad.com) and Notepad (www.microsoft.com)
  12. #7
  13. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Location
    Australia
    Posts
    111
    Rep Power
    15
    Actually I do not know of what you said about whitespaces and tabs.....
    Could you please explain more about this
    i do not know a lot about python, but I do know that it interprets spaces in the code. A whole file can not run because of incorrect spacing.

    wabirdman
    Real programmers code in binary
  14. #8
  15. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2002
    Posts
    32
    Rep Power
    13
    Python doesn't really interpret whitespace... it uses whitespace the way we use braces in most other programming languages (C, Java) to group statements or form scoping rules

    Code:
    if(condition)
    {
      if(othercondition)
      {
        do this;
        do that;
      }
    }
    whereas in python, this is how you structure your code with whitespace:
    Code:
    if condition:
      if othercondition:
        do this
        do that

IMN logo majestic logo threadwatch logo seochat tools logo