Найти - Пользователи
Полная версия: Ошибка при работе Wi-Fi модуля
Начало » Python для новичков » Ошибка при работе Wi-Fi модуля
1
kakadyi
Собсно вот:
>>> import wifi
>>> from wifi import Cell, Scheme
>>> Cell.all('wlan0')
Traceback (most recent call last):
File "<pyshell#2>", line 1, in <module>
Cell.all('wlan0')
File "C:\Python34\lib\site-packages\wifi-0.3.4-py3.4.egg\wifi\scan.py", line 29, in all
stderr=subprocess.STDOUT)
File "C:\Python34\lib\subprocess.py", line 607, in check_output
with Popen(*popenargs, stdout=PIPE, **kwargs) as process:
File "C:\Python34\lib\subprocess.py", line 858, in __init__
restore_signals, start_new_session)
File "C:\Python34\lib\subprocess.py", line 1111, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified
Импортировал библиотеку wifi 0.3.4 с питоновского сайта,а работать не хочет…Что за ошибка?“Система не может найти указанный файл”?
pyuser
На PYPI синим по белому написано: Operating System :: POSIX :: Linux
kakadyi
Хорошо,пробую на Ubuntu 14.04
from wifi.scan import Cell
>>> Cell.all('wlan0')
<map object at 0x7f253f82b4a8>
В руководсте написано,что “This returns a lis of Cell objects”.А выдаёт “map object at 0x7f253f82b4a8”.Что это?
den4ik
Discovering networks

You can use this library to scan for networks that are available in the air. To get a list of the different cells in the area, you can do

>>> from wifi import Cell, Scheme
>>> Cell.all('wlan0')

This returns a list of Cell objects. Under the hood, this calls iwlist scan and parses the unfriendly output.

Это и есть твой список. Если есть напряги по map, то сделай list(Cell.all('wlan0'))
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB