Object Integer mapping

2010-01-20 Thread NighterNet
Need help on python version 3.1.x. I can't seem to know what going on
a bit. The code that I check that the hash is different every time. Is
there a way to make the hash the same? I using as to check the class
is the same variables but if it different variable in the class that
it add to the array and return the index.


# Generic Object->Integer mapping
# the object must be usable as a dictionary key
class ObjMap:
def __init__(self):
self.dict = {}
self.next = 0
def get(self, obj):
if obj in self.dict:
return self.dict[obj]
else:
id = self.next
self.next = self.next + 1
self.dict[obj] = id
return id

def items(self):
getval = operator.itemgetter(0)
getkey = operator.itemgetter(1)
return map(getval, sorted(self.dict.items(), key=getkey))


class Point:
def __init__(self):
self.x = 0
self.y = 0
self.z = 0

points = ObjMap()

Testme = Point()
Testme.x = 0
print(points.get(Testme))
Testme2 = Point()
Testme2.y = 1
print(points.get(Testme2))
Testme3 = Point()
Testme3.y = 1
print(points.get(Testme3))
Ttestme4 = Point()
Ttestme4.y = 1
print( points.get(Ttestme4))

It keep adding new array from this but doesn't match hash. Need help
on how to fix this class code.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Object Integer mapping

2010-01-20 Thread NighterNet
On Jan 20, 9:43 am, Robert Kern  wrote:
> On 2010-01-20 11:18 AM, Richard Thomas wrote:
>
>
>
> > On Jan 20, 4:43 pm, NighterNet  wrote:
> >> Need help on python version 3.1.x. I can't seem to know what going on
> >> a bit. The code that I check that the hash is different every time. Is
> >> there a way to make the hash the same? I using as to check the class
> >> is the same variables but if it different variable in the class that
> >> it add to the array and return the index.
>
> >> # Generic Object->Integer mapping
> >> # the object must be usable as a dictionary key
> >> class ObjMap:
> >>          def __init__(self):
> >>                  self.dict = {}
> >>                  self.next = 0
> >>          def get(self, obj):
> >>                  if obj in self.dict:
> >>                          return self.dict[obj]
> >>                  else:
> >>                          id = self.next
> >>                          self.next = self.next + 1
> >>                          self.dict[obj] = id
> >>                          return id
>
> >>          def items(self):
> >>                  getval = operator.itemgetter(0)
> >>                  getkey = operator.itemgetter(1)
> >>                  return map(getval, sorted(self.dict.items(), key=getkey))
>
> >> class Point:
> >>          def __init__(self):
> >>                  self.x = 0
> >>                  self.y = 0
> >>                  self.z = 0
>
> >> points = ObjMap()
>
> >> Testme = Point()
> >> Testme.x = 0
> >> print(points.get(Testme))
> >> Testme2 = Point()
> >> Testme2.y = 1
> >> print(points.get(Testme2))
> >> Testme3 = Point()
> >> Testme3.y = 1
> >> print(points.get(Testme3))
> >> Ttestme4 = Point()
> >> Ttestme4.y = 1
> >> print( points.get(Ttestme4))
>
> >> It keep adding new array from this but doesn't match hash. Need help
> >> on how to fix this class code.
>
> > You need to define how the Point class hashes. You can do this by
> > writing a __hash__ method like so:
>
> > class Point(object):
> >      ...
> >      def __hash__(self):
> >          return hash(self.x) ^ hash(self.y) ^ hash(self.z)
>
> > However you will also need to define how the Point class relates as
> > equal using the __eq__ or __cmp__ methods.
>
> > class Point(object):
> >      ...
> >      def __eq__(self, other):
> >          return self.x == other.x and self.y == other.y and self.z ==
> > other.z
>
> > This addition makes sure that if two points a equivalent then they
> > count as the same key in the dictionary.
>
> I recommend a simpler approach that duplicates less code and makes it easier 
> to
> maintain the __hash__/__eq__ invariants:
>
> class Point(object):
>      ...
>      def _key(self):
>          # The type(self).__name__ bit is optional, but usually handy.
>          return (type(self).__name__, self.x, self.y, self.z)
>
>      def __hash__(self):
>          return hash(self._key())
>
>      def __eq__(self, other):
>          if not hasattr(other, '_key'):
>              return False
>          return self._key() == other._key()
>
> It is also worth noting that once one allows hashing by value, one should 
> treat
> the objects as immutable, so one should not change the attributes as the OP 
> does
> in his example.
>
> --
> Robert Kern
>
> "I have come to believe that the whole world is an enigma, a harmless enigma
>   that is made terrible by our own mad attempt to interpret it as though it 
> had
>   an underlying truth."
>    -- Umberto Eco

Thanks you, it help fix my hash check against my classes.
-- 
http://mail.python.org/mailman/listinfo/python-list


transparent splash screen

2009-10-08 Thread NighterNet
I been looking for simple way to create a transparent splash screen.
Using gif,png,jpg just by loading the file into it. Using version
3.1.1 Any help would be nice.
-- 
http://mail.python.org/mailman/listinfo/python-list


simple splash screen?

2009-07-28 Thread NighterNet
I am trying to make a simple splash screen from python 3.1.Not sure
where to start looking for it. Can any one help?
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: simple splash screen?

2009-07-29 Thread NighterNet
On Jul 29, 5:24 am, Marcus Wanner  wrote:
> On 7/28/2009 11:58 PM, NighterNet wrote:> I am trying to make a simple splash 
> screen from python 3.1.Not sure
> > where to start looking for it. Can any one help?
>
> Trying to make a splash screen for python?
> Or trying to do image processing in python?
>
> Marcus

trying to use jpg,gif,png for the splash screen
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: simple splash screen?

2009-07-29 Thread NighterNet
On Jul 29, 11:16 am, "Martin P. Hellwig" 
wrote:
> NighterNet wrote:
> > I am trying to make a simple splash screen from python 3.1.Not sure
> > where to start looking for it. Can any one help?
>
> Sure, almost the same as with Python 2 :-)
> But to be a bit more specific:
> 
> """Only works if you got Python 3 installed with tkinter"""
> import tkinter
>
> IMAGE_PATH = "/path/to/image"
>
> class Splash(object):
>      "Splash Screen GUI"
>      def __init__(self, root):
>          self.root = root
>          # No window borders and decoration
>          self.root.overrideredirect(True)
>          # Get the size of the screen
>          screen_width = self.root.winfo_screenwidth()
>          screen_height = self.root.winfo_screenheight()
>          # Full screen
>          geometry_text = "%dx%d+0+0" % (screen_width, screen_height)
>          self.root.geometry(geometry_text)
>          # Display an image
>          self.label = tkinter.Label(self.root)
>          # Only GIF and PGM/PPM supported, for more information see:
>          self.label._image = tkinter.PhotoImage(file=IMAGE_PATH)
>          #http://effbot.org/tkinterbook/photoimage.htm
>          self.label.configure(image = self.label._image)
>          self.label.pack()
>          # This will quit the screen after about 5 seconds
>          self.root.after(5000, self.root.quit)
>
> if __name__ == '__main__':
>      ROOT = tkinter.Tk()
>      APPL = Splash(ROOT)
>      ROOT.mainloop()
> 
>
> --
> MPHhttp://blog.dcuktec.com
> 'If consumed, best digested with added seasoning to own preference.'

Thanks it help. Sorry about that, I was just wander what kind of
answer and if there are other methods to learn it.

Is there a way to position image to the center screen?
-- 
http://mail.python.org/mailman/listinfo/python-list


socket send

2009-07-29 Thread NighterNet
I am trying to figure out how to send text or byte in python 3.1. I am
trying to send data to flash socket to get there. I am not sure how to
work it.

buff= 'id=' , self.id , ':balive=False\n'
clientSock.send(buff);
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: socket send

2009-07-30 Thread NighterNet
On Jul 30, 6:56 am, "Mark Tolonen"  wrote:
> "NighterNet"  wrote in message
>
> news:55aba832-df6d-455f-bf34-04d37eb06...@i4g2000prm.googlegroups.com...
>
> >I am trying to figure out how to send text or byte in python3.1. I am
> > trying to send data to flashsocketto get there. I am not sure how to
> > work it.
>
> > buff= 'id=' , self.id , ':balive=False\n'
> > clientSock.send(buff);
> > --
> >http://mail.python.org/mailman/listinfo/python-list
>
> Python3.1strings are Unicode (think characters not bytes).  When writing
> to files, sockets, etc. bytes must be used.  Unicode strings have an
> encode() method, where you can specify an appropriate encoding (ascii,
> latin-1, windows-1252, utf-8, etc.):
>
>     clientSock.send(buff.encode('ascii'))
>
> When reading from thesocket, you can decode() the byte strings back into
> Unicode strings.
>
>     data = clientSock.recv(1024).decode('ascii')
>
> -Mark

I am not sure how to use struct package.
Here an example for the input:
{id:1,playername:guest,x:100,y:50}
{id:2,playername:tester,x:100,y:50}

struct.pack(? )
-- 
http://mail.python.org/mailman/listinfo/python-list


class or thread id count

2009-07-30 Thread NighterNet
Need some help on doing some bit simple id count. It like every time
it create a class or thread there is id++. Python 3.1

example:
class ClientThread (threading.Thread):
   def __init__(self,clientSocket):
  threading.Thread.__init__(self)
 self.id += 1;

Not sure it how it works.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: class or thread id count

2009-07-30 Thread NighterNet
On Jul 30, 12:14 pm, r  wrote:
> On Jul 30, 1:13 pm, NighterNet  wrote:
>
> > Need some help on doing some bit simple id count. It like every time
> > it create a class orthreadthere is id++. Python 3.1
>
> > example:
> > class ClientThread (threading.Thread):
> >    def __init__(self,clientSocket):
> >       threading.Thread.__init__(self)
> >          self.id += 1;
>
> > Not sure it how it works.
>
> use a class atrribute
>
> >>> class Person():
>
>         count = 0
>         def __init__(self, name, info):
>                 self.name = name
>                 self.info = info
>                 Person.count+=1
>
> >>> p1 = Person('alex23', 'very annoying')
> >>> p2 = Person('Guido', 'very intelligent')
> >>> p2.count
> 2
> >>> p1.count
> 2
> >>> Person.count
>
> 2

Thanks it work.

class Person():
  count = 0
  def __init__(self, name, info):
  self.name = name
  self.info = info
  Person.count+=1
  self.count = Person.count
-- 
http://mail.python.org/mailman/listinfo/python-list


threads check socket

2009-07-31 Thread NighterNet
I been trying to find a way to check the socket is open or not. The
thread are in a group and loop if the sockets are open. If they are
not open delete the thread and remove the group. I need on this.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: threads check socket

2009-07-31 Thread NighterNet
On Jul 31, 10:23 am, "Gabriel Genellina" 
wrote:
> En Fri, 31 Jul 2009 13:35:10 -0300, NighterNet   
> escribió:
>
> > I been trying to find a way to check the socket is open or not. The
> > thread are in a group and loop if the sockets are open. If they are
> > not open delete the thread and remove the group. I need on this.
>
> What means an "open socket"? Do you want to detect whether the other side  
> closed the connection? In that case reading from the socket returns an  
> empty string.
>
> Regarding the "threads in a group", I don't understand what you mean. But  
> in general, you don't delete a thread, you just return from its run()  
> method and the thread finishes execution.
>
> --
> Gabriel Genellina

Thread added into the array. Well this thread when user leave the
server want to make sure it not in used so that I can reuse it some
how or move into another array.

Need to know the thread speed that need for game server timer to
control it. Don't want it too fast or slow for the game server.
fps = 30
def run(self):
while True:
self.gametime += 1
if self.gametime > 1000/fps:
self.gametime = 0;
-- 
http://mail.python.org/mailman/listinfo/python-list


socket policy flash help

2009-07-31 Thread NighterNet
I need help on the policy to able to let access to user to the server
once the policy access is finish. I been trying to find a good
example, but I got no luck. Using python version 3.1.

Here the code I tested but it not working.

if str(buff) == str("b\'\\x00\'"):
print ('policy FOUND >>> sending...')
rawinput = str('')
print (rawinput)
b = bytes ( ord(c) for c in rawinput)
self.sockfd.send(b);
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: socket policy flash help

2009-08-01 Thread NighterNet
On Aug 1, 4:52 am, Piet van Oostrum  wrote:
> >>>>> NighterNet  (N) wrote:
> >N> I need help on the policy to able to let access to user to the server
> >N> once the policy access is finish. I been trying to find a good
> >N> example, but I got no luck. Using python version 3.1.
> >N> Here the code I tested but it not working.
> >N> if str(buff) == str("b\'\\x00\'"):
>
> What is buff supposed to contain here? I assume a byte sequence?
> Do you reaaly mean that buff[0] contains the byte 'b' and buff[1]
> contains a single quote? And the last byte also a single quote? And the
> four bytes with \ x 0 0 before that instead of a null byte? In total 29 bytes?
>
> Or did you mean just the 23 bytes long b'\x00'?
>
> Maybe it should be if buff == b'\x00':
>
> >N>                               print ('policy FOUND >>> sending...')
> >N>                               rawinput = str(' >version=\"1.0\"?> >to-ports=\"*\" />')
>
> The str here is unnecessary as you have already a string.
>
> >N>                               print (rawinput)
> >N>                               b = bytes ( ord(c) for c in rawinput)
>
> Why not
> b = b' domain=\"*\" to-ports=\"*\" />' ?
>
> >N>                               self.sockfd.send(b);
>
> --
> Piet van Oostrum 
> URL:http://pietvanoostrum.com[PGP 8DAE142BE17999C4]
> Private email: p...@vanoostrum.org


I try that method and flash socket is not getting the policy.

b = b''
self.sockfd.send(b);

server = socket.socket( socket.AF_INET, socket.SOCK_STREAM)

When it able to read the policy it send it but it fail to send to
flash some reason and send it again and then d/c.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: socket policy flash help

2009-08-01 Thread NighterNet
Here the full code.

flashpolicy.xml
[[[


   

]]]

flashpolicytest_server3x.py
[[[

#!/usr/local/bin/python
'''
Still under testing...
python version 3.x.x
'''
import socket
import threading
import sys
import os

file_name = 'flashpolicy.xml'
fh = open(file_name, "r")
policy = fh.read(10001)

host = ''; #out side network
port = ;

print ("#  - Init... -  #");
class ClientThread (threading.Thread):
global policy;
allClients = [];
vlock = threading.Lock();
id = 0 # next available thread number
def __init__(self,clientSocket):
threading.Thread.__init__(self)
self.sockfd = clientSocket; #socket client
self.name = '';
ClientThread.id += 1
self.id = ClientThread.id
self.nickName = '';
self.allClients.append(self.sockfd);
def sendAll(self,buff):
for index,clientSock in enumerate(self.allClients):
try:
clientSock.send(buff);
except (socket.error):
print ('error socket %s\n',index,"| clean");
clientSock.close()
del self.allClients[index]
def run(self):
while True:
buff = self.sockfd.recv(1028);
if not buff:
print ("connect close...(client side)");
self.sockfd.close();
break #incase it loop infinite
if str(buff) == str("b\'\\x00\'"):
print ('policy FOUND >>> sending...')
print(buff)
b = b''
print (b)
self.sockfd.send(b);
self.sockfd.sendall(b);
print(buff);
self.sendAll(buff)
self.sockfd.close()
print ("#  - Init... Listen Client -  #\n");
try:
server = socket.socket(socket.AF_INET6, socket.SOCK_STREAM)
except AttributeError:
# AttributeError catches Python built without IPv6
server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
except socket.error:
# socket.error catches OS with IPv6 disabled
server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
server.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
server.bind((host,port))
server.listen(5)
print ("Server Up Listen!",host,":",port," Bind!");
while True:
(clientSocket, address) = server.accept();
print("client connect from :",address);
ct = ClientThread(clientSocket);
print(ct.id);
ct.start();

]]]

Some odd reason I can't send flash policy from python to flash socket
to agrees with the connection.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: socket policy flash help

2009-08-03 Thread NighterNet
On Aug 2, 12:25 pm, Piet van Oostrum  wrote:
> >>>>> NighterNet  (N) wrote:
> >N> Here the full code.
> >N> flashpolicy.xml
> >N> [[[
> >N> 
> >N> 
> >N>    
> >N> 
> >N> ]]]
> >N> flashpolicytest_server3x.py
> >N> [[[
> >N> #!/usr/local/bin/python
> >N> '''
> >N> Still under testing...
> >N> python version 3.x.x
> >N> '''
> >N> importsocket
> >N> import threading
> >N> import sys
> >N> import os
> >N> file_name = 'flashpolicy.xml'
> >N> fh = open(file_name, "r")
> >N> policy = fh.read(10001)
>
> You never use that variable.
>
>
>
> >N> host = ''; #out side network
> >N> port = ;
> >N> print ("#  - Init... -  #");
> >N> class ClientThread (threading.Thread):
> >N>       global policy;
> >N>       allClients = [];
> >N>       vlock = threading.Lock();
> >N>       id = 0 # next available thread number
> >N>       def __init__(self,clientSocket):
> >N>               threading.Thread.__init__(self)
> >N>               self.sockfd = clientSocket; #socketclient
> >N>               self.name = '';
> >N>               ClientThread.id += 1
> >N>               self.id = ClientThread.id
> >N>               self.nickName = '';
> >N>               self.allClients.append(self.sockfd);
> >N>       def sendAll(self,buff):
> >N>               for index,clientSock in enumerate(self.allClients):
> >N>                       try:
> >N>                               clientSock.send(buff);
>
> There is no guarantee that send will indeed transmit all of buff. It is
> better to use clientSock.sendall(buff). Or you should check the return
> value of send and check if it is equal to the length of buff. And repeat
> if not. (But sendall is easier).
>
> Also don't use ; at the end of the statement. It's not pythonic.
>
> >N>                       except (socket.error):
> >N>                               print ('errorsocket%s\n',index,"| clean");
> >N>                               clientSock.close()
> >N>                               del self.allClients[index]
> >N>       def run(self):
> >N>               while True:
> >N>                       buff = self.sockfd.recv(1028);
>
> There is no guarantee that recv will get the whole message. It may even
> get as little as 1 byte. So you should check the return value of recv.
> The official way is to keep reading until you have enough input or until
> you hit end of file.
>
> >N>                       if not buff:
> >N>                               print ("connect close...(client side)");
> >N>                               self.sockfd.close();
> >N>                               break #incase it loop infinite
> >N>                       if str(buff) == 
> >str("b\'\\x00\'"):
>
> What you check here is whether buff contains the byte sequence that starts 
> with a
> b, then a ' ... and ending with the 5 bytes \ x 0 0 ' which is wrong.
>
> Actually it should be:
>
> if buff == b\'\x00':
> or
> if buff == b\'\0':
>
> >N>                               print ('policy FOUND >>> sending...')
> >N>                               print(buff)
> >N>                               b = b' >version=\"1.0\"?> >N> from domain=\"*\" to-ports=\"*\" />'
> >N>                               print (b)
> >N>                               self.sockfd.send(b);
> >N>                               self.sockfd.sendall(b);
>
> Only self.sockfd.sendall; delete the line with self.sockfd.send(b). And
> remove the semicolons for esthetical reasons.
>
> >N> Some odd reason I can't send flash policy from python to flashsocket
> >N> to agrees with the connection.
>
> --
> Piet van Oostrum 
> URL:http://pietvanoostrum.com[PGP 8DAE142BE17999C4]
> Private email: p...@vanoostrum.org

thanks it help. I was not sure about the format most the time.
-- 
http://mail.python.org/mailman/listinfo/python-list


sqlite3 gui

2009-08-05 Thread NighterNet
This took a while to get a gui working. I am new at this coding.

This work with sqlite3 Python Version: 3.1.0. The older version
doesn't work.

#!/usr/local/bin/python
'''
This is for basic database access to view the information.
Python version: 3.1.0

Features:
-view database.
-run script
-update row
-delete row
-insert row

To do list:
-delete table
-create table
-export database
-import database
-primary id need to able to insert to the table
-delete table row
-refresh data

Note:
-It doesn't remove the GUI
-It bit buggy.
-Python version: 3.0.1 -Doesn't support the gui

execute script without '"' ->  INSERT INTO member (user, password)
VALUES( "admin", "admin")
'''

from tkinter import *
from tkinter import ttk
from tkinter import tix
import sqlite3 as sqlite
import re

DATABASE = 'nameofdatabasefile.db'
title = "Sqlite3 Database";

db = sqlite.connect(DATABASE);
cur = db.cursor();

print("#==#")
print("# Python Version: 3.1.0#")
print("# sqlite3  #")
print("#==#")

class Application(Frame):
#label_serverstatus = Label()
table = []
tablename = ''
tablerowid = ''
tablecolid = '0'
tablerowname = ''
tablevarinput = []
tablevartext = []
tableentrywidgetrow = []
tablelabelwidgetrow = []

def __init__(self, master=None):
Frame.__init__(self, master)
self.master.grid_columnconfigure(0, weight=1)
self.master.grid_rowconfigure(0, weight=1)
self.master.title(title)
self.listtable()#Make a list table
self.createWidgets()
self.master.geometry("800x600")
self.pack()
def listtable(self):
self.table = []
cur.execute("select * from sqlite_master WHERE type='table'");
for t in cur:
#print (t[1])
self.table.append(t[1])

#Create Widgets
def createWidgets(self):
#Schema
self.Schemaframe = ttk.Labelframe(self, text='Schema',
width=600, height=100)
self.Schemaframe.grid(column=1, row=1, sticky=W)
self.text_database = Label(self.Schemaframe)
self.text_database["text"] = "Schema Database:" + DATABASE
self.text_database.grid(column=1, row=1, sticky=W)

#Table
self.tableframe = ttk.Labelframe(self, text='Schema Table',
width=600, height=100)
self.tableframe.grid(column=1, row=2, sticky=W)
self.text_table = Label(self.tableframe)
self.text_table["text"] = "table:"
self.text_table.grid(column=1, row=1, sticky=W)

self.combobox = ttk.Combobox(self.tableframe)
self.combobox.grid(column=2, row=1, sticky=W)
self.combobox["values"] = self.table
self.combobox.bind('<>', self.table_click)
self.combobox.current(1)

self.button_deletetable = Button(self.tableframe)
self.button_deletetable["text"] = "Delete Table"
self.button_deletetable.grid(column=3, row=1, sticky=W)

self.button_createtable = Button(self.tableframe)
self.button_createtable["text"] = "Create Table"
self.button_createtable.grid(column=4, row=1, sticky=W)

#Table
self.scriptframe = ttk.Labelframe(self, text='Schema Script',
width=600, height=100)
self.scriptframe.grid(column=1, row=3, sticky=W)

self.button_script = Button(self.scriptframe)
self.button_script["text"] = "Exeute script"
self.button_script["command"] = self.executescript
self.button_script.grid(column=1, row=1, sticky=W)

self.button_commit = Button(self.scriptframe)
self.button_commit["text"] = "Commit"
self.button_commit["command"] = self.commit_save
self.button_commit.grid(column=2, row=1, sticky=W)

#TEXT BOX
self.textbox = Text(self.scriptframe, width=40, height=10)
self.textbox.grid(column=1, row=2, sticky=W,columnspan=6)

#TABLE FRAME LIST
self.tablerowframe = ttk.Labelframe(self, text='Table Rows',
width=600, height=100)
self.tablerowframe.grid(column=2, row=1, sticky=W,rowspan=3)

#TABLE ROW LIST
self.listbox = Listbox(self.tablerowframe, exportselection=0,
background="white")
self.listbox.bind("<>",self.listselect_click)
self.listbox.grid(column=1, row=1, sticky=W)

#vbar
self.vbar = Scrollbar(self.tablerowframe, name="vbar")
self.vbar.grid(column=1, row=1, sticky=E)
self.vbar.configure(orient=VERTICAL,
command=self.listbox.yview)
self.listbox.configure(yscrollcommand=self.vbar.set)

self.button_createrow = Button(self.tablerowframe)
self.button_createrow["text"] = "Create Table Row"
self.button_createrow["command"] = self.commit_save
self.button_createrow.grid(column=1, row=2, sticky=W)

#TABLE FRAME ROW EDIT
self.tablerowframe = ttk.Labelframe(self, text='Table Rows
EDIT', width=256, height=480)
self.tabl