Hi;<br>I get this error:<br><br> /var/www/html/<a href="http://angrynates.com/christians/cart/simplemail/mail.py">angrynates.com/christians/cart/simplemail/mail.py</a><br>  153 </head><br>  154 <body>'''<br>
  155 commitSale()<br>  156 myMail()<br>  157 print '''<br>commitSale = <function commitSale><br> /var/www/html/<a href="http://angrynates.com/christians/cart/simplemail/mail.py">angrynates.com/christians/cart/simplemail/mail.py</a> in commitSale()<br>
   98     cursor.execute('select max(ID) from %sCustomerData;' % store)<br>   99     custID = cursor.fetchone()[0]<br>  100   customerData(store, tmpTable, custID, patientID)<br>  101 <br>  102 def myMail():<br>global customerData = <function customerData>, global store = 'products', tmpTable = 'tem12627568064', custID = 1, global patientID = 'None'<br>
 /var/www/html/<a href="http://angrynates.com/christians/cart/customerData.py">angrynates.com/christians/cart/customerData.py</a> in customerData(store='products', tmpTable='tem12627568064', custID=1, patientID='None')<br>
   39 <body><br>   40 """<br>   41   print """<br>   42   print '<h1 align="center">%s Customer Data</h1>' % (store[0].upper() + store[1:])<br>   43   cursor.execute('describe %sCustomerData' % store)<br>
store = 'products'<br><br>ValueError: unsupported format character '(' (0x28) at index 54<br>      args = ("unsupported format character '(' (0x28) at index 54",) <br><br>Apparently that character is a "file separator", which I presume is an invisible character. I tried retyping the area in question, but with no avail (threw same error). Please advise. Complete code follows.<br>
TIA,<br>beno<br><br>#!/usr/bin/python<br><br>import sys,os<br>sys.path.append(os.getcwd())<br>import MySQLdb<br>from login import login<br>import re, string<br><br>def customerData(store, tmpTable, custID, patientID):<br>
  user, passwd, db, host = login()<br>  db = MySQLdb.connect(host, user, passwd, db)<br>  cursor = db.cursor()<br>  page= """#!/usr/bin/python<br><br>import sys,os<br>sys.path.append(os.getcwd())<br>import MySQLdb<br>
from login import login<br>import re, string<br>from particulars import ourStores, ourOptions<br>import fpformat<br>from sets import Set<br>from processOrder import processOrder<br><br>def %sCustomerData():<br>  print 'Content-Type: text/html'<br>
  print<br>  print '''<br><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd</a>"><br>
<head xmlns="<a href="http://www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml</a>"><br><style type='text/css'><br>.text {  font-family: Arial, Helvetica, sans-serif; font-size: 16px; text-decoration: none; text-align: justify}<br>
</style><br><title></title><br><meta http-equiv="distribution" content="Global" /><br><meta http-equiv="robots" content="index all, follow all" /><br><meta name="author" content="This web site developed by beno. You may reach him at his web site [<a href="http://beno.vi">beno.vi</a>], or by dialing 340-773-0687 and asking for room 102." /><br>
</head><br><body><br>"""<br>  print """<br>  print '<h1 align="center">%s Customer Data</h1>' % (store[0].upper() + store[1:])<br>  cursor.execute('describe %sCustomerData' % store)<br>
  cols = [itm[0] for itm in cursor]<br>  cursor.execute('select * from %sCustomerData where ID=%s' % (store, custID))<br>  ourCustomerData = cursor.fetchone()<br>  ourColsAndCustomerDataDict = dict(zip(cols, ourCustomerData))<br>
  for col, data in ourColsAndCustomerDataDict.iteritems():<br>    print '<b>%s</b>: %s<br />' % (col, data)<br>  print "<br /><h2 align='center'>Customer Order</h2>"<br>
  print "<table border='1'>\n  <tr>"<br>  numberShippingFields, totalTotal, html = processOrder(patientID, store, tmpTable)<br>  print html<br>  print "  </tr>"<br>  if store != 'prescriptions':<br>
    numberCols = 12 + numberShippingFields<br>  else:<br>    numberCols = 8 + numberShippingFields<br>  print '  <tr>\n    <td colspan="%d"><b>TOTAL</b></td>\n    <td><b>$%s</b></td>\n  </tr>' % (numberCols - 1, str(fpformat.fix(round(int(totalTotal * 100))/100,2)))<br>
  print "</table>"<br>  cursor.close()<br>  print '''<br></body><br></html><br>'''<br><br>%sCustomerData()<br>""" % (store, store)<br>  os.chdir('..')<br>
  try:<br>    os.delete('%s/%sCustomerData.py' % (os.getcwd(), store))<br>  except AttributeError:<br>    pass<br>  file = '%sCustomerData.py' % store<br>  f = open(file, 'w')<br>  f.write(page)<br>
  f.close()<br> # os.chown('%s/%s' % (os.getcwd(), file), 500, 500)<br>  os.chmod('%s/%s' % (os.getcwd(), file), 0755)<br><br clear="all"><br>-- <br>The Logos has come to bear<br><a href="http://logos.13gems.com/">http://logos.13gems.com/</a><br>