Foros del Web » Administración de Sistemas » Unix / Linux »

I want to see how script python change bash

Estas en el tema de I want to see how script python change bash en el foro de Unix / Linux en Foros del Web. I want to see how I can make this work for me with a bash script @import url("http://static.forosdelweb.com/clientscript/vbulletin_css/geshi.css"); Código Python: Ver original #!/usr/bin/python # -*- ...
  #1 (permalink)  
Antiguo 25/08/2022, 20:08
 
Fecha de Ingreso: junio-2012
Ubicación: En el Mundo
Mensajes: 759
Antigüedad: 11 años, 10 meses
Puntos: 10
I want to see how script python change bash

I want to see how I can make this work for me with a bash script

Código Python:
Ver original
  1. #!/usr/bin/python
  2. # -*- coding: utf-8 -*-
  3. import subprocess, os, random, string, sys, shutil, socket
  4. from itertools import cycle, izip
  5.  
  6. class col:
  7.     HEADER = '\033[95m'
  8.     OKBLUE = '\033[94m'
  9.     OKGREEN = '\033[92m'
  10.     WARNING = '\033[93m'
  11.     FAIL = '\033[91m'
  12.     ENDC = '\033[0m'
  13.     BOLD = '\033[1m'
  14.     UNDERLINE = '\033[4m'
  15.  
  16. def printc(rText, rColour=col.OKBLUE, rPadding=0):
  17.     print "%s ┌──────────────────────────────────────────┐ %s" % (rColour, col.ENDC)
  18.     for i in range(rPadding): print "%s │                                          │ %s" % (rColour, col.ENDC)
  19.     print "%s │ %s%s%s │ %s" % (rColour, " "*(20-(len(rText)/2)), rText, " "*(40-(20-(len(rText)/2))-len(rText)), col.ENDC)
  20.     for i in range(rPadding): print "%s │                                          │ %s" % (rColour, col.ENDC)
  21.     print "%s └──────────────────────────────────────────┘ %s" % (rColour, col.ENDC)
  22.     print " "
  23.  
  24. printc("Installation completed!", col.OKGREEN, 2)

Etiquetas: bash, python
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 23:14.