#!/usr/bin/python from PyQt4.QtGui import QApplication from ui.MainWindow import MainWindow def main(): import sys app = QApplication(sys.argv) wnd = MainWindow() wnd.show() sys.exit(app.exec_()) if __name__ == '__main__': main()
This file must be saved at root directory level.
Go to Project/Properties and set main.py as main script for the project.
Add main.py to the repository, the same way we have been doing for the other files.
To run the project, select menu Start/Run project. A dialog is shown, you must provide the working directory (C:\tmp\LogParser in my machine), the Command line (main.py) and that's pretty much all.
Clicking on the Ok button should run the application.
The next image shows the app running.
First, I opened a log file, and then applied a regexp something like UserId=xxx, as I know that there are a number of HTTP requests that send this info via GET (and therefore IIS does log it).
That's a bad programming practice, I know, but we are not going to discuss it now :-).
After having filtered records this way, I applied a new regexp, something like asp.*126.96.36.199 (which is the ip address for user xxx).
This screenshot shows the result of filtering records to show only requests for asp pages that were made by the user whith this ip address.
Unfolding the elements, you find yourself being able to follow along the entire 'http conversation'. This screen solved the issue for me: in the case of the new feature for the web app I had implemented, every user was expected to start the application via the page default.asp.
But it has finally turned out that plenty of users (the ones for which the app doesn't work as expected) are starting throught noentryaccess.asp. That's why it wasn't working properly!