Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 84 results for
pywin32
- Page 1
python script works in pywin but not in command window
Programming
Software Development
16 Years Ago
by gab_sk
Hi, I have a python script which uses a COM object. This script works correctly when I run it from pywin, however, it does not run when I run it from windows command line - it throws an exception occurred in this COM object. I know that this COM obj. exception is also thrown when call is made from C++ code, but this can be avoided when some …
Problems Exporting Shapes from Powerpoint using PyWin
Programming
Software Development
14 Years Ago
by Vertana
I've been racking my brain over this for a few days now. I'm attempting to write a program in Python 3.1 / PyQt 4.7.5 that will open a Powerpoint, go through every shape on every slide, determine if it is a picture and then save that picture to the specified directory with the correct name and extension. So far everything works. The GUI is ok, the …
Tkinter & Pywin, displaying database information
Programming
Software Development
17 Years Ago
by StudentMark
Hi, I'm having some problems and i'm hoping someone can help. I'm using python 2.4 and have the pywin library installed. I have a listbox which when I click on a description of a product displays the whole record, so for example I select "bike", and press a "select" button which i've created, in the IDLE window it will …
Re: python script works in pywin but not in command window
Programming
Software Development
16 Years Ago
by jlm699
Can you provide some code to demonstrate the problem? It will be much easier to understand the problem
Re: python script works in pywin but not in command window
Programming
Software Development
16 Years Ago
by gab_sk
This is the code, very short and simple, exception occurs in login.ValidateUser(). When I run this in pythonwin, process id is printed in interactive window, so it works as expected. import win32com.client login = win32com.client.Dispatch("ACDB.Login") login.Login("","") login.ApplicationName = "whatever" …
Re: python script works in pywin but not in command window
Programming
Software Development
16 Years Ago
by jlm699
Can you also post the traceback of the exception?
Re: Problems Exporting Shapes from Powerpoint using PyWin
Programming
Software Development
14 Years Ago
by woooee
join() interleaves a list with a constant so self.currentOutDir.join(self.counterStr) would produce self.counterStr[0]+self.currentOutDir+self.counterStr[1]+self.currentOutDir+self.counterStr[2]...etc. A simple example: [CODE]x = ["1", "2", "3"] print "a".join(x) # x = "123" print "b&…
Re: Problems Exporting Shapes from Powerpoint using PyWin
Programming
Software Development
14 Years Ago
by Vertana
I see what you're talking about. I wonder why Python decided upon that behaviour, but I went ahead and changed my method to just concatenate the strings to produce the full directory/filename.extension. Now the only thing is I have no idea what the error messages that are produced by the COM object are. [CODE]File "C:\Python31\lib\site-…
Re: Problems Exporting Shapes from Powerpoint using PyWin
Programming
Software Development
14 Years Ago
by Vertana
Here is my revised method: [CODE]def exportPhotos(self): self.currentFileName = self.view.pptPath.text() self.currentOutDir = self.view.outPath.text() g = globals() # These lines allow access to COM Object constants for c in dir(self.msoModule.constants): g[c] = getattr(self.msoModule.constants, c)…
Re: Problems Exporting Shapes from Powerpoint using PyWin
Programming
Software Development
14 Years Ago
by Vertana
I finally figured it out! Python interprets file directories as "C:\wherever\to\wherever" which it then feeds to the Windows API. The way I bypassed this was by forcing the slashes to convert to windows style right before I fed them to the Windows API with the following fix: [CODE]#This will create and verify the image paths (you can view…
Re: Problems Exporting Shapes from Powerpoint using PyWin
Programming
Software Development
14 Years Ago
by woooee
A cross platform solution is os.path.join(). The only gottcha is it sometimes gets confused when a "/" or "\" is included with the right-most string print os.path.join("dir_1", "dir_2", "image"+str(12)+".png")
Re: Problems Exporting Shapes from Powerpoint using PyWin
Programming
Software Development
14 Years Ago
by Vertana
Thank you very much for the cross platform advice! I'm sure that's gonna come in handy on a future project (and now I won't ave to figure out that mystery)!
Re: Tkinter & Pywin, displaying database information
Programming
Software Development
17 Years Ago
by StudentMark
I now have managed to create an entry control underneath my listbox. When i press the select button i have created it prints the record to the console, I would like to print it to the entry control. could anyone point me in the right direction?
Re: Tkinter & Pywin, displaying database information
Programming
Software Development
17 Years Ago
by woooee
Look at the info on control variables here. You will probably use .set() to set the contents of the entry widget. If you still can't get it to work, post some specific code. [url]http://infohost.nmt.edu/tcc/help/pubs/tkinter/control-variables.html[/url]
Pythonwin/import/class-related problem
Programming
Software Development
18 Years Ago
by Ginner
Hi all, I am working on a problem that should have been very trivial but has turned into a multiple marathon without an end in sight. I have written two very small scripts, one auxiliary script as below with two classes 'Node' and 'Queue' intended for use in a linked list. [code]class Node: value=None nextNode=None def __init__(…
Trouble with a certain Exception
Programming
Software Development
16 Years Ago
by Seagull One
Hello everyone! I haven't programmed in quite a while and now that I'm getting back into the programming environment for my robotics project again, I'm a little stumped on something: I'm getting this error message for an exception raised in my VAST python script for my robot. It goes like this: [QUOTE]Traceback (most recent call last): …
Re: Trouble with a certain Exception
Programming
Software Development
16 Years Ago
by Seagull One
Okay, I think I found the answer to that. All I had to do was change, say wxbitmap to wx.bitmap, in my script. But now I'm getting something else. When I try running the script, I get this error message: [QUOTE]Traceback (most recent call last): File "C:\Python25\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py", line …
Re: Trouble with a certain Exception
Programming
Software Development
16 Years Ago
by Seagull One
Hi Jeff. I think my problem was I hadn't used the MakePy Windows speech Object Library on it, because it got rid of that error. Now I'm getting something else, much farther down the script: [QUOTE]Traceback (most recent call last): File "C:\Python25\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript…
Re: Trouble with a certain Exception
Programming
Software Development
16 Years Ago
by Seagull One
Oh, right. Thanks, Jeff! That solved that problem. Now when I run the script, the windows speed recognition activates! Theres another exception that comes up though, but since the windows speech recognition comes up just before the exception, I know we're getting close. Here's whats coming up now: [QUOTE]Setting words - turned on …
Re: Trouble with a certain Exception
Programming
Software Development
16 Years Ago
by Seagull One
Thanks Jeff! I think we just have a little more ways to go. It's now giving me a NameError that goes like this: [QUOTE]Setting words - turned on Traceback (most recent call last): File "C:\Python25\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ …
Re: Trouble with a certain Exception
Programming
Software Development
16 Years Ago
by Seagull One
Oh, I think I get it now. That's defined in [QUOTE]self.tbicon = wx.TaskBarIcon() icon = wx.IconFromXPMData(getMondrianData()) [/QUOTE] I should've seen that coming. I've added the wx to the other parts in that chunck of code, and thats seems to account for several more exceptions. Except for one of them (man, these exceptions are …
RE:Import Python 2.4 error
Programming
Software Development
16 Years Ago
by happimani
Dear all, Previously i used Python2.3 now i upgraded to python 2.4 but my problem iam getting error ImportError: No module named pywin.framework.startup what to do ?????? regards Narain
Re: RE:Import Python 2.4 error
Programming
Software Development
16 Years Ago
by BearofNH
Most Python add-on modules need to be reinstalled, usually from a new download specific to the version of Python. You need to pick up a new [B]pywin[/B]. Is there any reason you didn't upgrade to Python 2.5? It has a number of nice features you may want to use some day.
Tkinter problem
Programming
Software Development
16 Years Ago
by Astudent
So I have another problem(new project new code), with a rather lengthy code. The problem is I am getting tkinter errors left and right and I can't find why. The error I get is: File "C:\Python25\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "…
Error while opening a file
Programming
Software Development
16 Years Ago
by lakhan.p
Hi, I m trying to open a file in read mode , my program is below ... #!/usr/bin/python print "------" file = open("C:\Lakhan\Pytonpro\file.txt", "r") print file file.close() but it shows following error ------ Traceback (innermost last): File "C:\Program Files\Python\Pythonwin\pywin\…
Unsupported Operand Types?
Programming
Software Development
15 Years Ago
by Seagull One
I'm writing some code for my robot's stereoscopic vision. This is how I'm calculating the stereo vision in python (I'm using the roborealm API). [CODE=python]COGXR = rr.GetVariable("COG_X_RIGHT") COGYR = rr.GetVariable("COG_Y_RIGHT") COGXL = rr.GetVariable("COG_X_LEFT") COGYL = rr.GetVariable("COG_Y_LEFT&…
Re: Unsupported Operand Types?
Programming
Software Development
15 Years Ago
by Seagull One
Yes. Apparently, COGXR equals "33" Here's what it looks like before the exception is raised [CODE=Python]Width: 160 Height: 120 IMAGE_COUNT = 541 33 Traceback (most recent call last): File "C:\Python25\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in …
Re: Unsupported Operand Types?
Programming
Software Development
15 Years Ago
by Seagull One
Okay, I tried that, but now I'm getting this: [CODE=Python]Width: 160 Height: 120 IMAGE_COUNT = 274 Traceback (most recent call last): File "C:\Python25\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Users\Loren\Desktop\My Robots\…
python, windows, modules missing sometimes?
Programming
Software Development
13 Years Ago
by jkrueger
Hi, I'm a Linux user, and have general knowledge of windows. OK, have cygwin terminals working and have colorama and termcolor modules working. Colorrama allows use of termcolor on windows. So, when doing quick scripts that have some color in them programed on Linux I can quickly cxfreeze them on the windows machine and the mac for use by …
Problems with pyHook(Key Logger)
Programming
Software Development
11 Years Ago
by Alex_24
so heres the code import pyHook, pythoncom, sys, logging file_log = 'C:\\LogFile\\log.txt' some other non important stuff here so the issue is that everytime i try to run the program it says that pyHook is not a module. I have downloaded it for my system but it still doesnt work, I have also downloaded pyWin. the error says Importerror: No …
1
2
3
Next
Search
Search
Forums
Forum Index
Hardware/Software
Recommended Topics
Programming
Recommended Topics
Digital Media
Recommended Topics
Community Center
Recommended Topics
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Top Members
Meet People
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2025 DaniWeb® LLC