当前位置: 首页>>代码示例>>Python>>正文


Python Clipboard.copy方法代码示例

本文整理汇总了Python中kivy.core.clipboard.Clipboard.copy方法的典型用法代码示例。如果您正苦于以下问题:Python Clipboard.copy方法的具体用法?Python Clipboard.copy怎么用?Python Clipboard.copy使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在kivy.core.clipboard.Clipboard的用法示例。


在下文中一共展示了Clipboard.copy方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: on_touch_down

# 需要导入模块: from kivy.core.clipboard import Clipboard [as 别名]
# 或者: from kivy.core.clipboard.Clipboard import copy [as 别名]
 def on_touch_down(self, touch):
     if touch.is_double_tap:
         try:
             Clipboard.copy(self.query_tree.selected_node.text)
         except AttributeError:
             Logger.debug("SQL Panel: Object didn't have text.")
     ScrollView.on_touch_down(self, touch)
开发者ID:Narcolapser,项目名称:bookish-octo-computing-machine,代码行数:9,代码来源:sql_panel.py

示例2: _update_pos

# 需要导入模块: from kivy.core.clipboard import Clipboard [as 别名]
# 或者: from kivy.core.clipboard.Clipboard import copy [as 别名]
    def _update_pos(self, dt):
        '''
        get and update position
        '''
        e, n, lon, lat = get_nmea(self)

        try:
            self.e_txt.text = e[:10]#self.dat['e'][:10]
            self.n_txt.text = n[:10]#self.dat['n'][:10]
        except:
            pass

        Clipboard.copy(self.n_txt.text+':'+self.e_txt.text)
        tmp = Clipboard.paste()
        self.n_txt.text = tmp.split(':')[0]
        self.e_txt.text = tmp.split(':')[1]

        if MAKEMAP:
            self.map.simple_marker([lat, lon], marker_color='red')
            self.map.save(self.mapname)

        if SHOWMAP:
            # plot position and color code by time elapsed
            secs = time.mktime(time.localtime())-self.starttime
            self.fig.gca().scatter(float(e),float(n),s=30,c=secs, vmin=1, vmax=1200, cmap='Greens')
            self.fig.gca().set_ylim([float(n)-IMBOX_Y, float(n)+IMBOX_Y])
            self.fig.gca().set_xlim([float(e)-IMBOX_X, float(e)+IMBOX_X])
            self.fig.canvas.draw()
开发者ID:dbuscombe-usgs,项目名称:lobos,代码行数:30,代码来源:lobos_v3.py

示例3: copy

# 需要导入模块: from kivy.core.clipboard import Clipboard [as 别名]
# 或者: from kivy.core.clipboard.Clipboard import copy [as 别名]
 def copy(self,text):
     try:
         from kivy.core.clipboard import Clipboard
         Clipboard.copy(text)
     except:
         logger.error("Could not be copied to clipboard: "+text)
         pass
开发者ID:harddevelop,项目名称:kivy-downloader,代码行数:9,代码来源:main.py

示例4: _update_pos

# 需要导入模块: from kivy.core.clipboard import Clipboard [as 别名]
# 或者: from kivy.core.clipboard.Clipboard import copy [as 别名]
    def _update_pos(self, dt):
        '''
        get and update position
        '''
        #self.dat = get_nmea(self)
        e, n, d = get_nmea(self)
        #now = time.asctime().replace(' ','_').replace(':','_')
        try:
            self.e_txt.text = e[:10]#self.dat['e'][:10]
            self.n_txt.text = n[:10]#self.dat['n'][:10]
        except:
            pass
        #self.textinput.text += 'Position obtained: '+now+'\n'

        Clipboard.copy(self.n_txt.text+':'+self.e_txt.text)
        tmp = Clipboard.paste()
        self.n_txt.text = tmp.split(':')[0]
        self.e_txt.text = tmp.split(':')[1]

        #self.textinput.text += 'N: '+str(self.n_txt.text)+', E: '+str(self.e_txt.text)+', D: '+str(self.dat['depth_m'])+'\n'

        #self.textinput2.text += str(self.dat['depth_m'])+' m'+'\n'
        self.textinput2.text += d+' m'+'\n'
        if float(d)>10: #self.dat['depth_m']>10:
            self.textinput2.foreground_color = (0.6,0.5,0.0,1.0)
        elif d=='NaN':#self.dat['depth_m']=='NaN':
            self.textinput2.foreground_color = (0.25,0.5,0.25,0.25)
        else:
            self.textinput2.foreground_color = (0.0,0.0,0.0,0.0)
开发者ID:dbuscombe-usgs,项目名称:lobos,代码行数:31,代码来源:lobos_v2.py

示例5: _update_pos

# 需要导入模块: from kivy.core.clipboard import Clipboard [as 别名]
# 或者: from kivy.core.clipboard.Clipboard import copy [as 别名]
    def _update_pos(self, dt):
        '''
        get and update position
        '''
        e, n, lon, lat = get_nmea(self)
        # d = get_nmeadepth(self)
        try:
            self.e_txt.text = e[:10]#self.dat['e'][:10]
            self.n_txt.text = n[:10]#self.dat['n'][:10]
            # self.d_txt.text = d
        except:
            pass

        Clipboard.copy(self.n_txt.text+':'+self.e_txt.text)
开发者ID:dbuscombe-usgs,项目名称:lobos,代码行数:16,代码来源:lobos_video.py

示例6: _update_pos

# 需要导入模块: from kivy.core.clipboard import Clipboard [as 别名]
# 或者: from kivy.core.clipboard.Clipboard import copy [as 别名]
    def _update_pos(self, dt):
        '''
        get and update position
        '''
        e, n, lon, lat = get_nmea(self)

        try:
            self.e_txt.text = e[:10]#self.dat['e'][:10]
            self.n_txt.text = n[:10]#self.dat['n'][:10]
        except:
            pass

        Clipboard.copy(self.n_txt.text+':'+self.e_txt.text)
        tmp = Clipboard.paste()
        self.n_txt.text = tmp.split(':')[0]
        self.e_txt.text = tmp.split(':')[1]
开发者ID:dbuscombe-usgs,项目名称:lobos,代码行数:18,代码来源:polecam_play.py

示例7: test_paste_text_max

# 需要导入模块: from kivy.core.clipboard import Clipboard [as 别名]
# 或者: from kivy.core.clipboard.Clipboard import copy [as 别名]
	def test_paste_text_max(self):
		"""
			paste_text()
			if len(self.pasted_str) >= 1000:
		"""
		from kivy.core.clipboard import Clipboard
		_clipboard = Clipboard.copy("test" * 1000)
		test_paste = self.encrypt.paste_text()
		self.assertEqual(test_paste, "")
开发者ID:bandrews568,项目名称:Just-Encrypt-It,代码行数:11,代码来源:tests.py

示例8: test_paste_text

# 需要导入模块: from kivy.core.clipboard import Clipboard [as 别名]
# 或者: from kivy.core.clipboard.Clipboard import copy [as 别名]
	def test_paste_text(self):
		"""
			paste_text()
			else: return self.pasted_str
		"""
		from kivy.core.clipboard import Clipboard
		_clipboard = Clipboard.copy("test")
		test_paste = self.encrypt.paste_text()
		self.assertEqual(test_paste, "test")
开发者ID:bandrews568,项目名称:Just-Encrypt-It,代码行数:11,代码来源:tests.py

示例9: on_start

# 需要导入模块: from kivy.core.clipboard import Clipboard [as 别名]
# 或者: from kivy.core.clipboard.Clipboard import copy [as 别名]
	def on_start(self):
		text = ''
		if CutBuffer:
			text = CutBuffer.get_cutbuffer()
		else:
			cbbtn = root.ids.cutbuffer
			cbbtn.parent.remove_widget(cbbtn)
		if not text:
			text = Clipboard.copy()
		root.ids.source.text = text or ''
		root.ids.manip.focus = True
开发者ID:kived,项目名称:strmanip,代码行数:13,代码来源:strmanip.py

示例10: cpClipboard

# 需要导入模块: from kivy.core.clipboard import Clipboard [as 别名]
# 或者: from kivy.core.clipboard.Clipboard import copy [as 别名]
 def cpClipboard(self):
     print("Copy current Kanji to clipboard")
     Clipboard.copy("{}".format(self.master_kanji.cur_framekanji))  # TODO fix UTF8
     print(Clipboard.get_types())
开发者ID:SurafuSoft,项目名称:KanjiOrigin,代码行数:6,代码来源:learnkanji_k.py

示例11: copy_to_clipboard

# 需要导入模块: from kivy.core.clipboard import Clipboard [as 别名]
# 或者: from kivy.core.clipboard.Clipboard import copy [as 别名]
 def copy_to_clipboard(self, data):
     from kivy.core.clipboard import Clipboard
     Clipboard.copy(data)
开发者ID:stonewell,项目名称:pymterm,代码行数:5,代码来源:terminal_widget_kivy.py

示例12: on_clipboard

# 需要导入模块: from kivy.core.clipboard import Clipboard [as 别名]
# 或者: from kivy.core.clipboard.Clipboard import copy [as 别名]
 def on_clipboard(self, *args):
     '''Event handler to "Copy to Clipboard" button
     '''
     Clipboard.copy(self.txt_traceback.text)
开发者ID:anch0vy,项目名称:kivy-designer,代码行数:6,代码来源:bug_reporter.py

示例13: paste_clipboard

# 需要导入模块: from kivy.core.clipboard import Clipboard [as 别名]
# 或者: from kivy.core.clipboard.Clipboard import copy [as 别名]
def paste_clipboard(text):
    # convert to appropriate format
    text = unicode(text)

    Clipboard.copy(text)
开发者ID:autosportlabs,项目名称:RaceCapture_App,代码行数:7,代码来源:utils.py

示例14: binding

# 需要导入模块: from kivy.core.clipboard import Clipboard [as 别名]
# 或者: from kivy.core.clipboard.Clipboard import copy [as 别名]
 def binding(btn):
     text_to_copy = self.hash_repr.text[:self.hash_repr.format_border]
     Clipboard.copy(text_to_copy)
开发者ID:meequz,项目名称:hash_kivy,代码行数:5,代码来源:main.py

示例15: copy_output

# 需要导入模块: from kivy.core.clipboard import Clipboard [as 别名]
# 或者: from kivy.core.clipboard.Clipboard import copy [as 别名]
	def copy_output(self):
		Clipboard.copy(root.ids.output.text)
		if CutBuffer:
			CutBuffer.set_cutbuffer(root.ids.output.text)
开发者ID:kived,项目名称:strmanip,代码行数:6,代码来源:strmanip.py


注:本文中的kivy.core.clipboard.Clipboard.copy方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。