我不能使用 python 套接字模块它说:
C:\Users\Owner\Desktop\Coding Projects\chatserver>Transcrypt import_test.py -b
Transcrypt (TM) Python to JavaScript Small Sane Subset Transpiler Version 3.6.4
Copyright (C) Geatec Engineering. License: Apache 2.0
Error in program import_test.py, module _socket, line 49:
Attempt to load module: _socket
Can't find any of:
C:/Users/Owner/Desktop/Coding Projects/chatserver/__javascript__/_socket.mod.js
C:/Users/Owner/Desktop/Coding Projects/chatserver/__javascript__/_socket.mod.js
c:/program files (x86)/python36-32/lib/site-packages/transcrypt/modules/__javascript__/_socket.mod.js
c:/program files (x86)/python36-32/lib/site-packages/transcrypt/modules/__javascript__/_socket.mod.js
C:/Program Files (x86)/Python36-32/Scripts/__javascript__/_socket.mod.js
C:/Program Files (x86)/Python36-32/Scripts/__javascript__/_socket.mod.js
c:/program files (x86)/python36-32/python36.zip/__javascript__/_socket.mod.js
c:/program files (x86)/python36-32/python36.zip/__javascript__/_socket.mod.js
c:/program files (x86)/python36-32/DLLs/__javascript__/_socket.mod.js
c:/program files (x86)/python36-32/DLLs/__javascript__/_socket.mod.js
c:/program files (x86)/python36-32/lib/__javascript__/_socket.mod.js
c:/program files (x86)/python36-32/lib/__javascript__/_socket.mod.js
c:/program files (x86)/python36-32/__javascript__/_socket.mod.js
c:/program files (x86)/python36-32/__javascript__/_socket.mod.js
c:/program files (x86)/python36-32/lib/site-packages/__javascript__/_socket.mod.js
c:/program files (x86)/python36-32/lib/site-packages/__javascript__/_socket.mod.js
Aborted
蟒蛇文件:
class Test:
def __init__(self):
print("HI")
try:
import socket
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
except Exception as ex:
print("Error: " + str(ex))