Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 14/10/2014, à 07:44

kaalimero

Suppression accidentelle de Python

Bonjour à vous, mon système refusant l'installation de certains logiciels (Qarte) ou de fonctionnalités comme HPLIP, j'ai -dans un moment d'égarement- supprimé les 2 versions de Python installées, à savoir 2.7 et 3. Du coup, fallait s'y attendre, pas mal de choses refusent de s'exécuter, comme la logithèque; et donc plus moyen d'installer quoi que ce soit (GDebi refuse également).

J'ai eu beau réinstaller une version avec le terminal, rien n'y fait; Synaptic s'est mis aussi à faire la gueule, j'ai désormais un magnifique sens interdit en bas de l'écran ("erreur survenue durant la recherche de mises à jour").

Y aurait-il moyen, par ex. par une ligne de commande (magique....) de rétablir la situation, ou dois-je me résoudre à réinstaller mon système?...

Merci d'avance pour vos remarques et suggestions.


Linux, il y a moins bien, mais c'est plus cher....

ASUS UX31A: 12.04.3 64 bit EFI, Gnome 3, Intel Core i5, SSD 128 Go , Ram 4Go.

Hors ligne

#2 Le 14/10/2014, à 08:46

Compte anonymisé

Re : Suppression accidentelle de Python

Et en essayant de faire sur le terminal

sudo apt-get install python3

Cf : Python 3 par l'exemple

sudo apt-get install idle-python3.4

Cf : How to install Python 3.4 on Ubuntu?

en fouillant un peu sur mon ordi, je me suis rendu compte que j'ai
- python 2.7.5-5ubuntu3
- python3-six
- python-six
- python3.4
- python3-uno
- python-qt4
- python3-update-manager
- python-support
- python3-apport
- python-pam
- python-gdbm
- python-apt-common
- python-cups
- python-commandnotfound
- python-smbc
etc...

Dernière modification par NéoUbuntonien (Le 14/10/2014, à 09:13)

#3 Le 14/10/2014, à 09:16

Compte anonymisé

Re : Suppression accidentelle de Python

Le gros problème est que l'on ne voit rien

Pourrais-tu refaire la commande et faire un copier/coller (commande et réponses) puis mettre le tout dans des balises codes ?
code
Balise code (moko138)

essai de faire juste

sudo apt-get install python

Dernière modification par NéoUbuntonien (Le 14/10/2014, à 09:22)

#4 Le 14/10/2014, à 09:19

tiramiseb

Re : Suppression accidentelle de Python

Salut,

Attention, ce dont tu as besoin ce n'est pas python3, c'est python2.7 (paquet "python"). En effet, de nombreux logiciels systèmes sont en Python.

Tu dis que tu les as supprimés : tu as supprimé les paquets ou alors tu as supprimé les exécutables ? C'est important pour savoir ce qu'il faut faire ensuite.

L'erreur que tu retournes en #3 est autre chose, ça n'a pas empêché l'installation de python3. Mais dans l'absolu tu n'as pas besoin de python3 : cette installation ne peut pas résoudre ton problème.

Dernière modification par tiramiseb (Le 14/10/2014, à 09:20)

Hors ligne

#5 Le 14/10/2014, à 09:25

Compte anonymisé

Re : Suppression accidentelle de Python

donc

sudo apt-get install python

ou

sudo apt-get install python2.7

tiramiseb ?

Dernière modification par NéoUbuntonien (Le 14/10/2014, à 09:26)

#6 Le 14/10/2014, à 09:27

tiramiseb

Re : Suppression accidentelle de Python

NéoUbuntonien: oui, s'il a désinstallé les paquets, c'est :

sudo apt-get install python

S'il a juste supprimé les fichiers, c'est autre chose qu'il faut faire.

Hors ligne

#7 Le 14/10/2014, à 09:30

kaalimero

Re : Suppression accidentelle de Python

Désolé, je me suis mal exprimé, j'ai carrément supprimé les 2 dossiers Python (2.7 et 3) dans le système (en sudo)......


Linux, il y a moins bien, mais c'est plus cher....

ASUS UX31A: 12.04.3 64 bit EFI, Gnome 3, Intel Core i5, SSD 128 Go , Ram 4Go.

Hors ligne

#8 Le 14/10/2014, à 09:33

tiramiseb

Re : Suppression accidentelle de Python

Ok, c'est ce que j'imaginais.

Cela veut dire que tu as supprimé des fichiers qui appartiennent à différents paquets qui ne sont même pas nécessairement nommés "python-quelquechose".

Tente la commande suivante :

dpkg -S usr/lib/python | cut -d: -f1 | sort | uniq

Celle-ci devrait te retourner la liste des paquets qui avaient des fichiers dans les répertoires que tu as supprimés.

Si cela fonctionne, tu pourras faire :

sudo apt-get install --reinstall X Y Z

... en remplaçant "X Y Z" par cette liste de paquets.

Hors ligne

#9 Le 14/10/2014, à 09:35

tiramiseb

Re : Suppression accidentelle de Python

Cela étant dit, je n'apporte aucune assurance que cette approche fonctionne.
L'idéal pour retrouver un système propre est de réinstaller...

Et, de manière générale, ne JAMAIS supprimer des fichiers systèmes (dans /usr, /var, tout ça).
Pour les prochaines fois, garde à l'esprit que "sudo" veut dire « je vais peut-être faire une connerie ».

Dernière modification par tiramiseb (Le 14/10/2014, à 09:37)

Hors ligne

#10 Le 14/10/2014, à 09:39

kaalimero

Re : Suppression accidentelle de Python

Merci pour vos réponses.....voici ce que donne "dpkg -S usr/lib/python | cut -d: -f1 | sort | uniq":


mike@mike-UX31A:~$ dpkg -S usr/lib/python | cut -d: -f1 | sort | uniq
adium-theme-ubuntu
apturl
apturl-common
apturl-common, apturl
apt-xapian-index
blueman
blueman, cairo-dock-plug-ins-dbus-interface-python, python-wxversion, python-gmenu, python-glade2, python-gnome2, python-support, gir1.2-dee-1.0, lsb-release, gufw, debconf, python-appindicator, python-pyorbit, python-qt4-dbus, python-compizconfig, usb-creator-common, gnome-tweak-tool, software-properties-common, software-properties-gtk, ubuntu-sso-client-gtk, ubuntu-system-service, ubuntuone-couch, ufw, unattended-upgrades, update-manager-core, update-manager, xdiagnose, python-uno, python-wadllib, python-xapian, python-xdg, python-xkit, python-zeitgeist, python-zope.interface, python2.7, sessioninstaller, software-center-aptdaemon-plugins, python-smbc, python-software-properties, python-twisted-bin, python-twisted-core, python-twisted-names, python-twisted-web, python-ubuntu-sso-client, python-ubuntuone-client, python-ubuntuone-control-panel, python-ubuntuone-storageprotocol, python-pkg-resources, python-problem-report, python-protobuf, python-pycurl, python-pyinotify, python-renderpm, python-reportlab-accel, python-reportlab, python-serial, python-simplejson, python-libxml2, python-mako, python-markupsafe, python-notify, python-oauth, python-openssl, python-packagekit, python-pam, python-pexpect, python-piston-mini-client, python-gobject-2, python-gst0.10, python-gtk2, python-httplib2, python-ibus, python-imaging, python-keyring, python-launchpadlib, python-lazr.restfulclient, python-lazr.uri, python-dbus, python-debian, python-debtagshw, python-defer, python-dirspec, python-gconf, python-gi-cairo, python-gi, python-gnomekeyring, python-gnupginterface, python-aptdaemon.gtk3widgets, python-aptdaemon, python-aptdaemon.pkcompat, python-cairo, python-chardet, python-configglue, python-crypto, python-cups, python-cupshelpers, python-dateutil, command-not-found, duplicity, gedit, jockey-common, language-selector-common, language-selector-gnome, nvidia-common, oneconf, python-apport, python-apt, gnome-applets-data, python-wxgtk2.8, python-numpy, python-visual, adium-theme-ubuntu, apt-xapian-index, apturl-common, apturl, checkbox-qt, checkbox
cairo-dock-plug-ins-dbus-interface-python
checkbox
checkbox-qt
command-not-found
debconf
duplicity
gedit
gedit, python-gi-cairo, python-gi, gir1.2-dee-1.0
gedit, python-gi, gir1.2-dee-1.0
gir1.2-dee-1.0
gnome-applets-data
gnome-tweak-tool
gufw
jockey-common
language-selector-common
language-selector-common, language-selector-gnome
language-selector-gnome
libpython2.7
libpython2.7, python2.7-minimal
lsb-release
nvidia-common
oneconf
python2.7
python2.7-minimal
python2.7-minimal, python2.7
python3.2
python3.2-minimal
python3.2-minimal, python3.2
python-appindicator
python-apport
python-apt
python-aptdaemon
python-aptdaemon.gtk3widgets
python-aptdaemon.gtk3widgets, python-aptdaemon, python-aptdaemon.pkcompat
python-aptdaemon.pkcompat
python-cairo
python-chardet
python-compizconfig
python-compizconfig, usb-creator-common, gnome-tweak-tool, blueman, cairo-dock-plug-ins-dbus-interface-python, python-wxversion, python-gmenu, python-glade2, python-gnome2, python-support, update-manager-core, update-manager, xdiagnose, gir1.2-dee-1.0, lsb-release, gufw, debconf, python-appindicator, python-pyorbit, python-qt4-dbus, python2.7, sessioninstaller, software-center-aptdaemon-plugins, software-properties-common, software-properties-gtk, ubuntu-sso-client-gtk, ubuntu-system-service, ubuntuone-couch, ufw, unattended-upgrades, python-ubuntuone-control-panel, python-ubuntuone-storageprotocol, python-uno, python-wadllib, python-xapian, python-xdg, python-xkit, python-zeitgeist, python-zope.interface, python2.7-minimal, python-serial, python-simplejson, python-smbc, python-software-properties, python-twisted-bin, python-twisted-core, python-twisted-names, python-twisted-web, python-ubuntu-sso-client, python-ubuntuone-client, python-pexpect, python-piston-mini-client, python-pkg-resources, python-problem-report, python-protobuf, python-pycurl, python-pyinotify, python-renderpm, python-reportlab-accel, python-reportlab, python-lazr.restfulclient, python-lazr.uri, python-libxml2, python-mako, python-markupsafe, python-notify, python-oauth, python-openssl, python-packagekit, python-pam, python-gnomekeyring, python-gnupginterface, python-gobject-2, python-gst0.10, python-gtk2, python-httplib2, python-ibus, python-imaging, python-keyring, python-launchpadlib, python-dateutil, python-dbus, python-debian, python-debtagshw, python-defer, python-dirspec, python-gconf, python-gdbm, python-gi-cairo, python-gi, python-apt, python-aptdaemon.gtk3widgets, python-aptdaemon, python-aptdaemon.pkcompat, python-cairo, python-chardet, python-configglue, python-crypto, python-cups, python-cupshelpers, command-not-found, duplicity, gedit, jockey-common, language-selector-common, language-selector-gnome, libpython2.7, nvidia-common, oneconf, python-apport, gnome-applets-data, python-wxgtk2.8, python-numpy, python-visual, adium-theme-ubuntu, apt-xapian-index, apturl-common, apturl, checkbox-qt, checkbox
python-configglue
python-crypto
python-cups
python-cupshelpers
python-dateutil
python-dbus
python-dbus, python-qt4-dbus
python-debian
python-debtagshw
python-defer
python-dirspec
python-gconf
python-gconf, python-gnomekeyring, python-gobject-2, python-gtk2, python-notify, python-glade2, python-gnome2
python-gdbm
python-gdbm, python2.7-minimal, python2.7
python-gi
python-gi-cairo
python-glade2
python-gmenu
python-gnome2
python-gnomekeyring
python-gnupginterface
python-gobject-2
python-gst0.10
python-gtk2
python-gtk2, python-glade2
python-httplib2
python-ibus
python-imaging
python-keyring
python-launchpadlib
python-lazr.restfulclient
python-lazr.restfulclient, python-lazr.uri
python-lazr.uri
python-libxml2
python-mako
python-markupsafe
python-notify
python-numpy
python-oauth
python-openssl
python-packagekit
python-pam
python-pexpect
python-piston-mini-client
python-pkg-resources
python-problem-report
python-protobuf
python-pycurl
python-pyinotify
python-pyorbit
python-qt4-dbus
python-renderpm
python-reportlab
python-reportlab-accel
python-serial
python-simplejson
python-smbc
python-software-properties
python-software-properties, software-properties-common, software-properties-gtk
python-support
python-twisted-bin
python-twisted-bin, python-twisted-core
python-twisted-bin, python-twisted-core, python-twisted-names, python-twisted-web
python-twisted-core
python-twisted-core, python-twisted-names, python-twisted-web
python-twisted-names
python-twisted-web
python-ubuntuone-client
python-ubuntuone-control-panel
python-ubuntuone-storageprotocol
python-ubuntu-sso-client
python-ubuntu-sso-client, ubuntu-sso-client-gtk
python-uno
python-visual
python-wadllib
python-wxgtk2.8
python-wxversion
python-xapian
python-xdg
python-xkit
python-zeitgeist
python-zope.interface
sessioninstaller
software-center-aptdaemon-plugins
software-properties-common
software-properties-gtk
ubuntuone-couch
ubuntu-sso-client-gtk
ubuntu-system-service
ufw
unattended-upgrades
update-manager
update-manager-core
update-manager-core, update-manager
usb-creator-common
xdiagnose
mike@mike-UX31A:~$ 

Linux, il y a moins bien, mais c'est plus cher....

ASUS UX31A: 12.04.3 64 bit EFI, Gnome 3, Intel Core i5, SSD 128 Go , Ram 4Go.

Hors ligne

#11 Le 14/10/2014, à 09:40

kaalimero

Re : Suppression accidentelle de Python

C'est toute cette liste de paquets qu'il faut ensuite intégrer à "sudo apt-get install --reinstall X Y Z"?......


Linux, il y a moins bien, mais c'est plus cher....

ASUS UX31A: 12.04.3 64 bit EFI, Gnome 3, Intel Core i5, SSD 128 Go , Ram 4Go.

Hors ligne

#12 Le 14/10/2014, à 09:41

tiramiseb

Re : Suppression accidentelle de Python

Voilà, c'est donc la liste de tous les paquets pour lesquels tu as supprimé des fichiers.
Il faut tous les réinstaller avec "sudo apt-get install --reinstall"... ou alors tu réinstalles tout le système.

Hors ligne

#13 Le 14/10/2014, à 09:41

tiramiseb

Re : Suppression accidentelle de Python

Il faut bien sûr enlever les virgules et tout mettre sur une seule ligne, séparés par des espaces.

Hors ligne

#14 Le 14/10/2014, à 09:46

kaalimero

Re : Suppression accidentelle de Python

Ok j'y vois plus clair....et si je ne réinstalle que les paquets Python, mon système risque de rester bancal?...


Linux, il y a moins bien, mais c'est plus cher....

ASUS UX31A: 12.04.3 64 bit EFI, Gnome 3, Intel Core i5, SSD 128 Go , Ram 4Go.

Hors ligne

#15 Le 14/10/2014, à 09:57

Compte anonymisé

Re : Suppression accidentelle de Python

Voilà le travail, à toi de jouer wink
Attention de bien TOUT prendre

sudo apt-get install --reinstall adium-theme-ubuntu apturl apturl-common apturl-common apturl apt-xapian-index blueman blueman cairo-dock-plug-ins-dbus-interface-python python-wxversion python-gmenu python-glade2 python-gnome2 python-support gir1.2-dee-1.0 lsb-release gufw debconf python-appindicator python-pyorbit python-qt4-dbus python-compizconfig usb-creator-common gnome-tweak-tool software-properties-common software-properties-gtk ubuntu-sso-client-gtk ubuntu-system-service ubuntuone-couch ufw unattended-upgrades update-manager-core update-manager xdiagnose python-uno python-wadllib python-xapian python-xdg python-xkit python-zeitgeist python-zope.interface python2.7 sessioninstaller software-center-aptdaemon-plugins python-smbc python-software-properties python-twisted-bin python-twisted-core python-twisted-names python-twisted-web python-ubuntu-sso-client python-ubuntuone-client python-ubuntuone-control-panel python-ubuntuone-storageprotocol python-pkg-resources python-problem-report python-protobuf python-pycurl python-pyinotify python-renderpm python-reportlab-accel python-reportlab python-serial python-simplejson python-libxml2 python-mako python-markupsafe python-notify python-oauth python-openssl python-packagekit python-pam python-pexpect python-piston-mini-client python-gobject-2 python-gst0.10 python-gtk2 python-httplib2 python-ibus python-imaging python-keyring python-launchpadlib python-lazr.restfulclient python-lazr.uri python-dbus python-debian python-debtagshw python-defer python-dirspec python-gconf python-gi-cairo python-gi python-gnomekeyring python-gnupginterface python-aptdaemon.gtk3widgets python-aptdaemon python-aptdaemon.pkcompat python-cairo python-chardet python-configglue python-crypto python-cups python-cupshelpers python-dateutil command-not-found duplicity gedit jockey-common language-selector-common language-selector-gnome nvidia-common oneconf python-apport python-apt gnome-applets-data python-wxgtk2.8 python-numpy python-visual adium-theme-ubuntu apt-xapian-index apturl-common apturl checkbox-qt checkbox cairo-dock-plug-ins-dbus-interface-python checkbox checkbox-qt command-not-found debconf duplicity gedit gedit python-gi-cairo python-gi gir1.2-dee-1.0 gedit python-gi gir1.2-dee-1.0 gir1.2-dee-1.0 gnome-applets-data gnome-tweak-tool gufw jockey-common language-selector-common language-selector-common language-selector-gnome language-selector-gnome libpython2.7 libpython2.7 python2.7-minimal lsb-release nvidia-common oneconf python2.7 python2.7-minimal python2.7-minimal python2.7 python3.2 python3.2-minimal python3.2-minimal python3.2 python-appindicator python-apport python-apt python-aptdaemon python-aptdaemon.gtk3widgets python-aptdaemon.gtk3widgets python-aptdaemon python-aptdaemon.pkcompat python-aptdaemon.pkcompat python-cairo python-chardet python-compizconfig python-compizconfig usb-creator-common gnome-tweak-tool blueman cairo-dock-plug-ins-dbus-interface-python python-wxversion python-gmenu python-glade2 python-gnome2 python-support update-manager-core update-manager xdiagnose gir1.2-dee-1.0 lsb-release gufw debconf python-appindicator python-pyorbit python-qt4-dbus python2.7 sessioninstaller software-center-aptdaemon-plugins software-properties-common software-properties-gtk ubuntu-sso-client-gtk ubuntu-system-service ubuntuone-couch ufw unattended-upgrades python-ubuntuone-control-panel python-ubuntuone-storageprotocol python-uno python-wadllib python-xapian python-xdg python-xkit python-zeitgeist python-zope.interface python2.7-minimal python-serial python-simplejson python-smbc python-software-properties python-twisted-bin python-twisted-core python-twisted-names python-twisted-web python-ubuntu-sso-client python-ubuntuone-client python-pexpect python-piston-mini-client python-pkg-resources python-problem-report python-protobuf python-pycurl python-pyinotify python-renderpm python-reportlab-accel python-reportlab python-lazr.restfulclient python-lazr.uri python-libxml2 python-mako python-markupsafe python-notify python-oauth python-openssl python-packagekit python-pam python-gnomekeyring python-gnupginterface python-gobject-2 python-gst0.10 python-gtk2 python-httplib2 python-ibus python-imaging python-keyring python-launchpadlib python-dateutil python-dbus python-debian python-debtagshw python-defer python-dirspec python-gconf python-gdbm python-gi-cairo python-gi python-apt python-aptdaemon.gtk3widgets python-aptdaemon python-aptdaemon.pkcompat python-cairo python-chardet python-configglue python-crypto python-cups python-cupshelpers command-not-found duplicity gedit jockey-common language-selector-common language-selector-gnome libpython2.7 nvidia-common oneconf python-apport gnome-applets-data python-wxgtk2.8 python-numpy python-visual adium-theme-ubuntu apt-xapian-index apturl-common apturl checkbox-qt checkbox python-configglue python-crypto python-cups python-cupshelpers python-dateutil python-dbus python-dbus python-qt4-dbus python-debian python-debtagshw python-defer python-dirspec python-gconf python-gconf python-gnomekeyring python-gobject-2 python-gtk2 python-notify python-glade2 python-gnome2 python-gdbm python-gdbm python2.7-minimal python2.7 python-gi python-gi-cairo python-glade2 python-gmenu python-gnome2 python-gnomekeyring python-gnupginterface python-gobject-2 python-gst0.10 python-gtk2 python-gtk2 python-glade2 python-httplib2 python-ibus python-imaging python-keyring python-launchpadlib python-lazr.restfulclient python-lazr.restfulclient python-lazr.uri python-lazr.uri python-libxml2 python-mako python-markupsafe python-notify python-numpy python-oauth python-openssl python-packagekit python-pam python-pexpect python-piston-mini-client python-pkg-resources python-problem-report python-protobuf python-pycurl python-pyinotify python-pyorbit python-qt4-dbus python-renderpm python-reportlab python-reportlab-accel python-serial python-simplejson python-smbc python-software-properties python-software-properties software-properties-common software-properties-gtk python-support python-twisted-bin python-twisted-bin python-twisted-core python-twisted-bin python-twisted-core python-twisted-names python-twisted-web python-twisted-core python-twisted-core python-twisted-names python-twisted-web python-twisted-names python-twisted-web python-ubuntuone-client python-ubuntuone-control-panel python-ubuntuone-storageprotocol python-ubuntu-sso-client python-ubuntu-sso-client ubuntu-sso-client-gtk python-uno python-visual python-wadllib python-wxgtk2.8 python-wxversion python-xapian python-xdg python-xkit python-zeitgeist python-zope.interface sessioninstaller software-center-aptdaemon-plugins software-properties-common software-properties-gtk ubuntuone-couch ubuntu-sso-client-gtk ubuntu-system-service ufw unattended-upgrades update-manager update-manager-core update-manager-core update-manager usb-creator-common xdiagnose

#16 Le 14/10/2014, à 10:04

kaalimero

Re : Suppression accidentelle de Python

Je rêve.....NéoUbuntonien m'a préparé la commande ad hoc, elle est toute prête, y a plus qu'à copier-coller.....un grand merci à toi, t'es trop top!


Linux, il y a moins bien, mais c'est plus cher....

ASUS UX31A: 12.04.3 64 bit EFI, Gnome 3, Intel Core i5, SSD 128 Go , Ram 4Go.

Hors ligne

#17 Le 14/10/2014, à 10:14

tiramiseb

Re : Suppression accidentelle de Python

et si je ne réinstalle que les paquets Python, mon système risque de rester bancal?...

Bien sûr, si tu ne réinstallais que les paquets Python, ton système serait bancal : tous les autres logiciels auraient des fichiers en moins !

NéoUbuntonien : smile bah ça c'est gentil smile

Hors ligne

#18 Le 14/10/2014, à 10:35

Compte anonymisé

Re : Suppression accidentelle de Python

tiramiseb a écrit :

et si je ne réinstalle que les paquets Python, mon système risque de rester bancal?...

Bien sûr, si tu ne réinstallais que les paquets Python, ton système serait bancal : tous les autres logiciels auraient des fichiers en moins !

NéoUbuntonien : smile bah ça c'est gentil smile

Normal, je suis gentil, tous comme toi qui prend du temps pour aider les autres avant et après ton boulot smile

kaalimero a écrit :

Je rêve.....NéoUbuntonien m'a préparé la commande ad hoc, elle est toute prête, y a plus qu'à copier-coller.....un grand merci à toi, t'es trop top!

Normal, il t'était impossible de le faire toi même étant donné qu'il te faut réinstaller le logiciel gedit
en suite c'est une suppression des virgules (il y a une commande pour retirer toutes les virgules) et mettre toutes ces lignes dans une seule et même ligne (là c'est une ligne à la foi, faut pas déconner... wink )
Un peu fastidieux mais dans l'ensemble ça va assez vite smile

#19 Le 14/10/2014, à 10:39

tiramiseb

Re : Suppression accidentelle de Python

avant et après ton boulot

Surtout pendant mon boulot, tu sais. J'ai décidé de passer environ 25% de mon temps à aider sur ce forum au lieu de bosser pour des clients (d'ailleurs ces derniers temps ça tourne plutôt autour de 30 ou 35%).

mettre toutes ces lignes dans une seule et même ligne (là c'est une ligne à la foi, faut pas déconner... wink )

$ echo -e "plop\nplop\nplop"
plop
plop
plop
sebastien@amaretto:~$ echo -e "plop\nplop\nplop" | tr '\n' ' '
plop plop plop 

big_smile roll

Hors ligne

#20 Le 14/10/2014, à 10:44

kaalimero

Re : Suppression accidentelle de Python

Ok bonne journée à toi, au plaisir!


Linux, il y a moins bien, mais c'est plus cher....

ASUS UX31A: 12.04.3 64 bit EFI, Gnome 3, Intel Core i5, SSD 128 Go , Ram 4Go.

Hors ligne

#21 Le 14/10/2014, à 10:48

Compte anonymisé

Re : Suppression accidentelle de Python

tiramiseb a écrit :

avant et après ton boulot

Surtout pendant mon boulot, tu sais. J'ai décidé de passer environ 25% de mon temps à aider sur ce forum au lieu de bosser pour des clients (d'ailleurs ces derniers temps ça tourne plutôt autour de 30 ou 35%).

mettre toutes ces lignes dans une seule et même ligne (là c'est une ligne à la foi, faut pas déconner... wink )

$ echo -e "plop\nplop\nplop"
plop
plop
plop
sebastien@amaretto:~$ echo -e "plop\nplop\nplop" | tr '\n' ' '
plop plop plop 

big_smile roll

Je voulais dire que ce n'est pas automatique (contrairement au retrait des virgules) et qu'il fallait le faire une par une.. effectivement ce n'est ni long, ni compliqué non plus
big_smile

#22 Le 14/10/2014, à 10:49

Compte anonymisé

Re : Suppression accidentelle de Python

kaalimero a écrit :

Ok bonne journée à toi, au plaisir!

tout est renté dans l'ordre ?

#23 Le 14/10/2014, à 10:49

tiramiseb

Re : Suppression accidentelle de Python

Je voulais dire que ce n'est pas automatique (contrairement au retrait des virgules) et qu'il fallait le faire une par une.. effectivement ce n'est ni long, ni compliqué non plus

Ben si, justement, la commande « tr '\n' ' ' » automatise la transformation des retours à la ligne en espaces. C'est ce que j'essaie de te montrer par cet exemple smile

Hors ligne

#24 Le 14/10/2014, à 10:51

Compte anonymisé

Re : Suppression accidentelle de Python

tiramiseb a écrit :

Je voulais dire que ce n'est pas automatique (contrairement au retrait des virgules) et qu'il fallait le faire une par une.. effectivement ce n'est ni long, ni compliqué non plus

Ben si, justement, la commande « tr '\n' ' ' » automatise la transformation des retours à la ligne en espaces. C'est ce que j'essaie de te montrer par cet exemple smile

Ok, je ne connaissais pas... encore une chose que j'ai appris aujourd'hui
Mais cette commande est en console et pas dans Gedit, si ?

#25 Le 14/10/2014, à 10:58

kaalimero

Re : Suppression accidentelle de Python

J'essaierai cette commande dans la journée, car là, mon petit UX31A (une merveille, notamment l'écran) a tendance à chauffer; je vais le faire dormir un petit peu; j'envisage d'ailleurs de lui ouvrir les entrailles pour un petit nettoyage d'automne.

Il a déjà 1 an le petit, et aucune maintenance jusqu'à présent. Le moment est venu, car il monte assez vite dans les tours à la moindre occasion, et ça m'effraye un peu.....à noter par ailleurs, la batterie qui ne tient plus que 2 heures, ceci explique peut-être cela (surchauffe).


Linux, il y a moins bien, mais c'est plus cher....

ASUS UX31A: 12.04.3 64 bit EFI, Gnome 3, Intel Core i5, SSD 128 Go , Ram 4Go.

Hors ligne