By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,446 Members | 1,566 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,446 IT Pros & Developers. It's quick & easy.

Is there any better way to approach this problem?

P: n/a
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

Jul 19 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.