FAQ
How does one use wxDirDialog to select and get a computer name from the network?

Or which widget should i use to accomplish this?

Eric

Search Discussions

  • Josiah Carlson at Mar 16, 2004 at 1:26 am

    How does one use wxDirDialog to select and get a computer name from the network?

    Or which widget should i use to accomplish this?
    If you are in Windows, check the Network Neighborhood. If you are on
    any other platform, I don't know.

    I have never tried to select a file on a computer through network
    neighborhood, so don't know if you get what you want (something like
    \\computername\service\path\file ) or not.

    - Josiah
  • Eric at Mar 16, 2004 at 4:03 pm
    Josiah Carlson <jcarlson at nospam.uci.edu> wrote in message news:<c35la1$sdi$2 at news.service.uci.edu>...
    How does one use wxDirDialog to select and get a computer name from the network?

    Or which widget should i use to accomplish this?
    If you are in Windows, check the Network Neighborhood. If you are on
    any other platform, I don't know.

    I have never tried to select a file on a computer through network
    neighborhood, so don't know if you get what you want (something like
    \\computername\service\path\file ) or not.

    - Josiah
    What i meant is that i can select a file over the network but i need
    to select the computer name only e.g. homepc, fileserver, etc over
    the network.

    DO i need to use python win32 API?
    Eric
  • Josiah Carlson at Mar 18, 2004 at 3:03 am

    What i meant is that i can select a file over the network but i need
    to select the computer name only e.g. homepc, fileserver, etc over
    the network.

    DO i need to use python win32 API?
    Checking the wxPython demo, trying to select a computer from the
    "Network Neighborhood" or "My Network Places/Computers Near Me" using
    the wxDirDialog produces the following error:

    Debug: e:\Projects\wx2.4\src\msw\dirdlg.cpp(161): 'SHGetPathFromIDList'
    failed with error 0x00000000 (the operation completed successfully.).

    It doesn't look like you can overtly select computers from a standard
    dialog.

    However, you can:

    import os
    a = os.popen('net view')
    data = a.read()
    a.close()
    computers = [line.split('\\')[2] for line in data.split('\n')]

    And get a list of computer names.

    - Josiah
  • ChrisH at Mar 16, 2004 at 8:01 pm
    I've sent a list of machines on a Windows network to a wxListBox.

    If you like, I can dig up the code.



    In article <b0457a31.0403150637.6dc3ed07 at posting.google.com>,
    ekoome at yahoo.com says...
    How does one use wxDirDialog to select and get a computer name from the network?

    Or which widget should i use to accomplish this?

    Eric

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedMar 15, '04 at 2:37p
activeMar 18, '04 at 3:03a
posts5
users3
websitepython.org

3 users in discussion

Josiah Carlson: 2 posts Eric: 2 posts ChrisH: 1 post

People

Translate

site design / logo © 2022 Grokbase