Exemplo n.º 1
0
	def OnCopyToSD(self, e):
		for f in self.filenameList:
			exportFilename = sliceRun.getExportFilename(f)
			filename = os.path.basename(exportFilename)
			if profile.getPreference('sdshortnames') == 'True':
				filename = sliceRun.getShortFilename(filename)
			shutil.copy(exportFilename, os.path.join(profile.getPreference('sdpath'), filename))
Exemplo n.º 2
0
	def OnCopyToSD(self, e):
		for f in self.filenameList:
			exportFilename = sliceRun.getExportFilename(f)
			filename = os.path.basename(exportFilename)
			if profile.getPreference('sdshortnames') == 'True':
				filename = sliceRun.getShortFilename(filename)
			shutil.copy(exportFilename, os.path.join(profile.getPreference('sdpath'), filename))
Exemplo n.º 3
0
 def OnCopyToSD(self, e):
     if profile.getPreference('sdpath') == '':
         wx.MessageBox(
             "You need to configure your SD card drive first before you can copy files to it.\nOpening the preferences now.",
             'No SD card drive.', wx.OK | wx.ICON_INFORMATION)
         prefDialog = preferencesDialog.preferencesDialog(self.GetParent())
         prefDialog.Centre()
         prefDialog.Show(True)
         if profile.getPreference('sdpath') == '':
             print "No path set"
             return
     exportFilename = sliceRun.getExportFilename(self.filelist[0])
     filename = os.path.basename(exportFilename)
     if profile.getPreference('sdshortnames') == 'True':
         filename = sliceRun.getShortFilename(filename)
     try:
         shutil.copy(
             exportFilename,
             os.path.join(profile.getPreference('sdpath'), filename))
     except:
         self.GetParent().preview3d.ShowWarningPopup(
             "Failed to copy file to SD card.")
         return
     self.GetParent().preview3d.ShowWarningPopup(
         "Copy finished, safely remove SD card?", self.OnSafeRemove)
Exemplo n.º 4
0
	def OnCopyToSD(self, e):
		if profile.getPreference('sdpath') == '':
			wx.MessageBox("You need to configure your SD card drive first before you can copy files to it.\nOpening the preferences now.", 'No SD card drive.', wx.OK | wx.ICON_INFORMATION)
			prefDialog = preferencesDialog.preferencesDialog(self.GetParent())
			prefDialog.Centre()
			prefDialog.Show(True)
			if profile.getPreference('sdpath') == '':
				print "No path set"
				return
		exportFilename = sliceRun.getExportFilename(self.filelist[0])
		filename = os.path.basename(exportFilename)
		if profile.getPreference('sdshortnames') == 'True':
			filename = sliceRun.getShortFilename(filename)
		try:
			shutil.copy(exportFilename, os.path.join(profile.getPreference('sdpath'), filename))
		except:
			self.GetParent().preview3d.ShowWarningPopup("Failed to copy file to SD card.")
			return
		self.GetParent().preview3d.ShowWarningPopup("Copy finished, safely remove SD card?", self.OnSafeRemove)
	def OnCopyToSD(self, e):
		filename = os.path.basename(self.resultFilename)
		if profile.getPreference('sdshortnames') == 'True':
			filename = sliceRun.getShortFilename(filename)
		shutil.copy(self.resultFilename, os.path.join(profile.getPreference('sdpath'), filename))
    def doit(self,event):
		filename = os.path.basename(self.resultFilename)
		if profile.getPreference('sdshortnames') == 'True':
			filename = sliceRun.getShortFilename(filename)
		shutil.copy(self.resultFilename, os.path.join(profile.getPreference('sdpath'), filename))
		self.Close(True)
Exemplo n.º 7
0
 def OnCopyToSD(self, e):
     filename = os.path.basename(self.resultFilename)
     if profile.getPreference('sdshortnames') == 'True':
         filename = sliceRun.getShortFilename(filename)
     shutil.copy(self.resultFilename,
                 os.path.join(profile.getPreference('sdpath'), filename))