[python-win32] win32ras.Dial() timing out on Windows 7

2010-02-17 Thread Eduan Basson

Hi

I'm experiencing problems with the win32ras.Dial() function in python, 
as installed with Activestate ActivePython 2.6.4.10-win32-x86. The 
behaviour is:


1. On Windows 2000 and XP, function works as expected, returning with a 
0 errorcode as soon as the dial-up connection is made.
2. On Windows Vista and an un-updated copy of Windows 7RC1, the 
connection is made (as can be seen on the flashing LEDs on my modem and 
the ipconfig command), but the Windows API takes almost 40 seconds to 
realise this, which only then returns a 0 errorcode.
3. On that same Windows 7RC1, after running an update, as well as on a 
full Windows 7 installation, the connection is made (again according to 
the flashing LEDs on the modem and the ipconfig command), but after 60 
seconds win32ras.Dial() still hasn't returned. If I send a 
win32ras.HangUp(), Dial returns with error 621, which is to be expected 
if you interrupt a Dial command.


Has anybody else experienced something similar? Or does anybody use 
win32ras.Dial under Windows 7 without issues? Is there any known bug 
related to this?



Thank you

--
*Eduan Basson*


___
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32


Re: [python-win32] pywin32 documentation wiki

2010-02-17 Thread le dahut

Hi,

I've joined a file containing :
* mytestservice_handlerex.py
and :
* mytestservice_isenslogon.py
* isenslogon.py

You can install them with command line (python.exe must be in your %PATH%) :
 'mytestservice_isenslogon.py --interactive --startup=auto install'
or
 'mytestservice_handlerex.py --interactive --startup=auto install'

Be aware that those 2 methods are asynchronous. This means that user may 
have its desktop (taskbar, etc.) ready while the service doesn't have 
finish its logon() method.


For example, I use it to tune user environment (hide drives, disable 
control panel, etc.). After that explorer.exe must be killed and 
restarted for changes to take effect.


A better way could be to modify userinit reg key to make it call an app 
that waits for the service to achieve its work and only then execute 
userinit.exe :

HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\UserInit



Tim, maybe you want to copy/paste those files and comments on your website ?

Ron, I hope this will help you.



Cheers,
Klaas



le dahut wrote :


Hello,

I've made some development around Windows services and logon events 
detection (using SCM and using SENS). I've spend a lot of time 
discovering how things work and trying to write them (with great help 
from people on this list !)


I think that people may be interested by some examples and I would like 
to know : is there a place where I can write them ?




___
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32


[python-win32] Python Automation Question

2010-02-17 Thread Roberts, Gregory (Contractor)
All,

I hope this is the proper method of searching for help.  Please excuse
my etiquette if not correct.  I maintain python automation scripts which
are currently under development for generating ~15 excel reports each
day and running macros on them, emailing, archiving, etc.

The automation runs on a VM and is working smoothly except for with one
report.  It requires that the default printer on the VM is set to print
to PDF and I am unsure of how to go about this.  I have inherited the
code after essentially writing the requirements and am excited to begin
coding in Python.  I would prefer not to have to contact the initial
developer if at all possible and use this as a learning experience since
again, I am maintaining the automation scripts.

Any assistance would be extremely valuable.

Cheers!
-Greg
___
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32


Re: [python-win32] Python Automation Question

2010-02-17 Thread Tim Roberts
Roberts, Gregory (Contractor) wrote:
>  
> The automation runs on a VM and is working smoothly except for with
> one report.  It requires that the default printer on the VM is set to
> print to PDF and I am unsure of how to go about this.  I have
> inherited the code after essentially writing the requirements and am
> excited to begin coding in Python.  I would prefer not to have to
> contact the initial developer if at all possible and use this as a
> learning experience since again, I am maintaining the automation scripts.

Well, at the risk of being flippant, it seems to me that the right thing
to do is to change the default printer to print to PDF.  By hand.

Assuming you have Acrobat installed, go into Settings, Printers and
Faxes, right-click on Adobe PDF and select "Set as Default Printer".

It would be very unfriendly for you to have your script change the
default printer.  Users do not expect that.

-- 
Tim Roberts, t...@probo.com
Providenza & Boekelheide, Inc.

___
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32


Re: [python-win32] Python Automation Question

2010-02-17 Thread Steven James
PDFCreator has a COM API...might be able to solve your problem a different
way.

If user-friendliness does not matter, try this knowledge base article:
http://support.microsoft.com/kb/156212

It describes how to change the
default printer (per user) through a registry setting.

SJ

On Wed, Feb 17, 2010 at 5:43 PM, Tim Roberts  wrote:

> Roberts, Gregory (Contractor) wrote:
> >
> > The automation runs on a VM and is working smoothly except for with
> > one report.  It requires that the default printer on the VM is set to
> > print to PDF and I am unsure of how to go about this.  I have
> > inherited the code after essentially writing the requirements and am
> > excited to begin coding in Python.  I would prefer not to have to
> > contact the initial developer if at all possible and use this as a
> > learning experience since again, I am maintaining the automation scripts.
>
> Well, at the risk of being flippant, it seems to me that the right thing
> to do is to change the default printer to print to PDF.  By hand.
>
> Assuming you have Acrobat installed, go into Settings, Printers and
> Faxes, right-click on Adobe PDF and select "Set as Default Printer".
>
> It would be very unfriendly for you to have your script change the
> default printer.  Users do not expect that.
>
> --
> Tim Roberts, t...@probo.com
> Providenza & Boekelheide, Inc.
>
> ___
> python-win32 mailing list
> python-win32@python.org
> http://mail.python.org/mailman/listinfo/python-win32
>
___
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32