Re: [python-win32] win32com client Workbooks.Open throws exeption

2010-08-18 Thread John Machin
On 19/08/2010 4:00 AM, Tim Roberts wrote: @©ħα® wrote: Workbooks.Open fails randomly throws an exception ... calling logToXLS() occasionally throws the mentioned error at xl.Workbooks.Open(filePath) File "C:\Python25\Lib\site-packages\win32com\client\dynamic.py", line 496, in __geta

[python-win32] [Fwd: Re: Problems installing pywin32]

2009-01-18 Thread John Machin
. Anyway, using your advice I found the regular installer and so far it seems to do well. Thanks again, Yaron On Sun, Jan 18, 2009 at 2:18 PM, John Machin wrote: > On 18/01/2009 10:26 PM, Yaron Charka wrote: > >> Hi, >> >> I'm trying to install pywin32 on an XP mac

Re: [python-win32] Get Blank Lines in a text file

2008-07-04 Thread John Machin
siddhartha veedaluru wrote: Hi, Your problem is nothing to do with Windows at all; a better target would have been the comp.lang.python newsgroup or the [EMAIL PROTECTED] mailing list [but NOT both; messages are gatewayed both ways]. As part of a task i need to verify that last line of a

Re: [python-win32] exception while opening excel file

2008-04-16 Thread John Machin
[EMAIL PROTECTED] wrote: > Hi all, > > I'm trying to write a file that does something with excel files. > Unfortunately all these files will give an error upon opening: I don't quite understand the first sentence above : "write a file that does something with excel files"??? What is your un

Re: [python-win32] Running SQL queries on excel sheets

2008-03-16 Thread John Machin
Rickey, Kyle W wrote: > Tim, thanks for your response. I've got 7 excel files that need reading > containing a total of ~6100 rows. I agree, about this code making me > sick :) That's not exactly "absolutely tons of data" :-) One problem with the ODBC approach to reading spreadsheets (at least w

Re: [python-win32] JPEG to TIFF conversion

2007-12-10 Thread John Machin
Manjeet Singh wrote: > Hi, >I am a new to the image conversion /compression concepts. I have > few thousands of images which were scanned in Uncompressed JPEG > format(.Tiff and .Jpeg). I am required to convert them to standard > tiff files(CCIT Group4). Is there any way to accomplish this i

Re: [python-win32] Python and Excel via Cron

2007-11-21 Thread John Machin
Jd H wrote: > Hello, > > I have the below python code which opens an excel sheet, runs a macro then > save the file. When run from python it runs perfectly. Code is below. File > name is test.py > What does "run from python" mean?? > > <<< > What's that "<<<"?? If you meant to

Re: [python-win32] Excel win32com newbie question

2006-10-06 Thread John Machin
On 6/10/2006 11:34 PM, Jim Steil wrote: > Thanks for your response too! Unfortunately, I must have something messed > up here because this didn't work either. > from win32com.client import Dispatch, constants print getattr(constants, 'xlHAlignRight', 'Bt!') > Bt! app = Disp

Re: [python-win32] Excel win32com newbie question

2006-10-05 Thread John Machin
On 6/10/2006 7:16 AM, Jim Steil wrote: > I’ve been working this week building some Excel spreadsheets using > Python and win32com. I am not having any trouble getting my sheets > built with the proper data in the proper cells, but I’m having a heck of > a time trying to find out how I can forma

Re: [python-win32] Picture.Insert, Excel issue

2006-10-01 Thread John Machin
On 2/10/2006 11:51 AM, Jim Chiang wrote: > I’m trying to very simply insert a picture from a file into an excel > spreadsheet. I know how to do this in VBA and it works fine, however > when I try this from python I get an error. Doing a search on this > turned up nothing. > > The code I’m using

Re: [python-win32] Trying to run an external program

2006-09-20 Thread John Machin
On 21/09/2006 8:03 AM, Brant Sears wrote: > Hi. I'm new to Python and I am trying to use it on Windows XP. I am trying to > use it to replicate the same thing that I do on Linux and Mac via shell > scripting (Batch files aren't powerful enough, so I've decided to try to use > Python.) > > What

Re: [python-win32] Fatal Error

2006-09-19 Thread John Machin
On 20/09/2006 5:09 AM, Ahmed, Shakir wrote: > > I am running a script and getting the following error, any idea is > highly appreciated. > > The script is mainly a loop work for sixteen time and raises the error > on 10th cycle. > > > NO free BITSYS Channels (BITCHN) > Dear Shakir, It is a g

Re: [python-win32] EasyDialogs - how to set initial path

2006-07-03 Thread John Machin
On 30/06/2005 5:43 PM, Radovan Grznarik wrote: > Hi, > > I am using EasyDialogs (AskFileForOpen) and I am not able to set the > initial open path. I found in Python help that it should be 3rd > parameter, I doubt it. The Python *documentation*, whose first two lines ("2.7 EasyDialogs -- Basic Ma

Re: [python-win32] Building win32 extensions to Python - crash

2006-06-16 Thread John Machin
On 17/06/2006 3:49 AM, Chris Botos wrote: > James Carroll wrote: >>> Thanks for your responses. I went ahead and tried MinGW. I was able to >>> build and use screengrabber and other examples. I also used it as an >>> example and created successfully a very simple "hello python" extension. >> Fan

Re: [python-win32] deviceiocontrol string format

2006-05-25 Thread John Machin
On 26/05/2006 4:43 AM, [EMAIL PROTECTED] wrote: > Dear All, > > I am new to python win32, and i cannot figure out how to format the data > string for deviceiocontrol code with win32file. > > I have the following c struct in my driver file: > typedef struct _WRITE_DEVICE_DATA_INPARAMS > { >

Re: [python-win32] Try to got short path for files - but goterror...

2006-05-25 Thread John Machin
On 25/05/2006 8:12 PM, Metz, Bobby W, WWCS wrote: > Mark, > Thanks for that. I didn't read an earlier entry from the > submitter close enough. Someone else had told them that > GetShortPathName wasn't supported but I didn't pay attention to the W at > the end...could have saved myself a cou

Re: [python-win32] Why I get wrong filetime values with win32 api(FindFilesW) ?

2006-05-11 Thread John Machin
On 11/05/2006 5:47 PM, Christian Stooker wrote: > Mark Hammond írta: >> I'm guessing it is related to the GMT offset. The MSDN docs for the >> FILETIME structure say: >> >> Furthermore, FAT records times on disk in local time. However, >> NTFS records times on disk in UTC. For more information

Re: [python-win32] curses and _curses

2006-05-02 Thread John Machin
On 3/05/2006 12:44 AM, Dean Allen Provins wrote: > Roger Upole wrote: >> Bill Burns wrote: >> On 2/05/2006 8:16 AM, Dean Allen Provins wrote: > Hello: > > I just installed the 2.4 version of Python on a WinXP box. I then > copied over my python code which runs under

Re: [python-win32] curses and _curses

2006-05-01 Thread John Machin
On 2/05/2006 8:16 AM, Dean Allen Provins wrote: > Hello: > > I just installed the 2.4 version of Python on a WinXP box. I then > copied over my python code which runs under Linux. This code uses > "curses.ascii" (isspace specifically). > > The Win version of the libraries has a curses directory

Re: [python-win32] py2exe & transparent icons

2006-04-18 Thread John Machin
On 19/04/2006 2:49 AM, Metz, Bobby W, WCS wrote: > All, > This may not be the right list for this, but I figured there's > bound to be some py2exe experts. [snip] There's bound to be even more py2exe experts on [EMAIL PROTECTED] :-) > > Thanks, > > Bobby > ___

Re: [python-win32] driving MS Access from python

2006-03-13 Thread John Machin
On 14/03/2006 11:19 AM, Phill Atwood wrote: > >> >> Sorry, you've lost me ... I thought "this" (installing mxODBC) was as >> simple as downloading the two installers ("base" and "commercial") >> that match the version of Python that you are using, and running them. >> What docs are you reading?

Re: [python-win32] driving MS Access from python

2006-03-13 Thread John Machin
On 14/03/2006 10:04 AM, Phill Atwood wrote: > Tim, > > Thanks. I've downloaded and installed adodb for Python. But I guess I > need to install mxODBC as well. But I'm not quite understanding the > docs I'm reading on how to do this. It seems very complex > > Phill > Phill, Sorry, you'

Re: [python-win32] Python Newbie Question

2006-02-23 Thread John Machin
f Python 2.3 before re-installing. Please don't top-post. > On 2/23/06, John Machin <[EMAIL PROTECTED]> wrote: > >>On 24/02/2006 3:02 AM, Heang Lim wrote: >> >>>Hello John, >>> >>>Here is the sys.path output: >>> >>>C:\\Apach

Re: [python-win32] Python Newbie Question

2006-02-22 Thread John Machin
On 23/02/2006 11:53 AM, Heang Lim wrote: > I've installed Python on my c:\python23 directory and Apache on my > c:\Apache2 directory. On my DOS windows, I went to c:\Apache\htdocs > directory and enter 'python' to go into the interactive mode. When I > tried to import some modules such as 'import

Re: [python-win32] COM ports connecting

2006-02-21 Thread John Machin
On 22/02/2006 5:51 AM, Math wrote: > Hello, > > Anybody could give me an example code of how connect/comunicate through > COM ports (i.e. COM1, COM2). > I'm under windows XP > > Thanks!!! > Math http://pyserial.sourceforge.net/ ___ Python-win32 mai

Re: [python-win32] Excel using python

2006-02-20 Thread John Machin
On 20/02/2006 10:37 PM, Tim Golden wrote: > | From: John Machin [mailto:[EMAIL PROTECTED] > | > | Tim, that's fantastic. Hold out your hand for the elephant stamp :-) > > Must be an American thing? (Obligatory Monty Python > reference: I'm sorry, old man, I don&

Re: [python-win32] Excel using python

2006-02-20 Thread John Machin
On 20/02/2006 10:15 PM, Tim Golden wrote: > [John Machin] > > | > OK, given the workbook created in my previous post... > > [ ... snip more code ...] > > | OK, great, Tim, we're almost there :-) > | "when i try to acces it always goes to the last sheet.&q

Re: [python-win32] Excel using python

2006-02-20 Thread John Machin
On 20/02/2006 8:02 PM, Tim Golden wrote: > [John Machin] > | > | On 20/02/2006 7:46 PM, Tim Golden wrote: > | > [yeswanty devi] > | > > | > | Hello all, > | > | if we have number of excel sheets in a workbook.can > | > | we access a select

Re: [python-win32] Excel using python

2006-02-20 Thread John Machin
On 20/02/2006 7:46 PM, Tim Golden wrote: > [yeswanty devi] > > | Hello all, > | if we have number of excel sheets in a workbook.can > | we access a selected sheet in the workbook. when i try to > | acces it always goes to the last sheet. > > I assume this is the kind of thing you want

Re: [python-win32] Using win32com Constants

2006-02-17 Thread John Machin
On 18/02/2006 11:25 AM, Dan Glassman wrote: > David Carter wrote: > >>>-Original Message- >>>From: Robert Brewer [mailto:[EMAIL PROTECTED] >>>Sent: Friday, February 17, 2006 4:11 PM >>>To: David Carter; python-win32@python.org >>>Subject: RE: [python-win32] Using win32com Constants >>> >>

Re: [python-win32] Apologies - Spawn problem

2006-01-31 Thread John Machin
Frank Peacock wrote: > Hello again > > I need to correct the previous email. The correct main.py file is attached > now. > > The interesting thing is that the naming of the python file does not change > the result. > > The result always is output to the screen: "Main" and then "Exit", there is >

Re: [python-win32] Excel

2006-01-10 Thread John Machin
bob wrote: > At 11:16 AM 1/10/2006, John Machin wrote: > >> bob wrote: >> >>> Viola, it displays 6. >> >> >> :-) >> Cello, it displays 7. >> (-: > > Version difference? I'm using Excel 2000. and I get xlcsv = 6! But it &

Re: [python-win32] Excel

2006-01-10 Thread John Machin
Stefan Elwesthal wrote: > Hi all! > > I have to ask, cause two days later I'm starting to get annoyed ;-) > > How could I use PythonCOM and save my re-worked Excel file as an xlCSV file? > All I get is > "SaveAs method in Worksheet class failed". > > Is something wrong with this line? Yes. Two

Re: [python-win32] Excel

2006-01-10 Thread John Machin
bob wrote: > Viola, it displays 6. :-) Cello, it displays 7. (-: ___ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] win32 meta-topic

2005-12-05 Thread John Machin
Tim Golden wrote: > > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] > On Behalf Of Tim Golden > Sent: 05 December 2005 15:28 > To: python-win32@python.org > Subject: Re: [python-win32] win32 meta-topic > > [Jeff Bauer] > > >>>this mailing list is for discu

Re: [python-win32] os.popen4 and spaces in the directory name

2005-12-04 Thread John Machin
Stephen Briley wrote: > Hi all, > > I would like to run a program via the os.popen (or similar) commands. > However, the path to the executable that I would like to run contains > spaces (e.g. C:\program files\some directory\engine\theexe.exe). The > python syntax that I am using is as follo

Re: [python-win32] Application exception in Python.dll

2005-11-23 Thread John Machin
[EMAIL PROTECTED] wrote: > [snip] > The error I'm getting is: > Event viewer: > > Faulting application python.exe, version 0.0.0.0, faulting module > python24.dll, version 2.4.150.1012, fault address 0x000t2f60 What is that "t" in the middle of a hexadecimal number? > > Doctor Watson: >

Re: [python-win32] Pythonwin - Word automation - Removing watermark not working

2005-11-05 Thread John Machin
Gregory Piñero wrote: > See below: > > On 11/5/05, *John Machin* <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> wrote: > > Gregory Piñero wrote: > > > > > Would anyone happen to know why this my function removewatermark() in >

Re: [python-win32] Pythonwin - Word automation - Removing watermark not working

2005-11-05 Thread John Machin
Gregory Piñero wrote: > > Would anyone happen to know why this my function removewatermark() in > this code isn't working? I copied it from a Word macro I recorded and > it did work when I recorded the macro. When I run it the watermark > doesn't go away. > > I've also attached the code in

Re: [python-win32] Illegal instruction while installing win32 extensions

2005-11-01 Thread John Machin
Olivier Lefevre wrote: > Trying to run pywin32-205.win32-py2.4.exe on a Windows XP SP2 machine > with a HT P4 processor gives me "The NTVDM CPU has encountered an > illegal instruction error". Any idea? > Gives me one of those stupid "do you want to send your life history to Microsoft" dialogu

Re: [python-win32] wdFormatText

2005-10-23 Thread John Machin
Michel Claveau wrote: > Hi_release_2 ! > Anyway I wonder if this could be found in MSDN documentation or in word macro itselfjust for the next time I am in the same situation... >>> > I don't know why you are sending this to me -- the above quote is from "geon", and as for the

Re: [python-win32] wdFormatText

2005-10-23 Thread John Machin
geon wrote: >Michel Claveau napsal(a): > > > >>You can to watch the class I had create, for "to tele-command" word, here: >> http://mclaveau.com/ress/python/pxword.htm >>(and look the "saveas" method) >> >> >> >> >so easy and so much spent my time on it. Thanks a lot. Anyway I wonder >if

Re: [python-win32] detecting windows type

2005-09-08 Thread John Machin
Roel Schroeven wrote: >le dahut wrote: > > >>Hello, >> >>How is it possible to detect which kind of windows a python script is >>running on ? (9x, Me, 2k, XP, 2k3) >> >> > >You can use sys.getwindowsversion() for that. Check MSDN documentation >for the precise meaning of the result. > > >

Re: [python-win32] EasyDialogs - how to set initial path

2005-06-30 Thread John Machin
Radovan Grznarik wrote: >Thank you very much, I was so close, it's the 4th one:))) >Next time before the question I will look at the code. > >now it works >filename = EasyDialogs.AskFileForOpen("","","","d:\\") > > Bletch. Try this: filename = EasyDialogs.AskFileForOpen(defaultLocation="d:\\")

Re: [python-win32] EasyDialogs - how to set initial path

2005-06-30 Thread John Machin
Radovan Grznarik wrote: >Hi, > >I am using EasyDialogs (AskFileForOpen) and I am not able to set the >initial open path. I found in Python help > Python help describes the *Mac* version; EasyDialogs for Windows by Jimmy Retzlaff has slightly different arguments; there is a readme.txt in .\si

Re: [python-win32] Forcing win32com.client.dispatch to start up a fresh Excel

2005-06-21 Thread John Machin
[EMAIL PROTECTED] wrote: > > Hi, > > I'm trying to use Python's win32com interface to drive an excel > spreadsheet. > > I've managed to have it open the sheet, call a VBA function with > arguments, and close it down cleanly. > > However, if Excel is already running, it closes the open instance.

Re: [python-win32] Editor Replace function limitation

2005-06-08 Thread John Machin
FYI, I am forced to run this version in support of >CAD system. > >Regards, >Robert > >-Original Message- >From: John Machin [mailto:[EMAIL PROTECTED] >Sent: Wednesday, June 08, 2005 2:45 PM >To: Graeme Glass; Robert Adams >Cc: python-win32 >Subject: Re: [python-win32] Ed

Re: [python-win32] Editor Replace function limitation

2005-06-08 Thread John Machin
Graeme Glass wrote: >On python 2.3.4 pythonwin build 203, i don't seem to have a problem. >can replace much more than 30 chars. >Not sure what your problem could be, but just thought that i would let >you know it's must your setup not pythonwin. > > Graeme, what "setup" do you refer to? PythonWi

Re: [python-win32] Strange page header text in PythonWin

2005-06-03 Thread John Machin
Robert Adams wrote: > I am somewhat of a newbie to Python, but thanks for the heads-up on > where to look. > > Question, since I have not customized anything that I am aware of, my > Python environment should be as installed from scratch, so why would I > get then strange text in page header ?