社区所有版块导航
Python
python开源   Django   Python   DjangoApp   pycharm  
DATA
docker   Elasticsearch  
aigc
aigc   chatgpt  
WEB开发
linux   MongoDB   Redis   DATABASE   NGINX   其他Web框架   web工具   zookeeper   tornado   NoSql   Bootstrap   js   peewee   Git   bottle   IE   MQ   Jquery  
机器学习
机器学习算法  
Python88.com
反馈   公告   社区推广  
产品
短视频  
印度
印度  
Py学习  »  Python

空闲导入子进程syntaxerror,但不在mac osx终端的python3中

mac • 6 年前 • 1499 次点击  

MacOS 10.11.6上IDLE Python 3.7.1 shell窗口中的以下代码片段导致语法错误。
解决办法是什么?
在终端python 2.7.10或python3中运行的相同代码不会导致错误。

Python 3.7.1 (v3.7.1:260ec2c36a, Oct 20 2018, 03:13:28) 
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license()" for more information.
>>> import subprocess
from time import strftime
import time
SyntaxError: multiple statements found while compiling a single statement
>>>
Python社区是高质量的Python/Django开发社区
本文地址:http://www.python88.com/topic/47357
文章 [ 1 ]  |  最新文章 6 年前