<s> from pyonep . portals . bindings import Bindings <EOL> from getpass import getpass <EOL> import sys <EOL> if sys . version_info [ <NUM_LIT:0> ] < <NUM_LIT:3> : <EOL> _input = raw_input <EOL> else : <EOL> _input = input <EOL> def example ( ) : <EOL> ( token , B ) = Bindings . login_to_portal ( ) <EOL> PORTAL_CIK = B . portal_cik ( ) <EOL> print ( "<STR_LIT>" . format ( token ) ) <EOL> _input ( "<STR_LIT>" ) <EOL> pw = getpass ( "<STR_LIT>" ) <EOL> ( token , B ) = Bindings . login_to_portal ( B . domain ( ) , <EOL> B . portal_name ( ) , <EOL> B . user ( ) , <EOL> pw ) <EOL> print ( "<STR_LIT>" ) <EOL> print ( Bindings . login_to_portal ( B . domain ( ) , <EOL> B . portal_name ( ) , <EOL> B . user ( ) , <EOL> token , <EOL> use_token = True ) <EOL> ) <EOL> _input ( "<STR_LIT>" ) <EOL> print ( "<STR_LIT>" . format ( B . portal_id ( ) ) ) <EOL> ( token , B ) = Bindings . login_to_portal ( B . domain ( ) , <EOL> B . portal_name ( ) , <EOL> B . user ( ) , <EOL> token , <EOL> use_token = True , <EOL> portal_id = B . portal_id ( ) ) <EOL> print ( B ) <EOL> print ( "<STR_LIT>" . format ( B . portal_name ( ) , PORTAL_CIK ) ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> example ( ) </s>
