Home Switchboard Unix Administration Red Hat TCP/IP Networks Neoliberalism Toxic Managers
May the source be with you, but remember the KISS principle ;-)
Bigger doesn't imply better. Bigger often is a sign of obesity, of lost control, of overcomplexity, of cancerous cells


News Python -- Scripting language with generators (semi-corportines)

Best Python books for system administrators

Recommended Links Python Braces Debate Pycharm IDE
Tutorials Coroutines Braces Problem IDE environments Jython  
Debugging in Python Algorithms Quotes Python history Tips Etc

PyCharm - Wikipedia

PyCharm is an Integrated Development Environment (IDE) used in computer programming, specifically for the Python language. It is developed by the Czech company JetBrains.[2] It provides code analysis, a graphical debugger, an integrated unit tester, integration with version control systems (VCSes), and supports web development with Django.

PyCharm is cross-platform, with Windows, macOS and Linux versions. The Community Edition is released under the Apache License, and there is also Professional Edition released under a proprietary license - this has extra features.


It competes mainly with a number of other Python-oriented IDEs, including Eclipse's PyDev, and the more broadly focused Komodo IDE.


You can export settings from other user in settings.jar and then import them

On Linux it works well via xrdp  session. 

PyCharm Download Latest Version of PyCharm

Top Visited
Past week
Past month


Old News ;-)

[Mar 19, 2018] PyCharm - Python IDE Full Review

An increasingly popular installation method: "snap install pycharm-community --classic".
Mar 19, 2018 |

​Pycharm is a powerful Integrated Development Environment that can be used to develop Python applications, web apps, and even data analysis tools. Pycharm has everything a python developer needs to develop. The IDE is full of surprises and keyboard shortcuts that will leave you impressed and at the same time satisfied that your projects are completed on time. Good work from JetBrains. Couldn't have done any better.

[Nov 07, 2017] Is PyCharm good - Quora

Nov 07, 2017 |

Cody Jackson , Python book author ( ) Answered Sep 11

I stumbled upon PyCharm a few years ago when my editor of choice (Stani's Python Editor) was no longer maintained. I haven't looked back.

I used the community edition for many years then decided to purchase a copy. While I don't necessarily need all the functionality of the paid version, I want to support the company in their work.

The PEP 8 notifications are nice to have. While PEP 8 is more of a guideline, it certainly helps ensure code looks nice and is easy to work with.

What's better, IMO, is the ability to load anything you want without having to explicitly download it. Import a module that isn't already on your system? PyCharm will let you know and offer to download it for you. Very handy.

I used to use GitKraken for GitHub work but the built-in VCS tools in PyCharm are just as easy to use, so I haven't bothered to download GitKraken for several months now. PyCharm highlights your modified files using color codes, so you know what you have updated, what's new, etc. so you know exactly what is going to be added in your next push. It also shows you what has changed between the different files using diff, which is handy.

PyCharm has built-in support for many different frameworks, the paid version obviously having more support. However, the free version includes Django, HTML, CSS, and JavaScript, which is sufficient for most people.

While the paid version has changed from a perpetual licenses to a subscription model, the monthly cost is only $8 per month for an individual, with certain discounts available.

Overall, PyCharm is the best proprietary Python editor and, unless you prefer completely FOSS software, there is no reason not to use it.

Yosef Dishinger , I dream in Python Answered Sep 28

The other answers have already said most of it, but I would just add that the search and code discovery features of PyCharm are superior to anything else I've used.

I work on a pretty large codebase, and with PyCharm you can search throughout the entire project, or even multiple projects, for a given string. Now it's true that other editors also have this feature, but PyCharm adds something here that other editors don't.

It lets you edit the code where the reference was found, in a panel within the search results window, and simply go through each search result one by one and see and modify the code in each section as you go, without needing to open the different files on their own.

At times when I've needed to do major refactoring this has been a lifesaver. It increased my productivity dramatically.

There are a lot of really nice editors out there, but I haven't come across anything like PyCharm for taming large codebases.

Edward Moseley , Python for programming, R for stats, C/C++ for microcontrollers Answered Aug 27 2016

I'm very much in agreement with User-9321510923064044481

If you begin to use a library that you don't have installed, PyCharm will let you know and makes the installation process really seamless. RStudio could actually probably take a page out of PyCharm's playbook, there.

I use the integrated python console very frequently for prototyping.

There's also this "Tip of the day" popup that I always mean to shut off but well sometimes they are good tips.

This may be nit-picky, but I especially agree that I don't use the integrated VCS , and until they find a more elegant way to integrate it I will stick to git on my command line.

[Nov 07, 2017] How to use Python interactively in PyCharm

Nov 07, 2017 |

Tony Flury , Freelance s/w developer Answered Apr 2

PyCharn when it starts will also start a python terminal as part of the project window. Look along the bottom where you will have tabs such as console and terminal.

PyCharn also offers integration with Jupiter notebook, but I haven't tried to use that feature yet.

Zdenko Hrcek , enjoying programming in Python Answered Apr 2

In main menu under Tools there is "Python console" option

Related Questions More Answers Below

[Nov 07, 2017] Should I use PyCharm for programming Python

Nov 07, 2017 |

AP Rajshekhar , Knows Java, Python, Ruby, Go; dabbled in Qt and GTK# Answered Sep 24, 2016

As with any other language, one does not need an IDE, which PyCharm is. However, it has been my experience that having an IDE improves productivity. Same is true with PyCharm.

If you are developing small applications that does not need git integration or PEP8 standards conformation, then you don't need PyCharm However, if you need any of the above, and do not want to use multiple tools (flake8, git-cli/git-cola) manually, then PyCharm is a good choice as it provides the following, apart from autocomplete, from within the IDE:

So, Pycharm improves your productivity quite a bit. Dominic Christoph , Met cofounders at a local meetup Updated Apr 5

It's obviously not necessary, and there are other free editors and IDEs. But in my experience, it is the best option.

I've used both Vim and Emacs and played with Sublime and Atom a bit. Those four editors allow you to highly customize your programming environment. Which some feel is a necessity.

They're all great, but you will miss out on some features that no one (that I know of; if you do, please share) has been able to properly recreate in a regular editor. Mainly, intelligent code navigation and completion. These are the most useful features that I've used, and PyCharm does them **almost** perfectly.

You'll spend much more time navigating code than you will typing code, so it's very helpful to be able to hit a keyboard shortcut and jump to a variable or method's definition/declaration. When you are typing, the intelligent autocomplete will be a big help as well. It's much more useable than the completion engines in editors because it only provides completions which are in scope. There're also Ctags and Gtags available for text editors but they are harder to use, must be customized for every language, and with any medium to large sized project work poorly. Though YMMV.

When it comes down to it, I prefer having features that work really well than the ability to customize. Download the community edition and see for yourself if it works for you. Especially for a beginner, it will save you the time of learning tools, which isn't as important as learning the language, because the UI is self-explanatory.


I would find it unusable without the IdeaVim plugin. The keybindings of Vim are just too good to give up.

I should also mention that Jetbrains IDEs are very customizable themselves. The IdeaVim plugin even has a dotfile.

You'll also find videos on YouTube where programmers try to discourage others from using them because of the distracting number of panes. Though it has a distraction free mode and even without that, if you use it sensibly, you can have it only display the editor and tabs. Pandu Poluan , programmed in Python for nearly a year, to replace complex bash scripts. Answered Mar 24

You don't *have* to use PyCharm, but its features are so good *I* find it essential for Python development.

Things I can't live without:

There are many more PyCharm features, but all the above make PyCharm for me a must-have for Python development.

[Nov 04, 2017] Which is the best book for learning python for absolute beginners on their own?

Nov 04, 2017 |

Robert Love Software Engineer at Google

Mark Lutz's Learning Python is a favorite of many. It is a good book for novice programmers. The new fifth edition is updated to both Python 2.7 and 3.3. Thank you for your feedback! Your response is private. Is this answer still relevant and up to date?

Aditi Sharma , i love coding Answered Jul 10 2016

Originally Answered: Which is the best book for learning Python from beginners to advanced level?

Instead of book, I would advice you to start learning Python from CodesDope which is a wonderful site for starting to learn Python from the absolute beginning. The way its content explains everything step-by-step and in such an amazing typography that makes learning just fun and much more easy. It also provides you with a number of practice questions for each topic so that you can make your topic even stronger by solving its questions just after reading it and you won't have to go around searching for its questions for practice. Moreover, it has a discussion forum which is really very responsive in solving all your doubts instantly.

3.1k Views 11 Upvotes Promoted by Facebook Join Facebook Engineering Leadership. We're hiring! Join our engineering leadership team to help us bring the world closer together. Learn More at Alex Forsyth , Computer science major at MIT Answered Dec 28 2015 Originally Answered: What is the best way to learn to code? Specifically Python.

There are many good websites for learning the basics, but for going a bit deeper, I'd suggest MIT OCW 6.00SC. This is how I learned Python back in 2012 and what ultimately led me to MIT and to major in CS. 6.00 teaches Python syntax but also teaches some basic computer science concepts. There are lectures from John Guttag, which are generally well done and easy to follow. It also provides access to some of the assignments from that semester, which I found extremely useful in actually learning Python.

After completing that, you'd probably have a better idea of what direction you wanted to go. Some examples could be completing further OCW courses or completing projects in Python.

[Sep 18, 2017] Operators and String Formatting in Python Operators

Sep 18, 2017 |


Formatting Strings!Modulus

Although not actually modulus, the Python % operator works similarly in string formatting to interpolate variables into a formatting string. If you've programmed in C, you'll notice that % is much like C's printf(), sprintf(), and fprintf() functions.

There are two forms of %, one of which works with strings and tuples, the other with dictionaries.

StringOperand % TupleOperand 

StringOperand % DictionaryOperand

Both return a new formatted string quickly and easily.

% Tuple String Formatting

In the StringOperand % TupleOperand form, StringOperand represents special directives within the string that help format the tuple. One such directive is %s, which sets up the format string

>>> format = "%s is my friend and %s is %s years old"

and creates two tuples, Ross_Info and Rachael_Info.

>>> Ross_Info = ("Ross", "he", 28)

>>> Rachael_Info = ("Rachael", "she", 28)

The format string operator (%) can be used within a print statement, where you can see that every occurrence of %s is respectively replaced by the items in the tuple.

>>> print (format % Ross_Info) 

Ross is my friend and he is 28 years old 

>>> print (format % Rachael_Info) 

Rachael is my friend and she is 28 years old

Also note that %s automatically converts the last item in the tuple to a reasonable string representation. Here's an example of how it does this using a list:

>>> bowling_scores = [190, 135, 110, 95, 195]

>>> name = "Ross"

>>> strScores = "%s's bowling scores were %s" \

...                                                 % (name, bowling_scores) 

>>> print strScores 

Ross's bowling scores were [190, 135, 110, 95, 195]

First, we create a list variable called bowling_scores and then a string variable called name. We then use a string literal for a format string (StringOperand) and use a tuple containing name and bowling_scores.

Format Directives

Table 3–6 covers all of the format directives and provides a short example of usage for each. Note that the tuple argument containing a single item can be denoted with the % operator as item, or (item).

Table 3–6 Format Directives
Directive Description Interactive Session
%s Represents a value as a string >>> list = ["hi", 1, 1.0, 1L]
>>> "%s" % list
"['hi', 1, 1.0, 1L]"
>>> "list equals %s" % list
"list equals ['hi', 1, 1.0, 1L]"
%i Integer >>> "i = %i" % (5)
'i = 5'
>>> "i = %3i" % (5)
'i = 5'
%d Decimal integer >>> "d = %d" % 5
'd = 5'
>>> "%3d" % (3)
' 3'
%x Hexadecimal integer >>> "%x" % (0xff)
>>> "%x" % (255)
%x Hexadecimal integer >>> "%x" % (0xff)
>>> "%x" % (255)
%o Octal integer >>> "%o" % (255)
>>> "%o" % (0377)
%u Unsigned integer >>> print "%u" % -2000
>>> print "%u" % 2000
%e Float exponent >>> print "%e" % (30000000L)
>>> "%5.2e" % (300000000L)
%f Float >>> "check = %1.2f" % (3000)
'check = 3000.00'
>>> "payment = $%1.2f" % 3000
'payment = $3000.00'
%g Float exponent >>> "%3.3g" % 100
>>> "%3.3g" % 1000000000000L
>>> "%g" % 100
%c ASCII character >>> "%c" % (97)
>>> "%c" % 97
>>> "%c" % (97)

Table 3–7 shows how flags can be used with the format directives to add leading zeroes or spaces to a formatted number. They should be inserted immediately after the %.

Table 3–7 Format Directive Flags
Flag Description Interactive Session
# Forces octal to have a 0 prefix; forces hex to >>> "%#x" % 0xff
have a 0x prefix '0xff'
>>> "%#o" % 0377
+ Forces a positive number to have a sign >>> "%+d" % 100
- Left justification (default is right) >>> "%-5d, %-5d" % (10,10)
'10 , 10 '
" " Precedes a positive number with a blank space >>> "% d,% d" % (-10, 10)
0 0 padding instead of spaces >>> "%05d" % (100,)

Advanced Topic: Using the %d, %i, %f, and %e Directives for Formatting Numbers

The % directives format numeric types: %i works with Integer; %f and %e work with Float with and without scientific notation, respectively.

>>> "%i, %f, %e" % (1000, 1000, 1000) 

'1000, 1000.000000, 10.000000e+002'

Notice how awkward all of those zeroes look. You can limit the length of precision and neaten up your code like this:

>>> "%i, %2.2f, %2.2e" % (1000, 1000, 1000) 

'1000, 1000.00, 10.00e+002'

The %2.2f directive tells Python to format the number as at least two characters and to cut the precision to two characters after the decimal point. This is useful for printing floating-point numbers that represent currency.

>>> "Your monthly payments are $%1.2f" % (payment) 

'Your monthly payments are $444.43'

All % directives have the form %min.precision(type), where min is the minimum length of the field, precision is the length of the mantissa (the numbers on the right side of the decimal point), and type is the type of directive (e, f, i, or d). If the precision field is missing, the directive can take the form %min(type), so, for example, %5d ensures that a decimal number has at least 5 fields and %20f ensures that a floating-point number has at least 20.

Let's look at the use of these directives in an interactive session.

>>> "%5d" % (100,) 

' 100' 

>>> "%20f" % (100,) 

' 100.000000'

Here's how to truncate the float's mantissa to 2 with %20.2f.

>>> "%20.2f" % (100,) 

' 100.00'

The padding that precedes the directive is useful for printing rows and columns of data for reporting because it makes the printed output easy to read. This can be seen in the following example (from ):

     # Create two rows

row1 = (100, 10000, 20000, 50000, 6000, 6, 5) 

row2 = (1.0, 2L, 5, 2000, 56, 6.0, 7) 


      # Print out the rows without formatting 

print "here is an example of the columns not lining up" 

print ´row1´ + "\n" + ´row2´ 



      # Create a format string that forces the number

      # to be at least 3 characters long to the left

      # and 2 characters to the right of the decimal point

format = "(%3.2e, %3.2e, %3.2e, %3.2e, " + \ "%3.2e, %3.2e, %3.2e)" 


      # Create a string for both rows

      # using the format operator

strRow1 = format % row1 

strRow2 = format % row2 

print "here is an example of the columns" + \ 

        " lining up using \%e" 

print strRow1 + "\n" + strRow2 


      # Do it again this time with the %i and %d directive 

format1 = "(%6i, %6i, %6i, %6i, %6i, %6i, %6i)" 

format2 = "(%6d, %6d, %6d, %6d, %6d, %6d, %6d)" 

strRow1 = format1 % row1 

strRow2 = format2 % row2 

print "here is an example of the columns" + \ 

        " lining up using \%i and \%d" 

print strRow1 + "\n" + strRow2 


here is an example of the columns not lining up 

(100, 10000, 20000, 50000, 6000, 6, 5) 

(1.0, 2L, 5, 2000, 56, 6.0, 7) 

here is an example of the columns lining up using \%e 

(1.00e+002, 1.00e+004, 2.00e+004, 5.00e+004, 6.00e+003, 6.00e+000, 5.00e+000) 

(1.00e+000, 2.00e+000, 5.00e+000, 2.00e+003, 5.60e+001, 6.00e+000, 7.00e+000) 

here is an example of the columns lining up using \%i and \%d 

( 100, 10000, 20000, 50000, 6000, 6, 5) 

(     1,         2,         5,   2000,     56, 6, 7)

You can see that the %3.2e directive permits a number to take up only three spaces plus the exponential whereas %6d and %6i permit at least six spaces. Note that %i and %d do the same thing that %e does. Most C programmers are familiar with %d but may not be familiar with %i, which is a recent addition to that language.

String % Dictionary

Another useful Python feature for formatting strings is StringOperand % Dictio-naryOperand. This form allows you to customize and print named fields in the string. %(Income)d formats the value referenced by the Income key. Say, for example, that you have a dictionary like the one here:

Monica = { 

                 "Occupation": "Chef",

                 "Name" : "Monica", 

                 "Dating" : "Chandler",

                 "Income" : 40000 


With %(Income)d, this is expressed as

>>> "%(Income)d" % Monica 


Now let's say you have three best friends, whom you define as dictionaries named Monica, Chandler, and Ross.

Monica = { 

                 "Occupation": "Chef",

                 "Name" : "Monica", 

                 "Dating" : "Chandler", 

                 "Income" : 40000 


Ross = 


                "Occupation": "Scientist Museum Dude",

                "Name" : "Ross", 

                "Dating" : "Rachael", 

                "Income" : 70000 


Chandler =              { 

                "Occupation": "Buyer",

                "Name" : "Chandler", 

                "Dating" : "Monica", 

                "Income" : 65000 


To write them a form letter, you can create a format string called message that uses all of the above dictionaries' keywords.

message = "%(Name)s, %(Occupation)s, %(Dating)s," \ 

                  " %(Income)2.2f"

Notice that %(Income)2.2f formats this with a floating-point precision of 2, which is good for currency. The output is

Chandler, Buyer, Monica, 65000.00 

Ross, Scientist Museum Dude, Rachael, 70000.00 

Monica, Chef, Chandler, 40000.00

You can then print each dictionary using the format string operator.

print message % Chandler 

print message % Ross 

print message % Monica

To generate your form letter and print it out to the screen, you first create a format string called dialog.

dialog = """ 

Hi %(Name)s, 

How are you doing? How is %(Dating)s? 

Are you still seeing %(Dating)s? 

How is work at the office? 

I bet it is hard being a %(Occupation)s. 

I know I could not do it. 


Then you print out each dictionary using the dialog format string with the % format string operator.

print dialog % Ross 

print dialog % Chandler 

print dialog % Monica

The output is

Hi Ross, 

How are you doing? How is Rachael? 

Are you still seeing Rachael? 

How is work at the office? 

I bet it is hard being a Scientist Museum Dude. 

I know I could not do it. 

Hi Chandler, 

How are you doing? How is Monica? 

Are you still seeing Monica? 

How is work at the office? 

I bet it is hard being a Buyer. 

I know I could not do it. 

Hi Monica, 

How are you doing? How is Chandler? 

Are you still seeing Chandler? 

How is work at the office? 

I bet it is hard being a Chef. 

I know I could not do it.

%(Income)d is a useful, flexible feature. You just saw how much time it can save you in writing form letters. Imagine what it can do for writing reports. < Back Page

[Sep 16, 2017] Is Python Really the Fastest-Growing Programming Language?

Sep 16, 2017 |

( 253 Posted by EditorDavid on Saturday September 09, 2017 @09:10PM from the is-simple-better-than-complex? dept. An anonymous reader quotes Stack Overflow Blog: In this post, we'll explore the extraordinary growth of the Python programming language in the last five years, as seen by Stack Overflow traffic within high-income countries.

The term "fastest-growing" can be hard to define precisely, but we make the case that Python has a solid claim to being the fastest-growing major programming language ... June 2017 was the first month that Python was the most visited [programming language] tag on Stack Overflow within high-income nations. This included being the most visited tag within the US and the UK, and in the top 2 in almost all other high income nations (next to either Java or JavaScript). This is especially impressive because in 2012, it was less visited than any of the other 5 languages, and has grown by 2.5-fold in that time .

Part of this is because of the seasonal nature of traffic to Java. Since it's heavily taught in undergraduate courses, Java traffic tends to rise during the fall and spring and drop during the summer. Does Python show a similar growth in the rest of the world, in countries like India, Brazil, Russia and China? Indeed it does.

Outside of high-income countries Python is still the fastest growing major programming language; it simply started at a lower level and the growth began two years later (in 2014 rather than 2012). In fact, the year-over-year growth rate of Python in non-high-income countries is slightly higher than it is in high-income countries ...

We're not looking to contribute to any "language war." The number of users of a language doesn't imply anything about its quality, and certainly can't tell you which language is more appropriate for a particular situation.

With that perspective in mind, however, we believe it's worth understanding what languages make up the developer ecosystem, and how that ecosystem might be changing. This post demonstrated that Python has shown a surprising growth in the last five years, especially within high-income countries.

The post was written by Stack Overflow data scientist David Robinson, who notes that "I used to program primarily in Python, though I have since switched entirely to R."

Recommended Links

Google matched content

Softpanorama Recommended

Top articles


Download PyCharm Python IDE for Professional Developers by JetBrains

PyCharm - The Best Linux Python IDE

PyCharm - Wikipedia


Home Switchboard Unix Administration Red Hat TCP/IP Networks Neoliberalism Toxic Managers
May the source be with you, but remember the KISS principle ;-)
Bigger doesn't imply better. Bigger often is a sign of obesity, of lost control, of overcomplexity, of cancerous cells