[Python-es] Consulta

2015-10-20 Por tema Gonzalo V
Hola a todos!
He buscado por todos lados y no me queda claro para qué sirven las
variables que empiezan con doble underline, ejemplo: __main__, __init__ y
esas cosas.

Alguien me puede explicar?



Saludos,
Gonzalo
___
Python-es mailing list
Python-es@python.org
https://mail.python.org/mailman/listinfo/python-es
FAQ: http://python-es-faq.wikidot.com/


Re: [Python-es] Consulta

2015-10-20 Por tema Robert
Hola Gonzalo, buscando en google encontré esta página que te puede servir.

http://www.iteramos.com/pregunta/1195/que-es--if-__name__--__main__-hacer


Saludos

Robert
Linux User #533516

2015-10-20 9:14 GMT-03:00 Gonzalo V :

> Hola a todos!
> He buscado por todos lados y no me queda claro para qué sirven las
> variables que empiezan con doble underline, ejemplo: __main__, __init__ y
> esas cosas.
>
> Alguien me puede explicar?
>
>
>
> Saludos,
> Gonzalo
>
> ___
> Python-es mailing list
> Python-es@python.org
> https://mail.python.org/mailman/listinfo/python-es
> FAQ: http://python-es-faq.wikidot.com/
>
>


-- 
Roberto Beroiza Alvear
 Linux User # 533916
  Chile
___
Python-es mailing list
Python-es@python.org
https://mail.python.org/mailman/listinfo/python-es
FAQ: http://python-es-faq.wikidot.com/


Re: [Python-es] Consulta

2015-10-20 Por tema Kiko
El 20 de octubre de 2015, 14:14, Gonzalo V  escribió:

> Hola a todos!
> He buscado por todos lados y no me queda claro para qué sirven las
> variables que empiezan con doble underline, ejemplo: __main__, __init__ y
> esas cosas.
>
> Alguien me puede explicar?
>
>
Depende del contexto.

Pueden ser nombres semiprivados o privados.

En un objeto, suelen ser nombres reservados para los métodos mágicos.

Más info en la documentación oficial o este hilo en SO (inglés):
http://stackoverflow.com/questions/1301346/the-meaning-of-a-single-and-a-double-underscore-before-an-object-name-in-python



>
>
> Saludos,
> Gonzalo
>
> ___
> Python-es mailing list
> Python-es@python.org
> https://mail.python.org/mailman/listinfo/python-es
> FAQ: http://python-es-faq.wikidot.com/
>
>
___
Python-es mailing list
Python-es@python.org
https://mail.python.org/mailman/listinfo/python-es
FAQ: http://python-es-faq.wikidot.com/


Re: [Python-es] Librería para acceder a los micros del ordenador?

2015-10-20 Por tema Jaime Perea
El Martes, 20 de octubre de 2015 14:27:42 Jesus Cea escribió:
> Para el podcast me he escrito un programa que usar la libería "pyaudio"
> que me da acceso al micrófono del ordenador ocultándome lo que tengo por
> debajo (por ejemplo, PulseAudio). El problema es que esa librería solo
> funciona en Linux y en Macintosh (instalando cosas a mano). Necesitaría
> también algo que funcionase en Windows, por ejemplo.
> 
> ¿Alguna sugerencia?. ¿Algo que funcione en Linux modernos, Mac (a poder
> ser instalando lo mínimo posible) y Windows?.

Esto salió en la lista de usuario de scipy en el contexto de usar numpy para 
sonido. Corto y pego a continuación:


On Tue, Mar 31, 2015 at 6:02 PM, Todd  wrote:
On Tue, Mar 24, 2015 at 9:39 PM, Todd  wrote:
Is anyone aware of a well-maintained, simple, cross-platform python package 
that can play a numpy array as sound over speakers?  

I am aware of https://wiki.python.org/moin/Audio/.  However, in all the cases 
there, as far as I can find they either do not support numpy arrays, are not 
cross-platform, cannot playback sound at all, or are unmaintained.  There is 
also PySoundCard, which would do what I need but also appears to be 
unmaintained (no release in over a year, and no commits in 5 months, no 
release with serious bugfixes mentioned in commits).

So in terms of raw waveform playback (as opposed to music note playback), I 
have done some more searching and I think I have found something that works.  
It is the "audio.io" package (https://pypi.python.org/pypi/audio.io/).  It has 
a recent release (late 2014), supports numpy arrays, and is cross-platform 
through PyAudio.  It is just a VERY thin wrapper around PyAudio (less than 100 
lines).  However, there is no website, no issue tracker, essentially no 
documentation, and has several projects copied into its tarball (including 
setputools, about, and sh).

Here are the reasonably maintained, reasonably relevant alternatives I have 
been able to find:

PyAudio: maintained, cross-platform, doesn't support numpy.  It seems to be 
used as a backend by a lot of other projects.

audiolazy: cross-platform, supports numpy, has not seen a release since 2013 
but its github repo is still seeing commits so it may have more releases in 
the future.  Uses PyAudio.  Provides a lot of other powerful audio-handling 
and audio-processing capabilities.

PySoundCard: cross-platform, supports numpy, has not seen a release in over a 
year and its github repo has not seen a commit in 5 months, but another 
related project (PySoundFile) has seen commits and releases recently.  The 
only option amongst these that does NOT rely on PyAudio.

pydub: maintained, cross-platform, doesn't appear to support numpy but the 
audio output is undocumented so I can't be sure.  Uses PyAudio or ffmpeg if 
PyAudio is not available.



Just an update on cross-platform, numpy-compatible sound I/O packages:

I have found some other possibilities: 

The "JACK-Client" package (https://pypi.python.org/pypi/JACK-Client/) is the 
furthest along and most established.  It has been around for almost a year, 
has three contributors, and has seen four releases.  However, it has gained 
built-in numpy support since my last update, which is why it hasn't appeared 
previously.  The maintainer seems to be a member of an established auditory 
research group with a good open-source software track record.  It seems to be 
a traditionally MATLAB group but they are adding more and more python 
packages.

The "sounddevice" package (https://pypi.python.org/pypi/sounddevice/).  It 
only has only been around for a few months and only has one contributor so 
far.  However, the maintainer is the same as the maintainer of the "JACK-
Client" package, it has a github repo with continued commits, a couple other 
people submitting issues.  Since "JACK-Client" seems to have done okay, I hope 
this package will as well.

The "hear" package (https://pypi.python.org/pypi/Hear/) is in a similar 
situation, although with a different maintainer.  It has been around about the 
same amount of time, has about the same number of releases, and only has one 
contributor.  The maintainer seems to have a good track record with open-
source software and experience with sound processing, so it has some promise 
too.

Otherwise, there has been no change.  None of the other packages I listed that 
support numpy have seen a release in the last year.  
___
SciPy-User mailing list
scipy-u...@scipy.org
https://mail.scipy.org/mailman/listinfo/scipy-user
___
Python-es mailing list
Python-es@python.org
https://mail.python.org/mailman/listinfo/python-es
FAQ: http://python-es-faq.wikidot.com/


[Python-es] Librería para acceder a los micros del ordenador?

2015-10-20 Por tema Jesus Cea
Para el podcast me he escrito un programa que usar la libería "pyaudio"
que me da acceso al micrófono del ordenador ocultándome lo que tengo por
debajo (por ejemplo, PulseAudio). El problema es que esa librería solo
funciona en Linux y en Macintosh (instalando cosas a mano). Necesitaría
también algo que funcionase en Windows, por ejemplo.

¿Alguna sugerencia?. ¿Algo que funcione en Linux modernos, Mac (a poder
ser instalando lo mínimo posible) y Windows?.

-- 
Jesús Cea Avión _/_/  _/_/_/_/_/_/
j...@jcea.es - http://www.jcea.es/ _/_/_/_/  _/_/_/_/  _/_/
Twitter: @jcea_/_/_/_/  _/_/_/_/_/
jabber / xmpp:j...@jabber.org  _/_/  _/_/_/_/  _/_/  _/_/
"Things are not so easy"  _/_/  _/_/_/_/  _/_/_/_/  _/_/
"My name is Dump, Core Dump"   _/_/_/_/_/_/  _/_/  _/_/
"El amor es poner tu felicidad en la felicidad de otro" - Leibniz



signature.asc
Description: OpenPGP digital signature
___
Python-es mailing list
Python-es@python.org
https://mail.python.org/mailman/listinfo/python-es
FAQ: http://python-es-faq.wikidot.com/


Re: [Python-es] Librería para acceder a los micros del ordenador?

2015-10-20 Por tema Kiko
El 20 de octubre de 2015, 14:27, Jesus Cea  escribió:

> Para el podcast me he escrito un programa que usar la libería "pyaudio"
> que me da acceso al micrófono del ordenador ocultándome lo que tengo por
> debajo (por ejemplo, PulseAudio). El problema es que esa librería solo
> funciona en Linux y en Macintosh (instalando cosas a mano). Necesitaría
> también algo que funcionase en Windows, por ejemplo.
>
> ¿Alguna sugerencia?. ¿Algo que funcione en Linux modernos, Mac (a poder
> ser instalando lo mínimo posible) y Windows?.
>
>
En PyPI y en la página de gohlke tienes wheels para win32 y 64:
http://www.lfd.uci.edu/~gohlke/pythonlibs/#pyaudio

Se bebería poder instalar con 'pip install pyaudio'



> --
> Jesús Cea Avión _/_/  _/_/_/_/_/_/
> j...@jcea.es - http://www.jcea.es/ _/_/_/_/  _/_/_/_/  _/_/
> Twitter: @jcea_/_/_/_/  _/_/_/_/_/
> jabber / xmpp:j...@jabber.org  _/_/  _/_/_/_/  _/_/  _/_/
> "Things are not so easy"  _/_/  _/_/_/_/  _/_/_/_/  _/_/
> "My name is Dump, Core Dump"   _/_/_/_/_/_/  _/_/  _/_/
> "El amor es poner tu felicidad en la felicidad de otro" - Leibniz
>
>
> ___
> Python-es mailing list
> Python-es@python.org
> https://mail.python.org/mailman/listinfo/python-es
> FAQ: http://python-es-faq.wikidot.com/
>
>
___
Python-es mailing list
Python-es@python.org
https://mail.python.org/mailman/listinfo/python-es
FAQ: http://python-es-faq.wikidot.com/


Re: [Python-es] Detección automática de "sobreescritura" en matplotlib

2015-10-20 Por tema Yamila Moreno Suárez
¿Para cuándo una charla sobre germanios? Son las flores que más me gustan,
con diferencia :)

2015-10-20 0:56 GMT+02:00 Juan Luis Cano :

> On 2015-10-20 00:08, Jesus Cea wrote:
>
>> Soy de la vieja escuela, saber cómo funcionan las cosas, sin magia:).
>>
>
> La magia es función del nivel de abstracción: hablemos de los niveles de
> energía, el germanio y la física cuántica que intervienen para mostrar en
> pantalla un vídeo de gatitos xD
>
> ___
> Python-es mailing list
> Python-es@python.org
> https://mail.python.org/mailman/listinfo/python-es
> FAQ: http://python-es-faq.wikidot.com/
>



-- 
Yamila  Moreno Suárez
http://dendarii.es
http://moduslaborandi.net
___
Python-es mailing list
Python-es@python.org
https://mail.python.org/mailman/listinfo/python-es
FAQ: http://python-es-faq.wikidot.com/


Re: [Python-es] Librería para acceder a los micros del ordenador?

2015-10-20 Por tema Juan Luis Cano
Wow, buenísimo  resumen. Gracias por compartir!
On Oct 20, 2015 2:45 PM, "Jaime Perea"  wrote:

> El Martes, 20 de octubre de 2015 14:27:42 Jesus Cea escribió:
> > Para el podcast me he escrito un programa que usar la libería "pyaudio"
> > que me da acceso al micrófono del ordenador ocultándome lo que tengo por
> > debajo (por ejemplo, PulseAudio). El problema es que esa librería solo
> > funciona en Linux y en Macintosh (instalando cosas a mano). Necesitaría
> > también algo que funcionase en Windows, por ejemplo.
> >
> > ¿Alguna sugerencia?. ¿Algo que funcione en Linux modernos, Mac (a poder
> > ser instalando lo mínimo posible) y Windows?.
>
> Esto salió en la lista de usuario de scipy en el contexto de usar numpy
> para
> sonido. Corto y pego a continuación:
>
>
> On Tue, Mar 31, 2015 at 6:02 PM, Todd  wrote:
> On Tue, Mar 24, 2015 at 9:39 PM, Todd  wrote:
> Is anyone aware of a well-maintained, simple, cross-platform python package
> that can play a numpy array as sound over speakers?
>
> I am aware of https://wiki.python.org/moin/Audio/.  However, in all the
> cases
> there, as far as I can find they either do not support numpy arrays, are
> not
> cross-platform, cannot playback sound at all, or are unmaintained.  There
> is
> also PySoundCard, which would do what I need but also appears to be
> unmaintained (no release in over a year, and no commits in 5 months, no
> release with serious bugfixes mentioned in commits).
>
> So in terms of raw waveform playback (as opposed to music note playback), I
> have done some more searching and I think I have found something that
> works.
> It is the "audio.io" package (https://pypi.python.org/pypi/audio.io/).
> It has
> a recent release (late 2014), supports numpy arrays, and is cross-platform
> through PyAudio.  It is just a VERY thin wrapper around PyAudio (less than
> 100
> lines).  However, there is no website, no issue tracker, essentially no
> documentation, and has several projects copied into its tarball (including
> setputools, about, and sh).
>
> Here are the reasonably maintained, reasonably relevant alternatives I have
> been able to find:
>
> PyAudio: maintained, cross-platform, doesn't support numpy.  It seems to be
> used as a backend by a lot of other projects.
>
> audiolazy: cross-platform, supports numpy, has not seen a release since
> 2013
> but its github repo is still seeing commits so it may have more releases in
> the future.  Uses PyAudio.  Provides a lot of other powerful audio-handling
> and audio-processing capabilities.
>
> PySoundCard: cross-platform, supports numpy, has not seen a release in
> over a
> year and its github repo has not seen a commit in 5 months, but another
> related project (PySoundFile) has seen commits and releases recently.  The
> only option amongst these that does NOT rely on PyAudio.
>
> pydub: maintained, cross-platform, doesn't appear to support numpy but the
> audio output is undocumented so I can't be sure.  Uses PyAudio or ffmpeg if
> PyAudio is not available.
>
>
>
> Just an update on cross-platform, numpy-compatible sound I/O packages:
>
> I have found some other possibilities:
>
> The "JACK-Client" package (https://pypi.python.org/pypi/JACK-Client/) is
> the
> furthest along and most established.  It has been around for almost a year,
> has three contributors, and has seen four releases.  However, it has gained
> built-in numpy support since my last update, which is why it hasn't
> appeared
> previously.  The maintainer seems to be a member of an established auditory
> research group with a good open-source software track record.  It seems to
> be
> a traditionally MATLAB group but they are adding more and more python
> packages.
>
> The "sounddevice" package (https://pypi.python.org/pypi/sounddevice/).  It
> only has only been around for a few months and only has one contributor so
> far.  However, the maintainer is the same as the maintainer of the "JACK-
> Client" package, it has a github repo with continued commits, a couple
> other
> people submitting issues.  Since "JACK-Client" seems to have done okay, I
> hope
> this package will as well.
>
> The "hear" package (https://pypi.python.org/pypi/Hear/) is in a similar
> situation, although with a different maintainer.  It has been around about
> the
> same amount of time, has about the same number of releases, and only has
> one
> contributor.  The maintainer seems to have a good track record with open-
> source software and experience with sound processing, so it has some
> promise
> too.
>
> Otherwise, there has been no change.  None of the other packages I listed
> that
> support numpy have seen a release in the last year.
> ___
> SciPy-User mailing list
> scipy-u...@scipy.org
> https://mail.scipy.org/mailman/listinfo/scipy-user
> ___
> Python-es mailing list
> Python-es@python.org
>