()
| 1735 | main() |
| 1736 | |
| 1737 | def main(): |
| 1738 | global api |
| 1739 | global usrPrompt |
| 1740 | |
| 1741 | if (usrPrompt == 0): |
| 1742 | print '\n ------------------------------' |
| 1743 | print ' | Bitmessage Daemon by .dok |' |
| 1744 | print ' | Version 0.3.1 for BM 0.6.2 |' |
| 1745 | print ' ------------------------------' |
| 1746 | api = xmlrpclib.ServerProxy(apiData()) #Connect to BitMessage using these api credentials |
| 1747 | |
| 1748 | if (apiTest() == False): |
| 1749 | print '\n ****************************************************************' |
| 1750 | print ' WARNING: You are not connected to the Bitmessage client.' |
| 1751 | print ' Either Bitmessage is not running or your settings are incorrect.' |
| 1752 | print ' Use the command "apiTest" or "bmSettings" to resolve this issue.' |
| 1753 | print ' ****************************************************************\n' |
| 1754 | |
| 1755 | print 'Type (H)elp for a list of commands.' #Startup message |
| 1756 | usrPrompt = 2 |
| 1757 | |
| 1758 | #if (apiTest() == False):#Preform a connection test #taken out until I get the error handler working |
| 1759 | # print '*************************************' |
| 1760 | # print 'WARNING: No connection to Bitmessage.' |
| 1761 | # print '*************************************' |
| 1762 | # print ' ' |
| 1763 | elif (usrPrompt == 1): |
| 1764 | print '\nType (H)elp for a list of commands.' #Startup message |
| 1765 | usrPrompt = 2 |
| 1766 | |
| 1767 | try: |
| 1768 | UI((raw_input('>').lower()).replace(" ", "")) |
| 1769 | except EOFError: |
| 1770 | UI("quit") |
| 1771 | |
| 1772 | if __name__ == "__main__": |
| 1773 | main() |
no test coverage detected