searching file paths updated

parent dc716f84
# import os.path # import os.path
from readWip import findFile from readWip import findFile
import os, sys
''' choose the file where we have the info related to the database we are about to connect to''' ''' choose the file where we have the info related to the database we are about to connect to'''
# insert the path to the file containing the data of the connection, for info see bellow within getConnectionInfo method# # insert the path to the file containing the data of the connection, for info see bellow within getConnectionInfo method#
# XXXX update the arguments with the server data stored on your computer, ADDED FOR TESTING # XXXX update the arguments with the server data stored on your computer, ADDED FOR TESTING
filename=findFile('ServerData',"c:/Users/papagiannis/workspace/DreamGit/dream/dream/simulation/", 'txt' ) filename=findFile('ServerData',os.path.dirname(os.path.abspath(sys.argv[0])), 'txt' )
# choose a delimiter for the file to be read # choose a delimiter for the file to be read
seperator='=' seperator='='
...@@ -21,7 +22,6 @@ def getConnectionInfo(): ...@@ -21,7 +22,6 @@ def getConnectionInfo():
pass_word='<user password>' pass_word='<user password>'
''' '''
fileIN=open(filename,'r') fileIN=open(filename,'r')
print 321
line=fileIN.readline() line=fileIN.readline()
while line: while line:
sout=line.split(seperator) sout=line.split(seperator)
......
...@@ -93,7 +93,7 @@ def requestWIP(): ...@@ -93,7 +93,7 @@ def requestWIP():
if not file: if not file:
# added for testing purposes # added for testing purposes
# XXXXX change that to a test file containing the wip, ADDED FOR TESTING # XXXXX change that to a test file containing the wip, ADDED FOR TESTING
file=findFile('testJSON',"c:/Users/papagiannis/workspace/DreamGit/dream/dream/simulation/", 'json' ) file=findFile('testJSON',os.path.dirname(os.path.abspath(sys.argv[0])), 'json' )
return file return file
def getOrders(input_data): def getOrders(input_data):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment