code: def getATR(self):
          
          CardConnection.getATR(self)
          if None == self.hcard:
              raise CardConnectionException('Card not connected')
          hresult, reader, state, protocol, atr = SCardStatus(self.hcard)
          if hresult != 0:
              raise CardConnectionException(
                  'Failed to get status: ' + \
                  SCardGetErrorMessage(hresult))
          return atr
docs: Return card ATR