Пример #1
0
def import_scan_dirs(dest_dir,src_dir):
	sim_dirs=[]
	get_scan_dirs(sim_dirs,src_dir)
	for my_file in sim_dirs:
		dest=os.path.join(dest_dir,os.path.basename(my_file))
		print("copy scan dir",my_file,"to",dest)

		if os.path.exists(dest):
			delete_second_level_link_tree(dest)

		copy_scan_dir(dest,my_file)
Пример #2
0
def import_scan_dirs(dest_dir,src_dir):
	scans=scans_io(src_dir)
	sim_dirs=scans.get_scan_dirs()
	for my_file in sim_dirs:
		dest=os.path.join(dest_dir,os.path.basename(my_file))
		print("copy scan dir",my_file,"to",dest)

		if os.path.exists(dest):
			gpvdm_delete_file(dest)

		copy_scan_dir(dest,my_file)
Пример #3
0
	def callback_copy_page(self,widget,data):
		pageNum = self.notebook.get_current_page()
		tab = self.notebook.get_nth_page(pageNum)
		name=tab.tab_name
		old_dir=os.path.join(self.sim_dir,name)
		new_sim_name=dlg_get_text( _("Clone the current simulation to a new simulation called:"), name)
		if new_sim_name!=None:
			new_sim_name=self.remove_invalid(new_sim_name)
			new_dir=os.path.join(self.sim_dir,new_sim_name)

			copy_scan_dir(new_dir,old_dir)
			print _("I want to copy"),new_dir,old_dir
			self.add_page(new_sim_name)
Пример #4
0
	def callback_copy_page(self):
		tab = self.notebook.currentWidget()
		name=tab.tab_name
		old_dir=os.path.join(self.sim_dir,name)
		new_sim_name=dlg_get_text( _("Clone the current simulation to a new simulation called:"), name,"clone.png")
		new_sim_name=new_sim_name.ret

		if new_sim_name!=None:
			new_sim_name=self.remove_invalid(new_sim_name)
			new_dir=os.path.join(self.sim_dir,new_sim_name)

			copy_scan_dir(new_dir,old_dir)
			print(_("I want to copy"),new_dir,old_dir)
			self.add_page(new_sim_name)
Пример #5
0
	def callback_copy_page(self):
		tab = self.notebook.currentWidget()
		index=self.notebook.currentIndex()
		name=self.notebook.tabText(index)
		old_dir=os.path.join(self.sim_dir,name)
		new_sim_name=dlg_get_text( _("Clone the current simulation to a new simulation called:"), name,"clone.png")
		new_sim_name=new_sim_name.ret

		if new_sim_name!=None:
			new_sim_name=self.remove_invalid(new_sim_name)
			new_dir=os.path.join(self.sim_dir,new_sim_name)
			if os.path.isdir(new_dir)==True:
				error_dlg(self,_("This directory already exists."))
				return

			copy_scan_dir(new_dir,old_dir)
			self.add_page(new_sim_name)
Пример #6
0
def scan_nested_simulation(root_simulation,nest_simulation):
	names=tree_load_flat_list(root_simulation)
	commands=[]
	for i in range(0,len(names)):
		dest_name=os.path.join(names[i],os.path.basename(nest_simulation))
		copy_scan_dir(dest_name,nest_simulation)

		program_list=[]
		flat_list=[]
		tree_load_program(program_list,dest_name)
		print("call=",names[i],dest_name)
		tree_gen(flat_list,program_list,names[i],dest_name)


		server_find_simulations_to_run(commands,dest_name)

	return commands