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)
r
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"
On 03/25/2018 04:31 PM, Ian Kelly wrote:
On Sun, Mar 25, 2018 at 9:01 AM, Jugurtha Hadjar
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's code
and namespace. Didn't want
issue a deprecation warning, and then use the
new API instead of having the code be rigid.
--
~ Jugurtha Hadjar,
--
https://mail.python.org/mailman/listinfo/python-list
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 w
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
On 03/25/2018 11:17 AM, Chris Angelico wrote:
On Sun, Mar 25, 2018 at 8:37 PM, Jugurtha Hadjar
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 = O1.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
parent.adopt(self)
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
sleepy=", sleepy, " and groggy=", groggy)
<-->
--
~ Jugurtha Hadjar,
--
https://mail.python.org/mailman/listinfo/python-list
t;, groggy)
>>> 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
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
The CTO then said "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
. Assuming you 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
for bin 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
o_a_list_you_were_returning
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
r to distribute Python code without an interpreter, and
let people get their own 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
nores the 2.2.2.2 because it doesn't have "ip=" in front of it, and
was just lucky to have an IP address structure.
You can then split "ip=" out of each item to have the IP address.
--
~Jugurtha Hadjar,
--
https://mail.python.org/mailman/listinfo/python-list
; that shows
how websites exchange your 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
l take years and I don't think you'll ever hit 100%,
not even after decades. Sorry :)
--
~Jugurtha Hadjar,
--
https://mail.python.org/mailman/listinfo/python-list
hn.dospames...@removemehotmail.com'
> ''.join(filter(lambda x: x==x.lower(),email))
>'john@hotmail.com'
Nice ! As well as Vlastimil's suggestions. 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
address? Maybe a function with no inverse
function ? 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
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
, why ?
--
~Jugurtha Hadjar,
--
https://mail.python.org/mailman/listinfo/python-list
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
he script you used. I can 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
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&#x
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
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
issue ? How sensitive is the information you are querying
? Must it be Telnet ?
--
~Jugurtha Hadjar,
--
https://mail.python.org/mailman/listinfo/python-list
s with that
But some questions:
1 - Why does the user have to specify that, why doesn't the program
itself tell if it is a string or a number ? You just give it the data
and it's up to him to tell.
2 - What 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
rom a book, and feeling that you're
"intermediate", you started reading from chapter 28 in a 29 chapters book.
--
~Jugurtha Hadjar,
--
http://mail.python.org/mailman/listinfo/python-list
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 imperativ
;for" is a meaningful english word.. So
specifying you are talking about the reserved word would be nice.
"storage of data on disk, and read back" --> maybe something like
"storing data on disk, and reading it back".
"memorisation" --> "memorization" (most used spelling).
"initialisation" --> "initialization"
Thanks you,
--
~Jugurtha Hadjar,
--
http://mail.python.org/mailman/listinfo/python-list
utput = open(dest_file, 'w')
output.write(data_to_write)
You can execute it this way:
python
e.g:
python script.py data.txt
--
~Jugurtha Hadjar,
--
http://mail.python.org/mailman/listinfo/python-list
to stick with, by the way ?
--
~Jugurtha Hadjar,
--
http://mail.python.org/mailman/listinfo/python-list
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 subscrib
ress, thank you 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.pyt
the first place. Brilliant list, by the way.
Gentlemen, I wish you a good night.
--
~Jugurtha Hadjar,
--
http://mail.python.org/mailman/listinfo/python-list
39 matches
Mail list logo