From elguavas@users.sourceforge.net Fri Aug 3 05:43:46 2001 From: elguavas@users.sourceforge.net (Stephen) Date: Thu, 02 Aug 2001 21:43:46 -0700 Subject: [Idle-dev] CVS: idle configDialog.py,1.2,1.3 Message-ID: Update of /cvsroot/idlefork/idle In directory usw-pr-cvs1:/tmp/cvs-serv23758 Modified Files: configDialog.py Log Message: further work on config dialog, particularly highligthing config Index: configDialog.py =================================================================== RCS file: /cvsroot/idlefork/idle/configDialog.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** configDialog.py 2001/07/31 10:46:29 1.2 --- configDialog.py 2001/08/03 04:43:44 1.3 *************** *** 42,48 **** self.bind('',self.CancelBinding) #dismiss dialog, no save self.bind('',self.SaveBinding) #dismiss dialog, save ! self.bind('',self.RevertBinding) #revert to defaults self.bind('',self.ChangePageBinding) ! self.bind('',self.ChangePageBinding) self.bind('',self.ChangePageBinding) self.bind('',self.ChangePageBinding) --- 42,48 ---- self.bind('',self.CancelBinding) #dismiss dialog, no save self.bind('',self.SaveBinding) #dismiss dialog, save ! self.bind('',self.HelpBinding) #context help self.bind('',self.ChangePageBinding) ! self.bind('',self.ChangePageBinding) self.bind('',self.ChangePageBinding) self.bind('',self.ChangePageBinding) *************** *** 55,65 **** pass ! def Revert(self): pass - def ChangePage(self): - self.pages[self.pageNum.get()].lift() - self.title('Settings - '+self.pageButtons[self.pageNum.get()].cget('text')) - def CancelBinding(self,event): self.Cancel() --- 55,61 ---- pass ! def Help(self): pass def CancelBinding(self,event): self.Cancel() *************** *** 68,76 **** self.Save() ! def RevertBinding(self,event): ! self.Revert() def ChangePageBinding(self,event): ! pageKeys=('f','c','k','g') pos=0 for key in pageKeys: --- 64,76 ---- self.Save() ! def HelpBinding(self,event): ! self.Help() + def ChangePage(self): + self.pages[self.pageNum.get()].lift() + self.title('Settings -'+self.pageButtons[self.pageNum.get()].cget('text')) + def ChangePageBinding(self,event): ! pageKeys=('f','h','k','g') pos=0 for key in pageKeys: *************** *** 81,92 **** pos=pos+1 def CreateWidgets(self): ! self.framePages = Frame(self,borderwidth=2,relief=SUNKEN) frameActionButtons = Frame(self) framePageButtons = Frame(self.framePages,borderwidth=1,relief=SUNKEN) #action buttons ! self.buttonRevert = Button(frameActionButtons,text='Revert', ! command=self.Revert,underline=0,takefocus=FALSE) ! self.buttonSave = Button(frameActionButtons,text='Save', command=self.Save,underline=0,takefocus=FALSE) self.buttonCancel = Button(frameActionButtons,text='Cancel', --- 81,102 ---- pos=pos+1 + def SetThemeType(self): + if self.themeType.get()==0: + self.optMenuThemeBuiltin.config(state=NORMAL) + self.optMenuThemeCustom.config(state=DISABLED) + self.buttonDeleteCustom.config(state=DISABLED) + elif self.themeType.get()==1: + self.optMenuThemeBuiltin.config(state=DISABLED) + self.optMenuThemeCustom.config(state=NORMAL) + self.buttonDeleteCustom.config(state=NORMAL) + def CreateWidgets(self): ! self.framePages = Frame(self) frameActionButtons = Frame(self) framePageButtons = Frame(self.framePages,borderwidth=1,relief=SUNKEN) #action buttons ! self.buttonHelp = Button(frameActionButtons,text='Help', ! command=self.Help,takefocus=FALSE) ! self.buttonSave = Button(frameActionButtons,text='Save, Apply and Exit', command=self.Save,underline=0,takefocus=FALSE) self.buttonCancel = Button(frameActionButtons,text='Cancel', *************** *** 95,103 **** self.pageNum=IntVar() self.pageNum.set(0) ! buttonPageFonts = Radiobutton(framePageButtons,value=0,text='Fonts') ! buttonPageColours = Radiobutton(framePageButtons,value=1,text='Colours') ! buttonPageKeys = Radiobutton(framePageButtons,value=2,text='Keys') ! buttonPageGeneral = Radiobutton(framePageButtons,value=3,text='General') ! self.pageButtons=(buttonPageFonts,buttonPageColours, buttonPageKeys,buttonPageGeneral) for button in self.pageButtons: --- 105,117 ---- self.pageNum=IntVar() self.pageNum.set(0) ! buttonPageFonts = Radiobutton(framePageButtons,value=0, ! text='Font/Tabs',padx=5,pady=5) ! buttonPageHighlight = Radiobutton(framePageButtons,value=1, ! text='Highlighting',padx=5,pady=5) ! buttonPageKeys = Radiobutton(framePageButtons,value=2, ! text='Keys',padx=5,pady=5) ! buttonPageGeneral = Radiobutton(framePageButtons,value=3, ! text='General',padx=5,pady=5) ! self.pageButtons=(buttonPageFonts,buttonPageHighlight, buttonPageKeys,buttonPageGeneral) for button in self.pageButtons: *************** *** 107,129 **** button.pack(side=LEFT) #pages ! framePageFonts=Frame(self.framePages) ! framePageColours=Frame(self.framePages) ! framePageKeys=Frame(self.framePages) ! framePageGeneral=Frame(self.framePages) ! self.pages=(framePageFonts,framePageColours,framePageKeys,framePageGeneral) ! #pageFonts ! Button(framePageFonts,text='fonts page test').pack(padx=30,pady=30) ! #pageColours ! Button(framePageColours,text='colours page test').pack(padx=60,pady=60) ! #pageKeys ! Button(framePageKeys,text='keys page test').pack(padx=90,pady=90) ! #pageGeneral ! Button(framePageGeneral,text='general page test').pack(padx=110,pady=110) ! #grid in framePages so we can overlap pages framePageButtons.grid(row=0,column=0,sticky=W) for page in self.pages: page.grid(row=1,column=0,sticky=(N,S,E,W)) ! self.buttonRevert.pack(side=LEFT,padx=5,pady=5) self.buttonSave.pack(side=LEFT,padx=5,pady=5) self.buttonCancel.pack(side=LEFT,padx=5,pady=5) --- 121,134 ---- button.pack(side=LEFT) #pages ! self.pages=(self.CreatePageFonts(), ! self.CreatePageHighlight(), ! self.CreatePageKeys(), ! self.CreatePageGeneral()) ! #grid in framePages so we can overlap pages framePageButtons.grid(row=0,column=0,sticky=W) for page in self.pages: page.grid(row=1,column=0,sticky=(N,S,E,W)) ! self.buttonHelp.pack(side=RIGHT,padx=20,pady=5) self.buttonSave.pack(side=LEFT,padx=5,pady=5) self.buttonCancel.pack(side=LEFT,padx=5,pady=5) *************** *** 131,134 **** --- 136,246 ---- self.framePages.pack(side=TOP,expand=TRUE,fill=BOTH) + def CreatePageFonts(self): + frame=Frame(self.framePages,borderwidth=2,relief=SUNKEN) + Button(frame,text='fonts page test').pack(padx=30,pady=30) + return frame + + def CreatePageHighlight(self): + #tkVars + self.target=StringVar() + self.builtinTheme=StringVar() + self.customTheme=StringVar() + self.colour=StringVar() + self.fontName=StringVar() + self.fontBold=StringVar() + self.fontItalic=StringVar() + self.fontSize=IntVar() + self.themeType=IntVar() + ##widget creation + #body frame + frame=Frame(self.framePages,borderwidth=2,relief=SUNKEN) + #body section frames + frameCustom=Frame(frame,borderwidth=2,relief=GROOVE) + frameTheme=Frame(frame,borderwidth=2,relief=GROOVE) + + #frameCustom + frameTarget=Frame(frameCustom) + frameSample=Frame(frameCustom,relief=SOLID,borderwidth=1) + frameSet=Frame(frameCustom) + frameColourSet=Frame(frameSet,relief=SOLID,borderwidth=1) + frameFontSet=Frame(frameSet) + + labelCustomTitle=Label(frameCustom,text='Set Custom Highlighting') + labelTargetTitle=Label(frameTarget,text='for : ') + optMenuTarget=OptionMenu(frameTarget, + self.target,'test target interface item','test target interface item 2') + self.target.set('test target interface item') + buttonSetColour=Button(frameColourSet,text='Set Colour') + labelFontTitle=Label(frameFontSet,text='Set Font Style') + checkFontBold=Checkbutton(frameFontSet,variable=self.fontBold, + onvalue='Bold',offvalue='',text='Bold') + checkFontItalic=Checkbutton(frameFontSet,variable=self.fontItalic, + onvalue='Italic',offvalue='',text='Italic') + labelTestSample=Label(frameSample,justify=LEFT, + text='def Ahem(foo,bar):\n test=foo\n text=bar\n return') + buttonSaveCustom=Button(frameCustom, + text='Save as a Custom Theme') + + #frameTheme + #frameDivider=Frame(frameTheme,relief=SUNKEN,borderwidth=1, + # width=2,height=10) + labelThemeTitle=Label(frameTheme,text='Select a Highlighting Theme') + labelTypeTitle=Label(frameTheme,text='Select : ') + radioThemeBuiltin=Radiobutton(frameTheme,variable=self.themeType, + value=0,command=self.SetThemeType,text='a Built-in Theme') + radioThemeCustom=Radiobutton(frameTheme,variable=self.themeType, + value=1,command=self.SetThemeType,text='a Custom Theme') + self.optMenuThemeBuiltin=OptionMenu(frameTheme, + self.builtinTheme,'test builtin junk','test builtin junk 2') + self.builtinTheme.set('test builtin junk') + self.optMenuThemeCustom=OptionMenu(frameTheme, + self.customTheme,'test custom junk','test custom junk 2') + self.customTheme.set('test custom junk') + self.themeType.set(0) + self.buttonDeleteCustom=Button(frameTheme,text='Delete Custom Theme') + self.SetThemeType() + + ##widget packing + #body + frameCustom.pack(side=LEFT,padx=5,pady=10,fill=Y) + frameTheme.pack(side=RIGHT,padx=5,pady=10,fill=Y) + #frameCustom + labelCustomTitle.pack(side=TOP,anchor=W,padx=5,pady=5) + frameTarget.pack(side=TOP,padx=5,pady=5,expand=TRUE,fill=X) + frameSample.pack(side=TOP,padx=5,pady=5,expand=TRUE,fill=BOTH) + frameSet.pack(side=TOP,fill=X) + frameColourSet.pack(side=LEFT,padx=5,pady=5,fill=BOTH) + frameFontSet.pack(side=RIGHT,padx=5,pady=5,anchor=W) + labelTargetTitle.pack(side=LEFT,anchor=E) + optMenuTarget.pack(side=RIGHT,anchor=W,fill=X,expand=TRUE) + buttonSetColour.pack(expand=TRUE,fill=BOTH,padx=10,pady=10) + labelFontTitle.pack(side=TOP,anchor=W) + checkFontBold.pack(side=LEFT,anchor=W,pady=2) + checkFontItalic.pack(side=RIGHT,anchor=W) + labelTestSample.pack() + buttonSaveCustom.pack(side=BOTTOM,fill=X,padx=5,pady=5) + + #frameTheme + #frameDivider.pack(side=LEFT,fill=Y,padx=5,pady=5) + labelThemeTitle.pack(side=TOP,anchor=W,padx=5,pady=5) + labelTypeTitle.pack(side=TOP,anchor=W,padx=5,pady=5) + radioThemeBuiltin.pack(side=TOP,anchor=W,padx=5) + radioThemeCustom.pack(side=TOP,anchor=W,padx=5,pady=2) + self.optMenuThemeBuiltin.pack(side=TOP,fill=X,padx=5,pady=5) + self.optMenuThemeCustom.pack(side=TOP,fill=X,anchor=W,padx=5,pady=5) + self.buttonDeleteCustom.pack(side=TOP,fill=X,padx=5,pady=5) + + return frame + + def CreatePageKeys(self): + frame=Frame(self.framePages,borderwidth=2,relief=SUNKEN) + Button(frame,text='keys page test').pack(padx=90,pady=90) + return frame + + def CreatePageGeneral(self): + frame=Frame(self.framePages,borderwidth=2,relief=SUNKEN) + Button(frame,text='general page test').pack(padx=110,pady=110) + return frame + if __name__ == '__main__': #test the dialog From elguavas@users.sourceforge.net Sat Aug 4 14:58:24 2001 From: elguavas@users.sourceforge.net (Stephen) Date: Sat, 04 Aug 2001 06:58:24 -0700 Subject: [Idle-dev] CVS: idle configDialog.py,1.3,1.4 Message-ID: Update of /cvsroot/idlefork/idle In directory usw-pr-cvs1:/tmp/cvs-serv32258 Modified Files: configDialog.py Log Message: further work on keybinding page Index: configDialog.py =================================================================== RCS file: /cvsroot/idlefork/idle/configDialog.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** configDialog.py 2001/08/03 04:43:44 1.3 --- configDialog.py 2001/08/04 13:58:22 1.4 *************** *** 11,14 **** --- 11,16 ---- import tkMessageBox + import IdleConf + class ConfigDialog(Toplevel): """ *************** *** 23,27 **** self.geometry("+%d+%d" % (parent.winfo_rootx()+20, parent.winfo_rooty()+30)) ! self.config=configDict #elguavas - config placeholders til config stuff completed self.bg=self.cget('bg') --- 25,29 ---- self.geometry("+%d+%d" % (parent.winfo_rootx()+20, parent.winfo_rooty()+30)) ! self.LoadConfig() #elguavas - config placeholders til config stuff completed self.bg=self.cget('bg') *************** *** 39,43 **** self.framePages.focus_set() #key bindings for this dialog - # self.bind('',self.Ok) #dismiss dialog self.bind('',self.CancelBinding) #dismiss dialog, no save self.bind('',self.SaveBinding) #dismiss dialog, save --- 41,44 ---- *************** *** 49,52 **** --- 50,64 ---- self.wait_window() + def LoadConfig(self): + #self.configParser=IdleConf.idleconf + #self.loadedConfig={} + #self.workingConfig={} + #for key in .keys(): + #print self.configParser.getsection('Colors').options() + self.workingTestColours={ + 'Foo-Bg': '#ffffff', + 'Foo-Fg': '#000000', + 'Bar-Bg': '#777777'} + def Cancel(self): self.destroy() *************** *** 69,73 **** def ChangePage(self): self.pages[self.pageNum.get()].lift() ! self.title('Settings -'+self.pageButtons[self.pageNum.get()].cget('text')) def ChangePageBinding(self,event): --- 81,85 ---- def ChangePage(self): self.pages[self.pageNum.get()].lift() ! self.title('Settings - '+self.pageButtons[self.pageNum.get()].cget('text')) def ChangePageBinding(self,event): *************** *** 85,93 **** self.optMenuThemeBuiltin.config(state=NORMAL) self.optMenuThemeCustom.config(state=DISABLED) ! self.buttonDeleteCustom.config(state=DISABLED) elif self.themeType.get()==1: self.optMenuThemeBuiltin.config(state=DISABLED) self.optMenuThemeCustom.config(state=NORMAL) ! self.buttonDeleteCustom.config(state=NORMAL) def CreateWidgets(self): --- 97,115 ---- self.optMenuThemeBuiltin.config(state=NORMAL) self.optMenuThemeCustom.config(state=DISABLED) ! self.buttonDeleteCustomTheme.config(state=DISABLED) elif self.themeType.get()==1: self.optMenuThemeBuiltin.config(state=DISABLED) self.optMenuThemeCustom.config(state=NORMAL) ! self.buttonDeleteCustomTheme.config(state=NORMAL) ! ! def SetKeysType(self): ! if self.keysType.get()==0: ! self.optMenuKeysBuiltin.config(state=NORMAL) ! self.optMenuKeysCustom.config(state=DISABLED) ! self.buttonDeleteCustomKeys.config(state=DISABLED) ! elif self.keysType.get()==1: ! self.optMenuKeysBuiltin.config(state=DISABLED) ! self.optMenuKeysCustom.config(state=NORMAL) ! self.buttonDeleteCustomKeys.config(state=NORMAL) def CreateWidgets(self): *************** *** 105,109 **** self.pageNum=IntVar() self.pageNum.set(0) ! buttonPageFonts = Radiobutton(framePageButtons,value=0, text='Font/Tabs',padx=5,pady=5) buttonPageHighlight = Radiobutton(framePageButtons,value=1, --- 127,131 ---- self.pageNum=IntVar() self.pageNum.set(0) ! buttonPageFontTab = Radiobutton(framePageButtons,value=0, text='Font/Tabs',padx=5,pady=5) buttonPageHighlight = Radiobutton(framePageButtons,value=1, *************** *** 113,117 **** buttonPageGeneral = Radiobutton(framePageButtons,value=3, text='General',padx=5,pady=5) ! self.pageButtons=(buttonPageFonts,buttonPageHighlight, buttonPageKeys,buttonPageGeneral) for button in self.pageButtons: --- 135,139 ---- buttonPageGeneral = Radiobutton(framePageButtons,value=3, text='General',padx=5,pady=5) ! self.pageButtons=(buttonPageFontTab,buttonPageHighlight, buttonPageKeys,buttonPageGeneral) for button in self.pageButtons: *************** *** 121,125 **** button.pack(side=LEFT) #pages ! self.pages=(self.CreatePageFonts(), self.CreatePageHighlight(), self.CreatePageKeys(), --- 143,147 ---- button.pack(side=LEFT) #pages ! self.pages=(self.CreatePageFontTab(), self.CreatePageHighlight(), self.CreatePageKeys(), *************** *** 136,147 **** self.framePages.pack(side=TOP,expand=TRUE,fill=BOTH) ! def CreatePageFonts(self): frame=Frame(self.framePages,borderwidth=2,relief=SUNKEN) ! Button(frame,text='fonts page test').pack(padx=30,pady=30) return frame def CreatePageHighlight(self): #tkVars ! self.target=StringVar() self.builtinTheme=StringVar() self.customTheme=StringVar() --- 158,169 ---- self.framePages.pack(side=TOP,expand=TRUE,fill=BOTH) ! def CreatePageFontTab(self): frame=Frame(self.framePages,borderwidth=2,relief=SUNKEN) ! Button(frame,text='font/tabs page test').pack(padx=90,pady=90) return frame def CreatePageHighlight(self): #tkVars ! self.highlightTarget=StringVar() self.builtinTheme=StringVar() self.customTheme=StringVar() *************** *** 158,174 **** frameCustom=Frame(frame,borderwidth=2,relief=GROOVE) frameTheme=Frame(frame,borderwidth=2,relief=GROOVE) - #frameCustom frameTarget=Frame(frameCustom) ! frameSample=Frame(frameCustom,relief=SOLID,borderwidth=1) frameSet=Frame(frameCustom) ! frameColourSet=Frame(frameSet,relief=SOLID,borderwidth=1) frameFontSet=Frame(frameSet) - labelCustomTitle=Label(frameCustom,text='Set Custom Highlighting') labelTargetTitle=Label(frameTarget,text='for : ') optMenuTarget=OptionMenu(frameTarget, ! self.target,'test target interface item','test target interface item 2') ! self.target.set('test target interface item') buttonSetColour=Button(frameColourSet,text='Set Colour') labelFontTitle=Label(frameFontSet,text='Set Font Style') --- 180,196 ---- frameCustom=Frame(frame,borderwidth=2,relief=GROOVE) frameTheme=Frame(frame,borderwidth=2,relief=GROOVE) #frameCustom frameTarget=Frame(frameCustom) ! frameSample=Frame(frameCustom,relief=SOLID,borderwidth=1, ! bg=self.workingTestColours['Foo-Bg']) frameSet=Frame(frameCustom) ! frameColourSet=Frame(frameSet,relief=SOLID,borderwidth=1, ! bg=self.workingTestColours['Foo-Bg']) frameFontSet=Frame(frameSet) labelCustomTitle=Label(frameCustom,text='Set Custom Highlighting') labelTargetTitle=Label(frameTarget,text='for : ') optMenuTarget=OptionMenu(frameTarget, ! self.highlightTarget,'test target interface item','test target interface item 2') ! self.highlightTarget.set('test target interface item') buttonSetColour=Button(frameColourSet,text='Set Colour') labelFontTitle=Label(frameFontSet,text='Set Font Style') *************** *** 178,185 **** onvalue='Italic',offvalue='',text='Italic') labelTestSample=Label(frameSample,justify=LEFT, ! text='def Ahem(foo,bar):\n test=foo\n text=bar\n return') ! buttonSaveCustom=Button(frameCustom, text='Save as a Custom Theme') - #frameTheme #frameDivider=Frame(frameTheme,relief=SUNKEN,borderwidth=1, --- 200,207 ---- onvalue='Italic',offvalue='',text='Italic') labelTestSample=Label(frameSample,justify=LEFT, ! text='def Ahem(foo,bar):\n test=foo\n text=bar\n return', ! bg=self.workingTestColours['Foo-Bg']) ! buttonSaveCustomTheme=Button(frameCustom, text='Save as a Custom Theme') #frameTheme #frameDivider=Frame(frameTheme,relief=SUNKEN,borderwidth=1, *************** *** 198,208 **** self.customTheme.set('test custom junk') self.themeType.set(0) ! self.buttonDeleteCustom=Button(frameTheme,text='Delete Custom Theme') self.SetThemeType() - ##widget packing #body ! frameCustom.pack(side=LEFT,padx=5,pady=10,fill=Y) ! frameTheme.pack(side=RIGHT,padx=5,pady=10,fill=Y) #frameCustom labelCustomTitle.pack(side=TOP,anchor=W,padx=5,pady=5) --- 220,229 ---- self.customTheme.set('test custom junk') self.themeType.set(0) ! self.buttonDeleteCustomTheme=Button(frameTheme,text='Delete Custom Theme') self.SetThemeType() ##widget packing #body ! frameCustom.pack(side=LEFT,padx=5,pady=10,expand=TRUE,fill=BOTH) ! frameTheme.pack(side=LEFT,padx=5,pady=10,fill=Y) #frameCustom labelCustomTitle.pack(side=TOP,anchor=W,padx=5,pady=5) *************** *** 219,224 **** checkFontItalic.pack(side=RIGHT,anchor=W) labelTestSample.pack() ! buttonSaveCustom.pack(side=BOTTOM,fill=X,padx=5,pady=5) ! #frameTheme #frameDivider.pack(side=LEFT,fill=Y,padx=5,pady=5) --- 240,244 ---- checkFontItalic.pack(side=RIGHT,anchor=W) labelTestSample.pack() ! buttonSaveCustomTheme.pack(side=BOTTOM,fill=X,padx=5,pady=5) #frameTheme #frameDivider.pack(side=LEFT,fill=Y,padx=5,pady=5) *************** *** 229,239 **** self.optMenuThemeBuiltin.pack(side=TOP,fill=X,padx=5,pady=5) self.optMenuThemeCustom.pack(side=TOP,fill=X,anchor=W,padx=5,pady=5) ! self.buttonDeleteCustom.pack(side=TOP,fill=X,padx=5,pady=5) ! return frame def CreatePageKeys(self): frame=Frame(self.framePages,borderwidth=2,relief=SUNKEN) ! Button(frame,text='keys page test').pack(padx=90,pady=90) return frame --- 249,329 ---- self.optMenuThemeBuiltin.pack(side=TOP,fill=X,padx=5,pady=5) self.optMenuThemeCustom.pack(side=TOP,fill=X,anchor=W,padx=5,pady=5) ! self.buttonDeleteCustomTheme.pack(side=TOP,fill=X,padx=5,pady=5) return frame def CreatePageKeys(self): + #tkVars + self.bindingTarget=StringVar() + self.builtinKeys=StringVar() + self.customKeys=StringVar() + self.keyChars=StringVar() + self.keyCtrl=StringVar() + self.keyAlt=StringVar() + self.keyShift=StringVar() + self.keysType=IntVar() + ##widget creation + #body frame frame=Frame(self.framePages,borderwidth=2,relief=SUNKEN) ! #body section frames ! frameCustom=Frame(frame,borderwidth=2,relief=GROOVE) ! frameKeySets=Frame(frame,borderwidth=2,relief=GROOVE) ! #frameCustom ! frameTarget=Frame(frameCustom) ! frameSet=Frame(frameCustom) ! labelCustomTitle=Label(frameCustom,text='Set Custom Key Bindings') ! labelTargetTitle=Label(frameTarget,text='Action') ! scrollTarget=Scrollbar(frameTarget) ! listTarget=Listbox(frameTarget) ! labelKeyBindTitle=Label(frameSet,text='Binding') ! labelModifierTitle=Label(frameSet,text='Modifier:') ! checkCtrl=Checkbutton(frameSet,text='Ctrl') ! checkAlt=Checkbutton(frameSet,text='Alt') ! checkShift=Checkbutton(frameSet,text='Shift') ! labelKeyEntryTitle=Label(frameSet,text='Key:') ! entryKey=Entry(frameSet,width=4) ! buttonSaveCustomKeys=Button(frameCustom,text='Save as a Custom Key Set') ! #frameKeySets ! labelKeysTitle=Label(frameKeySets,text='Select a Key Binding Set') ! labelTypeTitle=Label(frameKeySets,text='Select : ') ! radioKeysBuiltin=Radiobutton(frameKeySets,variable=self.keysType, ! value=0,command=self.SetKeysType,text='a Built-in Key Set') ! radioKeysCustom=Radiobutton(frameKeySets,variable=self.keysType, ! value=1,command=self.SetKeysType,text='a Custom Key Set') ! self.optMenuKeysBuiltin=OptionMenu(frameKeySets, ! self.builtinKeys,'test builtin junk','test builtin junk 2') ! self.builtinKeys.set('test builtin junk') ! self.optMenuKeysCustom=OptionMenu(frameKeySets, ! self.customKeys,'test custom junk','test custom junk 2') ! self.customKeys.set('test custom junk') ! self.keysType.set(0) ! self.buttonDeleteCustomKeys=Button(frameKeySets,text='Delete Custom Key Set') ! self.SetKeysType() ! ##widget packing ! #body ! frameCustom.pack(side=LEFT,padx=5,pady=5,expand=TRUE,fill=BOTH) ! frameKeySets.pack(side=LEFT,padx=5,pady=5,fill=Y) ! #frameCustom ! labelCustomTitle.pack(side=TOP,anchor=W,padx=5,pady=5) ! buttonSaveCustomKeys.pack(side=BOTTOM,fill=X,padx=5,pady=5) ! frameTarget.pack(side=LEFT,padx=5,pady=5,fill=Y) ! frameSet.pack(side=LEFT,padx=5,pady=5,fill=Y) ! labelTargetTitle.pack(side=TOP,anchor=W) ! scrollTarget.pack(side=RIGHT,anchor=W,fill=Y) ! listTarget.pack(side=TOP,anchor=W,expand=TRUE,fill=BOTH) ! labelKeyBindTitle.pack(side=TOP,anchor=W) ! labelModifierTitle.pack(side=TOP,anchor=W,pady=5) ! checkCtrl.pack(side=TOP,anchor=W) ! checkAlt.pack(side=TOP,anchor=W,pady=2) ! checkShift.pack(side=TOP,anchor=W) ! labelKeyEntryTitle.pack(side=TOP,anchor=W,pady=5) ! entryKey.pack(side=TOP,anchor=W) ! #frameKeySets ! labelKeysTitle.pack(side=TOP,anchor=W,padx=5,pady=5) ! labelTypeTitle.pack(side=TOP,anchor=W,padx=5,pady=5) ! radioKeysBuiltin.pack(side=TOP,anchor=W,padx=5) ! radioKeysCustom.pack(side=TOP,anchor=W,padx=5,pady=2) ! self.optMenuKeysBuiltin.pack(side=TOP,fill=X,padx=5,pady=5) ! self.optMenuKeysCustom.pack(side=TOP,fill=X,anchor=W,padx=5,pady=5) ! self.buttonDeleteCustomKeys.pack(side=TOP,fill=X,padx=5,pady=5) return frame From mats@laplaza.org Sat Aug 4 18:12:26 2001 From: mats@laplaza.org (Mats Wichmann) Date: Sat, 04 Aug 2001 11:12:26 -0600 Subject: [Idle-dev] current working directory In-Reply-To: Message-ID: <5.1.0.14.1.20010804110855.01fd0810@204.151.72.2> A thought, taking the lazy way out and bouncing it off the list instead of thinking in detail... Would it make sense to add a menu option to change the current working directory of the shell, and perhaps have the IDLE shell display the CWD in the title bar? I've found my tudents sometimes lose track of where they are. Yes you can do it pythonically, and of course they should learn to do that pretty early, but at least in a classroom context there's a lot to juggle in a short amount of time, and a little reminder wouldn't seem to hurt. Fire away! Mats From guido@zope.com Sat Aug 4 18:41:56 2001 From: guido@zope.com (Guido van Rossum) Date: Sat, 04 Aug 2001 13:41:56 -0400 Subject: [Idle-dev] current working directory In-Reply-To: Your message of "Sat, 04 Aug 2001 11:12:26 MDT." <5.1.0.14.1.20010804110855.01fd0810@204.151.72.2> References: <5.1.0.14.1.20010804110855.01fd0810@204.151.72.2> Message-ID: <200108041741.NAA11758@cj20424-a.reston1.va.home.com> > A thought, taking the lazy way out and bouncing it > off the list instead of thinking in detail... > > Would it make sense to add a menu option to change > the current working directory of the shell, and > perhaps have the IDLE shell display the CWD in the > title bar? > > I've found my tudents sometimes lose track of where > they are. Yes you can do it pythonically, and > of course they should learn to do that pretty > early, but at least in a classroom context there's > a lot to juggle in a short amount of time, and a > little reminder wouldn't seem to hurt. Yes, a notion of "current directory" would make sense. It also makes sense to have a current (or "default") directory per file window -- there's some notion of this, but it's not always used (I would like the "new window" command to inherit the default directory from the window that received the event). --Guido van Rossum (home page: http://www.python.org/~guido/) From elguavas@users.sourceforge.net Sun Aug 5 09:00:30 2001 From: elguavas@users.sourceforge.net (Stephen) Date: Sun, 05 Aug 2001 01:00:30 -0700 Subject: [Idle-dev] CVS: idle configDialog.py,1.4,1.5 Message-ID: Update of /cvsroot/idlefork/idle In directory usw-pr-cvs1:/tmp/cvs-serv14520 Modified Files: configDialog.py Log Message: began font / indentation page Index: configDialog.py =================================================================== RCS file: /cvsroot/idlefork/idle/configDialog.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** configDialog.py 2001/08/04 13:58:22 1.4 --- configDialog.py 2001/08/05 08:00:28 1.5 *************** *** 159,164 **** def CreatePageFontTab(self): frame=Frame(self.framePages,borderwidth=2,relief=SUNKEN) ! Button(frame,text='font/tabs page test').pack(padx=90,pady=90) return frame --- 159,239 ---- def CreatePageFontTab(self): + #tkVars + self.fontName=StringVar() + self.fontSize=StringVar() + self.spaceNum=IntVar() + self.tabCols=IntVar() + self.indentType=IntVar() + ##widget creation + #body frame frame=Frame(self.framePages,borderwidth=2,relief=SUNKEN) ! #body section frames ! frameFont=Frame(frame,borderwidth=2,relief=GROOVE) ! frameIndent=Frame(frame,borderwidth=2,relief=GROOVE) ! #frameFont ! labelFontTitle=Label(frameFont,text='Set Base Editor Font') ! frameFontName=Frame(frameFont) ! frameFontSize=Frame(frameFont) ! labelFontNameTitle=Label(frameFontName,justify=LEFT, ! text='Choose from available\nmonospaced fonts :') ! optFontName=OptionMenu(frameFontName, ! self.fontName,'Courier','Font Name 2','Font Name 3') ! self.fontName.set('Courier') ! labelFontSizeTitle=Label(frameFontSize,text='Choose font size :') ! optFontSize=OptionMenu(frameFontSize, ! self.fontSize,'8','10','12','14','16','18','20') ! self.fontSize.set('12') ! frameFontSample=Frame(frameFont,relief=SOLID,borderwidth=1, ! bg=self.workingTestColours['Foo-Bg']) ! labelFontSample=Label(frameFontSample,bg=self.workingTestColours['Foo-Bg'], ! fg='#000000',text='Font\nSample',justify=LEFT, ! font=('courier',12,'')) ! #frameIndent ! labelIndentTitle=Label(frameIndent,text='Set Indentation Defaults') ! frameIndentType=Frame(frameIndent) ! frameIndentSize=Frame(frameIndent) ! labelIndentTypeTitle=Label(frameIndentType, ! text='Choose indentation type :') ! radioUseSpaces=Radiobutton(frameIndentType,variable=self.indentType, ! value=0,text='Tab key inserts spaces') ! radioUseTabs=Radiobutton(frameIndentType,variable=self.indentType, ! value=1,text='Tab key inserts tabs') ! labelIndentSizeTitle=Label(frameIndentSize, ! text='Choose indentation size :') ! labelSpaceNumTitle=Label(frameIndentSize,justify=LEFT, ! text='when tab key inserts spaces,\nspaces per tab') ! self.scaleSpaceNum=Scale(frameIndentSize,variable=self.spaceNum, ! orient='horizontal',tickinterval=2,from_=2,to=8) ! labeltabColsTitle=Label(frameIndentSize,justify=LEFT, ! text='when tab key inserts tabs,\ncolumns per tab') ! self.scaleTabCols=Scale(frameIndentSize,variable=self.tabCols, ! orient='horizontal',tickinterval=2,from_=2,to=8) ! ! #widget packing ! #body ! frameFont.pack(side=LEFT,padx=5,pady=10,fill=Y) ! frameIndent.pack(side=LEFT,padx=5,pady=10,expand=TRUE,fill=BOTH) ! #frameFont ! labelFontTitle.pack(side=TOP,anchor=W,padx=5,pady=5) ! frameFontName.pack(side=TOP,padx=5,pady=5,fill=X) ! frameFontSize.pack(side=TOP,padx=5,pady=5,fill=BOTH) ! labelFontNameTitle.pack(side=TOP,anchor=W) ! optFontName.pack(side=TOP,pady=5,fill=X) ! labelFontSizeTitle.pack(side=TOP,anchor=W) ! optFontSize.pack(side=TOP,pady=5,fill=X) ! frameFontSample.pack(side=TOP,padx=5,pady=5,expand=TRUE,fill=BOTH) ! labelFontSample.pack(expand=TRUE,fill=BOTH) ! #frameIndent ! labelIndentTitle.pack(side=TOP,anchor=W,padx=5,pady=5) ! frameIndentType.pack(side=TOP,padx=5,fill=X) ! frameIndentSize.pack(side=TOP,padx=5,pady=5,fill=BOTH) ! labelIndentTypeTitle.pack(side=TOP,anchor=W,padx=5,pady=5) ! radioUseSpaces.pack(side=TOP,anchor=W,padx=5) ! radioUseTabs.pack(side=TOP,anchor=W,padx=5) ! labelIndentSizeTitle.pack(side=TOP,anchor=W,padx=5,pady=5) ! labelSpaceNumTitle.pack(side=TOP,anchor=W,padx=5) ! self.scaleSpaceNum.pack(side=TOP,padx=5,fill=X) ! labeltabColsTitle.pack(side=TOP,anchor=W,padx=5) ! self.scaleTabCols.pack(side=TOP,padx=5,fill=X) return frame *************** *** 199,204 **** checkFontItalic=Checkbutton(frameFontSet,variable=self.fontItalic, onvalue='Italic',offvalue='',text='Italic') ! labelTestSample=Label(frameSample,justify=LEFT, ! text='def Ahem(foo,bar):\n test=foo\n text=bar\n return', bg=self.workingTestColours['Foo-Bg']) buttonSaveCustomTheme=Button(frameCustom, --- 274,282 ---- checkFontItalic=Checkbutton(frameFontSet,variable=self.fontItalic, onvalue='Italic',offvalue='',text='Italic') ! labelTestSample=Label(frameSample,justify=LEFT,font=('courier',12,''), ! text='#when finished, this\n#sample area will\n#be interactive\n'+ ! 'def Ahem(foo,bar):\n '+ ! '"""'+'doc hazard'+'"""'+ ! '\n test=foo\n text=bar\n return', bg=self.workingTestColours['Foo-Bg']) buttonSaveCustomTheme=Button(frameCustom, *************** *** 228,232 **** #frameCustom labelCustomTitle.pack(side=TOP,anchor=W,padx=5,pady=5) ! frameTarget.pack(side=TOP,padx=5,pady=5,expand=TRUE,fill=X) frameSample.pack(side=TOP,padx=5,pady=5,expand=TRUE,fill=BOTH) frameSet.pack(side=TOP,fill=X) --- 306,310 ---- #frameCustom labelCustomTitle.pack(side=TOP,anchor=W,padx=5,pady=5) ! frameTarget.pack(side=TOP,padx=5,pady=5,fill=X) frameSample.pack(side=TOP,padx=5,pady=5,expand=TRUE,fill=BOTH) frameSet.pack(side=TOP,fill=X) *************** *** 234,243 **** frameFontSet.pack(side=RIGHT,padx=5,pady=5,anchor=W) labelTargetTitle.pack(side=LEFT,anchor=E) ! optMenuTarget.pack(side=RIGHT,anchor=W,fill=X,expand=TRUE) buttonSetColour.pack(expand=TRUE,fill=BOTH,padx=10,pady=10) labelFontTitle.pack(side=TOP,anchor=W) checkFontBold.pack(side=LEFT,anchor=W,pady=2) checkFontItalic.pack(side=RIGHT,anchor=W) ! labelTestSample.pack() buttonSaveCustomTheme.pack(side=BOTTOM,fill=X,padx=5,pady=5) #frameTheme --- 312,321 ---- frameFontSet.pack(side=RIGHT,padx=5,pady=5,anchor=W) labelTargetTitle.pack(side=LEFT,anchor=E) ! optMenuTarget.pack(side=RIGHT,anchor=W,expand=TRUE,fill=X) buttonSetColour.pack(expand=TRUE,fill=BOTH,padx=10,pady=10) labelFontTitle.pack(side=TOP,anchor=W) checkFontBold.pack(side=LEFT,anchor=W,pady=2) checkFontItalic.pack(side=RIGHT,anchor=W) ! labelTestSample.pack(anchor=CENTER,expand=TRUE,fill=BOTH) buttonSaveCustomTheme.pack(side=BOTTOM,fill=X,padx=5,pady=5) #frameTheme *************** *** 284,288 **** buttonSaveCustomKeys=Button(frameCustom,text='Save as a Custom Key Set') #frameKeySets ! labelKeysTitle=Label(frameKeySets,text='Select a Key Binding Set') labelTypeTitle=Label(frameKeySets,text='Select : ') radioKeysBuiltin=Radiobutton(frameKeySets,variable=self.keysType, --- 362,366 ---- buttonSaveCustomKeys=Button(frameCustom,text='Save as a Custom Key Set') #frameKeySets ! labelKeysTitle=Label(frameKeySets,text='Select a Key Set') labelTypeTitle=Label(frameKeySets,text='Select : ') radioKeysBuiltin=Radiobutton(frameKeySets,variable=self.keysType, From elguavas@users.sourceforge.net Tue Aug 7 04:28:28 2001 From: elguavas@users.sourceforge.net (Stephen) Date: Mon, 06 Aug 2001 20:28:28 -0700 Subject: [Idle-dev] CVS: idle configDialog.py,1.5,1.6 Message-ID: Update of /cvsroot/idlefork/idle In directory usw-pr-cvs1:/tmp/cvs-serv10587 Modified Files: configDialog.py Log Message: more fleshing out, this time primarily the 'general' page Index: configDialog.py =================================================================== RCS file: /cvsroot/idlefork/idle/configDialog.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** configDialog.py 2001/08/05 08:00:28 1.5 --- configDialog.py 2001/08/07 03:28:25 1.6 *************** *** 81,85 **** def ChangePage(self): self.pages[self.pageNum.get()].lift() ! self.title('Settings - '+self.pageButtons[self.pageNum.get()].cget('text')) def ChangePageBinding(self,event): --- 81,86 ---- def ChangePage(self): self.pages[self.pageNum.get()].lift() ! self.title('Settings - '+ ! self.pageButtons[self.pageNum.get()].cget('text')) def ChangePageBinding(self,event): *************** *** 407,412 **** def CreatePageGeneral(self): frame=Frame(self.framePages,borderwidth=2,relief=SUNKEN) ! Button(frame,text='general page test').pack(padx=110,pady=110) return frame --- 408,483 ---- def CreatePageGeneral(self): + #tkVars + self.runType=IntVar() + self.winWidth=StringVar() + self.winHeight=StringVar() + self.extState=IntVar() + #widget creation + #body frame=Frame(self.framePages,borderwidth=2,relief=SUNKEN) ! #body section frames ! frameRun=Frame(frame,borderwidth=2,relief=GROOVE) ! frameWinSize=Frame(frame,borderwidth=2,relief=GROOVE) ! frameExt=Frame(frame,borderwidth=2,relief=GROOVE) ! #frameRun ! labelRunTitle=Label(frameRun,text='Run Preferences') ! labelRunChoiceTitle=Label(frameRun,text='Run code : ') ! radioRunInternal=Radiobutton(frameRun,variable=self.runType, ! value=0,command=self.SetKeysType,text="in IDLE's Process") ! radioRunSeparate=Radiobutton(frameRun,variable=self.runType, ! value=1,command=self.SetKeysType,text='in a Separate Process') ! #frameWinSize ! labelWinSizeTitle=Label(frameWinSize,text='Initial Window Size') ! buttonWinSizeSet=Button(frameWinSize,text='Set to current window size') ! labelWinWidthTitle=Label(frameWinSize,text='Width') ! entryWinWidth=Entry(frameWinSize,textvariable=self.winWidth, ! width=3) ! labelWinHeightTitle=Label(frameWinSize,text='Height') ! entryWinHeight=Entry(frameWinSize,textvariable=self.winHeight, ! width=3) ! #frameExt ! frameExtList=Frame(frameExt) ! frameExtSet=Frame(frameExt) ! labelExtTitle=Label(frameExt,text='Configure IDLE Extensions') ! labelExtListTitle=Label(frameExtList,text='Extension') ! scrollExtList=Scrollbar(frameExtList) ! listExt=Listbox(frameExtList,height=5) ! labelExtSetTitle=Label(frameExtSet,text='Settings') ! radioEnableExt=Radiobutton(frameExtSet,variable=self.extState, ! value=1,text="enable") ! radioDisableExt=Radiobutton(frameExtSet,variable=self.extState, ! value=0,text="disable") ! self.extState.set(1) ! buttonExtConfig=Button(frameExtSet,text='Configure') ! ! #widget packing ! #body ! frameRun.pack(side=TOP,padx=5,pady=5,fill=X) ! frameWinSize.pack(side=TOP,padx=5,pady=5,fill=X) ! frameExt.pack(side=TOP,padx=5,pady=5,expand=TRUE,fill=BOTH) ! #frameRun ! labelRunTitle.pack(side=TOP,anchor=W,padx=5,pady=5) ! labelRunChoiceTitle.pack(side=LEFT,anchor=W,padx=5,pady=5) ! radioRunInternal.pack(side=LEFT,anchor=W,padx=5,pady=5) ! radioRunSeparate.pack(side=LEFT,anchor=W,padx=5,pady=5) ! #frameWinSize ! labelWinSizeTitle.pack(side=TOP,anchor=W,padx=5,pady=5) ! buttonWinSizeSet.pack(side=LEFT,anchor=W,padx=5,pady=5) ! labelWinWidthTitle.pack(side=LEFT,anchor=W,padx=5,pady=5) ! entryWinWidth.pack(side=LEFT,anchor=W,padx=5,pady=5) ! labelWinHeightTitle.pack(side=LEFT,anchor=W,padx=5,pady=5) ! entryWinHeight.pack(side=LEFT,anchor=W,padx=5,pady=5) ! #frameExt ! labelExtTitle.pack(side=TOP,anchor=W,padx=5,pady=5) ! frameExtSet.pack(side=RIGHT,padx=5,pady=5,fill=Y) ! frameExtList.pack(side=RIGHT,padx=5,pady=5,expand=TRUE,fill=BOTH) ! labelExtListTitle.pack(side=TOP,anchor=W) ! scrollExtList.pack(side=RIGHT,anchor=W,fill=Y) ! listExt.pack(side=LEFT,anchor=E,expand=TRUE,fill=BOTH) ! labelExtSetTitle.pack(side=TOP,anchor=W) ! radioEnableExt.pack(side=TOP,anchor=W) ! radioDisableExt.pack(side=TOP,anchor=W) ! buttonExtConfig.pack(side=TOP,anchor=W,pady=5) ! return frame From mats@laplaza.org Tue Aug 7 17:05:33 2001 From: mats@laplaza.org (Mats Wichmann) Date: Tue, 07 Aug 2001 10:05:33 -0600 Subject: [Idle-dev] Clearing the environment In-Reply-To: Message-ID: <5.1.0.14.1.20010807100149.00af79f8@204.151.72.2> This came up on comp.lang.python, and it seems like it's been visited here as well (I seem to have deleted the messages, if so, so maybe my memory is just failing): ============ begin clip ====================== On 6 Aug 2001 15:09:07 -0700, Ben C wrote: >Hi, > >Sorry to bother the group with such a trivial Q but for some reason I >can not find an answer to this in the docs ... how does one 'clear' >the Python environment .... so all loaded modules and variables are >freed? (ie return the Python environment back to its initial state at >start up) I assumed it would have been in the sys module? The command is actually in the os module: os.execvp('python', ('python',)) It would be difficult to reset the system "live". You'd have to unload all the modules (remove them out of the namespace, and also remove their sys.modules entries). Then you'd have to clear out the rest of the namespace, except things like __builtins__ and None (you want to keep __builtins__ so you don't lose access to __import__), and manually import the modules the toplevel automatically imports when it starts (such as site and exceptions (well, not exceptions any more, I guess)). And probably a bunch of other things I forgot. ============ end clip ====================== Speaking for me now, I can see situations where I'd like to have the environment in the "shell" reset, but the command history remembered, so just wiping out the shell window before rerunning the scipt is not ideal. Like, if I've tried out some manual inspection commands that showed a problem in the module under development; I'd like to rerun in a clean environment yet be able to call those commands back. Reload is only sometimes the answer... Is this a silly desire? /Is/ there a reasonable way to accomplish this? Mats From guido@python.org Tue Aug 7 17:15:57 2001 From: guido@python.org (Guido van Rossum) Date: Tue, 07 Aug 2001 12:15:57 -0400 Subject: [Idle-dev] Clearing the environment In-Reply-To: Your message of "Tue, 07 Aug 2001 10:05:33 MDT." <5.1.0.14.1.20010807100149.00af79f8@204.151.72.2> References: <5.1.0.14.1.20010807100149.00af79f8@204.151.72.2> Message-ID: <200108071616.f77GFxG28455@odiug.digicool.com> > >Sorry to bother the group with such a trivial Q but for some reason I > >can not find an answer to this in the docs ... how does one 'clear' > >the Python environment .... so all loaded modules and variables are > >freed? (ie return the Python environment back to its initial state at > >start up) I assumed it would have been in the sys module? The remote execution intends to make this easy. Each script execution starts afresh. --Guido van Rossum (home page: http://www.python.org/~guido/) From pobrien@orbtech.com Tue Aug 7 19:43:14 2001 From: pobrien@orbtech.com (Patrick K. O'Brien) Date: Tue, 7 Aug 2001 13:43:14 -0500 Subject: [Idle-dev] Clearing the environment In-Reply-To: <5.1.0.14.1.20010807100149.00af79f8@204.151.72.2> Message-ID: Conceptually I think this is doable. I could imagine two scenarios. One where you want the shell reset back to square one, as if you had just opened it up, but without losing the command history. The second would be the same as the first but in addition you'd want everything reloaded so that your local namespace was the same as when you called the hypothetical "shell.reset()" only it would be "fresh". Something like the following is what I'm thinking: 1. if necessary, copy the command history so it won't get lost 2. capture the state of the interpreter 3. delete the interpreter object 4. create a new interpreter object 5. reload whatever to get back to the previous state I'll add that to my to-do list for PyCrust: http://sourceforge.net/projects/pycrust/ --- Patrick K. O'Brien Orbtech "I am, therefore I think." -----Original Message----- From: idle-dev-admin@python.org [mailto:idle-dev-admin@python.org]On Behalf Of Mats Wichmann Sent: Tuesday, August 07, 2001 11:06 AM To: idle-dev@python.org Subject: [Idle-dev] Clearing the environment Speaking for me now, I can see situations where I'd like to have the environment in the "shell" reset, but the command history remembered, so just wiping out the shell window before rerunning the scipt is not ideal. Like, if I've tried out some manual inspection commands that showed a problem in the module under development; I'd like to rerun in a clean environment yet be able to call those commands back. Reload is only sometimes the answer... Is this a silly desire? /Is/ there a reasonable way to accomplish this? Mats _______________________________________________ IDLE-dev mailing list IDLE-dev@python.org http://mail.python.org/mailman/listinfo/idle-dev From guido@python.org Tue Aug 7 20:06:38 2001 From: guido@python.org (Guido van Rossum) Date: Tue, 07 Aug 2001 15:06:38 -0400 Subject: [Idle-dev] Clearing the environment In-Reply-To: Your message of "Tue, 07 Aug 2001 13:43:14 CDT." References: Message-ID: <200108071906.f77J6cM32073@odiug.digicool.com> > Conceptually I think this is doable. I could imagine two scenarios. One > where you want the shell reset back to square one, as if you had just opened > it up, but without losing the command history. The second would be the same > as the first but in addition you'd want everything reloaded so that your > local namespace was the same as when you called the hypothetical > "shell.reset()" only it would be "fresh". Something like the following is > what I'm thinking: > > 1. if necessary, copy the command history so it won't get lost > 2. capture the state of the interpreter > 3. delete the interpreter object > 4. create a new interpreter object > 5. reload whatever to get back to the previous state What exactly would this accomplish? It sounds like an expensive no-op to me... > I'll add that to my to-do list for PyCrust: > > http://sourceforge.net/projects/pycrust/ Where are the released files? The Development Status claims 6 - Mature, but there are no files and the home page is empty. Do you expect interested parties to check it out of CVS? --Guido van Rossum (home page: http://www.python.org/~guido/) From pobrien@orbtech.com Tue Aug 7 20:22:29 2001 From: pobrien@orbtech.com (Patrick K. O'Brien) Date: Tue, 7 Aug 2001 14:22:29 -0500 Subject: [Idle-dev] Clearing the environment In-Reply-To: <200108071906.f77J6cM32073@odiug.digicool.com> Message-ID: I guess thinking aloud got me an expensive no-op. At this time, yes, the PyCrust files are only in CVS and the home page is, indeed, empty. The status of 6 - mature is a mistake. I'll fix that. And then I'll crawl back under my rock and go back to coding. --- Patrick K. O'Brien Orbtech "I am, therefore I think." -----Original Message----- From: idle-dev-admin@python.org [mailto:idle-dev-admin@python.org]On Behalf Of Guido van Rossum Sent: Tuesday, August 07, 2001 2:07 PM To: pobrien@orbtech.com Cc: Mats Wichmann; IDLE Developers List Subject: Re: [Idle-dev] Clearing the environment > Conceptually I think this is doable. I could imagine two scenarios. One > where you want the shell reset back to square one, as if you had just opened > it up, but without losing the command history. The second would be the same > as the first but in addition you'd want everything reloaded so that your > local namespace was the same as when you called the hypothetical > "shell.reset()" only it would be "fresh". Something like the following is > what I'm thinking: > > 1. if necessary, copy the command history so it won't get lost > 2. capture the state of the interpreter > 3. delete the interpreter object > 4. create a new interpreter object > 5. reload whatever to get back to the previous state What exactly would this accomplish? It sounds like an expensive no-op to me... > I'll add that to my to-do list for PyCrust: > > http://sourceforge.net/projects/pycrust/ Where are the released files? The Development Status claims 6 - Mature, but there are no files and the home page is empty. Do you expect interested parties to check it out of CVS? --Guido van Rossum (home page: http://www.python.org/~guido/) _______________________________________________ IDLE-dev mailing list IDLE-dev@python.org http://mail.python.org/mailman/listinfo/idle-dev From elguavas@users.sourceforge.net Wed Aug 8 02:30:40 2001 From: elguavas@users.sourceforge.net (Stephen) Date: Tue, 07 Aug 2001 18:30:40 -0700 Subject: [Idle-dev] CVS: idle configDialog.py,1.6,1.7 Message-ID: Update of /cvsroot/idlefork/idle In directory usw-pr-cvs1:/tmp/cvs-serv22923 Modified Files: configDialog.py Log Message: beginning of work on the conf. handling smarts Index: configDialog.py =================================================================== RCS file: /cvsroot/idlefork/idle/configDialog.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** configDialog.py 2001/08/07 03:28:25 1.6 --- configDialog.py 2001/08/08 01:30:38 1.7 *************** *** 9,13 **** """ from Tkinter import * ! import tkMessageBox import IdleConf --- 9,13 ---- """ from Tkinter import * ! import tkMessageBox, tkColorChooser import IdleConf *************** *** 114,117 **** --- 114,130 ---- self.buttonDeleteCustomKeys.config(state=NORMAL) + def GetColour(self): + rgbTuplet, colourString = tkColorChooser.askcolor(parent=self, + title='Pick new colour for : '+self.highlightTarget.get(), + initialcolor=self.workingTestColours['Foo-Bg'])#._root() + if colourString: #user didn't cancel + self.workingTestColours['Foo-Bg']=colourString + self.frameColourSet.config(bg=self.workingTestColours['Foo-Bg']) + self.labelTestSample.config(bg=self.workingTestColours['Foo-Bg']) + self.frameHighlightSample.config(bg=self.workingTestColours['Foo-Bg']) + self.frameColourSet.update() #redraw after dialog + self.frameHighlightSample.update() #redraw after dialog + self.labelTestSample.update() + def CreateWidgets(self): self.framePages = Frame(self) *************** *** 258,265 **** #frameCustom frameTarget=Frame(frameCustom) ! frameSample=Frame(frameCustom,relief=SOLID,borderwidth=1, ! bg=self.workingTestColours['Foo-Bg']) frameSet=Frame(frameCustom) ! frameColourSet=Frame(frameSet,relief=SOLID,borderwidth=1, bg=self.workingTestColours['Foo-Bg']) frameFontSet=Frame(frameSet) --- 271,278 ---- #frameCustom frameTarget=Frame(frameCustom) ! self.frameHighlightSample=Frame(frameCustom,relief=SOLID,borderwidth=1, ! bg=self.workingTestColours['Foo-Bg'],cursor='hand2') frameSet=Frame(frameCustom) ! self.frameColourSet=Frame(frameSet,relief=SOLID,borderwidth=1, bg=self.workingTestColours['Foo-Bg']) frameFontSet=Frame(frameSet) *************** *** 267,273 **** labelTargetTitle=Label(frameTarget,text='for : ') optMenuTarget=OptionMenu(frameTarget, ! self.highlightTarget,'test target interface item','test target interface item 2') ! self.highlightTarget.set('test target interface item') ! buttonSetColour=Button(frameColourSet,text='Set Colour') labelFontTitle=Label(frameFontSet,text='Set Font Style') checkFontBold=Checkbutton(frameFontSet,variable=self.fontBold, --- 280,287 ---- labelTargetTitle=Label(frameTarget,text='for : ') optMenuTarget=OptionMenu(frameTarget, ! self.highlightTarget,'normal text background','test target interface item 2') ! self.highlightTarget.set('normal text background') ! buttonSetColour=Button(self.frameColourSet,text='Set Colour', ! command=self.GetColour) labelFontTitle=Label(frameFontSet,text='Set Font Style') checkFontBold=Checkbutton(frameFontSet,variable=self.fontBold, *************** *** 275,279 **** checkFontItalic=Checkbutton(frameFontSet,variable=self.fontItalic, onvalue='Italic',offvalue='',text='Italic') ! labelTestSample=Label(frameSample,justify=LEFT,font=('courier',12,''), text='#when finished, this\n#sample area will\n#be interactive\n'+ 'def Ahem(foo,bar):\n '+ --- 289,293 ---- checkFontItalic=Checkbutton(frameFontSet,variable=self.fontItalic, onvalue='Italic',offvalue='',text='Italic') ! self.labelTestSample=Label(self.frameHighlightSample,justify=LEFT,font=('courier',12,''), text='#when finished, this\n#sample area will\n#be interactive\n'+ 'def Ahem(foo,bar):\n '+ *************** *** 308,314 **** labelCustomTitle.pack(side=TOP,anchor=W,padx=5,pady=5) frameTarget.pack(side=TOP,padx=5,pady=5,fill=X) ! frameSample.pack(side=TOP,padx=5,pady=5,expand=TRUE,fill=BOTH) frameSet.pack(side=TOP,fill=X) ! frameColourSet.pack(side=LEFT,padx=5,pady=5,fill=BOTH) frameFontSet.pack(side=RIGHT,padx=5,pady=5,anchor=W) labelTargetTitle.pack(side=LEFT,anchor=E) --- 322,328 ---- labelCustomTitle.pack(side=TOP,anchor=W,padx=5,pady=5) frameTarget.pack(side=TOP,padx=5,pady=5,fill=X) ! self.frameHighlightSample.pack(side=TOP,padx=5,pady=5,expand=TRUE,fill=BOTH) frameSet.pack(side=TOP,fill=X) ! self.frameColourSet.pack(side=LEFT,padx=5,pady=5,fill=BOTH) frameFontSet.pack(side=RIGHT,padx=5,pady=5,anchor=W) labelTargetTitle.pack(side=LEFT,anchor=E) *************** *** 318,322 **** checkFontBold.pack(side=LEFT,anchor=W,pady=2) checkFontItalic.pack(side=RIGHT,anchor=W) ! labelTestSample.pack(anchor=CENTER,expand=TRUE,fill=BOTH) buttonSaveCustomTheme.pack(side=BOTTOM,fill=X,padx=5,pady=5) #frameTheme --- 332,336 ---- checkFontBold.pack(side=LEFT,anchor=W,pady=2) checkFontItalic.pack(side=RIGHT,anchor=W) ! self.labelTestSample.pack(anchor=CENTER,expand=TRUE,fill=BOTH) buttonSaveCustomTheme.pack(side=BOTTOM,fill=X,padx=5,pady=5) #frameTheme From StephenM.Gava Sun Aug 12 01:50:36 2001 From: StephenM.Gava (StephenM.Gava) Date: Sun, 12 Aug 2001 10:50:36 +1000 Subject: [Idle-dev] test Message-ID: <20010812004758.DWPD4715.mss.rdc2.nsw.optushome.com.au@there> testing list - please ignore this -- Stephen M. Gava IDLEfork ( http://idlefork.sourceforge.net ) " just like IDLE, only crunchy " From StephenM.Gava Sun Aug 12 01:58:32 2001 From: StephenM.Gava (StephenM.Gava) Date: Sun, 12 Aug 2001 10:58:32 +1000 Subject: [Idle-dev] syncmail problem Message-ID: <20010812005554.EANK4715.mss.rdc2.nsw.optushome.com.au@there> Hmm, this is barely on topic here, but since it relates to the IDLEfork project... Does anyone on the list have experience with syncmail? The syncmail setup for IDLEfork cvs has stopped forwarding commit messages to this list like it's supposed to, but I can't work out why. I haven't changed the setup at all since it was working on wednesday... No problem if no one here has any suggestions on this, I'll follow it up elsewhere also. -- Stephen M. Gava IDLEfork ( http://idlefork.sourceforge.net ) " just like IDLE, only crunchy " From fdrake@acm.org Sun Aug 12 15:17:43 2001 From: fdrake@acm.org (Fred L. Drake, Jr.) Date: Sun, 12 Aug 2001 10:17:43 -0400 (EDT) Subject: [Idle-dev] syncmail problem In-Reply-To: <20010812005554.EANK4715.mss.rdc2.nsw.optushome.com.au@there> References: <20010812005554.EANK4715.mss.rdc2.nsw.optushome.com.au@there> Message-ID: <15222.36871.778591.313368@cj42289-a.reston1.va.home.com> Stephen M. Gava writes: > Does anyone on the list have experience with syncmail? The syncmail setup As an occaissional syncmail contributer, yes. > No problem if no one here has any suggestions on this, I'll follow it up > elsewhere also. I don't think this is a syncmail problem; SF seems to be having some general problems with email notices. Hopefully they'll be fixed soon. -Fred -- Fred L. Drake, Jr. PythonLabs at Zope Corporation From StephenM.Gava Mon Aug 13 01:15:57 2001 From: StephenM.Gava (StephenM.Gava) Date: Mon, 13 Aug 2001 10:15:57 +1000 Subject: [Idle-dev] syncmail problem In-Reply-To: <15222.36871.778591.313368@cj42289-a.reston1.va.home.com> References: <20010812005554.EANK4715.mss.rdc2.nsw.optushome.com.au@there> <15222.36871.778591.313368@cj42289-a.reston1.va.home.com> Message-ID: <20010813001318.LEZ4715.mss.rdc2.nsw.optushome.com.au@there> > > Does anyone on the list have experience with syncmail? The syncmail > > setup > > As an occaissional syncmail contributer, yes. > > > No problem if no one here has any suggestions on this, I'll follow it up > > elsewhere also. > > I don't think this is a syncmail problem; SF seems to be having some > general problems with email notices. Hopefully they'll be fixed soon. Yep. Guido has a sf support request in, and they seem to have several other requests in on simillar issues. Its a pity their whole support section seems to go on hollidays for the weekend. -- Stephen M. Gava IDLEfork ( http://idlefork.sourceforge.net ) " just like IDLE, only crunchy " From webmaster@host77.com Tue Aug 14 00:06:56 2001 From: webmaster@host77.com (webmaster@host77.com) Date: Mon, 13 Aug 2001 19:06:56 -0400 Subject: [Idle-dev] Hosting Global! Foundation stone for online business! Message-ID: On our site http://www.host77.com/
we offer web-hosting on one of the best ISP !!!

We offer you hosting services of a high quality and reliable for any sites at the most low prices. You will be able to choose any tariff from the standard plan #1 ($9 a month) to plan #4 - with a 500 Mb disk space, an unlimited amount of E-Mail accounts, free domain registration in .com, .net or .org zones.

No matter which tariff you choose, you will have access to the following options:

  • FTP, Shell access
  • Account "Control Panel"
  • Additional Domains
  • Domain Aliases
  • Graphical traffic reports
  • Access to log files
  • SSI support

    Domains registration in .com, .net, .org zones will cost you only $15 a year!

    If you are interested in our offer glance on our site http://www.host77.com/

    If you do not wish to receive similar letters, send a letter of any content to un@host77.com

    ---
    Best regards,
    webmaster@host77.com


    06917 8522 From MusicMaster" This newsletter is provided to you FREE! To unsubscribe, reply to this email with REMOVE in the Subject. August, 15, 2001 Today's Topics: (Full Stories, See Below) -MADONNA Cancels NJ Concert -Blues Traveler: New Album, New Tour -U2 Plans more US Tour Dates -311 To Headline Following Warped Tour -CONCERT TICKETS Anyone? MADONNA CANCELS NJ CONCERT: Madonna's Friday night (8/3) concert at the Continental Airlines Arena in East Rutherford, N.J., has been canceled, promoter Clear Channel Entertainment announced. According to the artist's management, she is suffering from laryngitis. The canceled show--which will not be rescheduled--was to have been Madonna's seventh sold-out performance in the New York area. The decision not to reschedule immediately drew an angry response from fans posting on her official website . "I think it's absolutely ridiculous that she didn't re-schedule the concert," one fan wrote. "I think it's safe to say that she alienated a lot of her fans for not being willing to move the show to a later date." All Ticketmaster phone and Internet orders will be automatically refunded and credited to the card holder within two weeks, according to a press release. Tickets purchased at Ticketmaster outlets and at the Continental Airlines Arena box office will be refunded at the point of purchase. (Ticketmaster is LiveDaily's parent company.) Madonna's tour is expected to resume in Boston on Aug. 7 and 8. BLUES TRAVELER: NEW ALBUM, NEW TOUR Blues Traveler returns to the tour circuit to promote its new album, "Bridge." The tour is set to begin August 18th. Blues Traveler has revealed the next batch of dates for its summer tour, which kicks off on Aug. 18 in Oneida, Wis. The band will perform in mostly secondary markets including Sedona, Ariz., Buffalo, N.Y., and Portsmouth, Va. The Pontiac, Mich., show on Aug. 31 is part of the free Labor Day festival Arts, Beats and Eats. On Aug. 25, Blues Traveler will perform on "Weekend Today" on NBC. More October tour dates will be announced soon, according to the band's spokesperson. The second leg of Blues Traveler's summer jaunt coincides with the release of "Back in the Day," the second single from its fifth studio album, "Bridge" (A&M Records/Interscope). GO Here For More Info: http://www.livedaily.citysearch.com/news/printable.html?id=3478 U2 Plans More US Tour Dates: U2, which wraps up a tour of Europe later this month, plans to return to North America later this year to play 25 additional concert dates, the Times of London reported this week. Though there have been persistent rumors that more North American dates will be added, no dates have been confirmed by the band or by concert organizers. The Times of London reported that U2's Elevation tour has grossed $142 million from worldwide ticket sales, and the that the new dates are expected to gross an additional $33 million. According to Pollstar, U2's March-June run through North America grossed $69 million. If estimates prove accurate--and if U2 does add the additional dates--U2's Elevation Tour could rank as the third-highest grossing North American tour of all time, behind 1994 outings by the Rolling Stones ($121 million) and Pink Floyd ($103.5 million), according to Pollstar. 311 To Headline Following Warped Tour As its stint on the Warped Tour winds down, 311 has revealed the dates for a late summer headlining tour. Warped ends on Sunday (8/12) in Pontiac, Mich., after which 311 heads to Europe for a handful of shows. The band returns to the United States in late August and begins its stateside tour on Sept. 8 in San Diego. The last date, according to its official website , is a Halloween show in Los Angeles. The group will then spend the early part of November in Japan. All of the dates are in support of 311's latest record, "From Chaos," 311's first for Volcano/Zomba. CONCERT TICKETS Anyone? We found a great place to get your next pair of tickets to your favorite event! We have dealt with them many times and they have really prooved a great source for tickets to concerts, sports, theater; All Nationwide. Check them out at www.tixx4u.com That's about it for now, see ya next time! From hernan@orgmf.com.ar Thu Aug 16 00:11:49 2001 From: hernan@orgmf.com.ar (Hernan Martinez Foffani) Date: Thu, 16 Aug 2001 01:11:49 +0200 Subject: [Idle-dev] help on Idle extension Message-ID: Hi, Before I give up, can anybody help me with this extension, please? I'm a bit embarrased to ask because this is so simple that it has to work. With the following class a new menu option "Python Shelf" does show up, but when I click it nothing happens. Apparently, the method documents_event is not being dispatch by Idle. Don't know why. Running the test standalone does what I want, ie: a notepad window is opened. FYI, there is an empty section [ContextHelp] at config.txt I bet I'm missing something very obvious here. Thanks in advance, -Hernan Win2000, Python 2.2a1, idle 0.8 and idlefork 0.8.x ---8<---8<--- ContextHelp.py ---8<---8<--- import webbrowser class ContextHelp: menudefs = [ ('help', [ None, # Separator ('Python _Shelf', '<>'), ]) ] windows_keydefs = { '<>': [''], } unix_keydefs = { '<>': [''], } def __init__(self, editwin): self.editwin = editwin def documents_event(self, event): webbrowser.open( "c:/pepe.txt") # whatever def test(): a = ContextHelp(None) a.documents_event(None) if __name__ == '__main__': test() From hernan@orgmf.com.ar Thu Aug 16 16:03:15 2001 From: hernan@orgmf.com.ar (Hernan Martinez Foffani) Date: Thu, 16 Aug 2001 17:03:15 +0200 Subject: [Idle-dev] RV: help on Idle extension Message-ID: Sorry, don't mind... menudefs = [ ('Python _Shelf', '<>'), ^^^^^^^------- here!! And NOW I'm embarrased! Regards, -Hernan -----Mensaje original----- De: Hernan Martinez Foffani [mailto:hernan@orgmf.com.ar] Enviado el: jueves, 16 de agosto de 2001 1:12 Para: idle-dev@python.org Asunto: help on Idle extension Hi, Before I give up, can anybody help me with this extension, please? I'm a bit embarrased to ask because this is so simple that it has to work. With the following class a new menu option "Python Shelf" does show up, but when I click it nothing happens. Apparently, the method documents_event is not being dispatch by Idle. Don't know why. Running the test standalone does what I want, ie: a notepad window is opened. FYI, there is an empty section [ContextHelp] at config.txt I bet I'm missing something very obvious here. Thanks in advance, -Hernan Win2000, Python 2.2a1, idle 0.8 and idlefork 0.8.x ---8<---8<--- ContextHelp.py ---8<---8<--- import webbrowser class ContextHelp: menudefs = [ ('help', [ None, # Separator ('Python _Shelf', '<>'), ]) ] windows_keydefs = { '<>': [''], } unix_keydefs = { '<>': [''], } def __init__(self, editwin): self.editwin = editwin def documents_event(self, event): webbrowser.open( "c:/pepe.txt") # whatever def test(): a = ContextHelp(None) a.documents_event(None) if __name__ == '__main__': test() From noreply@sourceforge.net Wed Aug 15 08:01:03 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Wed, 15 Aug 2001 00:01:03 -0700 Subject: [Idle-dev] [ idlefork-Patches-451088 ] RemoteInterpreter patch to run on win32 Message-ID: Patches item #451088, was opened at 2001-08-15 00:01 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=309579&aid=451088&group_id=9579 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: RemoteInterpreter patch to run on win32 Initial Comment: *** ../Tools/idlefork-0.8.1/RemoteInterp.py Thu Jul 12 17:06:22 2001 --- ../Tools/idlenew/RemoteInterp.py Wed Aug 15 15:05:10 2001 *************** *** 121,127 **** def _decode_msg(self, msg): seqno = self.decode_seqno(msg [:self.SEQNO_ENC_LEN]) msg = msg[self.SEQNO_ENC_LEN:] ! parts = msg.split(" ", 2) if len(parts) == 1: cmd = msg arg = '' --- 121,131 ---- def _decode_msg(self, msg): seqno = self.decode_seqno(msg [:self.SEQNO_ENC_LEN]) msg = msg[self.SEQNO_ENC_LEN:] ! # ! # split a message into two parts ! # cmd arg ! # ! parts = msg.split(" ", 1) if len(parts) == 1: cmd = msg arg = '' *************** *** 263,280 **** self._cmd.reply() self._cmd.close() def startRemoteInterp(id): import os # UNIX domain sockets are simpler for starters sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) ! sock.bind("/var/tmp/ri.%s" % id) try: sock.listen(1) cli, addr = sock.accept() rinterp = RemoteInterp(cli) rinterp.run() finally: ! os.unlink("/var/tmp/ri.%s" % id) class RIClient: """Client of the remote interpreter""" --- 267,299 ---- self._cmd.reply() self._cmd.close() + def getAddress(id): + """returns a string representing the address of the + Unix domain socket for a particular id""" + import tempfile + import os + if tempfile.tempdir: + filename = os.path.join (tempfile.tempdir, "rs.%s" % id) + else: + # + # no temp dir defined in environment, use the + # current directory. + # + filename = "rs.%s" % id + return filename + def startRemoteInterp(id): import os # UNIX domain sockets are simpler for starters sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) ! sock.bind( getAddress(id) ) try: sock.listen(1) cli, addr = sock.accept() rinterp = RemoteInterp(cli) rinterp.run() finally: ! os.unlink( getAddress(id) ) class RIClient: """Client of the remote interpreter""" *************** *** 317,328 **** def riExec(id, file): sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) ! sock.connect("/var/tmp/ri.%s" % id) cli = RIClient(sock) cli.execfile(file) cli.run() if __name__ == "__main__": import sys import getopt --- 336,360 ---- def riExec(id, file): sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) ! sock.connect(getAddress(id)) cli = RIClient(sock) cli.execfile(file) cli.run() if __name__ == "__main__": + + # Usage: + # python RemoteInterp.py [-c] [-v] id + # Options: + # -c run as a client. Otherwise, run as a server by default + # -v verbose mode + # Example: + # This starts the server: + # python RemoteInterp.py id123 + # + # This starts the client: + # python RemoteInterp.py -c id123 test.py + # import sys import getopt ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=309579&aid=451088&group_id=9579 From noreply@sourceforge.net Thu Aug 16 04:59:23 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Wed, 15 Aug 2001 20:59:23 -0700 Subject: [Idle-dev] [ idlefork-Patches-451442 ] Adds refresh button to class browser Message-ID: Patches item #451442, was opened at 2001-08-15 20:59 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=309579&aid=451442&group_id=9579 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Chui Tey (teyc) Assigned to: Nobody/Anonymous (nobody) Summary: Adds refresh button to class browser Initial Comment: This patch does two things: a) ClassBrowser has a refresh button b) ClassBrowser 'docks' itself to the right hand side of the source window. ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=309579&aid=451442&group_id=9579 From emma.hornby@christ-church.oxford.ac.uk Sun Aug 19 13:45:28 2001 From: emma.hornby@christ-church.oxford.ac.uk (Emma Hornby) Date: Sun, 19 Aug 2001 13:45:28 +0100 Subject: [Idle-dev] basic problem with text input Message-ID: <000d01c128ac$d48ed160$391b4cc0@worc0352> This is a multi-part message in MIME format. ------=_NextPart_000_000A_01C128B5.351450C0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable can anyone explain why the simple script a=3Draw_input('Please enter your name: ') print 'elephants' ....doesn't work I'm using IDLE 0.5 under windows 98se from the 1.5.2 distribution if I save this 'window' and 'run module' from edit (that's another q, = why's it a 'module' and not a 'script'?) it doesn't get to the second line i.e. I can't get it to print elephants yours mystified, extreme python beginner ------=_NextPart_000_000A_01C128B5.351450C0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

    can anyone explain why the simple=20 script
     
        = a=3Draw_input('Please enter your=20 name: ')
        print = 'elephants'
     
     
    ....doesn't work
     
    I'm using IDLE 0.5 under windows 98se = from the=20 1.5.2 distribution
     
    if I save this 'window' and 'run = module'=20 from edit (that's another q, why's it a 'module' and not a=20 'script'?)
    it doesn't get to the second line i.e. = I can't get=20 it to print elephants
     
    yours mystified,
     
    extreme python = beginner
    ------=_NextPart_000_000A_01C128B5.351450C0-- From hernan@orgmf.com.ar Sun Aug 19 14:08:06 2001 From: hernan@orgmf.com.ar (Hernan Martinez Foffani) Date: Sun, 19 Aug 2001 15:08:06 +0200 Subject: [Idle-dev] basic problem with text input In-Reply-To: <000d01c128ac$d48ed160$391b4cc0@worc0352> Message-ID: I don't have python 1.5.2 at hand, but using python 2.1.1 (comes with IDLE 0.8) works fine for me. You ARE entering some data after the "Please enter your name: " arent' you? Regards, -Hernan -----Mensaje original----- De: idle-dev-admin@python.org [mailto:idle-dev-admin@python.org]En nombre de Emma Hornby Enviado el: domingo, 19 de agosto de 2001 14:45 Para: idle-dev@python.org Asunto: [Idle-dev] basic problem with text input can anyone explain why the simple script a=raw_input('Please enter your name: ') print 'elephants' ....doesn't work I'm using IDLE 0.5 under windows 98se from the 1.5.2 distribution if I save this 'window' and 'run module' from edit (that's another q, why's it a 'module' and not a 'script'?) it doesn't get to the second line i.e. I can't get it to print elephants yours mystified, extreme python beginner From emma.hornby@christ-church.oxford.ac.uk Mon Aug 20 00:30:19 2001 From: emma.hornby@christ-church.oxford.ac.uk (Emma Hornby) Date: Mon, 20 Aug 2001 00:30:19 +0100 Subject: [Idle-dev] basic text input Message-ID: <000801c12906$e9fe8a40$051b4cc0@worc0352> This is a multi-part message in MIME format. ------=_NextPart_000_0005_01C1290F.4A9DFA40 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable my apologies.....I had an ancient version installed. works fine now = :-) ------=_NextPart_000_0005_01C1290F.4A9DFA40 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
    my apologies.....I had an ancient = version=20 installed.     works fine now = :-)
    ------=_NextPart_000_0005_01C1290F.4A9DFA40-- From content-management@high-tech-communcations.com Tue Aug 21 07:59:34 2001 From: content-management@high-tech-communcations.com (Victor Black) Date: Mon, 20 Aug 2001 23:59:34 -0700 Subject: [Idle-dev] New web utility Message-ID: <200108210659.f7L6xYw00942@mail.high-tech-communications.com>

    I noticed your email address on a list serve related to technology and web development.  With your permission, we
    would like to send you information regarding new web tools and utilities based on your interests.  Please click the
    following link and opt-in to our product updates and e-newsletter, click here:
    http://216.133.228.90/cm/

    Cordially,

    Victor Black
    High-Tech-Communications.com

    If you would like to be removed from our database, please click here: http://216.133.228.90/cm/remove.cgi

     

    From ddanley@rectec.net Tue Aug 21 19:01:05 2001 From: ddanley@rectec.net (diane danley) Date: Tue, 21 Aug 2001 13:01:05 -0500 Subject: [Idle-dev] not sure what to put here? Message-ID: <003201c12a6b$4027c520$2e204041@ddanley> This is a multi-part message in MIME format. ------=_NextPart_000_002F_01C12A41.56991B80 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable are we to post surnames on here or what? ------=_NextPart_000_002F_01C12A41.56991B80 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
    are we to post surnames on here or=20 what?
    ------=_NextPart_000_002F_01C12A41.56991B80-- From Charlie.Paxton@noaa.gov Thu Aug 23 19:36:53 2001 From: Charlie.Paxton@noaa.gov (Charlie Paxton) Date: Thu, 23 Aug 2001 13:36:53 -0500 Subject: [Idle-dev] Idle key bindings Message-ID: <6127b62bee.62bee6127b@noaa.gov> idle-dev, Is it possible to change the unix key bindings in Idle? I'd like to change to windows key bindings on my linux machine. Charlie Paxton From hernan@orgmf.com.ar Thu Aug 23 20:05:46 2001 From: hernan@orgmf.com.ar (Hernan Martinez Foffani) Date: Thu, 23 Aug 2001 21:05:46 +0200 Subject: [Idle-dev] Idle key bindings In-Reply-To: <6127b62bee.62bee6127b@noaa.gov> Message-ID: Charlie Paxton > > idle-dev, > Is it possible to change the unix key bindings in Idle? > I'd like to change to windows key bindings on my linux machine. Yes. Just edit the file {PYTHONPATH}/Tools/Idle/keydefs.py The convention there is very straightforward. Look for unix_keydefs dictionary in that file and edit it carefully. :-) But I don't know if you can rebind everything you want. There's a chance that some key combinations are caught by the OS before they reach Idle... -Hernan From mats@laplaza.org Thu Aug 23 20:37:34 2001 From: mats@laplaza.org (Mats Wichmann) Date: Thu, 23 Aug 2001 13:37:34 -0600 Subject: [Idle-dev] Idle key bindings In-Reply-To: References: <6127b62bee.62bee6127b@noaa.gov> Message-ID: <5.1.0.14.1.20010823132917.02020f88@204.151.72.2> At 09:05 PM 8/23/2001 +0200, Hernan Martinez Foffani wrote: >Charlie Paxton >> >> idle-dev, >> Is it possible to change the unix key bindings in Idle? >> I'd like to change to windows key bindings on my linux machine. > >Yes. >Just edit the file {PYTHONPATH}/Tools/Idle/keydefs.py >The convention there is very straightforward. >Look for unix_keydefs dictionary in that file and edit >it carefully. :-) >But I don't know if you can rebind everything you want. There's >a chance that some key combinations are caught by the OS before >they reach Idle... This is a little murky. The tty driver has always handled "the terminal", even when it's a terminal window on a graphics screen (in this case because a pseudo terminal - a pty - is assigned to make sure things behave familarly). I'm not sure if there's a pty in effect in case an application pops up its' own window, as is the case for IDLE. In any case, to see the current bindings, do "stty -a". I'm sure someone knows how this really works. From lswayne@msn.com Mon Aug 27 03:13:49 2001 From: lswayne@msn.com (lswayne) Date: Sun, 26 Aug 2001 19:13:49 -0700 Subject: [Idle-dev] Info. Message-ID: <001101c12e9d$edffec00$5dff153f@oemcomputer> I found a place on your site to ask for help, now I can't find it. Help ! I asked for information on where I might find a picture of the last supper you have in your last issue. A friend is very interested in a picture 5 to 6 feet long. Where could one be purchased. Good quality would be high requirement. lswayne@msn.com Lawrence J. Swayne 14015 Cascadian Way Everett, Wash. 98208-7352 Thank you. From jessefw@loop.com Mon Aug 27 06:42:21 2001 From: jessefw@loop.com (Jesse F. W) Date: Sun, 26 Aug 2001 22:42:21 -0700 Subject: [Idle-dev] Info. In-Reply-To: <001101c12e9d$edffec00$5dff153f@oemcomputer> Message-ID: <3B897B4D.18208.14ACA702@localhost> This is one strange letter... lswayne wrote: > I found a place on your site to ask for help, now I can't find it. What site is this? Not python.org I think. :-) > Help ! I asked for information on where I might find a picture of the > last supper you have in your last issue. Last supper? Last issue? Huh? > A friend is very interested > in a picture 5 to 6 feet long. Where could one be purchased. Good > quality would be high requirement. Why does this person think that the Idle-development list could help them get a picture of the last supper? > lswayne@msn.com > > Lawrence J. Swayne > 14015 Cascadian Way > Everett, Wash. > 98208-7352 And why are they giving us their phone number? > Thank you. > From haertle@iqe.phys.ethz.ch Mon Aug 27 20:47:45 2001 From: haertle@iqe.phys.ethz.ch (Haertle Daniel) Date: Mon, 27 Aug 2001 21:47:45 +0200 Subject: [Idle-dev] Open Module patch Message-ID: Every time I open a project, I open a lot of modules, and this was usually done by double-clicking each module in import myModule1, myModule2, myModule3, myModule4, myModule5, myModule6 and pressing Alt-M to open it. Now I patched EditorWindow.py to extend the ability of open_module to open a list of modules (and ignore the import keyword), so that one can select the whole line and open all modules with one Alt-M. Below is the changed method open_module in EditorWindow.py, which can be substituted to the original to obtain the new behaviour. def open_module(self, event=None): # XXX Shouldn't this be in IOBinding or in FileList? try: name = self.text.get("sel.first", "sel.last") except TclError: name = "" else: name = string.strip(name) if not name: name = tkSimpleDialog.askstring("Module", "Enter the name of a Python module\n" "to search on sys.path and open:", parent=self.text) name = string.replace(name, ",", " ") name = string.replace(name, ";", " ") nameList = string.split(name) # XXX Ought to support package syntax # XXX Ought to insert current file's directory in front of path for name in nameList: if name in ["", "import"]: continue try: (f, file, (suffix, mode, type)) = imp.find_module(name) except (NameError, ImportError), msg: tkMessageBox.showerror("Import error", str(msg), parent=self.text) return if type != imp.PY_SOURCE: tkMessageBox.showerror("Unsupported type", "%s is not a source module" % name, parent=self.text) return if f: f.close() if self.flist: self.flist.open(file) else: self.io.loadfile(file) Daniel Haertle ------------------------------------------------------------------------ Daniel Haertle haertle@iqe.phys.ethz.ch _________________ ___ http://www.nlo.ethz.ch / ____/_ __/ /_/ / ETH Hoenggerberg - Nonlinear Optics Laboratory / __/_ / / / __ / Institute of Quantum Electronics, HPF E18 /______/ /__/ /__/ /__/ 8093 Zuerich - Switzerland Tel +41 1 63 32338 Fax +41 1 63 31056 ------------------------------------------------------------------------ From StephenM.Gava Tue Aug 28 05:20:53 2001 From: StephenM.Gava (StephenM.Gava) Date: Tue, 28 Aug 2001 14:20:53 +1000 Subject: [Idle-dev] Open Module patch In-Reply-To: References: Message-ID: <20010828041747.PUXF4715.mss.rdc2.nsw.optushome.com.au@there> Haertle Daniel wrote: > Every time I open a project, I open a lot of modules, and this was > usually done by double-clicking each module in > > import myModule1, myModule2, myModule3, myModule4, myModule5, myModule6 > > and pressing Alt-M to open it. > > Now I patched EditorWindow.py to extend the ability of open_module to [...] > Daniel Haertle Thanks for the patch. I submitted this to the IDLEfork patch manager for evaluation and possible inclusion there. -- Stephen M. Gava IDLEfork ( http://idlefork.sourceforge.net ) " just like IDLE, only crunchy " From bas@andrew.cmu.edu Wed Aug 29 20:48:18 2001 From: bas@andrew.cmu.edu (Bruce Sherwood) Date: Wed, 29 Aug 2001 15:48:18 -0400 Subject: [Idle-dev] No network card, no IDLE In-Reply-To: <01072422423900.01327@oberon> Message-ID: <2667685521.999100098@muon> I've found an interesting bug present even in the 0.8.1 version of IDLEfork which I installed on my Win98 laptop. (Also present in earlier versions of the Scherer IDLE.) If I don't have a network card plugged in, doubleclicking IDLE does nothing! No dialog box -- nothing happens at all. And the network card doesn't even have to be connected to anything. It is true that there is some pseudo-network connection made when starting a run (F5), but why doesn't IDLE at least start up in the absence of a network card? Bruce Sherwood From hernan@orgmf.com.ar Wed Aug 29 21:16:51 2001 From: hernan@orgmf.com.ar (Hernan Martinez Foffani) Date: Wed, 29 Aug 2001 22:16:51 +0200 Subject: [Idle-dev] No network card, no IDLE In-Reply-To: <2667685521.999100098@muon> Message-ID: Bruce Sherwood > .... > a run (F5), but why doesn't IDLE at least start up in the absence of a > network card? May be I'm totally wrong on this, so "handle with care" what follows. IDLEfork behind scenes takes 2 process to run. They use TCP/IP to communicate between each other. It's possible that IDLE can't find TCP/IP stack since your PC lacks a network adapter. I guess that you can fix that problem installing the Microsoft loopback adapter. It's a driver which is included in every Windows dist. Hope that helps, -Hernan From bas@andrew.cmu.edu Thu Aug 30 17:18:17 2001 From: bas@andrew.cmu.edu (Bruce Sherwood) Date: Thu, 30 Aug 2001 12:18:17 -0400 Subject: [Idle-dev] No network card, no IDLE In-Reply-To: Message-ID: <2741485055.999173897@muon> Some more data: At the suggestion of David Scherer, I ran Idlefork at a DOS prompt on the Win2000 laptop with the network card removed and saw a message to the effect that it was not possible to use a socket (and Idle doesn't start up). It would seem more appropriate behavior (even if bizarre) for Idle to start up and give the error message in a dialog box, rather than silently not come up at all. He also had me do this: --On Wednesday, August 29, 2001 5:19 PM -0400 David Scherer wrote: >> > (2) What does the following DOS command do in the same situation? >> > >> > ping 127.0.0.1 >> >> "PING: transmit failed, error code 10043." >> >> "Packets" Sent = 4, Received = 0, Lost = 4 (100% loss)" > > 10043: "The requested protocol has not been configured into the system, > or no implementation for it exists." > > For whatever reason, your machine is incapable of doing TCP/IP without > its network card. I don't think this is normal behavior! I've also had reports from students using the Scherer Idle (which is functionally the same as Idlefork, and used with VPython) that they can edit but when they press F5 to run nothing happens. A colleague Matt Kohlmyer is able to reproduce this behavior (though perhaps there are other possible causes). He downloaded a free program from www.zonealarm.com which allows you to specify which applications are allowed internet access. If he turns internet access off, F5 does nothing in Idle. Again, at the very least Idle should explain the situation in a dialog box rather than be silent. Bruce Sherwood From noreply@sourceforge.net Tue Aug 28 05:11:30 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Mon, 27 Aug 2001 21:11:30 -0700 Subject: [Idle-dev] [ idlefork-Patches-456006 ] open multiple modules at once Message-ID: Patches item #456006, was opened at 2001-08-27 21:11 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=309579&aid=456006&group_id=9579 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Stephen M. Gava (elguavas) Assigned to: Nobody/Anonymous (nobody) Summary: open multiple modules at once Initial Comment: Every time I open a project, I open a lot of modules, and this was usually done by double-clicking each module in import myModule1, myModule2, myModule3, myModule4, myModule5, myModule6 and pressing Alt-M to open it. Now I patched EditorWindow.py to extend the ability of open_module to open a list of modules (and ignore the import keyword), so that one can select the whole line and open all modules with one Alt-M. Below is the changed method open_module in EditorWindow.py, which can be substituted to the original to obtain the new behaviour. def open_module(self, event=None): # XXX Shouldn't this be in IOBinding or in FileList? try: name = self.text.get("sel.first", "sel.last") except TclError: name = "" else: name = string.strip(name) if not name: name = tkSimpleDialog.askstring("Module", "Enter the name of a Python module\n" "to search on sys.path and open:", parent=self.text) name = string.replace(name, ",", " ") name = string.replace(name, ";", " ") nameList = string.split(name) # XXX Ought to support package syntax # XXX Ought to insert current file's directory in front of path for name in nameList: if name in ["", "import"]: continue try: (f, file, (suffix, mode, type)) = imp.find_module(name) except (NameError, ImportError), msg: tkMessageBox.showerror("Import error", str(msg), parent=self.text) return if type != imp.PY_SOURCE: tkMessageBox.showerror("Unsupported type", "%s is not a source module" % name, parent=self.text) return if f: f.close() if self.flist: self.flist.open(file) else: self.io.loadfile(file) Daniel Haertle ------------------------------------------------------------------------ Daniel Haertle haertle@iqe.phys.ethz.ch _________________ ___ http://www.nlo.ethz.ch / ____/_ __/ /_/ / ETH Hoenggerberg - Nonlinear Optics Laboratory / __/_ / / / __ / Institute of Quantum Electronics, HPF E18 /______/ /__/ /__/ /__/ 8093 Zuerich - Switzerland Tel +41 1 63 32338 Fax +41 1 63 31056 ------------------------------------------------------------------------ ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=309579&aid=456006&group_id=9579