Re: Examples of Python driven Microsoft UI Automation wanted

2009-07-10 Thread Kelie
On Jul 9, 5:50 pm, Tim Roberts t...@probo.com wrote: The University of North Carolina at Chapel Hill has a great Python package called pyAA that does exactly this: http://www.cs.unc.edu/Research/assist/developer.shtmlhttp://mindtrove.info/articles/gui-automation-with-pyaa/ -- Tim Roberts,

Use Python to solve equations?

2008-09-11 Thread Kelie
Hello group, Is there any packages in Python that will help me solve functions similar to this: x = a*(1+bx)**2.5-c where a, b, c is known and the task to solve x? Thank you, Kelie -- http://mail.python.org/mailman/listinfo/python-list

Re: Use Python to solve equations?

2008-09-11 Thread Kelie
Thank you James! Checking it out right now... -- http://mail.python.org/mailman/listinfo/python-list

Re: Use Python to solve equations?

2008-09-11 Thread Kelie
On Sep 11, 1:11 am, Uwe Schmitt [EMAIL PROTECTED] wrote: Kelie look atwww.sagemath.com. it is great. greetings, uwe Thanks Uwe! -- http://mail.python.org/mailman/listinfo/python-list

question about string formatting

2008-04-09 Thread Kelie
Hello, Is there something in Python built-in function or library that will convert a number 1205466.654 to $1,205,466.65? To add the $ sign and set the decimal place is not a problem, but I don't know how to add the thousands delimiter. Thanks, -- Kelie UliPad http://code.google.com/p/ulipad

Re: question about string formatting

2008-04-09 Thread Kelie
Thank you Jerry! -- Kelie UliPad http://code.google.com/p/ulipad/ is my Python editor. -- http://mail.python.org/mailman/listinfo/python-list

Re: PyQt - How to prevent a dialog being resized?

2008-04-01 Thread Kelie
Thanks to all. I used the approach suggested by David. -- http://mail.python.org/mailman/listinfo/python-list

PyQt - Question on QListWidget's selectedItems Method

2008-04-01 Thread Kelie
Hello, This method returns selected items by the order of user's picking, instead of the original order of these items. For example, if a ListWidget stores a list of ['A', 'B', 'C', 'D'] and when user is prompted to make a selection, if he picks 'D' first, then 'B', the returned ListWidget items

Re: PyQt - Question on QListWidget's selectedItems Method

2008-04-01 Thread Kelie
Another question I have about QListWidget is when user manually selects and deselects a QListWidgetItem, the background color switches between blue and white. But when an item is programmingly selected with setItemSelected method, the background color is some kind of light gray instead of blue.

PyQt - How to prevent a dialog being resized?

2008-03-31 Thread Kelie
Hello, My question is as subject. I tried something like this and it doesn't work. def resizeEvent(self, event): self.size = event.oldSize() Any hint? Thank you. -- http://mail.python.org/mailman/listinfo/python-list

case insensitive lstrip function?

2008-03-28 Thread Kelie
Hello, Is there such a function included in the standard Python distribution? This is what I came up with. How to improve it? Thanks. def lstrip2(s, chars, ingoreCase = True): if ingoreCase: s2 = s.upper().lstrip(chars.upper()) return s[len(s)-len(s2):] else:

Re: case insensitive lstrip function?

2008-03-28 Thread Kelie
On Mar 28, 12:55 pm, Marc 'BlackJack' Rintsch [EMAIL PROTECTED] wrote: What about this: def lstrip2(string, chars, ignore_case=True): if ignore_case: chars = chars.lower() + chars.upper() return string.lstrip(chars) Ciao, Marc 'BlackJack' Rintsch Thanks Marc. I

Re: sqlite or xml

2007-12-07 Thread Kelie
On Dec 6, 3:37 pm, [EMAIL PROTECTED] wrote: If you're happy going with sqlite then stick with it. If on the other hand you were considering XML because you're more comfortable with that (e.g. you find XML easy to work with and you're more familiar with XPath/XQuery than SQL) then you could

sqlite or xml

2007-12-06 Thread Kelie
Hello group, If I need store and use a couple thousand of people's contact info: first name, last name, phone, fax, email, address, etc. I'm thinking of using either sqlite or xml. Which one is better? My understanding is if there is large amount of data, sqlite would be better as far as speed is

Re: sqlite or xml

2007-12-06 Thread Kelie
Thanks Chris, Tim and Yu-Xi. I'll follow your advice and use database. -- http://mail.python.org/mailman/listinfo/python-list

How to get the fullname of AcroExch.PDDoc?

2007-12-05 Thread Kelie
Hello group, I'm trying to perform some simple pdf file processing using PyWin32 package with Adobe's COM support. After searching the whole Acrobat Interapplication Communication Reference, I didn't find a way to get the fullname (file path) of AcroExch.PDDoc which does have a GetFileName method

ImportError: No module named sax.handler?

2007-11-29 Thread Kelie
Hello, I'm lost here. When I put this line from xml.sax.handler import ContentHandler in a .py file and run it, I get the ImportError. When I execute it in shell, there is no error. Why? Thanks for your help! -- http://mail.python.org/mailman/listinfo/python-list

Re: ImportError: No module named sax.handler?

2007-11-29 Thread Kelie
On Nov 29, 8:20 pm, Martin v. Löwis [EMAIL PROTECTED] wrote: Because you have another module called xml in your path that is found first and has no sax package in it. Thank you Martin. Actually it was the .py file itself. I named it xml.py. --

Re: better way to write this function

2007-11-26 Thread Kelie
On Nov 25, 10:51 pm, Paul Rubin http://[EMAIL PROTECTED] wrote: Really though, this grouping function gets reimplemented so often that it should be built into the stdlib, maybe in itertools. thanks Paul. itertools? that was actually the first module i checked. --

Re: better way to write this function

2007-11-26 Thread Kelie
On Nov 25, 11:24 pm, Paul Rudin [EMAIL PROTECTED] wrote: See the last recipe from:http://docs.python.org/lib/itertools-recipes.html. It's not doing quite the same thing, but gives an illustration of one way to approach this sort of thing. Thanks for the link! --

better way to write this function

2007-11-25 Thread Kelie
Hello, This function does I what I want. But I'm wondering if there is an easier/better way. To be honest, I don't have a good understanding of what pythonic means yet. def divide_list(lst, n): Divide a list into a number of lists, each with n items. Extra items are ignored, if any.

having problem using xlrd

2007-11-21 Thread Kelie
Hello, I tried using xlrd to read an Excel file and kept getting this error: AttributeError: 'Book' object has no attribute 'mem' import xlrd p = r'C:\2.xls' wb = xlrd.open_workbook(p) wb.get_sheets() AttributeError: 'Book' object has no attribute 'mem' wb.get_record_parts()

Re: having problem using xlrd

2007-11-21 Thread Kelie
FYI, this question has been answered in python-excel group. Thanks. -- http://mail.python.org/mailman/listinfo/python-list

using regular express to analyze lisp code

2007-10-04 Thread Kelie
part, which is (defun foo in this case, i can count the parenthesis, ignoring anything inside and any line for comment, until i find the closing ). not sure if i've made myself understood. thanks for reading. kelie -- http://mail.python.org/mailman/listinfo/python-list

Re: using regular express to analyze lisp code

2007-10-04 Thread Kelie
On Oct 4, 7:50 am, Tim Chase [EMAIL PROTECTED] wrote: Use a parsing lib. I've tinkered a bit with PyParsing[1] which is fairly easy to pick up, but powerful enough that you're not banging your head against limitations. There are a number of other parsing libraries[2] with various

Re: using regular express to analyze lisp code

2007-10-04 Thread Kelie
On Oct 4, 7:28 am, Dan [EMAIL PROTECTED] wrote: So, paren matching is a canonical context-sensitive algorithm. Now, many regex libraries have *some* not-purely-regular features, but I doubt your going to find anything to match parens in a single regex. If you want to go all out you can use a

execution speed increase after compile py code into exe?

2007-03-24 Thread Kelie
hello, would there be any speed increase in code execution after python code being compiled into exe file with py2exe? thanks, kelie -- http://mail.python.org/mailman/listinfo/python-list

Re: requestion regarding regular expression

2006-04-15 Thread Kelie
Thanks to both of you, Kent and Scott. -- http://mail.python.org/mailman/listinfo/python-list

requestion regarding regular expression

2006-04-14 Thread Kelie
this pattern 0 to 10 times, I know \\;+.+\\n{0:10}\\(DEFUN does not work. But don't know where to put {0:10}. As a work around, I tried to use pat = |.join([\\;+.+\\n*i+ \\(DEFUN for i in range(11)]), and it turned out to be very slow. Any help? Thank you. Kelie -- http://mail.python.org