script to search ebay?

2005-01-25 Thread Lance Hoffmeyer
Hi all, Anyone know where I can find a python script to search ebay? I have been looking around but haven't found anything. I know there must be one somewhere so I am probably just looking in the wrong places. Optimally, I would like the script to search ebay and then send an email out with t

Re: script to search ebay?

2005-01-26 Thread Lance Hoffmeyer
Thanks for the script. I haven't been on ebay for a while. Wasn't aware of the Favorite searches. Favorite Search is probably the way to go. Thanks for the info. Lance On Tue, 25 Jan 2005 22:57:54 -0800, Kamilche wrote: > This script works. But why not make a 'Favorite Search' in ebay, and >

excel column autofit

2007-06-12 Thread Lance Hoffmeyer
Hey all, Wondering why the syntax won't autofit Column A? I am not getting any errors. Also, is there a way of reducing the number of syntax lines? Basically, I am wondering if there is an easier way to copy and paste? Thanks in Advance. Lance # ADD ROW LABELS sh = wb.Worksheets ("Total") sh.

win32com ppt embedded object

2007-07-10 Thread Lance Hoffmeyer
Hey all, I am trying to create some python code to edit embedded ppt slides and need some help. import win32com.client from win32com.client import constants import re import codecs,win32com.client import time import datetime import win32com.client.dynamic

Re: win32com ppt embedded object - SOLVED

2007-07-11 Thread Lance Hoffmeyer
oGraph.Application.datasheet.Range("00").Value = "Fav" Lance Lance Hoffmeyer wrote: > Hey all, > > I am trying to create some python code to edit embedded ppt slides and need > some help. > > import win32com.client > from win32c

newbie question on def, passing param's help

2007-07-13 Thread Lance Hoffmeyer
Hey all, I have a def that I have been using but I realized that sometimes I need a LIST with 5 or 6 brands instead of 4 so I want to put LIST outside of the def but I can't wrap my head around a way to get LIST outside the def while still passing the same 4 parameters in the function. I'm sure

win32com ppt saveas, not allowing spaces?

2007-07-16 Thread Lance Hoffmeyer
Hey all, As always, thanks in advance! I am trying to save a ppt presentation but am having problems regarding spaces and am wondering if I am doing something wrong or whether this is a bug? Also, is there a way around this other than not using spaces in paths or filenames? I can create file

win32com ppt embedded object numbers reverting back to original numbers

2007-07-19 Thread Lance Hoffmeyer
Hey all, I have a script that takes numbers from XL and inserts them into an embedded MSGRAPH dataset in PPT. The problem is that when I reopen the modified document that has been saved as a new filename and activate the embedded datasheet the new numbers that were inserted disappear and the old,

Re: win32com ppt embedded object numbers reverting back to original numbers - SOLVED

2007-07-25 Thread Lance Hoffmeyer
Hey all, I solved this problem. Here is the final version of this def for anyone who someday may be interested: def attributesbyID(row,base,slideID,spreadsheet): sh = wb.Worksheets (spreadsheet) sh.Select() LIST = xlparams(row, base) POWERPOINT SE

excel find last column

2007-02-08 Thread Lance Hoffmeyer
Hi all, I am trying to find the last used column in an excel sheet using win32com: lastcol = sh.UsedRange.Columns.Count works, but only if there is no formatting. I want to allow formatting in the columns. I would rather use the code below because formatted cells are irrelevant. using: last

Re: excel find last column

2007-02-09 Thread Lance Hoffmeyer
I ran makepy.py and loaded Microsoft Excel Object Library 11.0 I have imported: import win32com.client from win32com.client import constants import re import codecs,win32com.client import time import datetime import win32com.client.dynamic using this expression lastcol = sh.UsedRange.Find("*",

re.search making no match == 0

2007-02-15 Thread Lance Hoffmeyer
Hey all, I have a search: VAR = re.search("PROVEN.*?\n[\sA-Za-z\(\)\/\-]+\d(.*?)\n.*?" , pcpT9, re.S ).group(1) #.split()[1] that does not match (sometimes it will and sometimes it will not match) Traceback (most recent call last): File "P:\Burke\TRACKERS\Ortho-McNeil\Automation\Wave3\test.

help with looping, re.search, multiple indexing

2007-02-16 Thread Lance Hoffmeyer
Hey all, How do I add another index inside a re.search? I want to add for j in [96,97,98,99] BASE = re.search ... sh.Cells97... for i so that the Table 96 within the re.search(s) becomes Table 96, Table 97, Table 98, Table 99 but don't know how to add a second index within the

Newbie help looping/reducing code

2007-02-19 Thread Lance Hoffmeyer
Hey all, Can someone help me reduce this code? It sure seems like there ought to be a way to loop this or combine things so that there is only 1 or 3 lines to this instead of 6. I've been scratching my head over this for a while though I can't come up with anything. Just as a note, I need even_

help with perl2python regular expressions

2006-05-15 Thread Lance Hoffmeyer
Hey all, I am trying to convert some old perl scripts I have to python. Here is a snippit of the regex I used in perl. I am trying to figure out the equivalent code in python. Can someone help? my $file =$Word->ActiveDocument->Content->Text; $file =~ /TABLE\s+1.*?JCP.*?MEAN.*?(?:(\d{1,3}\.\

regular expression error ?

2006-05-15 Thread Lance Hoffmeyer
why isn't re.search recognizing "file"? I can print the contents of "file". import win32com.client import re D=MSWord.Documents.Open('C:/test/Test.doc') file=D.Content print file match = re.search('(Table ?)', file) if match: print "Table Number is: ", match.group(1) Traceback (most recen

using target words from arrays in regex, pythons version of perls 'map'

2006-05-15 Thread Lance Hoffmeyer
Hey all, in perl I was able to use the same regular expression multiple times changing one part of it via a previously defined array and put the results into a new array IN PERL: my @targets = ('OVERALL RATING', 'CLOTHING', ' ITEMS', 'ACCESSORIES',

regex help

2006-05-16 Thread Lance Hoffmeyer
I have the following table and I am trying to match percentage the 2nd column on the 2nd Tiger line (9.0). I have tried both of the following. I expected both to match but neither did? Is there a modifier I am missing? What changes do I need to make these match? I need to keep the structure

round numbers in an array without importing Numeric or Math?

2006-05-16 Thread Lance Hoffmeyer
Is there an easy way to round numbers in an array? I have Test = [1.1,2.2,3.7] and want to round so the values are print Test [1,2,4] Lance -- http://mail.python.org/mailman/listinfo/python-list

Re: round numbers in an array without importing Numeric or Math?

2006-05-16 Thread Lance Hoffmeyer
May have a complicating issue with the array? Have the numbers have been interpreted as strings? I have been pulling them from a Word doc using regex's print Test [u'9.0', u'58.6', u'97.8', u'10.0', u'9.6', u'28.1'] Lanc

Re: round numbers in an array without importing Numeric or Math? - SOLVED, sort of

2006-05-16 Thread Lance Hoffmeyer
d the number Topamax= [(x+0.5) for x in Topamax] Is there a shorter way? Lance Lance Hoffmeyer wrote: > Is there an easy way to round numbers in an array? > > I have > Test = [1.1,2.2,3.7] > > and want to round so the values are > > print Test [1,2,4] > >

arrays, even, roundup, odd round down ?

2006-05-16 Thread Lance Hoffmeyer
So, I have using the following to grab numbers from MS Word. I discovered that that there is a "special" rule being used for rounding. If a ??.5 is even the number is to rounded down (20.5 = 20) if a ??.5 is odd the number is to rounded up (21.5 = 22) Brands = ["B1","B2"] A1 = [] A1 = [ re.sear

help with a function

2006-05-16 Thread Lance Hoffmeyer
Hey all, I'm new to python. I keep getting an error when running this. I'm sure there is an easy fix but I can't figure it out. What am I doing wrong? How do I fix it? def even_odd_round(num): if(round(num,2) + .5 == int(round(num,2)) + 1): if(int(num,0) % 2):

excel centering columns

2006-05-17 Thread Lance Hoffmeyer
Hey all, Having problems centering a column Can someone explain how to center a column using python? import win32com.client import re import codecs import win32com.client.dynamic import time import datetime from win32com.client.dynamic import Dispatch from win32com.client import constants t2

Re: excel centering columns

2006-05-17 Thread Lance Hoffmeyer
I did read the error message. I did not understand why 'constant' was not defined. In perl I did not have to run anything like 'makepy' to get constants to work. And no, I don't want to go back to perl. Python appears to integrate with packages more readily than perl does. I was unaware of 'ma

Re: excel centering columns

2006-05-17 Thread Lance Hoffmeyer
Once I imported the EXCEL 10.0 library using 'makepy utility' everything worked fine. And, yes, my typing mistake. Should have been 'constants' and not 'constant' Lance -- http://mail.python.org/mailman/listinfo/python-list