Re: https://www.python.org/ seems to be down
2014-09-26 8:46 GMT+02:00 Gmane shivaji...@yahoo.com.dmarc.invalid: https://www.python.org/ http://www.downforeveryoneorjustme.com/python.org -- Miguel García Lafuente - Rock Neurotiko Do it, the devil is in the details. The quieter you are, the more you are able to hear. Happy Coding. Code with Passion, Decode with Patience. If we make consistent effort, based on proper education, we can change the world. El contenido de este e-mail es privado, no se permite la revelacion del contenido de este e-mail a gente ajena a él. -- https://mail.python.org/mailman/listinfo/python-list
Re: https://www.python.org/ seems to be down
2014-09-26 9:05 GMT+02:00 Gmane shivaji...@yahoo.com.dmarc.invalid: Chris Angelico rosuav at gmail.com writes: I am getting the following error in my Firefox browser (OpenSuse OS): Secure Connection Failed An error occurred during a connection to www.python.org. The OCSP response is not yet valid (contains a date in the future). (Error code: sec_error_ocsp_future_response) The page you are trying to view cannot be shown because the authenticity of the received data could not be verified. Please contact the web site owners to inform them of this problem. Alternatively, use the command found in the help menu to report this broken site. Shiva -- https://mail.python.org/mailman/listinfo/python-list Check your local date, usually that happens when you don't have it right. -- Miguel García Lafuente - Rock Neurotiko Do it, the devil is in the details. The quieter you are, the more you are able to hear. Happy Coding. Code with Passion, Decode with Patience. If we make consistent effort, based on proper education, we can change the world. El contenido de este e-mail es privado, no se permite la revelacion del contenido de este e-mail a gente ajena a él. -- https://mail.python.org/mailman/listinfo/python-list
Re: https://www.python.org/ seems to be down
2014-09-26 9:25 GMT+02:00 Gmane shivaji...@yahoo.com.dmarc.invalid: Hi, Thanks - that was the problemincorrect system date/time. The system date time and hardware date time were off. Adjusted the system time to use one of the online time servers and then used hwclock --systohc (as a root user) to set the hardware clock. But it is weird that the data from a website fails to render because of incorrect system date. Thanks, Shiva -- https://mail.python.org/mailman/listinfo/python-list Doesn't fails the render of the data, fails the verification of the SSL certificate, all certificates have an start and end date, if you are not in that range, your browser don't verify it (that's to prevent malicious SSL certs). -- Miguel García Lafuente - Rock Neurotiko Do it, the devil is in the details. The quieter you are, the more you are able to hear. Happy Coding. Code with Passion, Decode with Patience. If we make consistent effort, based on proper education, we can change the world. El contenido de este e-mail es privado, no se permite la revelacion del contenido de este e-mail a gente ajena a él. -- https://mail.python.org/mailman/listinfo/python-list
Re: Best way to deal with different data types in a list comprehension
Maybe there are a different way, but you can do this: ' '.join([self.get_abbrev()] + [str(f['value').encode('utf-8') if type(f['value']) is str else str(f['value'] for f in self.filters if f.has_key('value')]).strip() 2014-09-24 0:01 GMT+02:00 Larry Martell larry.mart...@gmail.com: I have some code that I inherited: ' '.join([self.get_abbrev()] + [str(f['value') for f in self.filters if f.has_key('value')]).strip() This broke today when it encountered some non-ascii data. I changed the str(f['value']) line to f['value'].encode('utf-8'), which works fine, except when f['value'] is not a string (it could be anything). Without rewriting this without the list comprehension, how can I write this to deal with both strings and non-strings? -- https://mail.python.org/mailman/listinfo/python-list -- Miguel García Lafuente - Rock Neurotiko Do it, the devil is in the details. The quieter you are, the more you are able to hear. Happy Coding. Code with Passion, Decode with Patience. If we make consistent effort, based on proper education, we can change the world. El contenido de este e-mail es privado, no se permite la revelacion del contenido de este e-mail a gente ajena a él. -- https://mail.python.org/mailman/listinfo/python-list
Re: Python is going to be hard
print(x) :) 2014-09-03 20:10 GMT+02:00 Seymore4Head Seymore4Head@hotmail.invalid: import math import random import sys b=[] steve = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89] for x in steve: print (steve[x]) Traceback (most recent call last): File C:\Functions\blank.py, line 7, in module print (steve[x]) IndexError: list index out of range -- https://mail.python.org/mailman/listinfo/python-list -- Miguel García Lafuente - Rock Neurotiko Do it, the devil is in the details. The quieter you are, the more you are able to hear. Happy Coding. Code with Passion, Decode with Patience. If we make consistent effort, based on proper education, we can change the world. El contenido de este e-mail es privado, no se permite la revelacion del contenido de este e-mail a gente ajena a él. -- https://mail.python.org/mailman/listinfo/python-list
Re: Collaps arrays/ list of intergers
Hi, I made a fast implementation (I'm sure that can be done better) but it works (for what I understood). Is tested in Python3.4, if you will execute in Python 2.x, or don't have mypy or don't like it, you always can remove the function annotations :) http://gist.github.com/rockneurotiko/017044d907242c2e0482 There are all the code and some own-tests :) I hope that this is what you was asking for :) Cheers! 2014-08-19 18:22 GMT+02:00 Peter Pearson ppearson@nowhere.invalid: On Tue, 19 Aug 2014 05:54:24 -0700 (PDT), Jurgens de Bruin wrote: I do hope somebody can help me with the following: I have the followings lists which represent the upper and lower value of a range/array. a = [1,50] b = [75,150] c = [25,42] d = [120,149] e = [35,55] What I would like to happen is that overlapping range will collapse to a single range meaning the above list would become: as list a,c and e overlap they can be represented by f = [1,55] as list b and d overlap they can be represented by g = [75,150] Is your question about (a) identifying overlapping subsets of ranges, or (b) collapsing such subsets once you have identified them? What output would you want if the inputs were . . . a = [1,50] b = [2,10] c = [40,60] ? -- To email me, substitute nowhere-spamcop, invalid-net. -- https://mail.python.org/mailman/listinfo/python-list -- Miguel García Lafuente - Rock Neurotiko Do it, the devil is in the details. The quieter you are, the more you are able to hear. Happy Coding. Code with Passion, Decode with Patience. If we make consistent effort, based on proper education, we can change the world. El contenido de este e-mail es privado, no se permite la revelacion del contenido de este e-mail a gente ajena a él. -- https://mail.python.org/mailman/listinfo/python-list
Re: error with files
You are trying to write the open file (file1) in the file type. I think that you wanted to write in file1, the data: file1.write(file_data) # instead of file.write(file1) 2014-08-18 11:41 GMT+02:00 ngangsia akumbo ngang...@gmail.com: error yems ~ # nano testfile1 yems ~ # python testfile1 Enter file name: g write in data: g Traceback (most recent call last): File testfile1, line 11, in module file.write(file1) TypeError: function takes exactly 1 argument (0 given) import os.path save_here = '/home/yems/newfile/' file_name = raw_input(Enter file name: ) filesname = os.path.join(save_here, file_name+.txt) file1 = open(filesname, 'w') file_data = raw_input('write in data: ') file.write(file1) file1.close() -- https://mail.python.org/mailman/listinfo/python-list -- Miguel García Lafuente - Rock Neurotiko Do it, the devil is in the details. The quieter you are, the more you are able to hear. Happy Coding. Code with Passion, Decode with Patience. If we make consistent effort, based on proper education, we can change the world. El contenido de este e-mail es privado, no se permite la revelacion del contenido de este e-mail a gente ajena a él. -- https://mail.python.org/mailman/listinfo/python-list