mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2024-11-14 17:40:24 -08:00
22 lines
454 B
Python
22 lines
454 B
Python
#!/usr/bin/env python
|
|
|
|
import ctypes
|
|
|
|
|
|
def ensure_unicode(param):
|
|
try:
|
|
param = ctypes.create_unicode_buffer(param)
|
|
except TypeError:
|
|
pass # just return the param as is
|
|
return param
|
|
|
|
|
|
class Extended(object):
|
|
"Used to add extended capability to structures"
|
|
|
|
def __eq__(self, other):
|
|
return memoryview(self) == memoryview(other)
|
|
|
|
def __ne__(self, other):
|
|
return memoryview(self) != memoryview(other)
|