from os import getenv
import pymssql
conn = pymssql.connect(server = 'localhost', database = 'VCDB')
cursor = conn.cursor()
cursor.execute('select * from vpx_version')
row = cursor.fetchone()
while row:
print("ID=%d, Name=%s" % (row[0], row[1]))
row = cursor.fetchone()
conn.close()
Python: setting remote view in Raspberry Pi
In the Raspberry Pi box
Installing tightvncserver.
sudo apt-get install tightvncserver
Set it up at port #1. One can type in any other ports as long as not conflicting with other open ports.
sudo vncserver :1 -geometry 1920x1080 -depth 24
If you do not know your IP address just do "ifconfig" and look for the ip address because you are going to need this later.
ifconfig|grep inet
In another box, (I have an Ubuntu in this case) install
sudo apt-get install xtightvncviewer
To run it simply type in the following
xtightvncviewer <IP>:port
Example: xtightvncviewer 192.168.1.123:1
Other easier option would be to download VNCViewer from Google Chrome Web Store.
Subscribe to:
Posts (Atom)