Search Results

Search found 4 results on 1 pages for 'madsc13ntist'.

Page 1/1 | 1 

  • Python3: ssl cert information

    - by MadSc13ntist
    I have been trying to get information regarding expired ssl certificates using python 3 but it would be nice to be able to get as verbose a workup as possible. any takers? So far i have been trying to use urllib.request to get this info (to no avail), does this strike anyone as foolish? I have seen some examples of similar work using older versions of python, but nothing using v3. http://objectmix.com/python/737581-re-urllib-getting-ssl-certificate-info.html http://www.mail-archive.com/[email protected]/msg208150.html

    Read the article

  • python3: removing several chars from a string with a long chain of .replace().replace().replace()

    - by MadSc13ntist
    I found this example on stack overflow. I understand it, but seems like a bit much for such a simple method concept... removing several chars from a string. import string exclude = set(string.punctuation) s = ''.join(ch for ch in s if ch not in exclude) is there a builtin string method in python 3.1 to do something to the tune of: s = "a,b,c,d,e,f,g,h,i" s = s.strip([",", "d", "h"]) instead of: s = s.replace(",", "").replace("d", "").replace("h", "")

    Read the article

  • how to copy a dictionary in python 3.1 and edit ONLY the copy

    - by MadSc13ntist
    can someone please explain this to me??? this doesn't make any sense to me.... I copy a dictionary into another and edit the second and both are changed???? ActivePython 3.1.0.1 (ActiveState Software Inc.) based on Python 3.1 (r31:73572, Jun 28 2009, 19:55:39) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. dict1 = {"key1":"value1", "key2":"value2"} dict2 = dict1 dict2 {'key2': 'value2', 'key1': 'value1'} dict2["key2"] = "WHY?!?!?!!?!?!?!" dict1 {'key2': 'WHY?!?!?!!?!?!?!', 'key1': 'value1'}

    Read the article

  • Python 3: list atributes within a class object

    - by MadSc13ntist
    is there a way that if the following class is created; I can grab a list of attributes that exist. (this class is just an bland example, it is not my task at hand) class new_class(): def __init__(self, number): self.multi = int(number) * 2 self.str = str(number) a = new_class(2) print(', '.join(a.SOMETHING)) * the attempt is that "multi, str" will print. the point here is that if a class object has attributes added at different parts of a script that I can grab a quick listing of the attributes which are defined.

    Read the article

1