issue135:python
Différences
Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédente | ||
issue135:python [2018/08/01 16:23] – créée auntiee | issue135:python [2018/08/13 14:53] (Version actuelle) – christo.2so | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | When I meet another programmer for the first time, the first question that they usually ask is what languages do I program in. Their second question is usually what do I write my code in. Is it Emacs, VIM, a text editor, or an IDE. I surprise most programmers with my answer of Geany. | + | **When I meet another programmer for the first time, the first question that they usually ask is what languages do I program in. Their second question is usually what do I write my code in. Is it Emacs, VIM, a text editor, or an IDE. I surprise most programmers with my answer of Geany. |
One of the things that makes (and keeps) a programmer productive is an efficient IDE. Over the years, I've tried many different IDE applications and code editors, and I always come back to Geany. While Geany is not “officially” an IDE, it does the job, since it allows you to write code, and call a build process (for languages like C/C++). | One of the things that makes (and keeps) a programmer productive is an efficient IDE. Over the years, I've tried many different IDE applications and code editors, and I always come back to Geany. While Geany is not “officially” an IDE, it does the job, since it allows you to write code, and call a build process (for languages like C/C++). | ||
Ligne 5: | Ligne 5: | ||
It’s not flashy at first glance, but rather stark and bland. But once you start working with it, the lack of flashy is not a bad thing. With one exception, Geany has everything that a Python programmer (or most other programmers) would want. That one exception is debugging, which isn't really that big of an issue for me. | It’s not flashy at first glance, but rather stark and bland. But once you start working with it, the lack of flashy is not a bad thing. With one exception, Geany has everything that a Python programmer (or most other programmers) would want. That one exception is debugging, which isn't really that big of an issue for me. | ||
- | Let's take a look at Geany in depth. | + | Let's take a look at Geany in depth.** |
- | Like any modern IDE, Geany has multiple editor tabs, which makes it easy to deal with most large projects. It also has support for split windows, either side-by-side or stacked. | + | Quand je rencontre un autre programmeur pour la première fois, il me demande habituellement les langages que j' |
+ | |||
+ | Une des choses qui rendent (et gardent) un programmeur productif est un EDI efficace. Depuis des années, j' | ||
+ | |||
+ | Au premier regard, ce n'est pas très tape-à-l' | ||
+ | |||
+ | Examinons Geany en détail. | ||
+ | |||
+ | |||
+ | |||
+ | **Like any modern IDE, Geany has multiple editor tabs, which makes it easy to deal with most large projects. It also has support for split windows, either side-by-side or stacked. | ||
This makes it very easy for me to see the definition of a function that I’m writing a call to, so that I know all of the parameters that I need to provide and in what order. | This makes it very easy for me to see the definition of a function that I’m writing a call to, so that I know all of the parameters that I need to provide and in what order. | ||
Ligne 15: | Ligne 25: | ||
This shows all of the functions that are in the current program, as well as the line number on which they are defined. Again, for me, this is a fantastic memory aid. | This shows all of the functions that are in the current program, as well as the line number on which they are defined. Again, for me, this is a fantastic memory aid. | ||
- | Of course, Geany also has themes, from dark to light and pretty much anywhere in between, with over 30 different themes pre-defined. These are available as an add-on package. | + | Of course, Geany also has themes, from dark to light and pretty much anywhere in between, with over 30 different themes pre-defined. These are available as an add-on package.** |
- | Another thing that many IDEs provide these days is snippet support, which are bits of preset code that can be inserted by typing a keyword and then pressing the <Tab> key. Shown top right is an example of some of the predefined snippets... | + | Comme tout EDI moderne, Geany comporte de multiples onglets d' |
+ | |||
+ | Ainsi, il est très facile pour moi de voir la définition d'une fonction pour laquelle je crée un appel, car je peux connaître tous les paramètres que je dois fournir et leur ordre. | ||
+ | |||
+ | Un des éléments qui me plaisent le plus chez Geany est la barre latérale « symbols ». | ||
+ | |||
+ | Celle-ci montre toutes les fonctions du programme actuel ainsi que le numéro de la ligne où elles sont définies. À nouveau, pour moi c'est un aide-mémoire fantastique. | ||
+ | |||
+ | Bien entendu, Geany propose aussi des thèmes, de très sombre à très clair et à peu près tout ce qu'il y a entre les deux, avec plus de 30 thèmes prédéfinis différents. Ils sont disponibles sous forme de paquets d' | ||
+ | |||
+ | **Another thing that many IDEs provide these days is snippet support, which are bits of preset code that can be inserted by typing a keyword and then pressing the <Tab> key. Shown top right is an example of some of the predefined snippets... | ||
So, if you wanted to start a for loop in Python, all you have to do is type: | So, if you wanted to start a for loop in Python, all you have to do is type: | ||
Ligne 33: | Ligne 53: | ||
# =========================== | # =========================== | ||
- | I can just fill in the blank with whatever I need at the time. | + | I can just fill in the blank with whatever I need at the time.** |
- | Of course, since Geany handles multiple programming languages, the snippets are language dependant, so you have to either save the file as a ‘.py’ file before you can use the snippet feature, or you can use the menu option Document|Set Filetype|Scripting Languages|Python source file. | + | Une autre chose que pas mal d'EDI fournissent de nos jours est le support des extraits de code, ce sont des petits bouts de code pré-établis qui peuvent être insérés en tapant un mot-clé, puis en appuyant sur la touche Tab. En haut à droite, se trouve un exemple de quelques extraits de code prédéfinis. |
+ | |||
+ | Ainsi, si vous vouliez démarrer une boucle for en Python, tout ce qu'il faut faire est de taper : | ||
+ | |||
+ | for | ||
+ | |||
+ | ...puis appuyez sur la touche Tab (avant de taper l' | ||
+ | |||
+ | for i in xrange(_): | ||
+ | |||
+ | ... avec le curseur à l' | ||
+ | |||
+ | # =========================== | ||
+ | # _ | ||
+ | # =========================== | ||
+ | |||
+ | Il me suffit de remplir l' | ||
+ | |||
+ | |||
+ | **Of course, since Geany handles multiple programming languages, the snippets are language dependant, so you have to either save the file as a ‘.py’ file before you can use the snippet feature, or you can use the menu option Document|Set Filetype|Scripting Languages|Python source file. | ||
Keyboard shortcuts abound that take care of many of my work methods. As I’m programming away, sometimes I decide to add something that I wasn’t planning on when I did the original design. Many times, for example, I decide in midstream to add a Try|Except around a block of code. This requires the existing code to be indented. A simple < | Keyboard shortcuts abound that take care of many of my work methods. As I’m programming away, sometimes I decide to add something that I wasn’t planning on when I did the original design. Many times, for example, I decide in midstream to add a Try|Except around a block of code. This requires the existing code to be indented. A simple < | ||
- | Another wonderful thing about Geany is that I can run my code directly from the Editor by clicking on the ‘Run’ icon, or by pressing <F5>. By default, right now, I’ve got it set to use Python 2.x. If I want to run under Python 3.x, I simply use the Build menu options and select the option I’ve got set up for using Python 3. Again, many editors/ | + | Another wonderful thing about Geany is that I can run my code directly from the Editor by clicking on the ‘Run’ icon, or by pressing <F5>. By default, right now, I’ve got it set to use Python 2.x. If I want to run under Python 3.x, I simply use the Build menu options and select the option I’ve got set up for using Python 3. Again, many editors/ |
+ | |||
+ | Bien entendu, puisque Geany gère de multiples langages de programmation, | ||
+ | |||
+ | Geany fourmille de raccourcis claviers qui correspondent à beaucoup de mes méthodes de travail. Pendant que je suis au milieu d'un programme, je décide parfois d' | ||
+ | |||
+ | Un autre truc génial chez Geany est que je peux lancer mon code directement à partir de l' | ||
+ | |||
+ | **Yes, many of the better modern IDEs have most, if not all, of the features I’ve outlined here, but I find that Geany is easier to deploy them when I need them. Add the fact that Geany is Free, available for most operating systems, and is open source; I can be productive under whatever environment I’m using. Please take all of my comments as my own opinions and pertain to only my preferences. | ||
+ | Until next time, have a great month.** | ||
- | Yes, many of the better modern IDEs have most, if not all, of the features I’ve outlined here, but I find that Geany is easier to deploy them when I need them. Add the fact that Geany is Free, available for most operating systems, and is open source; I can be productive under whatever environment I’m using. Please take all of my comments as my own opinions | + | Oui, il est vrai que beaucoup des meilleurs EDI modernes proposent la plupart, pour ne pas dire l' |
- | Until next time, have a great month. | + | À la prochaine fois ; passez un excellent mois. |
issue135/python.1533133427.txt.gz · Dernière modification : 2018/08/01 16:23 de auntiee