Last active
August 29, 2015 13:58
-
-
Save kgadek/9955233 to your computer and use it in GitHub Desktop.
Remote debuggging dla Piotrka-Zimnioka
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
class CQ(object): | |
bla = None | |
"""CQ Instance Object""" | |
def __init__(self, port, path, init): | |
self.port = port | |
self.path = path | |
self.init = init | |
def __repr__(self): | |
return """port: {suchportname}; path: {muchpath}; init: {wow}; dupa={dupa}""".format( | |
suchportname=self.port, muchpath=self.path, wow=self.init, dupa='dupa') | |
def __getitem__(self,key): | |
return getattr(self, key) | |
def __setitem__(self,key,val): | |
setattr(self, key, val) | |
def bla(self): | |
this = 'da fuq' | |
that = 'da fuq' | |
cat = 'awesome' | |
print('cat is {cat}, says: "{this} is this, {that} is {that}"'.format(**locals())) | |
CQinst = CQ(4503,"/content/CQ_publish/crx-quickstat","/etc/init.d/cq_publish") | |
print CQinst |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment