def browseDestFile(self):
     filename = tkfd.asksaveasfilename(initialdir=self._convConfigHandler.
                                       readPlaneShiftScoresDefaultFldr(),
                                       filetypes=(("XML Files", "*.xml"),
                                                  ("All Files", "*.*")))
     self.endDestFile.delete(0, END)
     self.endDestFile.insert(0, filename)
Exemplo n.º 2
0
 def saveas(self):
     data = self.text.get(1.0, 'end-1c')
     self.original = data
     temp = self.filename
     self.filename = dialog.asksaveasfilename(parent=self.window, filetypes=[('Text', '*.txt')], title='Save as...')
     if self.filename == '':
         self.filename = temp
         self.window.title(self.filename + " - Andrea's Notepad")
     else:
         self.window.title(basename(self.file_ext()) + " - Andrea's Notepad")
         writer = open(self.file_ext(), 'w')
         writer.write(data)
         writer.close()
Exemplo n.º 3
0
    def getFileNameSave(title='Guardar',
                        file_types=[['Archivos de Texto', '.txt'],
                                    ['Todos los Archivos', '.*']],
                        init_dir=os.getcwd(),
                        encima=True):

        if encima == True:
            root.wm_attributes('-topmost', True)
        else:
            root.wm_attributes('-topmost', False)

        f_name = filedialog.asksaveasfilename(title=title,
                                              initialdir=init_dir,
                                              filetypes=file_types)
        if not f_name == '':
            return f_name
Exemplo n.º 4
0
def savePlaylist():
    '''
    #Attempt 1: But this makes a temporary .txt file, We want something more complex
    thefile = open('playlist.txt', 'w')
    for song in root.playlist:
        thefile.write("%s\n" % song)
    thefile.close()
    '''

    #Attempt 2
    #using import pickle
    #using Tkinter too

    root.playListFileO = filedialog.asksaveasfilename(
        title="Give a name to your playlist",
        filetypes=(("Python File", ".py"), ("Text File", ".txt")),
        initialdir="/")
    output = open(root.playListFileO, 'wb')
    pickle.dump(root.playlist, output, -1)

    output.close()
Exemplo n.º 5
0
 def savefile(self):
     self.save_name = asksaveasfilename(initialdir='C:\\Python31')
Exemplo n.º 6
0
 def savefile(self):
     self.save_name = asksaveasfilename(initialdir='C:\\Python31')
Exemplo n.º 7
0
def SaveFile():
    f = filedialog.asksaveasfilename(
        title='save file',
        initialdir='/home/syang/syang/practices/python_GUI_Tkinter',
        initialfile='hello.py')
    print(f)
 def save():
     self.shift_activated = False
     file_name = asksaveasfilename(defaultextension=".npy")
     if file_name is None or len(file_name) == 0:
         return
     np.save(file_name, self.layers, allow_pickle=False)
Exemplo n.º 9
0
def analyzeData():
    """ callback fcn: ask user for file, call parse funciton , save output  """
    filename = fd.askopenfilename()
    newFile = fd.asksaveasfilename(defaultextension='.csv')
    main(filename, newFile)
    print("DONE")