<commit_before>from ..lib import appdirs
from ..lib.cfg_file import config
from Tkinter import *
from arrow_pad import ArrowPad		
from jabber_client import JabberClient
from options_window import OptionsWindow

class App:

	def __init__(self,parent):
		self.parent=parent
		self.f = Frame(parent)
		self.arrPad=ArrowPad(self.f,self.controlButtonPress)
		self.arrPad.pack()
		self.optButton=Button(self.f,text="Options...",command=self.optionsButtonPress)
		self.optButton.pack()
		self.f.pack()

		#self.jabberClient=JabberClient()
		#self.jabberClient.connect()
	
	def optionsButtonPress(self):
		o=OptionsWindow()
		

	def controlButtonPress(self,bName): #bName is "pan|tilt [+-][123]"
		command,amount=bName.split()
		amount=int(amount)
		if amount<0:
			direction=-1
			amount=-amount
		else:
			direction=1
			amount=amount
		degrees=int(config.get("tkclient_%s%d"%(command,amount))) #Look up config file vars like tkclient_pan1
		self.jabberClient.sendMsg("%s %d"%(command,degrees*direction))<commit_msg>...jabber connection in tkclient now called<commit_after>from ..lib import appdirs
from ..lib.cfg_file import config
from Tkinter import *
from arrow_pad import ArrowPad		
from jabber_client import JabberClient
from options_window import OptionsWindow

class App:

	def __init__(self,parent):
		self.parent=parent
		self.f = Frame(parent)
		self.arrPad=ArrowPad(self.f,self.controlButtonPress)
		self.arrPad.pack()
		self.optButton=Button(self.f,text="Options...",command=self.optionsButtonPress)
		self.optButton.pack()
		self.f.pack()

		self.jabberClient=JabberClient()
		self.jabberClient.connect()
	
	def optionsButtonPress(self):
		o=OptionsWindow()
		

	def controlButtonPress(self,bName): #bName is "pan|tilt [+-][123]"
		command,amount=bName.split()
		amount=int(amount)
		if amount<0:
			direction=-1
			amount=-amount
		else:
			direction=1
			amount=amount
		degrees=int(config.get("tkclient_%s%d"%(command,amount))) #Look up config file vars like tkclient_pan1
		self.jabberClient.sendMsg("%s %d"%(command,degrees*direction))
{'fraction_non_alphanumeric': 0.12646484375, 'fraction_numerical': 0.0068359375, 'mean_word_length': 5.383177570093458, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2738571', 'n_tokens_mistral': 773, 'n_tokens_neox': 695, 'n_words': 134}