| 101 | | if sys.platform.startswith('darwin'): |
|---|
| 102 | | self.bound3 = self.bind('<M2-Button-1>', self.selStart) |
|---|
| 103 | | self.bound3m = self.bind('<M2-B1-Motion>', self.selDrag) |
|---|
| 104 | | else: |
|---|
| 105 | | self.bound3 = self.bind('<Button-3>', self.selStart) |
|---|
| 106 | | self.bound3m = self.bind('<B3-Motion>', self.selDrag) |
|---|
| | 101 | self.boundM2_1 = self.bind('<M2-Button-1>', self.selStart) |
|---|
| | 102 | self.boundM2_1m = self.bind('<M2-B1-Motion>', self.selDrag) |
|---|
| | 103 | self.bound3 = self.bind('<Button-3>', self.selStart) |
|---|
| | 104 | self.bound3m = self.bind('<B3-Motion>', self.selDrag) |
|---|
| | 105 | |
|---|
| 6075 | | self.helpmenu.insert_command(2, label='Tutorial', underline=0, command= |
|---|
| 6076 | | lambda s='file:'+os.path.abspath(os.path.join(self.basepath,'doc', |
|---|
| 6077 | | 'tutorial.html')) : |
|---|
| 6078 | | webbrowser.open(s, new=1)) |
|---|
| | 6079 | self.helpmenu.insert_command(2, label='Tutorial', underline=0, command=self.showTutorial) |
|---|
| | 6080 | |
|---|
| | 6081 | |
|---|
| | 6082 | def showTutorial(self): |
|---|
| | 6083 | try: |
|---|
| | 6084 | webbrowser.open('file:'+os.path.abspath(os.path.join(self.basepath,'doc','tutorial.html')),new=1) |
|---|
| | 6085 | except: |
|---|
| | 6086 | showwarning('Error', 'Failed to open the web browser.\nYou can find the tutorial as\n'+\ |
|---|
| | 6087 | 'file:'+os.path.abspath(os.path.join(self.basepath,'doc','tutorial.html'))) |
|---|