Hello,
I'm using this code :
mypdc = 'mypdc'
dusers = 'DomName\DomainUsers'
obj = 'C:\\Mylogfile.log'
try:
domainusers_sid = wsec.LookupAccountName(mypdc, dusers)[0]
info = wsec.DACL_SECURITY_INFORMATION
sd = wsec.GetFileSecurity(obj, info)
Hello,
I have installed win32 extensions on my windows 2003 server
i'm using python 2.5.1.
downloaded the wmi module 1.3.2 to my machine
used
python setup.py install
to install the module
i tried run an example mentioned in the web page. it gave the following
error.
File
On Fri, Mar 14, 2008 at 01:46:16PM +1100, Christopher Nilsson wrote:
It's been ages since I looked at this, but you need to make sure the
constants at the top of the module match your version of excel. The
ones that are currently there are for Excel XP (which is the one
before the version
siddhartha veedaluru wrote:
I have installed win32 extensions on my windows 2003 server
i'm using python 2.5.1.
downloaded the wmi module 1.3.2 to my machine
used
python setup.py install
to install the module
i tried run an example mentioned in the web page. it gave the following
Sorry I forgot some informations.
The error is :
1789, 'LookupAccountName', The trust relationship between this
workstation and the primary domain failed.
As I said, this doesn't always happen, sometimes logon runs successfully
and ACLs are correctly set (this is why I use 'LookupAccountName').
[.. snipped ..]
le dahut: I'm not sure which bit is wrong. I could
point out that traceback.print_exc () will *print*
the current exception (to stdout / stderr, not sure)
and *return* None, so your line:
logging.debug('Error %s'%traceback.print_exc())
probably doesn't do what you want, as it
Rickey, Kyle W wrote:
I've got several excel sheets I would like to run SQL queries on and
I've worked out a couple of ways, but I'm not sure what the best way
would be. I've also got a problem where I can't connect to the excel
file if someone is currently editing it. Given the following to
I've got several excel sheets I would like to run SQL queries on and
I've worked out a couple of ways, but I'm not sure what the best way
would be. I've also got a problem where I can't connect to the excel
file if someone is currently editing it. Given the following to code
samples, which one is
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 :)
In a perfect world I would get all the data into our SQL server and
write a front end for everyone that needs to access/modify the data, but
that's
What strange is is that:
try:
wsec.LookupAccountName(...)
except:
print 'Error'
shows :
- a traceback, as if I didn't put LookupAccountName in a try/except
statement
- the string 'error' so the program has also switched to except as if
the try/except has been correctly interpreted
So we
le dahut wrote:
What strange is is that:
try:
wsec.LookupAccountName(...)
except:
print 'Error'
shows :
- a traceback, as if I didn't put LookupAccountName in a try/except
statement
- the string 'error' so the program has also switched to except as if
the try/except has been
Tim Golden wrote :
le dahut wrote:
What strange is is that:
try:
wsec.LookupAccountName(...)
except:
print 'Error'
shows :
- a traceback, as if I didn't put LookupAccountName in a try/except
statement
- the string 'error' so the program has also switched to except as if
the
Tim, thanks for the samples, those are quite handy. I'll play with this
some more and see what I can come up. An issue that I can see about
reading from the excel files every time is that these files are stored
on our network. Our VPN access is horribly slow so it might take a while
on a slow
le dahut wrote:
Tim Golden wrote :
le dahut wrote:
What strange is is that:
try:
wsec.LookupAccountName(...)
except:
print 'Error'
shows :
- a traceback, as if I didn't put LookupAccountName in a try/except
statement
- the string 'error' so the program has also switched to
Rickey, Kyle W wrote:
In a perfect world I would get all the data into our SQL server and
write a front end for everyone that needs to access/modify the data, but
that's a ways down the road. I've still got to convince people in the
company that excel is NOT a good way to store database info!
Does anyone have a working example (excel, outlook, etc...) to try the
win32com.client.Record function on ?
I tried the pythoncom test harness also, but no luck:
import win32com.client
myarray = win32com.client.DispatchEx
({F1A51873-24E9-47ED-AE71-925462C5FE3B})
myrecord =
That's also not a bad idea, most of the time, the data I'm interested in
will be at least 1-2 weeks old. That would also be better than exporting
everything to SQL every time a user saves the document.
Thanks for the info about Turbo Gears, etc. I'll have to check those
out.
-Kyle Rickey
All:
I am trying to print the attributes of a file.
The want I am most interested in is the owner. This is on windows xp.
Any help would be appreciated.
Chris J
The information contained in this email may be confidential and/or legally
privileged. It has been
All:
I am trying to print the attributes of a file.
The want I am most interested in is the owner. This is on windows xp.
Any help would be appreciated.
Chris J
___
python-win32 mailing list
python-win32@python.org
Chris Johnson wrote:
All:
I am trying to print the attributes of a file.
The want I am most interested in is the owner. This is on windows xp.
Any help would be appreciated.
Chris J
See \win32\demos\FileSecurityTest.py for an example of
how to do this.
Roger
Chris Johnson wrote:
I am trying to print the attributes of a file.
The want I am most interested in is the owner. This is on windows xp.
Any help would be appreciated.
import win32security
o = win32security.GetFileSecurity( filename,
win32security.OWNER_SECURITY_INFORMATION )
Chris Johnson wrote:
I am trying to print the attributes of a file.
The want I am most interested in is the owner. This is on windows xp.
http://timgolden.me.uk/python/win32_how_do_i/get-the-owner-of-a-file.html
TJG
___
python-win32 mailing list
Sorry for so many posting here, but on the off chance someone is curious and
looks in to this:
There's two issues I've found so far:
On Fri, Mar 14, 2008 at 2:44 PM, Kevin Patterson [EMAIL PROTECTED]
wrote:
Does anyone have a working example (excel, outlook, etc...) to try the
Sorry for so many posting here, but on the off chance someone is curious and
looks in to this:
There's two issues I've found so far:
- The generated py files don't have the GUID for the Record (at least not in
the relased 210). The generated py file would need GUID from the
TestStruct1, for some
Kevin Patterson wrote:
I found the comtypes equivalent if that helps any. The generated comtypes
file looks like this:
COMMETHOD([dispid(1610743812), helpstring(u'GetInterface() method')],
HRESULT, 'GetInterface',
( ['in'], POINTER(GUID), 'riid' ),
(
Kevin Patterson wrote:
Now the bad news: I can't figure out how to get a Record if the GUID
is not present. The one I need is in OLE. When I use the Visual C++
browser, I can see that the GUID struct is defined, but there is no
GUID for the GUID struc (ironic huh :))
This path is going to
Hi,
when I try use MAPI, I get message with pywintypes.com_error ...
Can anybody help me?
(PyWin32 210)
Python 2.4.4 (#71, Oct 18 2006, 08:34:43) [MSC v.1310 32 bit (Intel)] on win32
Type help, copyright, credits or license for more
So back to the beginning again:
There is a COM function that takes a pointer to the GUID structure as an
INPUT. The fact that it happens to be called GetInterface may be
confusing matters. It just happens to be the name of the function. So lets
just say the function is:
HRESULT SomeFunction(
28 matches
Mail list logo