Re: Help please, why doesn't it show the next input?

2013-09-11 Thread Jugurtha Hadjar
is it you are trying to accomplish: Maybe there are shortcuts or better ways to do things. -- ~Jugurtha Hadjar, -- https://mail.python.org/mailman/listinfo/python-list

Re: Telnet to remote system and format output via web page

2013-09-11 Thread Jugurtha Hadjar
an issue ? How sensitive is the information you are querying ? Must it be Telnet ? -- ~Jugurtha Hadjar, -- https://mail.python.org/mailman/listinfo/python-list

Re: Python in XKCD today

2013-09-11 Thread Jugurtha Hadjar
On 09/11/2013 02:09 PM, Roy Smith wrote: http://xkcd.com/1263/ Nice one! -- ~Jugurtha Hadjar, -- https://mail.python.org/mailman/listinfo/python-list

Re: Help please, why doesn't it show the next input?

2013-09-11 Thread Jugurtha Hadjar
On 09/11/2013 08:33 PM, William Bryant wrote: @Jugurtha Hadjar What does user_input.lower() mean/do? Hello, As did other people point out, it returns the lower case of a string. It's not user_input.lower(), it's any_string.lower() For example: Try this on your python prompt mystring

Re: Help please, why doesn't it show the next input?

2013-09-11 Thread Jugurtha Hadjar
On 09/12/2013 02:08 AM, Jugurtha Hadjar wrote: Try this on your python prompt mystring = ThIs Is ThE wAy SoMe StUpId PeOpLe WrItE i DoN't KnOw WhY! mystring.lower() This should return: You shouldn't treat people of stupid, but I feel your pain, or let's be more realistic

Re: ImportError: No module named Image

2013-09-12 Thread Jugurtha Hadjar
Google the guy's name, but he might have written dozens of things, so .. which one). -- ~Jugurtha Hadjar, -- https://mail.python.org/mailman/listinfo/python-list

Re: Need help to sort out the below code...

2013-09-14 Thread Jugurtha Hadjar
multiply by coefficients, and these coefficients (the percentage the state charges) is less likely to change than the costs of ingredients or your margins (money moves faster than legislation). -- ~Jugurtha Hadjar, -- https://mail.python.org/mailman/listinfo/python-list

Re: How do I calculate a mean with python?

2013-09-16 Thread Jugurtha Hadjar
? -- ~Jugurtha Hadjar, -- https://mail.python.org/mailman/listinfo/python-list

Re: How do I calculate a mean with python?

2013-09-16 Thread Jugurtha Hadjar
? And then, n also doesn't need to be in the loop and list.count(i) gives the occurrences of i in your list, which you don't need. list.count(15) gives 1. thesum/list.count(15) doesn't change. -- ~Jugurtha Hadjar, -- https://mail.python.org/mailman/listinfo/python-list

Antispam measures circumventing

2013-09-20 Thread Jugurtha Hadjar
? Generating an image that can't be converted back to text, etc.. If this is off-topic, you can just answer the what is a better way to do that part. Thanks, -- ~Jugurtha Hadjar, -- ~Jugurtha Hadjar, -- https://mail.python.org/mailman/listinfo/python-list

Re: Antispam measures circumventing

2013-09-20 Thread Jugurtha Hadjar
. The things I found on the net weren't that well written. There were *way* too many lines that made me think No way. There's gotta be a better way. -- ~Jugurtha Hadjar, -- https://mail.python.org/mailman/listinfo/python-list

Re: What minimum should a person know before saying I know Python

2013-09-20 Thread Jugurtha Hadjar
%, not even after decades. Sorry :) -- ~Jugurtha Hadjar, -- https://mail.python.org/mailman/listinfo/python-list

Re: Antispam measures circumventing

2013-09-22 Thread Jugurtha Hadjar
data between them and let me tell you: It's not reassuring. -- Joel Goldstick http://joelgoldstick.com -- ~Jugurtha Hadjar, -- https://mail.python.org/mailman/listinfo/python-list

Re: fputs

2012-06-05 Thread Jugurtha Hadjar
= open(dest_file, 'w') output.write(data_to_write) You can execute it this way: python script_name.py file_you_want_to_create e.g: python script.py data.txt -- ~Jugurtha Hadjar, -- http://mail.python.org/mailman/listinfo/python-list

Re: English version for Mémento Python 3 (draft, readers needed)

2012-06-06 Thread Jugurtha Hadjar
-- memorization (most used spelling). initialisation -- initialization Thanks you, -- ~Jugurtha Hadjar, -- http://mail.python.org/mailman/listinfo/python-list

Re: English version for Mémento Python 3 (draft, readers needed)

2012-06-06 Thread Jugurtha Hadjar
On 06/06/2012 07:45 PM, MRAB wrote: On 06/06/2012 18:23, Jugurtha Hadjar wrote: [snip] range returns a « generator », convert it to list to see.. -- converts instead of convert. No, convert is correct here; it's the imperative, i.e. convert it to a list if you want to see My bad. I

Re: Intermediate Python user needed help

2012-08-06 Thread Jugurtha Hadjar
, you started reading from chapter 28 in a 29 chapters book. -- ~Jugurtha Hadjar, -- http://mail.python.org/mailman/listinfo/python-list

Re: The devolution of English language and slothful c.l.p behaviors exposed!

2012-01-25 Thread Jugurtha Hadjar
place. Brilliant list, by the way. Gentlemen, I wish you a good night. -- ~Jugurtha Hadjar, -- http://mail.python.org/mailman/listinfo/python-list

Beware, my computer was infected.

2012-02-16 Thread Jugurtha Hadjar
to report it to me. I will not send you an executable, so if you receive one from me, please do not open it and it would be nice to report it. I will send an e-mail to this list once I think it is no longer in the system. Thank you all. -- ~Jugurtha Hadjar, -- http://mail.python.org/mailman

Re: Beware, my computer was infected.

2012-02-20 Thread Jugurtha Hadjar
On 16/02/2012 01:34, Jugurtha Hadjar wrote: Hello gentlemen, I'm writing these words to give you a heads up. My computer has recently been infected with 1.exe, and I am doing what I can to contain it. It spreads via mail and I fear it will send SPAM to lists I am subscribed to. If you

Re: Please verify!!

2012-02-24 Thread Jugurtha Hadjar
? -- ~Jugurtha Hadjar, -- http://mail.python.org/mailman/listinfo/python-list

Re: re.findall help

2015-02-04 Thread Jugurtha Hadjar
then split ip= out of each item to have the IP address. -- ~Jugurtha Hadjar, -- https://mail.python.org/mailman/listinfo/python-list

Re: beginners choice: wx or tk?

2015-07-11 Thread Jugurtha Hadjar
interpreters. I just found this: https://us.pycon.org/2012/schedule/presentation/393/ It's a talk titled Deep Freeze: building better stand-alone apps with Python. I'll watch it later. ChrisA -- ~Jugurtha Hadjar, -- https://mail.python.org/mailman/listinfo/python-list

Re: Best way to ensure user calls methods in correct order?

2017-07-01 Thread Jugurtha Hadjar
turning return OutputB(_b_result) def c(list_from_b): _c_result = you_get_the_point return OutputC(_c_result) -- ~Jugurtha Hadjar, -- https://mail.python.org/mailman/listinfo/python-list

Re: Speeding up the implementation of Stochastic Gradient Ascent in Python

2018-01-20 Thread Jugurtha Hadjar
in range(10):     for i in range(len(self.list_of_items)):     for k in range(self.K2):     for f in range(4096): -- ~ Jugurtha Hadjar, -- https://mail.python.org/mailman/listinfo/python-list

Re: Read satellite images

2018-01-24 Thread Jugurtha Hadjar
are using Python 2 (from your print):     import binascii     with open('merg_2018011100_4km-pixel', 'rb') as f:     data = f.read()     hex_data = binascii.hexlify(data)     first_byte = hex_data[0:2]     print first_byte -- ~ Jugurtha Hadjar, -- https://mail.python.org/mailman/listinfo/python-list

Re: Where has the practice of sending screen shots as source code come from?

2018-01-30 Thread Jugurtha Hadjar
On 01/29/2018 03:48 PM, alister via Python-list wrote: On Mon, 29 Jan 2018 15:20:06 +0100, Jugurtha Hadjar wrote: On 01/28/2018 04:43 PM, Skip Montanaro wrote: I've never been a Windows user, but at my current job, Windows is core to just about everything, so I am forced to use it for a lot

Re: Where has the practice of sending screen shots as source code come from?

2018-01-29 Thread Jugurtha Hadjar
"Sorry.. I meant Ubuntu." and seeing my pale face, he said in a reassuring tone "Don't be afraid, there are no Windows machines here." which brought me back to life. I hope to be as brave as you some day. -- ~ Jugurtha Hadjar, -- https://mail.python.org/mailman/listinfo/python-list

Re: Is there are good DRY fix for this painful design pattern?

2018-02-27 Thread Jugurtha Hadjar
t;> f = Foo(1, 19) >>> f.spam() I am spam. sleepy= 1 >>> f.spam(sleepy=8) I am spam. sleepy= 8 >>> f.ham(sleepy=8) I am ham. sleepy= 8  and groggy= 19 >>> f.ham(sleepy=17, groggy=888) I am ham. sleepy= 17  and groggy= 888 -- ~ Jugurtha Hadjar, -- https://mail.python.org/mailman/listinfo/python-list

Re: Is there are good DRY fix for this painful design pattern?

2018-03-01 Thread Jugurtha Hadjar
uot;, sleepy, " and groggy=", groggy) <------> -- ~ Jugurtha Hadjar, -- https://mail.python.org/mailman/listinfo/python-list

Re: how to set timeout for os.popen

2018-04-16 Thread Jugurtha Hadjar
On 04/15/2018 12:01 PM, Ho Yeung Lee wrote: while 1: runner = os.popen("tracert -d www.hello.com") o=runner.read() print(o) runner.close() runner = os.popen("tracert -d www.hello.com") o=runner.read() print(o) runner.close() runner = os.popen("tracert -d www.hello.com") o=runner.read() print(o)

Re: Accessing parent objects

2018-03-25 Thread Jugurtha Hadjar
c2 = C2() c2.adoptme()    # No parent yet c1 = C1() c2.adoptme(c1)  # I am C1 and I adopted C2 c2.foo()    # I am C2 foo     # I am C1 foo c1.adopt(c2)    # I am C1 and I adopted C2 <--------> -- ~ Jugurtha Hadjar, -- https://mail.python.org/mailman/listinfo/python-list

Re: Accessing parent objects

2018-03-25 Thread Jugurtha Hadjar
On 03/25/2018 11:17 AM, Chris Angelico wrote: On Sun, Mar 25, 2018 at 8:37 PM, Jugurtha Hadjar <jugurtha.had...@gmail.com> wrote: On 03/24/2018 07:14 PM, D'Arcy Cain wrote: class C1(dict): class C2(object): def f(self): return X['field'] O1 = C1() O1['field'] = 1 O2 =

Re: Accessing parent objects

2018-03-25 Thread Jugurtha Hadjar
foo()    # I am C2 foo     # I am C1 foo c1.adopt(c2)    # I am C1 and I adopted C2 <----> -- ~ Jugurtha Hadjar, -- https://mail.python.org/mailman/listinfo/python-list

Re: Accessing parent objects

2018-03-25 Thread Jugurtha Hadjar
Erratum: "I can select C2, or C3 and I'll have the instance created with my choice" -- ~ Jugurtha Hadjar, -- https://mail.python.org/mailman/listinfo/python-list

Re: Accessing parent objects

2018-03-25 Thread Jugurtha Hadjar
API instead of having the code be rigid. -- ~ Jugurtha Hadjar, -- https://mail.python.org/mailman/listinfo/python-list

Re: Accessing parent objects

2018-03-25 Thread Jugurtha Hadjar
On 03/25/2018 03:25 PM, Terry Reedy wrote: On 3/25/2018 7:42 AM, Jugurtha Hadjar wrote: class C2(object): def __init__(self, parent=None): self.parent = parent Since parent is required, it should not be optional. You can still call it the way you'd call it if it were

Re: Accessing parent objects

2018-03-25 Thread Jugurtha Hadjar
On 03/25/2018 04:31 PM, Ian Kelly wrote: On Sun, Mar 25, 2018 at 9:01 AM, Jugurtha Hadjar <jugurtha.had...@gmail.com> wrote: On 03/25/2018 03:25 PM, Terry Reedy wrote: None.foo will raise AttributeError. Right.. As I said, I tried to assume as little as possible about OP'

Re: Accessing parent objects

2018-03-25 Thread Jugurtha Hadjar
On 03/25/2018 12:07 PM, D'Arcy Cain wrote: On 03/25/2018 05:10 AM, Jugurtha Hadjar wrote:     print("I am {self.__class__.__name__} foo".format(self=self)) Unrelated to the original issue but why not one of the following? print("I am {0.__class__.__name__} foo".form