H
Hitesh Joshi
Hi,
I am newbie python dude. I need few hints.
I created a DB table with following fields
UserID(PK), TimeStamp, Version, IP, Port
I need to insert these info from this .log file and the log file has
lines like following with some junk garbase like "attempt using client
software " I need to get rid of that.
10:03:54.527 (01) - User (xxx123) login attempt using client software
version (1.0.1.1) from IP (xxx.xxx.xxx.xxx) port (xxxx)
Create a while 1 loop, read line from file.. disect line and insert
'stuff' into those variables and then run a query from inside the
python to insert data... and do this untill EOF...
Is there any better way to approach this problem?
so if I have variable , let's say, TimeStamp, UserID, Version,
IPAddress and PortNum.. how can I disect this line and insert into
this variable?
Thank you,
hj
I am newbie python dude. I need few hints.
I created a DB table with following fields
UserID(PK), TimeStamp, Version, IP, Port
I need to insert these info from this .log file and the log file has
lines like following with some junk garbase like "attempt using client
software " I need to get rid of that.
10:03:54.527 (01) - User (xxx123) login attempt using client software
version (1.0.1.1) from IP (xxx.xxx.xxx.xxx) port (xxxx)
Create a while 1 loop, read line from file.. disect line and insert
'stuff' into those variables and then run a query from inside the
python to insert data... and do this untill EOF...
Is there any better way to approach this problem?
so if I have variable , let's say, TimeStamp, UserID, Version,
IPAddress and PortNum.. how can I disect this line and insert into
this variable?
Thank you,
hj