Skip to content

Commit

Permalink
add pydev atrifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume Aubert committed Jun 25, 2010
1 parent 631c49d commit df6fe7d
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .project
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>rodd</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.python.pydev.PyDevBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.python.pydev.pythonNature</nature>
</natures>
</projectDescription>
10 changes: 10 additions & 0 deletions .pydevproject
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?eclipse-pydev version="1.0"?>

<pydev_project>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.6</pydev_property>
<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH">
<path>/rodd/src</path>
</pydev_pathproperty>
</pydev_project>
12 changes: 12 additions & 0 deletions sql/create_rodd_mysql.sql
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,15 @@ INSERT into orbit_type (name) values("GEO");
-- status, instrument, frequency, should be expressed differently
-- for frequency, it will be very difficult

CREATE TABLE IF NOT EXISTS channel (
chanID INTEGER NOT NULL PRIMARY KEY,
channel VARCHAR(256),
multicastAddress VARCHAR(256),
minRate INTEGER NOT NULL,
maxRate INTEGER NOT NULL,
channelFunction VARCHAR(256),
PID_EB9 INTEGER NOT NULL,
PID_AB3 INTEGER,
PID_NSS INTEGER
);

25 changes: 25 additions & 0 deletions src/sandbox/serv.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Echo server program
import socket

HOST = '' # Symbolic name meaning the local host
PORT = 9001 # Arbitrary non-privileged port
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.bind((HOST, PORT))
s.listen(1)
print "listenning on %s , port = %d"%(HOST,PORT)
while 1:
conn, addr = s.accept()
print 'Connected by', addr
while 1:
try:
data = conn.recv(1024)
print "received = ", data
if data[:4] == "QUIT":
conn.send("BYE BYE")
conn.close()
if not data: break
conn.send(data)
except :
print "exception received"
break
conn.close()
10 changes: 10 additions & 0 deletions src/sandbox/test_connection.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import MySQLdb

#conn = MySQLdb.connect (host = "localhost", user = "testuser", passwd = "testpass", db = "test")
conn = MySQLdb.connect (host = "127.0.0.1", user="root", db = "rodd")
cursor = conn.cursor ()
cursor.execute ("SELECT VERSION()")
row = cursor.fetchone ()
print "server version:", row[0]
cursor.close ()
conn.close ()

0 comments on commit df6fe7d

Please sign in to comment.