Sample and test code shows you are correct.
tpsFile - is really the SQL file I will be inserting new policy records
into
tagFile - is a CVS file containing all of the information for a new
policy in an XMLish fashion (one record per filed of the policy) I will
receive from a third party
tagIdxFi
In article <[EMAIL PROTECTED]>,
len <[EMAIL PROTECTED]> wrote:
.
.
.
>I have done some more reading and I think the code I need is as
>follows;
>
>mycode = "TagToSQL['mySQLfieldname'] = Tagfile['Value']"
>exec mycode
>
>This is
In <[EMAIL PROTECTED]>, len wrote:
> mycode = "TagToSQL['mySQLfieldname'] = Tagfile['Value']"
> exec mycode
Why do you use ``exec`` here? Why not simply::
TagToSQL['mySQLfieldname'] = Tagfile['Value']
Ciao,
Marc 'BlackJack' Rintsch
--
http://mail.python.org/mailman/listinfo/python-l
Thank all for your reply.
I will try again to state the problem.
I have three files.
1. Tagfile - This file contains data in a CSV format each record in
the file contains three fields 'Tagname', 'Scope', and 'Value' and
exampe of this data file follows;
"totalpolicypremium","pol0","1584"
"quote
In article <[EMAIL PROTECTED]>,
len <[EMAIL PROTECTED]> wrote:
>I appoligize I don't think I have done a very good job of explaining my
>problem.
.
.
.
>The program I am writing is nothing more than a conversion program to
>tak
len wrote:
> Hi all
>
> I have a file that I receive from another party which is basicly a csv
> file containing the following type of information;
>
> Tagname Scope Value
> "first_name","POL01","John"
> "last_name","POL01","Doe"
> "birthday","POL01","04/03/61"
> etc
>
> I nee
I appoligize I don't think I have done a very good job of explaining my
problem.
I work in the an insurance company that sells non standard auto. We
have an in house policy management system that uses MySQL for the data
storage.
An individual policy consists of a policy header and 1 to n drivers
len wrote:
> Hi all
>
> I have a file that I receive from another party which is basicly a csv
> file containing the following type of information;
Python has a csv module. I'm not sure if you're already using that or
if it would be useful to you:
http://docs.python.org/lib/module-csv.html
>
> T
Do you absolutely need to use variables? A dictionary would serve if
each case has a unique identifier.
client_info_dict = {}
for i in tagfile:
tagname,scope,value = i.replace('"','').split(',') # split fields,
strip redundant characters
client_info_dict.setdefault(scope,{}) # set up a
Hi all
I have a file that I receive from another party which is basicly a csv
file containing the following type of information;
Tagname Scope Value
"first_name","POL01","John"
"last_name","POL01","Doe"
"birthday","POL01","04/03/61"
etc
I need to convert this file info into
10 matches
Mail list logo