[Tutor] Question about autocomplete functionality

2012-06-12 Thread Richard Querin
Hi All, I wrote a small utility several months ago to easily search a project list (an excel spreadsheet) by project name or number etc. However I am thinking of expanding it with the following sort of functionality - the ability to add 'tags' to a given project (tags being just simple

[Tutor] How to find a substring within a list of items

2011-01-13 Thread Richard Querin
I have an object that contains about 3500 list items, each list containing various data, some strings and some floats, like so: ['D', 123.4,'This is a project description', 'type', 52.1,'title'] What is the easiest way to search this list for a given string? So I want to find out if this list

Re: [Tutor] How to find a substring within a list of items

2011-01-13 Thread Richard Querin
On Thu, Jan 13, 2011 at 2:27 PM, Wayne Werner waynejwer...@gmail.comwrote: I don't know if either of these are the best options (they probably aren't), but they should work, and for 3500 it will probably loop faster than opening up excel. HTH, Wayne Thanks Wayne. This would definitely be

Re: [Tutor] List processing question - consolidating duplicate entries

2007-11-29 Thread Richard Querin
On Nov 27, 2007 5:40 PM, Kent Johnson [EMAIL PROTECTED] wrote: This is a two-liner using itertools.groupby() and operator.itemgetter: data = [['Bob', '07129', 'projectA', '4001',5], ['Bob', '07129', 'projectA', '5001',2], ['Bob', '07101', 'projectB', '4001',1], ['Bob', '07140', 'projectC',

[Tutor] Python CMS advice wanted

2007-11-27 Thread Richard Querin
Hi, I've got a site that is currently a static site. While not unmanageable at the moment (it's still pretty young), we've been entertaining thoughts of converting it to a CMS system. I'm looking for some good suggestions based on some simple criteria: - Python based - I have a rudimentary

[Tutor] List processing question - consolidating duplicate entries

2007-11-27 Thread Richard Querin
I'm trying to process a list and I'm stuck. Hopefully someone can help me out here: I've got a list that is formatted as follows: [Name,job#,jobname,workcode,hours] An example might be: [Bob,07129,projectA,4001,5] [Bob,07129,projectA,5001,2] [Bob,07101,projectB,4001,1]

Re: [Tutor] Python CMS advice wanted

2007-11-27 Thread Richard Querin
Whoa!. Lots of very good advice here. Thanks to all. After reading it all I'm wondering if maybe a templating system like Cheetah might be the way to go for us. I'll have to do a lot more reading and exploring. I'd love to learn something like Django but like it has been said, that's really a

Re: [Tutor] Which GUI?

2007-08-02 Thread Richard Querin
On 8/2/07, scott [EMAIL PROTECTED] wrote: I was thinking about finding a copy of that book, so maybe starting WxPython would be easier then and not worry about Tkinter. Is WxPython in Action a very good book? I'm no programmer by trade, but dabble in Python/wxPython for fun and bought the

Re: [Tutor] Which GUI?

2007-08-02 Thread Richard Querin
On 8/2/07, Eric Brunson [EMAIL PROTECTED] wrote: Switching gears from linear to event driven programming is a pretty significant paradigm shift. Will this book help him get his head around that? That's one of the main reasons why I bought it actually. I couldn't grasp in any significant way

Re: [Tutor] eyeD3 module installation on XP

2007-07-16 Thread Richard Querin
Sorry Tino, Missed your response completely. Your advice on using cygwin was spot-on. I hadn't thought of using that. Per my response to Terry, I've got the .10 version up and running now. Thanks. RQ ___ Tutor maillist - Tutor@python.org

[Tutor] Fwd: eyeD3 module installation on XP

2007-07-16 Thread Richard Querin
On 7/16/07, Terry Carroll [EMAIL PROTECTED] wrote: You might want to try downloading .10 instead of the current release and see if that works for you. See http://eyed3.nicfit.net/releases/ Sorry I can't help more. Nope. That's fine. Based on your response I was able to upgrade my Cygwin

[Tutor] eyeD3 module installation on XP

2007-07-13 Thread Richard Querin
I'm interested in writing a small app - or attempting to ;) - which will involve using the eyeD3 python module to process id3 tags of a given set of files. There are source downloads as well as downloads for various linux distros, which is fine. However I also might want to work on this in XP.

[Tutor] How can I escape a pound symbol in my script?

2007-07-05 Thread Richard Querin
Hi, I'm writing a very simple python script which writes out some predefined text to a file (which will later become part of an html file). I need to write out a pound sign '#' to the file and I can't figure out how to escape it. I've tried '\#' and '\u0023', but neither works. How can I do it?

Re: [Tutor] How can I escape a pound symbol in my script?

2007-07-05 Thread Richard Querin
Thanks for the quick responses guys... I was fooled by Vim and my own inexperience. I had forgotten to escape a preceding quote and the pound symbol was generating a python comment which showed up in syntax highlighting... Grrr. Problem fixed now. [walking away embarrassed...] ;)

[Tutor] how can I compare a local directory or file with a remote one

2007-06-20 Thread Richard Querin
I'm interested in writing a quick script that would run a diff-type command that would compare a local directory to a remote one to identify the changes in the files within that directory. I was initially thinking that I would maybe use the linux diff command in conjunction with the wget command

Re: [Tutor] gmail

2007-05-29 Thread Richard Querin
On 5/29/07, Adam Urbas [EMAIL PROTECTED] wrote: Hey, I have gmail now, but I'm not sure how to turn off HTML. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor When you're typing in your email, you should

[Tutor] Podcast aggregator - OPML Parsing?

2007-04-23 Thread Richard Querin
I'd like to try my hand at writing a very simple podcast aggregator for linux. I'll be using wxPython and have found the Universal Feed Parser which looks good for me to use, but I'm having trouble finding a similar module that might parse OPML files. Does anybody know of a good one? Or should I

Re: [Tutor] Running an exe from Python

2007-02-22 Thread Richard Querin
On 2/22/07, Nagendra Singh [EMAIL PROTECTED] wrote: What it does is that opens and closes the command window really fast and displays a value of 1 in the interpreter. How can I get python to display the results in the interactive window or what is the right way to do this. I assume you're

Re: [Tutor] Replying to the tutor-list

2007-02-15 Thread Richard Querin
On 2/14/07, Mike Hansen [EMAIL PROTECTED] wrote: The following tutor faq has an explanation: http://www.python.org/infogami-faq/tutor/tutor-why-do-my-replies-go-to-t he-person-who-sent-the-message-and-not-to-the-list/ It seems like this is designed for the 5% case when it makes the

Re: [Tutor] Replying to the tutor-list

2007-02-15 Thread Richard Querin
On 2/15/07, Alan Gauld [EMAIL PROTECTED] wrote: I dunno about you but 95% of my email is private, only about 5% comes from mailing lists. Yeah, me too, but I guess it seems easier to just hit 'reply' 100% of the time and have it go to the right recipient. My point really was that 95% of

Re: [Tutor] Trouble getting os.execl() command to work

2007-02-11 Thread Richard Querin
On 2/11/07, Luke Paireepinart [EMAIL PROTECTED] wrote: for name in filelist: oops! filelist still contains the non-normalized names of the files! Dang! Thank you sir. I should have recaptured the file list before continuing on. Alan - thanks for the great info as well. I will check it

[Tutor] Converting Filenames to Lower case

2007-02-10 Thread Richard Querin
Hi, I'm interested in a writing a quick python script for use on the command line. I'm at the linux terminal inside a directory with a bunch of files. The files have mixed case (some are .JPG and some are .jpg, etc..) I'd like to be able to run a python script that will take all the files in the

[Tutor] Trouble getting os.execl() command to work

2007-02-10 Thread Richard Querin
I'm having a slight problem here. I've got a script (shown below) which is run from the command line. I am converting the filenames to lowercase and then, for each .cr2 file, I'm building a command line and running it. Seems pretty simple. I print the resulting command line and it looks fine, but

Re: [Tutor] free IDE for Python?

2006-11-14 Thread Richard Querin
On 11/14/06, Tim Johnson [EMAIL PROTECTED] wrote: I've used vim in the past for python and recommend it for ease ofuse and support. I also use emacs, which may be found harder tolearn but has the advantage of being able to evaluate code directlyin the editor. timI have to chuckle when you

Re: [Tutor] A simple list question...

2006-09-07 Thread Richard Querin
On 9/7/06, Kent Johnson [EMAIL PROTECTED] wrote: No, it doesn't. You are confused somewhere; my guess is your original data has newlines. Sorry, my bad. When I created the original list I was splitting a string in two pieces. The latter portion of the string had a newline at the end. I had

Re: [Tutor] Style query

2006-08-13 Thread Richard Querin
I believe you can find it here:http://www.python.org/doc/essays/styleguide.htmlAuthored by Guido Van Rossum himself.Cheers, RichardOn 8/13/06, dave s [EMAIL PROTECTED] wrote: As my programs become more complex I am aware of the need to adopt aconsistent style. To differentiate between classes,

[Tutor] Raw files and jpeg thumbnail extraction

2006-08-06 Thread Richard Querin
I am interested in extracting jpeg thumbnails that are stored in my camera's Canon .CR2 raw files. Does anybody know of any python libraries with this kind of functionality? Is dcraw the only way to implement this functionality? I'm writing a simple gui to selectively process raw files into jpegs,

[Tutor] Writing python scripts to control GIMP

2006-07-20 Thread Richard Querin
Hi,I'm interested in learning about how to write python scripts that can control the GIMP. I've read about several scripts but I'd like to know where to start learning about how it's done. Anybody got any good places to look for tutorials, references etc?

Re: [Tutor] How can I copy files recursively?

2006-07-11 Thread Richard Querin
On 7/11/06, Alan Gauld [EMAIL PROTECTED] wrote: Things which are easy in the shell are usually less easy in Python.In your case a simple cp -r will copy the files and an rm -rf willdelete the originals.Or you could just use mv on the top level folder. But I don't want the sub folders to come along

[Tutor] How can I copy files recursively?

2006-07-10 Thread Richard Querin
I know this is probably a dumb question:I've got mp3 files that are downloaded (by ipodder) into individual subfolders. I'd like to write a quick script to move (not copy) all the mp3 files in those folders into a single destination folder. I was thinking I could do it easily from the linux

Re: [Tutor] Python video?

2006-04-15 Thread Richard Querin
On 4/13/06, Steve Nelson [EMAIL PROTECTED] wrote: On a similar line, I've recently discovered podcasts.I spend a lotof time driving, and have been listening through the Security Nowbroadcasts, and the last few days some stuff on Evolutionary Theory. Does anyone know of some good sources for

Re: [Tutor] Question About Function Arguments and Returned Results

2006-04-11 Thread Richard Querin
On 4/11/06, Kent Johnson [EMAIL PROTECTED] wrote: There is no need to pass the class object in to the function, you cancreate it in the function and return it. A class might be nice becauseit gives names to the various values. A dict can also be used for this. Do what feels right :-)To be more

Re: [Tutor] preliminary app design question

2006-04-06 Thread Richard Querin
On 4/5/06, Alan Gauld [EMAIL PROTECTED] wrote: Sounds like creating each app as a class which can be instantiated ondemand by the master application would be a possible design option.I guess writing the master program (or some simplified version of it) would be required from the start in order to

Re: [Tutor] preliminary app design question

2006-04-06 Thread Richard Querin
On 4/5/06, Hugo González Monteverde [EMAIL PROTECTED] wrote: Now seriously. Are there file formats meant to be used and understood byother programs in principle (we know it is a nice feature, but is itnecessary?)?There will be input data and output results from program A that may be utilized by