What steps will reproduce the problem?
1. ./dbconf.py
What is the expected output? What do you see instead?
I expect:
It to work
I get:
File "./dbconf.py", line 5
? import MySQLdb
^
SyntaxError: invalid syntax
--- Code Snippit ----
def parseConfigFile():? # Originally I wrote this function to parse PHP
configuration files!
? config = open(os.path.dirname(os.path.realpath(__file__)) +
'/yubiserve.cfg', 'r').read().splitlines()
? keys = {}
? for line in config:
? ? match = re.search('(.*?)=(.*);', line)
? ? try: # Check if it's a string or a number
? ? ? if ((match.group(2).strip()[0] != '"') and (match.group(2).strip()[0]
!= '\'')):
? ? ? ? keys[match.group(1).strip()] = int(match.group(2).strip())
? ? ? else:
? ? ? ? keys[match.group(1).strip()] = match.group(2).strip('"\' ')
------------------------------
What version of the product are you using? On what operating system?
Version 3.1
Fedora 20 x86_64
Python 2.7.5
Please provide any additional information below.
Also, the python mysql python module on my system is imported vi: import mysql
and not import MySQLdb
Original issue reported on code.google.com by cgka...@gmail.com on 18 Jun 2014 at 6:00
Original issue reported on code.google.com by
cgka...@gmail.com
on 18 Jun 2014 at 6:00