skpy/conn.py
def writeToken(self):
        """
        Store details of the current connection in the named file.

        This can be used by :meth:`readToken` to re-authenticate at a later time.
        """
        # Write token file privately.
        with os.fdopen(os.open(self.tokenFile, os.O_WRONLY | os.O_CREAT, 0o600), "w") as f:
            # When opening files via os, truncation must be done manually.
            f.truncate()
            f.write(self.userId + "\n")
            f.write(self.tokens["skype"] + "\n")
            f.write(str(int(time.mktime(self.tokenExpiry["skype"].timetuple()))) + "\n")
            f.write(self.tokens["reg"] + "\n")
            f.write(str(int(time.mktime(self.tokenExpiry["reg"].timetuple()))) + "\n")
            f.write(self.msgsHost + "\n")
def writeToken(self):
        # Write token file privately.
        with os.fdopen(os.open(self.tokenFile, os.O_WRONLY | os.O_CREAT, 0o600), "w") as f:
            # When opening files via os, truncation must be done manually.
            f.truncate()
            f.write(self.userId + "\n")
            f.write(self.tokens["skype"] + "\n")
            f.write(str(int(time.mktime(self.tokenExpiry["skype"].timetuple()))) + "\n")
            f.write(self.tokens["reg"] + "\n")
            f.write(str(int(time.mktime(self.tokenExpiry["reg"].timetuple()))) + "\n")
            f.write(self.msgsHost + "\n")
def writeToken ( self ) : # Write token file privately. with os . fdopen ( os . open ( self . tokenFile , os . O_WRONLY | os . O_CREAT , 0o600 ) , "w" ) as f : # When opening files via os, truncation must be done manually. f . truncate ( ) f . write ( self . userId + "\n" ) f . write ( self . tokens [ "skype" ] + "\n" ) f . write ( str ( int ( time . mktime ( self . tokenExpiry [ "skype" ] . timetuple ( ) ) ) ) + "\n" ) f . write ( self . tokens [ "reg" ] + "\n" ) f . write ( str ( int ( time . mktime ( self . tokenExpiry [ "reg" ] . timetuple ( ) ) ) ) + "\n" ) f . write ( self . msgsHost + "\n" )
Store details of the current connection in the named file.

        This can be used by :meth:`readToken` to re-authenticate at a later time.
Store details of the current connection in the named file .