[Chicago] Question
david nides
david.nides at gmail.com
Fri Jan 20 20:26:13 CET 2012
Using Python 2.7 but didn't really know what the difference was. I was
planning on reading up on that this weekend before I go to far.
This is the code I used to import my CSV into the db .. worked fine!
with open('C:\Python27\data2.csv','rb') as infile:
# csv.DictReader uses first line in file for column headings by default
dr = csv.DictReader(infile, delimiter=',')
to_db = [(i['date'], i['time'], i['timezone'], i['MACB'], i['source'],
i['sourcetype'], i['type'], i['user'], i['host'], i['short'], i['desc'],
i['version'], i['filename'], i['inode'], i['notes'], i['format'],
i['extra']) for i in dr]
On Fri, Jan 20, 2012 at 11:07 AM, kirby urner <kirby.urner at gmail.com> wrote:
> Hey David --
>
> Just to butt in from Portland, where I'm a PPUG lieutenant under
> Michelle Rowley (our fearless leader), I'd say do it both ways if the
> goal is maximum learning.
>
> Thick client local GUI: consider Tk the presumably came with Python,
> quite capable. John Zelle's book is good at using it. wxPython would
> be a next step up to a truly full featured widget set, as wxPython is
> a wrapper around the venerable wxWidgets. I support using open source
> for maximum learning potential.
>
> Web client: writing a server application is in many ways easier as so
> much has been done for you in terms of human-hours. You have
> frameworks galore. What's more complicated is you're dealing with the
> network itself and the http request / response protocol, plus if
> you're willing they might rope you in to help fine tune Apache and
> before you know it, Python is but a receding memory in the rear view
> mirror (good sysops in short supply in many neighborhoods).
>
> Did you use Python's CSV module to read the file? Is this Python 3.x?
> I'm sure you'll be wanting to take it off list with the glorious
> details, but if you do a web version you should give us a holler so's
> we can all log in and buy us a Mustang, at Costco prices.
>
> Kirby
>
>
> On Fri, Jan 20, 2012 at 8:53 AM, david nides <david.nides at gmail.com>
> wrote:
> > I'm new to Python (don't have a programming background) and looking for
> some
> > assistance as I learn. If this is not the right place to ask this
> question
> > please point me in the right direction. Thanks!
> >
> > I have created a script that will import data from a CSV file into a
> SQLITE3
> > database. I want to create a user interface to display some of the data
> > stored in the database. It can either be in the form of a GUI or web
> app..
> > whatever is easiest! What's the best approach to take here??
> >
> > Example of data to be displayed to user (preferable if it's a scrolling
> > window and sortable columns):
> >
> > Make Model Year
> > Ford F150 2010
> > Ford Mustang 2011
> >
> > Thanks in advance for the help.
> >
> > _______________________________________________
> > Chicago mailing list
> > Chicago at python.org
> > http://mail.python.org/mailman/listinfo/chicago
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/chicago/attachments/20120120/529d4720/attachment.html>
More information about the Chicago
mailing list