Linux server.edchosting.com 4.18.0-553.79.1.lve.el7h.x86_64 #1 SMP Wed Oct 15 16:34:46 UTC 2025 x86_64
LiteSpeed
Server IP : 75.98.162.185 & Your IP : 216.73.216.163
Domains :
Cant Read [ /etc/named.conf ]
User : goons4good
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
lib /
python2.7 /
site-packages /
qrcode /
image /
Delete
Unzip
Name
Size
Permission
Date
Action
__init__.py
0
B
-rw-r--r--
2012-10-11 16:45
__init__.pyc
144
B
-rw-r--r--
2015-03-06 00:13
__init__.pyo
144
B
-rw-r--r--
2015-03-06 00:13
base.py
1.68
KB
-rw-r--r--
2013-09-05 18:38
base.pyc
2.42
KB
-rw-r--r--
2015-03-06 00:13
base.pyo
2.42
KB
-rw-r--r--
2015-03-06 00:13
Save
Rename
class BaseImage(object): """ Base QRCode image output class. """ kind = None allowed_kinds = None def __init__(self, border, width, box_size, *args, **kwargs): self.border = border self.width = width self.box_size = box_size self.pixel_size = (self.width + self.border*2) * self.box_size self._img = self.new_image(**kwargs) def drawrect(self, row, col): """ Draw a single rectangle of the QR code. """ raise NotImplementedError("BaseImage.drawrect") def save(self, stream, kind=None): """ Save the image file. """ raise NotImplementedError("BaseImage.save") def pixel_box(self, row, col): """ A helper method for pixel-based image generators that specifies the four pixel coordinates for a single rect. """ x = (col + self.border) * self.box_size y = (row + self.border) * self.box_size return [(x, y), (x + self.box_size - 1, y + self.box_size - 1)] def new_image(self, **kwargs): """ Build the image class. Subclasses should return the class created. """ return None def check_kind(self, kind, transform=None): """ Get the image type. """ if kind is None: kind = self.kind allowed = not self.allowed_kinds or kind in self.allowed_kinds if transform: kind = transform(kind) if not allowed: allowed = kind in self.allowed_kinds if not allowed: raise ValueError( "Cannot set %s type to %s" % (type(self).__name__, kind)) return kind