Impossible de lancer le shell de python
Fermé
HellBenito
Messages postés
56
Date d'inscription
vendredi 28 mars 2014
Statut
Membre
Dernière intervention
20 mars 2015
-
9 sept. 2014 à 10:54
HellBenito Messages postés 56 Date d'inscription vendredi 28 mars 2014 Statut Membre Dernière intervention 20 mars 2015 - 9 sept. 2014 à 12:53
HellBenito Messages postés 56 Date d'inscription vendredi 28 mars 2014 Statut Membre Dernière intervention 20 mars 2015 - 9 sept. 2014 à 12:53
A voir également:
- Impossible de lancer le shell de python
- Classic shell windows 11 - Télécharger - Personnalisation
- Citizen code python avis - Accueil - Outils
- Qu'est ce qui se lance au démarrage de l'ordinateur - Guide
- Lancer une application au démarrage windows 10 - Guide
1 réponse
HellBenito
Messages postés
56
Date d'inscription
vendredi 28 mars 2014
Statut
Membre
Dernière intervention
20 mars 2015
9 sept. 2014 à 12:37
9 sept. 2014 à 12:37
Pour ceux qui aurait le même problème ceci vous fera peut être gagner du temps (trouver sur stackoverflow.com) :
Not answering the initial question, but for those who want to use Python interactive session from within Cygwin terminal (for example in mintty) - start Python with "-i" option to tell it explicitly that it needs to run in interactive mode:
$ python -i
The neat way is also to create an alias in your .bashrc (knowing that it is only read for interactive terminal sessions anyway):
alias python='python -i'
Otherwise, Python will not know that it runs in the console, because all Cygwin pty-based terminals (mintty, rxvt and xterm) are recognized as pipes by Windows, not as the console. Therefore, Python thinks there is no console and enters non-interactive mode. So, if you still want interactive mode instead, you need to explicitly tell Python to use it. However, it still won't behave as it normally should - one still won't be able to use HOME or LEFT ARROW keys, and so on.
share|improve this answer
edited Sep 4 '12 at 13:08
answered Sep 3 '12 at 9:34
Timur
2,34411425
J'ai essayé et "well"... camarche!
$ python -i manage.py shell
>>>
Not answering the initial question, but for those who want to use Python interactive session from within Cygwin terminal (for example in mintty) - start Python with "-i" option to tell it explicitly that it needs to run in interactive mode:
$ python -i
The neat way is also to create an alias in your .bashrc (knowing that it is only read for interactive terminal sessions anyway):
alias python='python -i'
Otherwise, Python will not know that it runs in the console, because all Cygwin pty-based terminals (mintty, rxvt and xterm) are recognized as pipes by Windows, not as the console. Therefore, Python thinks there is no console and enters non-interactive mode. So, if you still want interactive mode instead, you need to explicitly tell Python to use it. However, it still won't behave as it normally should - one still won't be able to use HOME or LEFT ARROW keys, and so on.
share|improve this answer
edited Sep 4 '12 at 13:08
answered Sep 3 '12 at 9:34
Timur
2,34411425
J'ai essayé et "well"... camarche!
$ python -i manage.py shell
>>>
9 sept. 2014 à 12:53