PythonWin: Change background color

2005-10-04 Thread Bell, Kevin
Does anyone know of a way to change the background color of the PythonWin windows from the blinding white, to another color, like the way MS Word will allow a dark blue background with white text? I know you can specify colors for all the different style of text via View/Options/Format, but I see

change a value to NULL?

2005-10-05 Thread Bell, Kevin
I'm pulling a list of numbers from MS Excel, but occasionally if there is no data from excel, the value is an asterisk, but I need to make it null. What is the best way to do that? Thus far, I'm using: for value in myRange: try: intV = int(value) print intV

RE: change a value to NULL?

2005-10-05 Thread Bell, Kevin
. Thanks again... Kevin Bell -Original Message- From: Laszlo Zsolt Nagy [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 05, 2005 10:18 AM To: Bell, Kevin; python-list@python.org Subject: Re: change a value to NULL? Bell, Kevin wrote: >I'm pulling a list of numbers from MS Excel, bu

RE: change a value to NULL?

2005-10-05 Thread Bell, Kevin
Just tested it. Access does recognize None as null/blank/etc when None is passed in from python. Kevin Bell -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bell, Kevin Sent: Wednesday, October 05, 2005 10:33 AM To: python-list@python.org Subject: RE

RE: So far

2005-10-06 Thread Bell, Kevin
I like pythonWin other than the white background where you write your scripts, because after awhile it's bad on the eyes. Does anyone know of a free IDE that will allow control of this, as well as the coloring of keywords, etc? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL

date reformatting

2005-10-06 Thread Bell, Kevin
Anyone aware of existing code to turn a date string "8-15-05" into the number 20050815? The dateutil module has a parse method that looks perfect, I downloaded and unzipped it, but could figure out how to install it. I using windows XP and py2.4. Any ideas? Kev -- http://mail.python.org/m

interactive window vs. script: inconsistent behavior

2005-10-06 Thread Bell, Kevin
The following works in the interactive window of PythonWin, but fails in a script. TypeError: Objects of type 'slice' can not be converted to a COM VARIANT I just need to parse out these dates, but it's making me crazy. Shouldn't it work in both the interactive window and a script? >>> d = "5

RE: interactive window vs. script: inconsistent behavior

2005-10-06 Thread Bell, Kevin
Oops! Sorry about that post. I'm pulling data from excel, and needed to convert the object I pulled into a string before slicing. I guess I should look (more thoroughly) before I leap. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bell, Kevin

Listen for directory events

2005-10-12 Thread Bell, Kevin
Anyone have any advice on listening for directory events? I'd like to fire off my script if new files are added to a directory. Right now, I've set up my script as a scheduled task (Windows XP) and when the script is run periodically, it initially looks for new files and does it's magic if there

get a copy of a string leaving original intact

2005-10-20 Thread Bell, Kevin
I'm having trouble with something that seems like it should be simple. I need to copy a file, say "abc-1.tif" to another directory, but if it's in there already, I need to transfer it named "abc-2.tif" but I'm going about it all wrong. Here's what doesn't work: (I'll add the copy stuff from shuti

RE: get a copy of a string leaving original intact

2005-10-21 Thread Bell, Kevin
Lundh Sent: Friday, October 21, 2005 2:10 AM To: python-list@python.org Subject: Re: get a copy of a string leaving original intact "Bell, Kevin" wrote: > I'm having trouble with something that seems like it should be simple. > > I need to copy a file, say "abc-1.tif&

where to download md5.py?

2005-11-02 Thread Bell, Kevin
I've been looking around, but haven't found a place to download the md5.py module. I need it to run the dupinator.py Anyone know where to find it? Kev -- http://mail.python.org/mailman/listinfo/python-list

RE: where to download md5.py?

2005-11-02 Thread Bell, Kevin
"Bell, Kevin" wrote: > I've been looking around, but haven't found a place to download the > md5.py module. I need it to run the dupinator.py Fredick replied: md5 is a standard Python module (written in C). it's been in Python

RE: where to download md5.py?

2005-11-02 Thread Bell, Kevin
I guess I do have it. I was looking in LIB for it, because that's where I've typically imported other modules from, like os, etc... >> import md5 >> help(md5) Gives me the help like you'd expect. I was getting an error in the dupinator that I mistakenly attributed to not being able to see md

convert COM obj to integer

2005-11-02 Thread Bell, Kevin
I'm pulling a range of cells from Excel into a list and the data in Excel is a number or possibly some text like an asterisk. Each member of the list is a com object (I think) and I'm converting them to integers (or to None if not numberic) but my method seems very silly. Is this the best way to g

RE: convert COM obj to integer

2005-11-02 Thread Bell, Kevin
Well that looks quite nice, so I'll work that into my script. Thanks!!! That 1-tuple business was confusing me, and I was getting errors stating something about converting an object, so as you can see, I was grasping at straws. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL

how to open a windows folder?

2005-11-04 Thread Bell, Kevin
I'd love to be able to open up a windows folder, like c:\temp, so that it pops up visually. I know how to drill down into a directory, but I can't figure out how to open one up on screen. Would I have to make a call to windows explorer in a similar way that I hit Excel with: from win32co

RE: how to open a windows folder? THANKS!

2005-11-04 Thread Bell, Kevin
import os os.startfile ("c:/temp") That was painless and did the trick! Thanks Tim! -- http://mail.python.org/mailman/listinfo/python-list

pyKML: where to get it?

2006-07-17 Thread Bell, Kevin
When trying to download pyKML at sourceForge, it says "No File Packages Defined" ;( Does anyone know where I can get pyKML? TIA Kev. -- http://mail.python.org/mailman/listinfo/python-list

Google Earth contact? (OT, sort of...)

2006-07-17 Thread Bell, Kevin
Sorry if this is an off topic shot in the dark, but... Does anyone know a contact for anyone that works for Google Earth? I wanted to shoot 'em an email about a possible enhancement, but they're smart enough to not leave contact info ANYWHERE on their websites. -- http://mail.python.org/mailma

seeking the "Hello World" of Packages

2006-08-11 Thread Bell, Kevin
I'm trying to get an idea of how packages work and I've read about it in the Py Tutorial and Nutshell, but I'm still craving a concrete example that I can poke through. Does anyone have a really basic package that does very little that I could look at? What I've gathered thus far is that a packag

RE: interactive programme (voice)

2006-05-30 Thread Bell, Kevin
http://www.cs.unc.edu/~parente/tech/tr02.shtml loads of fun. -- http://mail.python.org/mailman/listinfo/python-list

RE: wxPython, dynamically modify window

2006-12-12 Thread Bell, Kevin
I think that you'll just need to change the frame size property when you hit your checkbox... -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Grant Sent: Tuesday, December 12, 2006 12:02 AM To: python-list@python.org Subject: wxPython, dynamically modify

open a directory in widows

2006-12-14 Thread Bell, Kevin
If I want "C:\temp" to pop open on screen, how do I do it? -- http://mail.python.org/mailman/listinfo/python-list

formatted string like---> u'720 S'

2006-02-23 Thread Bell, Kevin
I'm building a dictionary from values a database and upon print the dictionary I see key value pairs like this: u'Briarcliff' : [u'2500 E'], u'Shumway' : [ u'2600 E'] do I need to slice off the "u", or anything? I know it has something to do with unicode but I don't know how to treat it. -- htt

RE: newbie question: parsing street name from address

2007-06-21 Thread Bell, Kevin
Look at the string.split() built-in, then you could use s.isalpha & s.isdigit to test each word... regular expressions would be the way to go, but that's a bit to chew on if you're getting started with string methods. You'll need to look at list indexing as well. Kev SLC DOT GIS -Original M

google maps api for py?

2007-05-30 Thread Bell, Kevin
I see that the weapon of choice for google maps is javascript... Is there anything for python? Kev -- http://mail.python.org/mailman/listinfo/python-list

Win XP "Sleep" mode: can Py wake up?

2007-01-26 Thread Bell, Kevin
Does anyone have any experience having python deal with sleep mode? I'd love to run something that would hear a sleep event coming and pickle some data before sleep, then after coming out of sleep, unpickle... Any thoughts? -- http://mail.python.org/mailman/listinfo/python-list

pyTTS broken : (

2007-12-21 Thread Bell, Kevin
Importing pyTTS works, but then it bombs... any ideas? This worked without a hitch on my old computer! >>> import pyTTS >>> tts = pyTTS.Create() Traceback (most recent call last): File "C:\", line 1, in ? File "c:\Python24\Lib\site-packages\pyTTS\__init__.py", line 28, in Create

RE: pyTTS broken SOLVED

2007-12-21 Thread Bell, Kevin
: ( Bell, Kevin wrote: > Importing pyTTS works, but then it bombs... any ideas? This worked > without a hitch on my old computer! > >> >> import pyTTS > >> >> tts = pyTTS.Create() > > Traceback (most recent call last): > File "C:\", lin

send pdf or jpg to printer

2006-04-19 Thread Bell, Kevin
Does anyone have any suggestions on printing pdf's? These pdf's don't change much, so if it be more straight forward to convert them to jpgs, or another format, then that'd be fine too. Thanks in advanced, Kevin -- http://mail.python.org/mailman/listinfo/python-list

search an entire website given the homepage URL

2006-04-25 Thread Bell, Kevin
I know I can use urllib2 to get at a website given urllib2.urlopen(url) but I'm unsure how to then go through all pages that are linked to it, but still in the domain. If I want to search through the entire python website give the homepage, how would I go about it? I don't reinvent the wheel if s

Re: search an entire website given the homepage URL

2006-04-25 Thread Bell, Kevin
>use a search engine (try the search box in the upper right corner). >using a spider to download the entire site just so you can "search through >it" is bloody impolite. Really? I'd argue that's impolite only if you're an impolite person with a rude agenda, which is not what I had in mind, but t

Re: search an entire website given the homepage URL

2006-04-25 Thread Bell, Kevin
impolite for newspapers to use someone's name without informing them of it, for sure, but you can't count on journalists to call you up. Would this application of a spider be impolite? Bell, Kevin wrote: >>use a search engine (try the search box in the upper right corner). > >

py on windows Mobile 5.0?

2006-05-15 Thread Bell, Kevin
Does anyone know if/how to go about using python on a windows mobile 5.0 PDA? Kevin -- http://mail.python.org/mailman/listinfo/python-list

hide python window

2006-05-26 Thread Bell, Kevin
When I run a script, how can I make it run in the background? I don't want to see the command window because it runs all day. I'm on windows... -- http://mail.python.org/mailman/listinfo/python-list

hide python window, con'td

2006-05-26 Thread Bell, Kevin
Great! And now that it's hiding w/ .pyw, how would I kill it if I want? Just log off, or is there a better way? Kevin -- http://mail.python.org/mailman/listinfo/python-list

RE:RE: hide python window, cont'd

2006-05-26 Thread Bell, Kevin
Bell, Kevin wrote: > Great! And now that it's hiding w/ .pyw, how would I kill it if I want? > Just log off, or is there a better way? > > Kevin > > >>JOE WROTE: >>Close it in the Task Manager? I don't see it in the task manager. -- http://mail.python.org/mailman/listinfo/python-list