Permalink
Browse files

add pydev atrifacts

  • Loading branch information...
1 parent 631c49d commit df6fe7d5ab8dc65f60801001ee5b3578aed8f324 Guillaume Aubert committed Jun 25, 2010
Showing with 74 additions and 0 deletions.
  1. +17 −0 .project
  2. +10 −0 .pydevproject
  3. +12 −0 sql/create_rodd_mysql.sql
  4. +25 −0 src/sandbox/serv.py
  5. +10 −0 src/sandbox/test_connection.py
View
@@ -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>
View
@@ -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>
@@ -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
+);
+
View
@@ -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()
@@ -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.