Re: RELEASED Python 2.4.1, release candidate 1

2005-03-10 Thread Roger Upole
Does the workaround for the crash do anything for this problem ? Mark has changed the makepy code to break up long lines, and a new build of Pywin32 should be out before long. Roger "Tim N. van der Leeuw" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] &g

Re: RELEASED Python 2.4.1, release candidate 1

2005-03-11 Thread Roger Upole
unwarranted syntax errors ? Roger "Tim N. van der Leeuw" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Sorry, but I don't know what you mean with 'workaround for the > crash'... > The interpreter no longer crashes when trying to compile thi

Re: win32 shell extension (virtual drive)

2005-03-15 Thread Roger Upole
There's an example shell extension in the Pywin32 demos that creates a pseudo-folder whose contents are determined by python code. Take a look at \win32comext\shell\demos\servers\shell_view.py. However, I don't think it qualifies as 'simple' ;) Roger "Tiziano

Re: Getting the process list on win98

2005-03-15 Thread Roger Upole
the object. hth Roger "Ron" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I've written a screen saver which opens multiple copies on windows 98. I'm > trying to check the process list to determine if it is already running. > > So far

Re: wxPython to build an HTML analyser/displayer?

2004-12-01 Thread Roger Binns
isplay widget directly. See the demo. If you need to be cross platform then wxMozilla is worth looking at (which is apparently active despite appearing dormant). Start at http://wxmozilla.sourceforge.net/pmwiki/pmwiki.php/Main/Documentation Roger -- http://mail.python.org/mailman/listinfo/python-list

Re: What to use for installation?

2004-12-02 Thread Roger Binns
a freezer/installer on Windows, Linux and Mac. http://bitpim.org/papers/baypiggies/ (See slides 18 thru 22). Roger -- http://mail.python.org/mailman/listinfo/python-list

Re: PySQLLite Speed

2004-12-02 Thread Roger Binns
synchronous information in the pragmas: http://www.sqlite.org/pragma.html See also: http://www.sqlite.org/cvstrac/wiki?p=PerformanceConsiderations http://www.sqlite.org/cvstrac/wiki?p=PerformanceTuning Roger -- http://mail.python.org/mailman/listinfo/python-list

Re: PajamaScript

2004-12-05 Thread Roger Binns
/Python/Recipe/52217 http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/162292 Note that they also deal with the area you will have an issue in which is how to add conditional statements. Roger -- http://mail.python.org/mailman/listinfo/python-list

Re: Fun with Outlook and MAPI

2004-12-11 Thread Roger Binns
s for every > single one. Here is an simple workaround: http://www.contextmagic.com/express-clickyes/ If you have win32all installed, you can even use the programming API they present to turn on and off the clickyes functionality. Roger -- http://mail.python.org/mailman/listinfo/python-list

Re: Fun with Outlook and MAPI

2004-12-11 Thread Roger Binns
(I also have not had any issue sending lots of messages using MAPI). Ultimately the utility of vanilla of pure SMTP will depend on customer requirements and how simple the configuration is. Roger -- http://mail.python.org/mailman/listinfo/python-list

Re: why no python setup.py uninstall?

2004-12-12 Thread Roger Binns
our platform. You can then use your platform tools to install and uninstall the files. Or you can use the zip/tar formats and keep track of the files by whatever means you want to. http://docs.python.org/dist/built-dist.html Roger -- http://mail.python.org/mailman/listinfo/python-list

Re: Boo who? (was Re: newbie question)

2004-12-21 Thread Roger Binns
hon, and C# (actually C-Omega) in one language", on which > "work has rarely begun") That work died due to "a crisis of faith": http://mylist.net/archives/spry-dev/2004-November/72.html Roger -- http://mail.python.org/mailman/listinfo/python-list

Re: File locking is impossible in Windows?

2004-12-21 Thread Roger Upole
pt to confirm overwrite on the command line. Roger "Pekka Niiranen" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > I have used the following example from win32 extensions: > > -SCRIPT STARTS > > import win32file > im

Source cross reference + colourizer (PyXR is no more?)

2004-12-22 Thread Roger Binns
://www.cathoderaymission.net/~logistix/python/pyxr.html Does anyone know what happened to the author? Are there any maintained alternatives to PyXR? Roger -- http://mail.python.org/mailman/listinfo/python-list

Re: PHP vs. Python

2004-12-23 Thread Roger Binns
ts). That way I got the best of both worlds, didn't have to get mod-python installed, and *my opinion* is that Smarty is the nicest template tool I have tried in Python or PHP. Roger -- http://mail.python.org/mailman/listinfo/python-list

Re: PHP vs. Python

2004-12-23 Thread Roger Binns
an be available in any number of languages including Python, PHP, Java and Perl. http://www.swig.org/compare.html Roger -- http://mail.python.org/mailman/listinfo/python-list

Re: Win 32 - VB, Ruby, Perl VS Python with fireEvent

2005-03-23 Thread Roger Upole
I don't know why case would make a difference, but if I change the fireevent call to FireEvent, it works on XP sp2. It also works if you generate the makepy wrappers (probably because that forces case-sensitivity) hth Roger <[EMAIL PROTECTED]> wrote in message

Re: wsh and Python

2005-04-09 Thread Roger Upole
Since AppActivate returns a boolean, you should be able to do something like this: while not shell.AppActivate(name): win32api.Sleep(100) Roger "David Josty" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello >

Re: Read the windows event log

2005-04-13 Thread Roger Upole
You'll need to read in a loop until no records are returned. Roger "Austin" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > My codes are below: > > *** > import win32evtlog > > def check_records(reco

Re: Python 2.4 killing commercial Windows Python development ?

2005-04-13 Thread Roger Binns
dures, editors in what they do or may contribute to your project if it is open source. That is the point at which Python matters. In all these matters I think it is better to lead by example rather than try to make people aware of things early in order to perform some sort of attempt to gain mindshare. Roger -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 2.4 killing commercial Windows Python development ?

2005-04-13 Thread Roger Binns
Python packages are backwaters/low priority for the packagers. All it takes is one missing dependency to throw a spanner in the works. And as I told the person who originally wanted to package BitPim for Debian, I will supply all the help and make changes as necessary. Someone from the distr

Re: Python 2.4 killing commercial Windows Python development ?

2005-04-18 Thread Roger Binns
"Stefan Behnel" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > Roger Binns schrieb: >> As far as I can tell, they failed at two hurdles. One is that there >> is a new BitPim release every two weeks and they can't really keep up >>

Re: Updating Windows File Summary Data

2005-04-18 Thread Roger Upole
Pywin32 has functions to read and write these properties. Take a look at testStorage.py in the \win32\test directory for an example of how to use them. Roger "Denrael" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >I am looking for a way in Python to

Re: GUI woes

2005-04-23 Thread Roger Binns
no attribute 'Bind' Bind was introduced in wxPython 2.5. Looks like you are running against thr 2.4 library. Roger -- http://mail.python.org/mailman/listinfo/python-list

Re: Decent Win32All Documentation

2005-04-24 Thread Roger Binns
er over the underlying Windows API. http://www.microsoft.com/msdownload/platformsdk/sdkupdate/ Roger -- http://mail.python.org/mailman/listinfo/python-list

Re: Internet Explorer, COM+, Javascript and Python

2005-04-28 Thread Roger Upole
t.Script._oleobj_.Invoke(id, 0, pythoncom.DISPATCH_METHOD, True, ) hth Roger "Ishpeck" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >I need to make IE execute javascript in a web page with COM+ and > Python. > > Similarly to the way they do

Re: Killing process

2005-04-29 Thread Roger Upole
TerminateProcess takes a process handle, not a pid. win32api.OpenProcess will give you a handle. Roger "Harlin Seritt" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >I am using os.getpid() to get the pid value for a script running. I > store that va

Re: Pipes

2015-08-10 Thread Roger Hunter
I agree that some of Python is simple but the description of subprocess is certainly not. I spent much of my working career using Fortran and TrueBasic on mainframes. I'd like programming to be more like holding a discussion to the computer in English instead of Sanscrit. Roger On Sun,

Re: INSTRUCTOR SOLUTIONS MANUAL

2013-03-22 Thread Roger Cox
Do you have the Instructor Solutions Manual for these two text books? Fundamentals of Fluid Mechanics, 5th Edtion, Munson, young, Okiishi Chemical Engineering Fluid Mechanics, 2nd Edition, Ron Darby Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: How can I load python script into Html ??

2005-12-13 Thread Roger Upole
Mozilla is growing python support: http://weblogs.mozillazine.org/roadmap/archives/008865.html Using Pywin32, Python can also be registered as an ActiveScript language so that it can be used in Internet Explorer. Roger -- "Ask the ToeCutter - HE knows who I am !"

Re: query to find name of the OS, ip addr, mac addr etc

2005-12-13 Thread Roger Upole
If you have Pywin32 installed, you can use WMI to get all these details. The WMI classes to look at are win32_networkadapter and win32_operatingsystem. Roger -- "Ask the ToeCutter - HE knows who I am !" <[EMAIL PROTECTED]> wrote: > Hi all, > > 1) Am work

Re: How can I load python script into Html ??

2005-12-16 Thread Roger Upole
Using the normail src attribute works for me: Did you register the Python script engine with pyscript.py or pyscript_rexec.py ? Roger -- "Ask the ToeCutter - HE knows who I am !" "PatPoul" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > So

Re: Windows Services

2005-12-19 Thread Roger Upole
Active State's help file is missing parameters from some modules built using Swig. The .chm included with the SourceForge releases has complete parameter info. hth Roger "Mondal" <[EMAIL PROTECTED]> wrote: > Hi, > > Every one please accept my th

Re: How can I load python script into Html ??

2005-12-19 Thread Roger Upole
! >> >> Patrick Poulin >> > > In this context I have a question: > > How can the registering of the Python scripting engine be easily and > completely removed? (i.e. how can I get rid of it when > already registered?) > > Claudio Run pyscript.py passing

Re: Providing 'default' value with raw_input()?

2005-12-22 Thread Roger Upole
('modify this: ','some data') print data hth Roger "planetthoughtful" <[EMAIL PROTECTED]> wrote: > Hi Steve, > > As keir mentioned, my goal is to be able to edit the value returned > from a record stored in SQLite, so that it ca

Re: run line or selection

2005-12-28 Thread Roger Upole
You can add your own entries under the Tools menu fairly easily. Go to View->Options->Tools Menu and enter the command name and code to be executed. hth Roger "linda.s" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] is there any tool like &quo

Re: Is there any detailed debug tutorial for Pythonwin?

2005-12-28 Thread Roger Upole
Python Programming on Win32 has a lot of info in chapter 4. Roger "linda.s" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Is there any detailed debug tutorial for Pythonwin? == Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet

Re: Windows and python execution

2005-12-28 Thread Roger Upole
The PATHEXT allows you to execute the script without typing the .py extension. Roger "BartlebyScrivener" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Some of the confusion probably comes from which installation people > use. I used the latest Activ

Re: COM automation, Internet Explorer, DocumentComplete event

2006-01-10 Thread Roger Upole
PythonCom interfaces implement __cmp__ so that you can just use a straight == comparison. hth Roger "puff" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I'm very new to Python and have a question concerning IE automation and > detection

Re: Accessing Windows file metadata?

2006-01-11 Thread Roger Upole
file data. This would change the file's hash if the document properties were changed. On volumes formatted with NTFS 5 (Win2k and later), document properties can be added to any type of file and are stored in alternate data streams. hth Roger "EP" <[EMAIL PROTE

Re: Placing graphics & text on printed page - jan06call.jpg (0/1)

2006-01-12 Thread Roger Upole
Roger "Michael Galvin" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > To see an example of what I am trying to accomplish, look at this page > on my personal website: > > http://mysite.verizon.net/michaelgalvin/jan06call.html > > I now r

Re: Creating shortcuts?

2006-01-13 Thread Roger Upole
On Windows, Pywin32 allows you to create and manipulate shortcuts. See \win32comext\shell\test\link.py for a small class that wraps the required interfaces. hth Roger "Ron Griswold" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Hi Folks, Is it poss

Re: HP open source printer drivers are in Python

2006-01-13 Thread Roger Upole
"Grant Edwards" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On 2006-01-13, Andy Leszczynski <[EMAIL PROTECTED]> wrote: > >> I have a specific question, anybody is familiar? > > Yes. > You're a familiar ? Who's your wiza

Re: Listing partitions (on win32)

2006-01-15 Thread Roger Upole
as the control code should be able to retrieve the partitions defined on a disk. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/ioctl_disk_get_drive_layout.asp Unpacking the output buffer may get a little messy, though. hth Roger == Posted via Newsfeed

Re: Listing partitions (on win32)

2006-01-15 Thread Roger Upole
'D:', 'E:', 'V:', 'W:'] > > Regards, > Bengt Richter This will miss any partitions that don't have a drive letter assigned. It will also give duplicate results for any volumes that have more than one drive letter. And it will return an entry fo

Re: [help] how to generate a empty ".MDB" file using python

2006-01-15 Thread Roger Upole
;s helpful if you post the traceback. I get com_error: (-2147352567, 'Exception occurred.', (0, 'DAO.DbEngine', 'Invalid argument.', 'jeterr40.chm', 5003001, -2146825287), None) Apparently the Locale parameter is required. eng=win32com.client.gencache.Ens

Re: MSSQL LIKE and IN statements in ADO problem

2006-01-18 Thread Roger Upole
ou'd need value = "%raj%" (looks like there was an extraneous single quote in the original) and your sql would be "SELECT * FROM tb_name WHERE firstname LIKE ?" Named parameters are usually used for calling stored procedures. As far as I know, you can't use them with plain

Re: Registering COM python based components when not admin

2006-01-18 Thread Roger Upole
o the RegisterClassImplCategories method. I don't see anything in the SDK docs indicating how it determines whether it should write to HKCU or HKLM. hth Roger "tooper" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello, > > I'

Re: OT: excellent book on information theory

2006-01-18 Thread Roger Upole
gh from the context the meaning seemed obvious, I was left with some doubts as to whether it might have some more specific connotations. For instance, it could have referred to a metered lot, or to a parking garage with time tickets, or even some kind of valet parking. Often, assuming that

Re: OT: excellent book on information theory

2006-01-18 Thread Roger Upole
"Steven D'Aprano" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Roger Upole wrote: > >>>I wouldn't have figured out that a "car park" was a parking lot. I >>>might have thought it was a park where you go to look at

Re: OT: excellent book on information theory

2006-01-18 Thread Roger Upole
r thing, you would be seeing the sketch about the penguin on the telly ? Lets see, "sketch" means a rough line drawing, and the only "telly" I know of is Telly Savalas, but I'm fairly sure I know what a penguin is. So while in this "chair" I am to be shown

Re: Coding style

2006-07-17 Thread Roger Miller
Peter Otten wrote: > Steve Holden wrote: > > > I'll bet you still write > > > > if a>3 == True: > > > > don't you ;-) > > I'll second that. > > if (a>3) == True: > > is the correct way :-) > > Peter No, to be consistent you'll have to write if ((a>3) == True) == True: Oops, I mean, if (((

embedding python in a plugin

2006-07-17 Thread Roger Edberg
can't find any mention of this in the extending/embedding docs or the CG package documentation. Or is this a linux thing? Thanks, Roger -- http://mail.python.org/mailman/listinfo/python-list

Re: using capicom with python

2006-07-17 Thread Roger Upole
#x27;s usually aren't designed to be used directly. You request instances of the interfaces they implement by guid or program id. import win32com.client certstore=win32com.client.Dispatch('capicom.store') certstore.Open(StoreName='Root') for cert in certstore.Certificates:

wxPython: wxStaticBitmap and large images

2006-07-19 Thread Roger Miller
I have a WxPython app that displays images that are typically around 600x600 pixels. I use a wxStaticBitmap, which appears to work fine on Windows XP. However the documentation states that a StaticBitmap "... is meant for display of the small icons in the dialog boxes and is not meant to be a gener

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 wind

Re: OS independent files

2006-08-03 Thread Roger Upole
/blogs.msdn.com/oldnewthing/archive/2003/11/03/55532.aspx the Shell Folders key shouldn't be relied upon. You can retrieve user directories using SHGetFolderPath or SHGetSpecialFolderPath, both of which are wrapped by win32com.shell. Roger -- http://mail.python.org/mailman/listinfo/python-list

Re: using an already running COM object with Dispatch

2006-08-06 Thread Roger Upole
le to use the instance that is already running, if exists, > otherwise open a new one. > > Has anyone being able to do this? You should be able to use win32com.client.GetActiveObject('outlook.application') and fall back to a normal Dispatch if it fails. Roger -- http://mail.python.org/mailman/listinfo/python-list

Re: kerberos under windows

2006-08-11 Thread Roger Upole
ka The Pywin32 package (http://sourceforge.net/projects/pywin32/) wraps the SSPI functions used for kerberos authentication. There are some scripts in \win32\Demos\security\sspi\ that demonstrate usage. They're currently set up for NTLM, but it only takes a couple changes to convert them to Kerb

Re: Kill process based on window name (win32)

2006-08-11 Thread Roger Upole
WindowThreadProcessId should do the trick. Roger -- http://mail.python.org/mailman/listinfo/python-list

Re: Kill process based on window name (win32)

2006-08-13 Thread Roger Upole
ether. Roger "drodrig" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >I am running the program mentioned below as an NT service on a terminal > server. The service listens on a UDP port for any of a series of > commands. In this case, the command "closeApps &

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

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

2006-08-22 Thread Roger Upole
None,0, None,None,None,None) win32service.CloseServiceHandle(hsvc) win32service.CloseServiceHandle(hscm) Roger -- http://mail.python.org/mailman/listinfo/python-list

pythonw documentation?

2006-10-09 Thread Roger Miller
I was going to ask how to a program can tell whether it was started by python.exe or pythonw.exe, but after some experimentation I noticed that sys.stdin.fileno() is -1 in the latter case. However on a more general note, the only references to pythonw that I could find in the Python 2.5 documentat

Re: COM and Threads

2006-10-12 Thread Roger Upole
ttribute error at the point where COM object is invoked. Any > pointers please?? > An actual traceback would help. At a guess, when using COM in a thread you need to call pythoncom.CoInitialize and CoUninitialize yourself. Roger -- http://mail.python.org/mailman/listinfo/python-list

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

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: >> >>

Re: Reading a Microsoft access file.

2006-10-18 Thread Roger Upole
tically all Windows systems anymore) Roger -- http://mail.python.org/mailman/listinfo/python-list

Re: Sending mouse events on Windows

2006-10-28 Thread Roger Upole
gt; > Radu Take a look at win32api.mouse_event. Roger == Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News== http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups = East and West-Coast Server Farms - Total Privacy via Encryption =--

uninstall and Windows file associations

2006-11-01 Thread Roger Miller
When I installed Python 2.5 (on Windows XP) I left 2.4 in place "just in case". Today I decided to remove it. However after doing so (from the control panel) I found that Windows no longer knows about the Python file types and associations. Is this behavior expected, or was there something wrong wi

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

2006-11-07 Thread Roger Upole
irpath, dirNm) >print '"' + theDirPath +'"' ># cacls needs double-quotes around space-containing paths >result = os.popen("cacls " + '"' + theDirPath + '"') ># Print the security inf

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

2006-11-08 Thread Roger Upole
\security. Also, searching the Python-win32 mailing list should turn up some more code. Roger == Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News== http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups ---= East/West-Coast

Re: Change directory permission under windows

2006-11-08 Thread Roger Upole
cessAllowedAce doesn't have a parm for inheritance flags. Try AddAccessAllowedAceEx instead: acl.AddAccessAllowedAceEx(win32security.ACL_REVISION_DS, win32security.OBJECT_INHERIT_ACE|win32security.CONTAINER_INHERIT_ACE, win32file.FILE_ALL_ACCESS, sidUser) Roger == Posted via Newsfeeds.

Re: win32com/python different behavour.

2006-11-10 Thread Roger Upole
anks in keen anticipation for any ideas to get over this one!! > > I am in the middle of returning to Python 2.4.3 just to be sure that > this is not the issue. Try running makepy on the object's typelib. It may have been done for your previous version of python. Occasionally this ca

Re: How to calc easier the "long" filesize from nFileSizeLow and nFileSizeHigh

2006-05-29 Thread Roger Upole
Shift nFileSizeHigh by 32 and add FileSizeLow. Roger "DurumDara" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi ! > > I get the file datas with FindFilesW. > I want to calc the filesize from nFileSizeLow and nFileSizeHigh with easiest > as

Re: shuffling elements of a list

2006-05-31 Thread Roger Miller
Sybren Stuvel wrote: > David C Ullrich enlightened us with: > > I thought that the fact that you could use the same trick for > > _shuffling_ a list was my idea, gonna make me rich and famous. I > > guess I'm not the only one who thought of it. Anyway, you can use > > DSU to _shuffle_ a list by de

Re: Try/Except for ADSI GetObject

2006-05-31 Thread Roger Upole
re doing any more operations. hth Roger == Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News== http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups ---= East/West-Coast Server Farms - Total Privacy via Encryption =--- -- http://mail.python.org/mailman/listinfo/python-list

Re: WinPops

2006-05-31 Thread Roger Upole
t; > Hari On Windows, you can use win32net.NetMessageBufferSend. Roger == Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News== http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups ---= East/West-Coast Server Farms - To

Re: Sampling a population

2006-06-02 Thread Roger Miller
For your example, since the probabilities are all multiples of 0.01 you could make a list of 100 elements. Set one of them to a, 5 of them to b, 50 of them to c, etc. Then just randomly sample from the table (which is O(1)). Of course if the probabilities can be arbitrary floating point values the

Re: Converting binary sid's to a hex string

2006-06-07 Thread Roger Upole
You can use the binascii module to convert the raw bytes of the sid to hex. binascii.b2a_hex(buffer(MySid)) Roger "LittlePython" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >I am trying to create a hexstring of a NT4 user account sid which I can in >

Adding extra frames to traceback in C module

2006-06-09 Thread Roger Binns
and adding the extra information will establish why. I couldn't find anything on the web or in the documentation to explain how to do it. I did find snippets of code doing things like PyTraceback_Here but they use a real Python frame which I don't have and don't know ho

Re: How to select a folder with native windows dialog box?

2006-06-13 Thread Roger Upole
You can use SHBrowseForFolder: from win32com.shell import shell shell.SHBrowseForFolder() Roger <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >I found the win32ui.CreateFileDialog() function to select a file but > nothing to select a folder :'-( >

Re: DispatchEx('.Application')

2006-06-13 Thread Roger Upole
There's a project to create a COM api for Firefox that's identical to IE: http://www.iol.ie/~locka/mozilla/mozilla.htm Roger <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > When using win32com and DispatchEx to work with a webbrowser, eg: > > fr

Re: How to select a folder with native windows dialog box?

2006-06-14 Thread Roger Upole
> it's working fine... And I was unable to fix this issue. SHGetPathFromIDList only works for real filesystem folders. Pseudo-folders like Control Panel or Network Connections throw an error. You can use PyIShellFolder.BindToObject to get an interface to perform operations on these.

Re: Screen capturing on Windows

2006-06-14 Thread Roger Upole
) saveDC.SelectObject(saveBitMap) saveDC.BitBlt((0,0),(w, h) , mfcDC, (0,0), win32con.SRCCOPY) temp_dir=win32api.GetTempPath() bmpname=win32api.GetTempFileName(temp_dir,'wc')[0]+'.bmp' saveBitMap.SaveBitmapFile(saveDC, bmpname) return bmpname Roger -- http://mail.python.org/mailman/listinfo/python-list

Re: source reduction using Python

2006-06-22 Thread Roger Miller
[EMAIL PROTECTED] wrote: > Intel has introduced something called CESR, written in Python, to aid > C, C++, and Fortran programmers in reducing the sizes of programs > included in bug reports. Here is a brief description from > http://cache-www.intel.com/cd/00/00/21/93/219320_relnotes_10.pdf : > ...

Re: win32com and name of com

2006-06-22 Thread Roger Upole
them > wrong. > (All authors are fairly sparse on the topic using Microsoft examples > that are more self evident.) > thanks muchly! > Your best bet is the documentation for the application. However, if the dll is registered correctly you can also find the progid in the registry by searchin

Re: embedded Python calling app via COM

2006-06-22 Thread Roger Upole
-- Jim Pythoncom.GetActiveObject will retrieve the running instance of the app. (assuming that it registers itself in the Running Object Table) Roger == Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News== http://www.newsfeeds.com The #1 Newsgroup Service in the

Re: occasional win32com error

2006-06-22 Thread Roger Upole
You could try using DispatchEx to make sure you always get a new instance of Excel. Roger "Ransom" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hey folks... > > Newbie here. I'm working with win32com launching, closing and > re-launchin

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

2006-06-27 Thread Roger Upole
; Any help really appreciated. > > With kind regards, > > KRis > If the application has a typelib, you can use makepy to generate a wrapper module that will show you the objects' methods and properties. Otherwise, you'll have to depend on the documentation for the app.

Re: MSoffice metadata

2006-06-27 Thread Roger Upole
Specifically, you can use pythoncom.StgOpenStorage to retrieve an IPropertySetStorage interface. Roger == Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News== http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups ---= East/We

Re: zipfile module doesn't allow append

2006-06-29 Thread Roger Miller
Ritesh Raj Sarraf wrote: > The line > filename = zipfile.ZipFile(zip_file_name, "a") > throws an exception if the given filename is not present already. > Shouldn't it create a file (in case one is not there) since it is > "append" mode ?? Perhaps it would be nicer that way, but it is working as

Re: Controlling Windows Media Player from Python

2006-07-03 Thread Roger Upole
e. > -- > Jeffrey Barish WMP can be automated using COM: import win32com.client w=win32com.client.gencache.EnsureDispatch('WMPlayer.OCX',0) pl=w.playlistCollection.getByName('All Music')[0] s=pl[0] print s.name, s.duration w.currentMedia=s Roger -- http://mail.python.org/mailman/listinfo/python-list

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"

Re: Questoin about outlook calendar

2006-08-29 Thread Roger Upole
curring > recItem = appointments[x].GetRecurrencePattern GetRecurrencePattern is a method, so at this point recItem is a reference to the method itself, rather than the result of calling it. You'll need to add parens to actually call it. Roger -- http://mail.python.org/mailman/listinfo/python-list

Re: Questoin about outlook calendar

2006-08-31 Thread Roger Upole
int appointments[x].RecurrenceState > print appointments[x].EntryID > print appointments[x].IsRecurring > recItem = appointments[x].GetRecurrencePattern > GetRecurrencePattern is a method, so at this point recItem > is a reference to the method itself, rather than the result of call

Re: makepy, ADO and dynamic.py

2006-09-10 Thread Roger Upole
ea what I should be running > makepy on? > > [1] I seem to have a bunch of versions of "Microsoft ActiveX Data > Objects Library", is there a chance that another ADO library is being > used? > The most reliable way to make sure the generated support is used is to cal

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

2006-09-21 Thread Roger Upole
network adapter(s): import win32com.client wmi=win32com.client.GetObject('winmgmts:') adapters=wmi.InstancesOf('Win32_NetworkAdapterConfiguration') for adapter in adapters: print adapter.Properties_['Caption'], adapter.Properties_['DhcpEnabled'], adapter.

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

2006-09-26 Thread Roger Upole
the service tries to establish a connection with the Samba server, it will use whatever credentials it's set up to start as. You really shouldn't have to do anything special. However, you can initiate the connection with an alternate username using win32net.NetUseAdd or win32wn

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

2006-09-27 Thread Roger Upole
This means the unicode object contains characters that can't be represented in the default encoding. Try encoding it in another character set, something like adapter.Properties_['Caption'].Value.encode('mbcs') (you may need to use a different codec) Roger &

<    1   2   3   4   5   6   >