Re: Writing a C extension - borrowed references

2018-03-21 Thread Stefan Behnel
Tom Evans via Python-list schrieb am 20.03.2018 um 18:03: > On Tue, Mar 20, 2018 at 4:38 PM, Chris Angelico wrote: >> BTW, have you looked into Cython? It's smart enough to take care of a >> lot of this sort of thing for you. > > I did a bit; this work is to replace our old python 2 SAML client, >

Re: Style Q: Instance variables defined outside of __init__

2018-03-21 Thread Rustom Mody
On Wednesday, March 21, 2018 at 5:37:48 AM UTC+5:30, Paul Rubin wrote: > Ben Finney writes: > > Any program which needs to interact with systems outside itself – which > > is to say, any program which performs useful work, ultimately – must > > have side effects. So it's absurd to advocate removin

Re: Modules

2018-03-21 Thread MRAB
On 2018-03-21 22:59, Jacques Bikoundou wrote: Hi, I am writing because I use a Python 3 kernel on my notebook that I access through the Microsoft Azure ML. I experience error messages when using modules such as 'speedml' or 'xgboost'. The error messagessay: no such module. How can I solve thi

Re: Modules

2018-03-21 Thread Rick Johnson
On Wednesday, March 21, 2018 at 7:49:42 PM UTC-5, Jacques Bikoundou wrote: > It said: ImportError: no module named 'speedml' I see. And did you check the search path[1] to ensure that the modules you want to import are indeed located in a directory which python normally searches? As an academic e

Re: Modules

2018-03-21 Thread Jacques Bikoundou
It said: ImportError: no module named 'speedml' On Wed, Mar 21, 2018, 19:57 Rick Johnson wrote: > Hmm, let's try a little interactive session, shall we? Did > your error message look something like this? > > >>> import spam > > Traceback (most recent call last): > File "", line 1,

Re: Want to convert the msg file in html file so that i can read the tables emebedded in msg file using python

2018-03-21 Thread Rick Johnson
On Wednesday, March 21, 2018 at 5:15:47 AM UTC-5, gurpreet...@gmail.com wrote: > TITLE: "Want to convert the msg file in html file so that i > can read the tables emebedded in msg file using python" My guess that the OP meant to say: "msg file *INTO* html file" -- where "msg file" is a file holdin

Re: Modules

2018-03-21 Thread Rick Johnson
Hmm, let's try a little interactive session, shall we? Did your error message look something like this? >>> import spam Traceback (most recent call last): File "", line 1, in import spam ImportError: No module named spam >>> import eggs Traceback (most recent

Modules

2018-03-21 Thread Jacques Bikoundou
Hi, I am writing because I use a Python 3 kernel on my notebook that I access through the Microsoft Azure ML. I experience error messages when using modules such as 'speedml' or 'xgboost'. The error messagessay: no such module. How can I solve this?Thanks, Jacques  Sent from Samsung tablet --

PyDev 6.3.2 released

2018-03-21 Thread Fabio Zadrozny
PyDev 6.3.2 Release Highlights PyDev changes: - Type inference - PyDev can now uses information on .pyi files (when along the typed .py file) for type inference. - Fixed issue opening code completion preferences page. About PyDev PyDev is an open-source Python IDE on top

Re: lire du son en format natif avec python

2018-03-21 Thread Vincent Vande Vyvre
Le 21/03/18 à 11:25, asphjt--- via Python-list a écrit : Bonjour à tous, En utilisant le module pyaudio pour enregistrer du son, j'ai une chaine de caractères de la forme b'\x01\x00\n\x00\x04\x00\xfe\xff\x04\x00\x0b\x00\n\x00\x07\x00'b'\x01\x00\xff\xff\x00\x00\xff\xff\x01\x00\n\x00\n\x00\n\x00

Re: Reg python regexp

2018-03-21 Thread Youta TAKAOKA
sankarramanv, It seems for me that this task does not need both python AND shell. Only python does it, as well as only shell. Of course, there can be some restrictions let you use both. (the real world is filled up with such troublesome matters !) If you *really* need to use `lgrep`, try `-f` opt

Re: how do I retry a command only for a specific exception / error

2018-03-21 Thread Ganesh Pal
Please ensure quoted text is quoted, and new text you write is unquoted. > That way you are more likely to get useful > Sorry , Steve I didn't realize but thanks for pointing out I will take care I was on a mobile phone and messed the quoted text >Something like this should do it. It gives up imm

Re: Multiprocessing on a remote host

2018-03-21 Thread Larry Martell
On Tue, Mar 20, 2018 at 11:15 PM, Steven D'Aprano wrote: > On Wed, 21 Mar 2018 02:20:16 +, Larry Martell wrote: > >> Is there a way to use the multiprocessing lib to run a job on a remote >> host? > > Don't try to re-invent the wheel. This is a solved problem. > > https://stackoverflow.com/que

Re: lire du son en format natif avec python

2018-03-21 Thread Thomas Jollans
On 2018-03-21 11:25, asphjt--- via Python-list wrote: > Bonjour à tous, > En utilisant le module pyaudio pour enregistrer du son, j'ai une chaine de > caractères de la forme > b'\x01\x00\n\x00\x04\x00\xfe\xff\x04\x00\x0b\x00\n\x00\x07\x00'b'\x01\x00\xff\xff\x00\x00\xff\xff\x01\x00\n\x00\n\x00\n\x

Re: Reg python regexp

2018-03-21 Thread Rhodri James
On 21/03/18 10:44, sankarram...@gmail.com wrote: Hi, I have a requirement. cmd="cat |grep -c 'if [ -t 1 ]; then mesg n 2>/dev/null; fi'" I need to escape only the square brackets in above variable since its not grepping without escaping the brackets. You need to escape the square brackets a

Re: Want to convert the msg file in html file so that i can read the tables emebedded in msg file using python

2018-03-21 Thread Steven D'Aprano
On Wed, 21 Mar 2018 03:15:30 -0700, gurpreetsinghluky wrote: > Please help me We'd love to help if only we knew what you wanted. Can you explain what you want? Give an example of the data you are working with and the results you expect? -- Steve -- https://mail.python.org/mailman/listinfo/

Re: Reg python regexp

2018-03-21 Thread Chris Angelico
On Wed, Mar 21, 2018 at 9:44 PM, wrote: > Hi, > > I have a requirement. > > cmd="cat |grep -c 'if [ -t 1 ]; then mesg n 2>/dev/null; fi'" > > I need to escape only the square brackets in above variable since its not > grepping without escaping the brackets. > > Please help. You're putting this

Re: Reg python regexp

2018-03-21 Thread Paul Moore
Hi, You don't need a regexp for this, the "replace" method on a string will do what you want: >>> s = 'this is a [string' >>> print(s.replace('[', '\\[')) this is a \[string Paul On 21 March 2018 at 10:44, wrote: > Hi, > > I have a requirement. > > cmd="cat |grep -c 'if [ -t 1 ]; then mesg n

Reg python regexp

2018-03-21 Thread sankarramanv
Hi, I have a requirement. cmd="cat |grep -c 'if [ -t 1 ]; then mesg n 2>/dev/null; fi'" I need to escape only the square brackets in above variable since its not grepping without escaping the brackets. Please help. Thanks. -- https://mail.python.org/mailman/listinfo/python-list

lire du son en format natif avec python

2018-03-21 Thread asphjt--- via Python-list
Bonjour à tous, En utilisant le module pyaudio pour enregistrer du son, j'ai une chaine de caractères de la forme b'\x01\x00\n\x00\x04\x00\xfe\xff\x04\x00\x0b\x00\n\x00\x07\x00'b'\x01\x00\xff\xff\x00\x00\xff\xff\x01\x00\n\x00\n\x00\n\x00 qui correspond aux valeurs hexadécimales (je pense) du son

Want to convert the msg file in html file so that i can read the tables emebedded in msg file using python

2018-03-21 Thread gurpreetsinghluky
Please help me -- https://mail.python.org/mailman/listinfo/python-list

Re: Enumerating all 3-tuples

2018-03-21 Thread Robin Becker
On 21/03/2018 05:14, Steven D'Aprano wrote: On Tue, 13 Mar 2018 23:56:37 +0100, Denis Kasak wrote: [...] The triples can be viewed as a pair of a pair and a natural number: (1,1),1 (1,1),2 (1,1),3 ... (2,1),1 (2,1),2 (2,1),3 ... (1,2),1 (1,2),2 (1,2),3 ... [...] This leads fairly naturally