[issue22107] tempfile module misinterprets access denied error on Windows

2015-02-17 Thread Roger Upole
Roger Upole added the comment: It doesn't actually do anything, so why do it at all? In order to distinguish why it failed, you might try checking if the file actually exists, and if it is a folder. -- ___ Python tracker rep...@bugs.python.org

[issue22107] tempfile module misinterprets access denied error on Windows

2015-02-16 Thread Roger Upole
Roger Upole added the comment: os.access doesn't check filesystem permissions, so the patch will not catch the condition that creates the problem. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22107

[issue22107] tempfile module misinterprets access denied error on Windows

2014-07-30 Thread Roger Upole
New submission from Roger Upole: _mkstemp_inner assumes that an access denied error means that it has generated a filename that matches an existing foldername. However, in the case of a folder for which you don't have permissions to create a file, this means it will loop thru the maximum

[issue16253] Docs for PyArg_ParseTupleAndKeywords say it doesn't accept nested tuples

2012-10-16 Thread Roger Upole
New submission from Roger Upole: The docs for this function state Nested tuples cannot be parsed when using keyword arguments! but this restriction was removed some time ago. -- assignee: docs@python components: Documentation messages: 173081 nosy: docs@python, rupole priority: normal

Re: An ODBC interface for Python 3?

2011-07-02 Thread Roger Upole
kozmikyak wrote: Does anyone here have a Python 3 environment that can access MSSQL using SQLAlchemy, running on a Windows 7 box? If so, I would like some assistance making it happen. The last post on this was mid-2010. It was mentioned that pyodbc had a Python 3 branch. I've been unable

[issue10181] get_shape0 in memoryobject.c not checked for error return

2010-11-03 Thread Roger Upole
Roger Upole rup...@hotmail.com added the comment: While on the subject, the docs for PyMemoryView_FromBuffer state that the resulting memoryview takes ownership of the Py_buffer struct and is responsible for freeing any associated memory. It does not do so, which is not surprising

[issue10181] get_shape0 in memoryobject.c not checked for error return

2010-11-02 Thread Roger Upole
Roger Upole rup...@hotmail.com added the comment: The culprit wrt copying Py_buffer structs seems mainly to be dup_buffer, which is called in memory_getbuf. This seems unnecessary in the case where there's an underlying object and it has returned the view thru its own tp_as_buffer

[issue3605] Py_FatalError causes infinite loop

2010-11-02 Thread Roger Upole
Roger Upole rup...@hotmail.com added the comment: I know this has been closed, but I disagree with the fix. Py_FatalError is designed to give a clean exit with a readable error message when the state of the interpreter is known to be compromised. Calling *any* python functions or accessing

[issue10181] get_shape0 in memoryobject.c not checked for error return

2010-10-23 Thread Roger Upole
New submission from Roger Upole rup...@hotmail.com: There are a number of places in memoryobject.c where get_shape0 is used without the return value being checked. If it fails, this leads to hanging exceptions and crashes. -- components: Interpreter Core messages: 119460 nosy: rupole

Re: python wia and RegisterEvent

2010-04-18 Thread Roger Upole
gelonida wrote: ... while True: print sleep time.sleep(10) When I plug / unplug a USB WIA device nothing shows up. My C# implementation prints messages on wiaEventDeviceConnected / wiaEventDeviceDisconnected events if I register them. What am I missing? You need to be processing

Re: Querying for ownership of file shared by Samba fails with MemoryError: allocating SECURITY_DESCRIPTOR

2009-09-23 Thread Roger Upole
Middle Fork GIS middlefork...@gmail.com wrote in message news:943c8e0b0909231216t1c590b14u453855718352...@mail.gmail.com... I have just learned how to use the win32security module (within Windows, of course) to determine file ownership. When running against local drives or windows shares, this

Re: where is ctrl+newline handled in pywin editor?

2009-09-22 Thread Roger Upole
C or L Smith wrote: I use the pywin environment on Windows for python code editing and interactive environment. I've been able to find the place in the editor files where the enter key is handled and where the whitespace is stripped from a line and I've been able to get it to not leave any

Re: Scheduled Tasks - SetFlags

2009-01-13 Thread Roger Upole
kj7ny wrote: How do I enable/disable a scheduled task using Python? I can get to a task: self.ts=pythoncom.CoCreateInstance (taskscheduler.CLSID_CTaskScheduler,None,pythoncom.CLSCTX_INPROC_SERVER,taskscheduler.IID_ITaskScheduler) self.ts.SetTargetComputer(u'SomeServer')

Re: Trying to set a date field in a access databse

2008-11-07 Thread Roger Upole
You should be able to pass a PyTime or datetime.datetime object. Roger [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, I cannot get the following code to work import win32com.client import time engine = win32com.client.Dispatch(DAO.DBEngine.36)

Re: (Windows) Dropping stuff onto a Python script

2008-11-07 Thread Roger Upole
This is done via a drop handler. Add registry key HKCR\Python.File\shellex\DropHandler with a default value of {86C86720-42A0-1069-A2E8-08002B30309D} Roger [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello people, I'd like to have the functionality known from real

Re: adodbapi and output parameters in stored procedures

2008-11-07 Thread Roger Upole
[EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello, I need some help getting output values from my stored procedures when using adodbapi. There's an example testVariableReturningStoredProcedure in adodbapitest.py, and that works for my system. But my stored procedure also

Re: self signing a py2exe windows executable

2008-10-06 Thread Roger Upole
William Heath wrote: Hi Roger, I managed to get the dll and register it. I am now getting this error: Traceback (most recent call last): File C:\Python25\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py, line 312, in RunScript exec codeObject in __main__.__dict__ File

Re: self signing a py2exe windows executable

2008-10-06 Thread Roger Upole
William Heath wrote: I don't know, how can I tell, sorry I am new to this. -Tim You can use the certificates snap in for MMC to view them. Start-Run and enter mmc.exe File-Add/Remove snapin Click the Add button, and then select Certificates. On some systems, you might find it already

Re: self signing a py2exe windows executable

2008-10-04 Thread Roger Upole
William Heath wrote: Hi All, I thought I sent an email to the list regarding a need I have to self sign a py2exe windows executable. Does anyone know how to do that? -Tim You can use capicom to sign an executable (or even a .pyd): import win32com.client

[issue3946] PyObject_CheckReadBuffer crashes on memoryview object

2008-09-23 Thread Roger Upole
New submission from Roger Upole [EMAIL PROTECTED]: Sample code: PyObject *b=PyBytes_FromString(eh ?); PyObject *mv=PyMemoryView_FromObject(b); PyObject_CheckReadBuffer(mv); From following the chain of calls in PyObject_CheckReadBuffer, a few things are unclear

[issue3906] lib2to3\main.py will not run

2008-09-18 Thread Roger Upole
New submission from Roger Upole [EMAIL PROTECTED]: On first try: File H:\Python-3.0rc1\Lib\lib2to3\main.py, line 10, in module from . import refactor ValueError: Attempted relative import in non-package And after changing that line to from lib2to3 import refactor it still dies

[issue3608] memoryview constructor has no deallocator

2008-08-20 Thread Roger Upole
Roger Upole [EMAIL PROTECTED] added the comment: As background, what I need is an equivalent of PyBuffer_New(size), which creates an object that manages its own buffer memory, and is not based on another object at all. ___ Python tracker [EMAIL PROTECTED

[issue3608] memoryview constructor has no deallocator

2008-08-20 Thread Roger Upole
Roger Upole [EMAIL PROTECTED] added the comment: Aha, thanks. I'll go that route for now. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3608 ___ ___ Python

[issue3605] Py_FatalError causes infinite loop

2008-08-19 Thread Roger Upole
New submission from Roger Upole [EMAIL PROTECTED]: Py_FatalError calls PyErr_Occurred() which requires a current thread state. This mean that if the original error was a thread state error Py_FatalError is triggered again, ad infinitum. -- components: Interpreter Core messages: 71478

[issue3453] PyType_Ready doesn't ensure that all bases are ready

2008-08-19 Thread Roger Upole
Roger Upole [EMAIL PROTECTED] added the comment: This doesn't address the discrepancy between tp_base and tp_bases. If multiple bases are used, it's no longer 'good practice', it's an absolute requirement. IMO, it should call PyType_Ready for all bases, or none of them. Since the code assumes

[issue3605] Py_FatalError causes infinite loop

2008-08-19 Thread Roger Upole
Roger Upole [EMAIL PROTECTED] added the comment: Py_BEGIN_ALLOW_THREADS PyErr_SetString(PyExc_SystemError, bork bork bork); Py_END_ALLOW_THREADS ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3605

[issue3605] Py_FatalError causes infinite loop

2008-08-19 Thread Roger Upole
Roger Upole [EMAIL PROTECTED] added the comment: Well, you asked for a simple case. In practice, I'm dealing with much more complicated code that contains callbacks which may need to acquire or release the theadlock. This problem makes it very difficult to debug such code. Also

[issue3608] memoryview constructor has no deallocator

2008-08-19 Thread Roger Upole
New submission from Roger Upole [EMAIL PROTECTED]: When using PyMemoryView_FromMemory to create a new object, you have to pass in a preallocated buffer. However, there's no way to specify a routine to free the memory, and it leaks when the object is destroyed. -- components

[issue3608] memoryview constructor has no deallocator

2008-08-19 Thread Roger Upole
Roger Upole [EMAIL PROTECTED] added the comment: Well it existed up until a couple hours ago ;). Looks like it was recently changed to PyMemoryView_FromBuffer. However, it still has the same issue. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org

[issue3537] dict creation failure causes crash

2008-08-10 Thread Roger Upole
New submission from Roger Upole [EMAIL PROTECTED]: If the first item can't be inserted the interpreter will crash eventually. while 1: try: d = { 'a':a, 'b':'b', 'c':'c', 'd':'d', 'e':'e

[issue3534] refactor.py can lose indentation for relative imports

2008-08-09 Thread Roger Upole
New submission from Roger Upole [EMAIL PROTECTED]: Here's an excerpt from the output when run with --verbose. @@ -138,7 +136,7 @@ def _MakeColorizer(self): ext = os.path.splitext(self.GetDocument().GetPathName()) - import formatter +from . import formatter

[issue3534] refactor.py can lose indentation for relative imports

2008-08-09 Thread Roger Upole
Roger Upole [EMAIL PROTECTED] added the comment: I was using 3.0b2. The output is correct with latest updates, sorry for the trouble. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3534

Re: win32com ChartObject pythonwin vs idle

2008-07-31 Thread Roger Upole
sterling [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I'm curious as to why the difference between IDLE and pythonWin when using win32com. opening an excel file, i've attempted to grab the chart information out of the file. commands like co = ChartObjects(1) works in

[issue3453] PyType_Ready doesn't ensure that all bases are ready

2008-07-28 Thread Roger Upole
Roger Upole [EMAIL PROTECTED] added the comment: If that were the case, it wouldn't need to call PyType_Ready for tp_base either. From stepping thru the code, there are several places in the interpreter core that PyType_Ready is called for types whose tp_base has not been initialized yet

[issue3453] PyType_Ready doesn't ensure that all bases are ready

2008-07-27 Thread Roger Upole
New submission from Roger Upole [EMAIL PROTECTED]: If a type's tp_base has not been initialized yet, PyType_Ready calls itself for tp_base. However, it doesn't do the same for members of tp_bases. The inheritance determinations assume that all bases are ready, in particular that tp_mro

[issue3120] subprocess module truncates handles on AMD64

2008-07-20 Thread Roger Upole
Roger Upole [EMAIL PROTECTED] added the comment: This fixes the problem I had on 64-bit Vista, and all of python's own tests still pass. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3120

[issue3240] IDLE environment corrupts string.letters

2008-06-29 Thread Roger Upole
New submission from Roger Upole [EMAIL PROTECTED]: The problem seems to stem from this line in IOBinding.py: locale.setlocale(locale.LC_CTYPE, ) From the command prompt: Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)] on win32 Type help, copyright, credits

[issue1474454] Allow PyArg_ParseTupleAndKeywords to unpack tuples

2008-06-15 Thread Roger Upole
Roger Upole [EMAIL PROTECTED] added the comment: This functionality is subsumed in patch 1691070 (which has since been applied), so this can be closed. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue1474454

[issue3120] subprocess module truncates handles on AMD64

2008-06-15 Thread Roger Upole
New submission from Roger Upole [EMAIL PROTECTED]: HANDLEs are pointer sized values, but there are several places in _subprocess.c where it assumes they are the same size as longs which are still 4 bytes on win64. -- components: Windows messages: 68263 nosy: rupole severity: normal

Re: Finding file details...

2008-05-29 Thread Roger Upole
Kalibr wrote: I've been trying to figure out how to find the details of files (specifically music for now) for a little sorting script I'm making, My aim is to get details on the artist, album, and genre for mp3 and wma files (possibly more in the future). My closest match was when I

Re: Finding file details...

2008-05-29 Thread Roger Upole
Kalibr wrote: On May 30, 1:41 am, Roger Upole [EMAIL PROTECTED] wrote: You can use the shell COM objects to access media properties as shown by Explorer. import win32com.client sh=win32com.client.Dispatch('Shell.Application') folder= r'M:\Music\Bob Dylan\Highway 61 Revisited' ns

Re: help with file path exceeding 255 characters

2008-05-13 Thread Roger Upole
[EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I have trouble of obtaining the file size of a file because the fullpath exceeds 255 characters. I get this message with os.path.getsize(fullpath). fullpath = r\\LOSSSFS002\NWE_TECHNICAL\05. UK\Schiehallion (204_25a)

Re: Can't drag and drop onto .py in Windows XP?

2008-05-07 Thread Roger Upole
Sizer wrote: I have several python utils that look at sys.argv to get a list of filenames to process and mangle the files in various ways. If I have a bar.bat file in Windows XP then I can just drag foo.avi onto bar.bat and bar.bat gets called with foo.avi as an argument, everyone's happy. But

Re: PythonWin Print Problem.. Build 210

2008-04-12 Thread Roger Upole
Hutch [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] PythonWin has been a very good ide from early version thru 2.4. All work ok on THREE of my computers with THREE different HP printers. Now comes 2.5. Every thing seems to work the same except when I want to print out a copy of

Re: About Pywin32's invoke

2007-10-27 Thread Roger Upole
kernel1983 [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] By reading the doc of pywin32 we can invoke COM like: o = win32com.client.Dispatch(Excel.Application) but is it possible to invoke some GUID directly? Yes, you can do something like

Re: how to get the NT event log properties with OnObjectReady() with python

2007-10-13 Thread Roger Upole
[EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I'm trying to get a notification from the NT event for any new event using the DispatchWithEvents() function. Everything seems to be working the way I wanted, but I don't know how to get the properties of the event (ie. event type,

Re: Python service gets interrupted function call

2007-10-12 Thread Roger Upole
ashish [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi All, I wanted to know how to handle events like 'logoff' in the main thread so that any process which is being run by svcDoRun method of service does not get 'interrupted function call' exception. I am posting a very simple

Re: win32com COMAdminCatalogObject Value method

2007-10-01 Thread Roger Upole
rc wrote: I'm trying to convert VB code that registers COM+ components to Python. However, I'm unable to set values on COMAdminCatalogObject using the Value() method, it seems to think I'm trying to call the get method. VB Code: Dim cat As COMAdminCatalog Set cat = New COMAdminCatalog

Re: Getting subprocesses to be hidden on Windows

2007-08-28 Thread Roger Upole
geoffbache wrote: On 28 Aug, 18:18, Larry Bates [EMAIL PROTECTED] wrote: geoffbache wrote: Hi, As part of my efforts to write a test tool that copes with GUIs nicely, I'm trying to establish how I can start a GUI process on Windows that will not bring up the window. So I try to hide

Re: Cancelling events on a COM Object

2007-08-16 Thread Roger Upole
Oliver Nelson wrote: I have MapPoint working in Python, and I'm trying to cancel events on the map, but I can't seem to make that happen. I'm responding to the events successfully in my panel object. My code is like this: global MapPointMod MapPointMod =

Re: windows cetificates

2007-07-04 Thread Roger Upole
m.banaouas wrote: hi, is there any way to decrypt an email (already read with poplib, so available on client side) with python using a window certificate (those we can see on ie/internet options/content/certificates) ? the purpose is to decrypt an email sent and crypted by the sender

Re: How do I remotely access Scheduled Tasks from Windows XP to Windows Server 2003?

2007-06-30 Thread Roger Upole
kj7ny wrote: How can I access and manipulate Scheduled Tasks in Windows using Python? I have a Windows XP workstation running Python 2.4.4 using the win32all modules to control the windows services on multiple Windows 2003 servers. It works great. However, I also need to remotely collect

Re: Can os.remove followed by os.path.isfile disagree?

2007-06-06 Thread Roger Upole
[EMAIL PROTECTED] wrote: Can os.path.isfile(x) ever return True after os.remove(x) has successfully completed? (Windows 2003, Python 2.3) Yes. If another application has opened the file with FILE_SHARE_DELETE, os.remove succeeds but the file doesn't actually disappear until the last open

Re: WebBrowser: How to cast the document object

2007-05-06 Thread Roger Upole
zdp [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, all, My project is based on wxPython, and I need an IE control (i.e. WebBrowser ActiveX control). Although the wxPython implements a wrapped version (wx.lib.iewin.IEHtmlWindow), but it doesn't meet all my demands, because I

Re: Python-URL! - weekly Python news and links (Apr 30)

2007-04-30 Thread Roger Upole
Cameron Laird wrote: QOTW: That is just as feasible as passing a cruise ship through a phone line. - Carsten Haese, on transporting a COM object across a network. Less vividly but more formally, as he notes, A COM object represents a connection to a service or executable that is running on

Re: Python-URL! - weekly Python news and links (Apr 30)

2007-04-30 Thread Roger Upole
Cameron Laird [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] In article [EMAIL PROTECTED], Roger Upole [EMAIL PROTECTED] wrote: Cameron Laird wrote: QOTW: That is just as feasible as passing a cruise ship through a phone line. - Carsten Haese, on transporting a COM object across

Re: how to serialize a COM object ?

2007-04-25 Thread Roger Upole
Carsten Haese [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Tue, 2007-04-24 at 13:10 -0700, vml wrote: I have a problem : I have a COM object. I would like to pass this com object from a server to a client through a socket. That is just as feasible as passing a cruise ship

Re: Printing Using Python

2007-04-17 Thread Roger Upole
Raja [EMAIL PROTECTED] wrote: Hi, Attached is the code . I want my program to save the current printer job properties and , when I reconnect the printer at a latter date , i need to print the saved job . Can you please help with my code ? How to print a document at a later stage and any

Re: NetUseAdd mystery

2007-02-26 Thread Roger Upole
king kikapu wrote: Is anyone see any error in the following code: mapDrive = MyServer\\C$ data = {'remote' : mapDrive, 'local' : 'M:', 'password' : 'mypassword', 'user' : 'Administrator', 'asg_type' : 0} win32net.NetUseAdd(None, 1, data) It gives me

Re: Problem - Win32 Programming

2007-02-09 Thread Roger Upole
[EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi .. I'm a newbie to python win32 programming. I was just reading Python Programming on Win32 and I was trying to run this program: # SimpleCOMServer.py - A sample COM server - almost as small as they come! # # We expose a single

Re: tricky(?) win32com question - Mark Hammond or other experts please.

2006-12-20 Thread Roger Upole
[EMAIL PROTECTED] wrote OK, I've asked this earlier this week with no response. Since then I've also received a suggestion from the app developers but that failed with the same type error problem. Hopefully Mark Hammond or other experts can offer a suggestion as to how to get around this

Re: Windows Authetication vs seperate process

2006-12-20 Thread Roger Upole
[EMAIL PROTECTED] wrote: I was wondering of someone could steer me in the right direction. We have a package that we would like to secure so that only specific individuals can access specific portions of the application. Our wxPython application will revolve around updating a central

Re: Need Simple Way To Determine If File Is Executable

2006-12-17 Thread Roger Upole
Gabriel Genellina wrote: On 16 dic, 04:47, Tim Roberts [EMAIL PROTECTED] wrote: os.stat(selected)[ST_MODE] (S_IXUSR|S_IXGRP|S_IXOTH This will tell you that x.exe is executable, even if x.exe contains nothing but zeros. Isn't the same with any other recipe, portable or not? Unless the OS

Re: Need Simple Way To Determine If File Is Executable

2006-12-17 Thread Roger Upole
Tim Daneliuk wrote: Roger Upole wrote: Gabriel Genellina wrote: On 16 dic, 04:47, Tim Roberts [EMAIL PROTECTED] wrote: os.stat(selected)[ST_MODE] (S_IXUSR|S_IXGRP|S_IXOTH This will tell you that x.exe is executable, even if x.exe contains nothing but zeros. Isn't the same with any other

Re: Security Descriptor and CoInitializeSecurity

2006-12-02 Thread Roger Upole
Huayang Xia wrote: I'd like to call pythoncom.CoInitializeSecurity with a PySecurityDescriptor object to set the process-wide security values. But I'm not able to find a way to let the code go through. I have read MSDN and searched web, I've not been able to find answer. I cooked a security

Re: Win32 Excel Generation Slow

2006-12-01 Thread Roger Upole
Daniel Bowett [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I am trying to create an excel document that displays a table of data. It does exactly what I want but takes a long time. I am writing around 1000 rows and it takes around a second to do each row. Is there a quicker way

Re: PythonWin And Excel Problem

2006-12-01 Thread Roger Upole
Andrea Gavana [EMAIL PROTECTED] wrote: Hi All, I am having some problems in running a very simple python script, which prints some numbers in an Excel spreadsheet. The numbers are stored in a list. I know that the numbers are different (random generated), but when I open the Excel file I

Re: good documentation about win32api ??

2006-12-01 Thread Roger Upole
__schronos__ wrote: Hi all. Recently I've to developed a project in python that made operation under win32 platform and I found a lot of problema to find good information. The only one documentation is in ActivePython page (http://aspn.activestate.com/ASPN/docs/ASPNTOC-APYTH2.4.0) but it is

Re: Accessing file metadata on windows XP

2006-11-28 Thread Roger Upole
[EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] When rightclicking a, for example, pdf file on windows, one normally gets a screen with three or four tags. Clicking on one of the summary tag one can get some info like title, Author, category, keyword etc.. My question is how can

Re: win32com/python different behavour.

2006-11-10 Thread Roger Upole
bli wrote: I have been developing an application driving a device through COM. I used win32com (brilliant ) and was at a fairly advanced stage being able to access the functions of the device and access/ retrieve its data. A week or two ago I did some overdue upgrading to all the components of

Re: More elegant way to obtain ACLs / permissions for windows directories than using cacls dos command?

2006-11-08 Thread Roger Upole
[EMAIL PROTECTED] wrote: Could you give an example for listing security descriptors using the win32security module? I looked at the documentation but found it confusing. Thanks. There are some examples of using the security descriptor objects in \Lib\site-packages\win32\Demos\security. Also,

Re: Change directory permission under windows

2006-11-08 Thread Roger Upole
__schronos__ wrote: Hi. I would like to add users with full control access to a directory. I can do it to a file in the following way: info=win32security.DACL_SECURITY_INFORMATION sd=win32security.GetFileSecurity(DIR, info) acl=sd.GetSecurityDescriptorDacl()

Re: More elegant way to obtain ACLs / permissions for windows directories than using cacls dos command?

2006-11-07 Thread Roger Upole
[EMAIL PROTECTED] wrote: Is there a standard library module in Python 2.4 (Win32) that will return directory permissions / ACLs (e.g. users, groups, and what rights they have)? Otherwise, I'm faced with sending cacls dirName commands via os.popen as below, and then parsing and comparing the

Re: Sending mouse events on Windows

2006-10-28 Thread Roger Upole
Radu Ciurlea wrote: Hello, I want to write a program that can generate mouse events. I'd like to actually be able to control the pointer and generate clicks. Any pointers on modules I could use for doing this? Any suggestions are welcome. tia Radu Take a look at win32api.mouse_event.

Re: Reading a Microsoft access file.

2006-10-18 Thread Roger Upole
[EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I googled for the answer but all the answer seem to imply that you have to have Access installed on your system. I have a file that was created using Access and I want develop a Python script to read the file and produce a report. Can

Re: COM and Threads

2006-10-13 Thread Roger Upole
Teja [EMAIL PROTECTED] wrote: Roger Upole wrote: Teja [EMAIL PROTECTED] wrote: Roger Upole wrote: Teja [EMAIL PROTECTED] wrote: I have an application which uses COM 's Dispatch to create a COM based object. Now I need to upgrade the application to a threaded one. But its

Re: COM and Threads

2006-10-12 Thread Roger Upole
Teja [EMAIL PROTECTED] wrote: I have an application which uses COM 's Dispatch to create a COM based object. Now I need to upgrade the application to a threaded one. But its giving an error that COM and threads wont go together. Specifically its an attribute error at the point where COM object

Re: COM and Threads

2006-10-12 Thread Roger Upole
Teja [EMAIL PROTECTED] wrote: Roger Upole wrote: Teja [EMAIL PROTECTED] wrote: I have an application which uses COM 's Dispatch to create a COM based object. Now I need to upgrade the application to a threaded one. But its giving an error that COM and threads wont go together

Re: DAT file compilation

2006-09-30 Thread Roger Upole
On Windows NTFS file systems, you can add data to a file using named streams. The extra streams aren't visible from Explorer so the average end-user won't even know they're there. Roger Jay [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] That cgi idea is really cool, but I

Re: DAT file compilation

2006-09-30 Thread Roger Upole
Steve Holden [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Roger Upole wrote: On Windows NTFS file systems, you can add data to a file using named streams. The extra streams aren't visible from Explorer so the average end-user won't even know they're there. I hadn't realised how

Re: creating a small test server on my local computer

2006-09-29 Thread Roger Upole
John Salerno [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Irmen de Jong wrote: John Salerno wrote: Ok, this is completely unnecessary so I don't intend to get into stuff that's beyond my skill, but I'm wondering how simple it would be to use Python to create a server that runs

Re: Starting Win32 Service

2006-09-28 Thread Roger Upole
Tim Golden wrote: ... Yes, sorry about that, it's a well-known (to me) gotcha. Basically there's no way I can extract the params from the COM interface in a way which implies order, so I can't take them in positionally. (Corrections to this statement will be gratefully received). TJG

Re: How to get ip setting, dynamic ip or static ip?

2006-09-27 Thread Roger Upole
(self.__call__()) UnicodeEncodeError: 'ascii' codec can't encode characters in position 15-19: ordinal not in range(128) How to deal with it? Roger Upole wrote: kode4u [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] How to use python get my windows box's ip setting type? Dynamic

Re: Win32: Access to network resources w/o user login

2006-09-26 Thread Roger Upole
utabintarbo [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Is there a way to (programmatically) access network resources from a WinXP client without a user being logged in? I guess I need to know where the fstab file is in Windows. :-P Some more background: I am trying to access a

Re: How to get ip setting, dynamic ip or static ip?

2006-09-21 Thread Roger Upole
kode4u [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] How to use python get my windows box's ip setting type? Dynamic ip, or static ip? If it's static ip, what's the exact value? You can use WMI to list properties of your network adapter(s): import win32com.client

Re: makepy, ADO and dynamic.py

2006-09-10 Thread Roger Upole
Chris Curvey [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I'm trying to track down a performance issue in my Windows code, and hotshot is telling me that the most time and calls are spent in these methods ncalls tottime percall cumtime percall filename:lineno(function)

Re: Questoin about outlook calendar

2006-08-31 Thread Roger Upole
Gallagher, Tim F (NE) [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Gallagher, Tim (NE) wrote : import win32com.client import time import datetime outlook = win32com.client.Dispatch(Outlook.Application) namespace = outlook.GetNamespace(MAPI) appointments =

Re: Questoin about outlook calendar

2006-08-29 Thread Roger Upole
Gallagher, Tim (NE) wrote : import win32com.client import time import datetime outlook = win32com.client.Dispatch(Outlook.Application) namespace = outlook.GetNamespace(MAPI) appointments = namespace.GetDefaultFolder(9).Items #print appointments.count x = 4 # This is a number for one of

Re: How can I enumerate all windows services and disable some of them?

2006-08-22 Thread Roger Upole
[EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I know that Module win32service has some functions on manipulating win32 services. But I still have 2 questions: 1. how to enumerate all services? 2. how to disable a certain one? Thanks in advance! win32service.EnumServicesStatus

Re: What would be the best way to run python client in the background

2006-08-16 Thread Roger Upole
You can use the Task Scheduler to run a script at login. It's not as robust as creating a service, but it's much less work. Roger gel [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi I have written a python client server app that keeps an eye on processes starting and ending

Re: Kill process based on window name (win32)

2006-08-13 Thread Roger Upole
: win32api.TerminateProcess(handle,0) win32api.CloseHandle(handle) except: pass: Roger Upole wrote: drodrig wrote: Hi. I am trying to close/kill all processes that show visible windows on Windows XP. So far I've created a script that uses win32gui.EnumWindows to iterate

Re: Kill process based on window name (win32)

2006-08-12 Thread Roger Upole
drodrig wrote: Hi. I am trying to close/kill all processes that show visible windows on Windows XP. So far I've created a script that uses win32gui.EnumWindows to iterate through all windows, check for which windows are visible, then send a WM_CLOSE message to the window to request that it

Re: kerberos under windows

2006-08-11 Thread Roger Upole
Kamil Malinka wrote: Hi i'd like to know, is there any package like pykpass for windows? Or how to use this under windows. I need to authenticate users with kerberos under windows environment and have no idea how. Thanks for help. Kamil Malinka The Pywin32 package

Re: using an already running COM object with Dispatch

2006-08-06 Thread Roger Upole
jiccab [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Greetings. with the following code, olApp = Dispatch(Outlook.Application) I am capable of getting a new instance of Outlook running. I would like to be able to use the instance that is already running, if exists, otherwise

Re: OS independent files

2006-08-04 Thread Roger Upole
Dennis Lee Bieber [EMAIL PROTECTED] wrote: On Thu, 03 Aug 2006 21:55:21 +0200, Jarek Zgoda [EMAIL PROTECTED] declaimed the following in comp.lang.python: crystalattice napisa?(a): If I want to make sure the file/directory is made in a user's home directory (e.g. /home/users/path/to/file)

Re: How to automate user input at the command prompt?

2006-07-21 Thread Roger Upole
If you have the Pywin32 extensions installed, you can use the win32console module to send keystrokes directly to a command prompt via WriteConsoleInput. Roger [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I'm working on a scirpt to be used on a windows machine and I need to

Re: using capicom with python

2006-07-17 Thread Roger Upole
stéphane bard [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi all, Has anyone ever used Python to work with Certificate Services in Windows? I'm trying to capicom dll with pywin32. I've found some reference about python and capicom in this mail archive

Re: Launching multiple instances of a program with win32com.client.Dispatch?

2006-07-06 Thread Roger Upole
win32com.client.DispatchEx should create a new instance. Roger [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi there, I am trying to launch a program called AmiBroker using the command: AB = win32com.client.Dispatch(Broker.Application) However, I have a dual-core CPU

Re: Controlling Windows Media Player from Python

2006-07-04 Thread Roger Upole
Jeffrey Barish [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Is there a way to interact with Windows Media Player from Python? I would like to be able to do things like tell WMP to play a given sound file or to ask WMP for metadata about a sound file. -- Jeffrey Barish WMP can

Re: Help with conversion VB script to Python : COM objects

2006-06-27 Thread Roger Upole
[EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, I need to re-write a VB script into Python (because I really don't like VB). The VB script is used to create a Windows COM object. (I am more of Unix guy, so COM objects are a little bit alien for me). At a certain point in

  1   2   3   >