#1
  1. I <3 ASCII
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Aug 2003
    Posts
    2,399
    Rep Power
    1232

    Modem Dialing: win32ras.Dial


    I need help getting my modem to dial with python, (as I cannot user the internet without it )

    Seriously though I'm using the win32ras.Dial function and as I understand it it needs no initialization.

    Here's the applicable code snipit

    Code:
    import win32ras
    fs, ret = win32ras.Dial(None, None, ('', '9,,832-XXXX', '', 'accountName', 'password', ''), None)
    as I understand it it should connect to (9 to dial out ,, to pause) then 832XXXX, using the default windows modem, but it is not dialing.

    Any thoughts?
  2. #2
  3. I <3 ASCII
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Aug 2003
    Posts
    2,399
    Rep Power
    1232
    For those who might be interrested:

    The 'win32ras.Dial'

    function requires a dial up connection name to be provided to the function. This sets up which device / com etc to be used and all of that good stuff. The phone number and username / password can all be overrided, but it needs the initial path to the device.

    Therefore the code would need to look like the following
    Code:
    win32ras.Dial(None, None, ('DialUpConnectionName', '9,,832-XXXX', '', 'accountName', 'password', ''), None)
    -MBirchmeier

IMN logo majestic logo threadwatch logo seochat tools logo