mirror of
https://expo.survex.com/repositories/expoweb/.git/
synced 2025-01-18 00:42:38 +00:00
[svn r8187] Got rid of data relating to specific machines
This commit is contained in:
parent
3dbd762944
commit
0701ce3ee2
@ -2,12 +2,12 @@ import sys
|
|||||||
import os
|
import os
|
||||||
import urllib
|
import urllib
|
||||||
import types
|
import types
|
||||||
sys.path.append('C:\\Expo\\expoweb')
|
#sys.path.append('C:\\Expo\\expoweb')
|
||||||
from troggle import *
|
from troggle import *
|
||||||
os.environ['DJANGO_SETTINGS_MODULE']='troggle.settings'
|
#os.environ['DJANGO_SETTINGS_MODULE']='troggle.settings'
|
||||||
import troggle.settings as settings
|
import troggle.settings as settings
|
||||||
import troggle.expo.models as models
|
import troggle.expo.models as models
|
||||||
import fileAbstraction
|
import troggle.expo.fileAbstraction as fileAbstraction
|
||||||
|
|
||||||
#import settings
|
#import settings
|
||||||
#import expo.models as models
|
#import expo.models as models
|
||||||
@ -15,16 +15,8 @@ import csv
|
|||||||
import re
|
import re
|
||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
def openFileOrWeb(name):
|
surveytab = fileAbstraction.readFile("Surveys.csv")
|
||||||
try:
|
dialect=csv.Sniffer().sniff(surveytab)
|
||||||
f = open(os.path.join(settings.FILES, name))
|
|
||||||
except:
|
|
||||||
f = urllib.urlopen(settings.FILES + "download/" + name)
|
|
||||||
return f.readlines()
|
|
||||||
|
|
||||||
surveytab = openFileOrWeb("Surveys.csv")
|
|
||||||
|
|
||||||
dialect=csv.Sniffer().sniff(reduce(lambda x, y: x + "\n" + y, surveytab))
|
|
||||||
surveyreader = csv.reader(surveytab,dialect=dialect)
|
surveyreader = csv.reader(surveytab,dialect=dialect)
|
||||||
print surveyreader
|
print surveyreader
|
||||||
headers = surveyreader.next()
|
headers = surveyreader.next()
|
||||||
|
Loading…
Reference in New Issue
Block a user