|
Martijn Smitshoek wrote: I don't like IDLE because it changes the behavior of the language How exactly does it do that?
|
|
|
|
|
try in IDLE:
import getpass
getpass.getpass() then type something.
Not very useful.
|
|
|
|
|
Quote: Warning (from warnings module):
File "C:\Program Files (x86)\Python_36\lib\getpass.py", line 100
return fallback_getpass(prompt, stream)
GetPassWarning: Can not control echo on the terminal.
Warning: Password input may be echoed.
Password:
Looks reasonable to me.
|
|
|
|
|
Life would be boring without a little evil.
|
|
|
|
|
It's very important to set your editor for "convert tabs to spaces" or whatever the setting is for your editor so you don't accidentally mix the two.
|
|
|
|
|
Yeah! Who cares about whitespace and labels in Assembly!
... such stuff as dreams are made on
|
|
|
|
|
|
Thanks for bringing this up ... my impression was exactly the same a few years ago when I tried to learn Python "for fun" (having C++/C# background). Luckily I did not need it for a project so I comfortably have given up ... Perhaps Python is meant for people without programming background ...
|
|
|
|
|
No, Python is meant for people who want to get stuff done without having to debate brace layout and other trivialities. It's quicker to get simple stuff done than C/C++ (for one, you don't have to recompile). It can be extended with C/C++ if you think you have a performance need.
If you think Python is for non-programmers, you may be disappointed to find that it's exactly for you.
|
|
|
|
|
I don't want to exaggerate, but we both probably agree that syntax is important, as it helps our brain to understand (quicker or slower ) what we are doing ... So, Glenn is quite right in his remarks. But of course as you say there are qualities in Python, and I would also add that it is in top 5 in the TIOBE list "as we speak". Perhaps I will give Python another try ... ,
BR
|
|
|
|
|
|
It takes a bit of getting used to. Then after a while, it's like your eyes are opened -- if whitespace is the block delimiter, there can no longer be wars about where to put those braces. There can no longer be wars about indentation levels. All code in a codebase becomes slightly more unified and people can focus on solving problems -- which Python does extremely well -- instead of trying to assert some rule they had hammered into them at some previous point in their life.
As an exercise, try open up other people's Python. Go have a look at software written in Python which is installed on, say, many Linux boxes. Go learn the "Pythonic" way to do things (there are language features which make the structure easier to conform to and which help to unify the flow of process).
Now, with your eyes opened, go back to C++, Javascript, C#, wherever. And recognise the burden that Python took from you.
I'm not pulling this out of my ass. Python is only one of about 20 languages I've coded in, with varying degrees of proficiency and utility. But I still recommend Python as the ideal learner language because:
- it reads well (easy to understand what you or someone else wrote)
- the language enforces a reasonable style
- it's easy to get simple things done
- it doesn't run out of steam when you no longer wish to just get simple things done (it's powerful in itself and there are myriad free libraries out there which are easy to install and consume)
- it runs just about everywhere
- there are a mad number of good, free (and non-free) editors / IDEs for it (check out PyCharm Edu if you want a good editor and a tutor)
- SNAKE!
|
|
|
|
|
glennPattonWork wrote: Winge mode on.
You forgot to turn winge mode off again...
My plan is to live forever ... so far so good
|
|
|
|
|
Ah, how right you are: Winge mode off.
|
|
|
|
|
If formatting is your biggest complaint, you're blaming your tools for your inadequacy.
I use Eclipse which automatically converts tabs to spaces, and yes a macro in Notepad ++ to trim trailing white space, convert tabs to space and save.
Stop whining and learn the language.
|
|
|
|
|
Way too many languages designed by way too many Bjarne Stroustrup wannabe's (but without the skill)
We need a massive cull of languages and there should be no space for ones like Python.....
Computer languages are becoming like normal language, way too many and defended on the most irrational grounds and too the death. Like welsh - its only real use is to confuse tourists and make very long road signs
|
|
|
|
|
What are you talking about? We need more PHPs and Javascripts. We need more Pythons, but only if they come in several incompatible versions. What's all this talk about noise, productivity, reinventing the wheel again and again, or not fighting your language or IDE? "Just shut up and learn the language" (quote in this very topic).
BTW, /s of course. Long live C++ and C#.
|
|
|
|
|
Although I do feel sorry for those poor soles who use languages where you can't have the fun of locating a random memory leak, no wonder modern software engineers take up extreme sports like rubber free bungee jumping.
|
|
|
|
|
Not on embedded devices!
But for desktop stuff with C++, yeah, you have maintain discipline with your allocations and destructors.
Quote: modern software engineers
Those don't exist anymore. Everything is web or middle-ware, nowadays. Didn't you get the memo? Desktop software is dead, Google says so! (never-mind the fact they have a competing OS which only runs sh*tty web apps, or the vested interest in keeping everything on the web so they can snoop and sell data).
You'll take my native software development out of my cold dying hands, even if I have to code everything myself. Thank god for UWP ease of development, I can whip out a working app in half an hour.
|
|
|
|
|
Use PyCharm as IDE for Python.
But if you want curly braces then switch to Perl.
|
|
|
|
|
Use IDLE for Python programs. Much better than Notepad+++ and it helps resolve the tab issue.
|
|
|
|
|
glennPattonWork wrote: I am going to start using Notepad++
Visual Studio supports python since 2015
In theory, theory agrees perfectly with practice.
In practice, this is virtually never the case.
"*the {VOiCE} says: The truth is analog - not digital." - jonathan HICKMAN
|
|
|
|
|
Thanks ... I was just going to ask about this . This makes things a lot easier. Perhaps I will give Python another try ...
|
|
|
|
|
Like some of the other respondents, I was introduced to programming with BASIC and FORTRAN in the '70s. Turbo Pascal was fun to use and was my introduction to functional languages. Still, for most of my career Excel was adequate for data manipulation, analysis and presentation. A few years ago, I began generating 1000 point molecular dynamics data series and Excel fell short of my needs. Some Google research led me to matplotlib and python. I know that views differ, but I am a fan. There are many great libraries, especially for scientific applications. Anaconda bundles an ample collection (including native IDEs) and is trivial to install, even without admin rights on Windows.
I find the VS support for python to be pretty decent. It will auto-indent spaces or tabs cleanly <whisper> use spaces < /whisper> and highlight any inconsistencies. You can choose from several python and Anaconda environments to get satisfactory Intellisense. My only real complaint is the inconsistent performance of the Navigation bar in VS 2017 Community. Frequently, the drop-down will not be populated with the objects in a module, which is annoying. Since VS 15.6, it has been better, but the second-level drop-down (e.g. for functions in a class) is still always empty for me. There is a bit of frustrated discussion about this online and MS repeatedly claims it fixed, but...
Python is not the the right hammer for every nail. Nonetheless, it is a great ancillary tool to have. I hope that it gives you a good second experience.
George
In theory, theory agrees perfectly with practice.
In practice, this is virtually never the case.
"*the {VOiCE} says: The truth is analog - not digital." - jonathan HICKMAN
|
|
|
|
|
haha, as a BASIC guy, I feel the same way about case sensitivity being part of syntax. THIS and this should not be different things!
|
|
|
|