[pythonvis] Re: FW: How to get started

  • From: "Octavian Rasnita" <orasnita@xxxxxxxxx>
  • To: <pythonvis@xxxxxxxxxxxxx>
  • Date: Fri, 2 May 2014 08:12:04 +0300

Python 3 has some advantages and some disadvantages.

Python 3 is out for many years, it has some improvements like a little better 
unicode support, it does the math correctly so 5 / 2 = 2.5, not 2, like in 
Python 2.7.
On the other hand it is slower than Python 2.7 and it doesn't have good enough 
documentation.

I read an article saying that only ~ 3% of the Python users use Python 3, so 
Python is stuck on 2.7 for a very long time.

This is not especially because of lack of documentation, but because Python 
project never cared about backward compatibility and versions 2 and 3 are not 
compatible.

While Python was a young project it was so nice to not care about backward 
compatibility but change it to be as modern as possible because this way it 
involved less work and headaches.
After a time when many projects were done in Python, the programmers started to 
care about backward compatibility. They simply can't upgrade from Python 2.7 to 
Python 3, because their programs would stop working.

Because of this incompatibility between 2.7 and 3, there are many Python 
modules which are compatible only with Python 2.7, so they can't be used with 
Python 3.

What's worst is that a year ago was the same, 2 years ago was the same, 3 years 
ago was the same, and so on, and things don't seem to change.
A few years ago I thought that for a beginner would be better to start learning 
Python 3 directly, because in short term it will replace Python 2.7, but an 
experienced Python programmer told me that it would be more intelligent to 
stick with Python 2.7, even if Python 3 is better in some fields. And now after 
Python 3 was developed for years but is still not used much, I can say that he 
was very right.

So I just told you about my experience, but is your decision what version you 
will use.

--Octavian

  ----- Original Message ----- 
  From: Drew Mochak 
  To: pythonvis@xxxxxxxxxxxxx 
  Sent: Friday, May 02, 2014 5:07 AM
  Subject: [pythonvis] Re: FW: How to get started


  Out of curiosity, why are we learning Python 2.7 rather than 3?

  On 5/1/2014 5:56 PM, Jeffrey Turner wrote:

    Hello List Members,



    We had our first meeting on Out-of-sight.net tonight, so I am reposting 
this Getting Started email sent by richard Dinger for the new members. It may 
seem like a lot to do just to get going, but if you take it step-by-step, it 
really isn’t too bad.



    JDog



    ***richard’s message:



    For those new to programming and maybe even some just new to Python, I 
found an on-line tutorial for beginners on programming using Python that might 
help.  If you want to go through the tutorial, you will need to set up your 
computer first as described below.



    Part 1: Getting set up

    Before you look at the tutorial, you will need a few things. You need 
python itself, a text editor program and a folder to work in. The following 
steps cover how to get set up on windows.  Note there are many ways to get set 
up, this is just a quick setup for beginners that can be revised later.



    1 Download the latest version of python 2.7x (about 15 meg) from

    www.python.org/download 

    the filename will be something like python-2.7.6.msi 

    2 install python by executing the msi file. Note where you install it on 
your computer for example at c:\python27. 



    3 You will need a text editor program and know how to use it. MS Notepad 
comes with windows and is workable for the tutorial.  Other editors will be 
discussed on the list.



    4 Create a new folder for trying examples in the tutorial, I will call it 
tutor.



    5 in your tutor folder put the following dos file named 'shell.bat' you can 
edit the file with Notepad.  Note lines beginning with rem are comments and may 
be omitted.



    rem begin shell.bat

    rem replace c:\python27 with where you installed python

    set path=%path%;c:\python27



    rem change prompt to just the drive letter (optional):

    prompt $N$G

    cmd.exe

    rem end shell.bat



    Part 2: How to use your set up to write and run python scripts.



    1 Navigate to your tutor folder.



    2 Open your text editor and enter the following one line script, which 
simply writes to the screen:

    print 'Hello, world'



    3 Save the file as 'hello.py'



    4 Start your shell.bat file by hitting enter on it.  Shell will prompt you 
with something like:

    C:> 



    5 Type the name of your python script 'hello.py' and enter.



    6 You should get:

    Hello, world

    c:>

    or an error message if there is a problem



    7 When done for the day, you can close the shell command shell by enteering 
'exit' after the prompt.  The shell also has minor editing for example an up 
arrow will scroll up through previous commands andyou can edit through arrow 
keys, new text and delete.



    You can also run your script by simply double clicking or hitting enter on 
the filename in windows explorer, but when it runs windows will create a new 
window, run it and close the window.  That all happens so fast you will miss it 
and any error messages.



    Part 3: Take a look at the tutorial.

    hetland.org/writing/instant-hacking.html   



    Richard



    From: Charles Rivard 

    Sent: Saturday, April 19, 2014 9:35 AM

    To: learning python list 

    Subject: [pythonvis] something to remember



    For those who have had experience with Python and other programming, try to 
keep in mind that what's been sent to the list is foreign to those who haven't. 
 Thanks.


    ---
    Be positive!  When it comes to being defeated, if you think you're 
finished, you! really! are! finished!


Other related posts: