[Python] Lanciare

2008-03-03 Per discussione andrea lucaroni
Salve a tutti
Vorrei  lanciare comandi di schell dentro un mio script in python, aspettare
che terminino per tornare nel mio script come posso fare?
Questi comandi non appartengono al modulo os, come li posso implementare in
questo modulo.

Grazie
Ciao
Andrea
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] Lanciare

2008-03-03 Per discussione Marco Mariani
andrea lucaroni wrote:

> Vorrei  lanciare comandi di schell dentro un mio script in python, 
> aspettare che terminino per tornare nel mio script come posso fare?
> Questi comandi non appartengono al modulo os, come li posso 
> implementare in questo modulo.

import subprocess

subprocess.Popen(args).wait()

#args should be a string, or a sequence of program arguments.  The
#program to execute is normally the first item in the args sequence or
#string, but can be explicitly set by using the executable argument.


___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] Lanciare

2008-03-03 Per discussione andrea lucaroni
Grazie della risposta, ma non lo trovo che me lo devo scaricare
e come funziona ?

Ciao
Andrea

2008/3/3, Marco Mariani <[EMAIL PROTECTED]>:
>
> andrea lucaroni wrote:
>
> > Vorrei  lanciare comandi di schell dentro un mio script in python,
> > aspettare che terminino per tornare nel mio script come posso fare?
> > Questi comandi non appartengono al modulo os, come li posso
> > implementare in questo modulo.
>
>
> import subprocess
>
> subprocess.Popen(args).wait()
>
> #args should be a string, or a sequence of program arguments.  The
> #program to execute is normally the first item in the args sequence or
> #string, but can be explicitly set by using the executable argument.
>
>
> ___
> Python mailing list
> Python@lists.python.it
> http://lists.python.it/mailman/listinfo/python
>
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] Lanciare

2008-03-03 Per discussione Marco Mariani
andrea lucaroni wrote:

 > Grazie della risposta, ma non lo trovo che me lo devo scaricare
 > e come funziona ?

Esiste da python 2.4 in poi, cosa stai usando?
Se puoi, e' consigliabile aggiornarlo.

Altrimenti c'e' il vecchio modulo 'commands' e la funzione os.popen()
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


[Python] [ANN] WSGI module 0.0.6

2008-03-03 Per discussione Manlio Perillo
Sono felice di annunciare il rilascio del modulo WSGI per nginx, 
versione 0.0.6.

Il module WSGI è una implementazione del Python Web Server Gateway
Interface v1.0 (http://python.org/dev/peps/pep-0333/) per il server Nginx.

Il modulo è disponibile solo attraverso un repository Mercurial:
http://hg.mperillo.ath.cx/nginx/mod_wsgi/

Le istruzioni per compilare il modulo si trovano nel file README (nginx 
non supporta il caricamento dinamico di moduli).


Ecco il changelog (in inglese):

   - Bug fix: configuration problem on Mac OS X.

   - Added support for nginx 0.5.34, and dropped support for older
 versions.

 Note: older version are only supported via patches.
   - Added wsgi_optimize_send_headers directive.

 WSGI spec requires that the headers must be sent when the first
 not empty string is yielded, however sending headers early can
 optimize content generation.

   - Added experimental support for interpreter finalization.

 This will ensure that sys.exitfunc is called.
   - Variables declared with wsgi_var directive can override HTTP_
 variables.

 It can be useful, as an example, to override HTTP_COOKIE with:

wsgi_var HTTP_COOKIE  $http_cookie;

 since the $http_cookie variable combines multiple Cookie headers.
   - Renamed the wsgi_params directive to wsgi_var.

 wsgi_param was a poor choice, since parameters are a concept used
 by FastCGI.

 This revision breaks compatibility.
   - Added the wsgi_allow_ranges directive, for integrated support to
 partial HTTP requests.
   - Added the ngx_wsgitest.py script, that executes a WSGI application
 in a testing environment.
   - Added the ngx_wsgiref.py script, that runs a WSGI application
 using the builtin wsgiref server, with a command line compatibile
 with ngx_wsgi.py.
   - Added the ngx_wsgi.py script, for rapid deployment of WSGI
 applications using nginx and mod_wsgi.
   - Added wsgi_middleware directive.

 This directive enables middleware stacking in mod_wsgi.
   - Removed the callable_object and the wsgi_alias directives, and
 added a new wsgi_pass directive.

 The new directive is more consistent with other nginx modules like
 mod_fastcgi and mod_proxy.

 This revision breaks compatibility.



Manlio Perillo

___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python