腾讯云
开发者社区
文档
建议反馈
控制台
首页
学习
活动
专区
工具
TVP
最新优惠活动
文章/答案/技术大牛
搜索
搜索
关闭
发布
登录/注册
精选内容/技术社群/优惠产品,
尽在小程序
立即前往
文章
问答
(8520)
视频
沙龙
1
回答
stdout
stdin
节
点到
python
python
、
node.js
、
stdout
、
stdin
我正在尝试学习如何使用
stdin
和
stdout
在node和
Python
之间来回传递数据。 这是一个超级裸体,节点app.js调用
Python
文件test.py。"]); mystr = data.toString(); "Data": data print(json.d
浏览 21
提问于2021-10-28
得票数 0
回答已采纳
1
回答
我能很容易地将列表从Node传递到
python
吗?
python
、
node.js
、
command-line-interface
、
sys
我知道,通过CLI将更复杂的数据结构(如列表列表)传递给
python
脚本存在一些问题。const spawn = require("child_process").spawn; oc = sys.argv[1]
浏览 0
提问于2019-01-28
得票数 0
回答已采纳
1
回答
关于编码、unicode和
stdout
的几个基本问题
python
、
python-2.7
、
unicode
、
encoding
、
utf-8
说我这么做:'\xc3\xa9'u'\xe9'é
浏览 4
提问于2014-03-19
得票数 0
回答已采纳
2
回答
如何让
python
脚本区分输出是管道还是进程替换
python
、
python-3.x
、
linux
、
tty
尝试区分
stdout
是管道还是进程替换。#!/usr/bin/
python
3.6 print("
stdin
is TTY") print("
stdin
is not TTY") print("> my_
python
_script.py |
浏览 25
提问于2021-03-14
得票数 1
回答已采纳
1
回答
shell=True
python
、
shell
、
subprocess
我试图通过移植
Python
脚本来做正确的事情,该脚本通过通过使用shell=True来避免Popen的安全风险'],
stdin
=PIPE,
stdout
=destination) p2 = Popen(['sort'],
stdin
=PIPE,
stdout
=p3.
stdin
)p1 = Popen(['awk', '
浏览 4
提问于2014-09-11
得票数 2
回答已采纳
1
回答
帕拉米科启动了一个SSH进程,它dies..why?
python
、
ssh
、
paramiko
('nohup
python
/home/ubuntu/Optimization/pvServer2.py &')
stdin
,
stdout
, stderr =
浏览 0
提问于2011-09-28
得票数 2
1
回答
Python
控制Tcl shell
python
、
shell
、
unix
、
tcl
在
Python
中,有没有一种方法可以启动Tcl shell或unix shell并控制它来执行操作?我知道子进程TkInter可以用来执行外壳/Tcl脚本并获得输出。具体地说,这将是Tcl shell/工具上的一个包装器,它将控制其
stdin
/out。我尝试过建立客户端-服务器连接,但是为了让
python
控制tcl shell,需要手动建立连接。
浏览 25
提问于2021-10-18
得票数 0
1
回答
如何使用子进程获得返回值?
python
、
python-2.7
、
subprocess
我正在编写一个
Python
脚本,它使用子进程调用
python
,并处理几个函数,如下面的简化代码。(当然,下面的脚本无法工作。)p.
stdin
.write("1+3\n") print p.
stdout
浏览 3
提问于2016-05-10
得票数 0
回答已采纳
1
回答
实时读取Runtime.getRuntime().exec()
java
、
android
例如: 如果getevent返回1
浏览 2
提问于2013-03-09
得票数 2
3
回答
在以下情况下运行时,
Python
脚本的Nohup脚本无法工作&
python
、
linux
、
nohup
下面是一个简单的
python
脚本,我想在linux上使用nohup运行它。我使用以下(在linux上)运行它:该命令似乎什么也不做,没有任何附加到nohup.out。
浏览 5
提问于2015-08-25
得票数 11
回答已采纳
1
回答
为什么
Python
3.3中的打印速度这么慢,我该如何修复呢?
python
、
performance
、
unicode
、
python-3.3
我只是尝试用
Python
3.3运行这个脚本。不幸的是,它的速度大约是
Python
2.7的两倍。 for line in
stdin
: pass main()$ time zcat acce
浏览 4
提问于2013-12-14
得票数 14
回答已采纳
1
回答
Python
子进程(“cmd”)生成另一个交互式shell
python
、
windows
、
subprocess
stdin
=subprocess.PIPE)p.
stdout
.readline()p.
stdout
.readline()p.
stdout
.readline()print>>p.
stdin
, "
py
浏览 2
提问于2013-01-19
得票数 0
回答已采纳
2
回答
stdin
似乎比
stdout
(
python
)慢得多。为什么?
python
、
io
、
stdio
我有两个需要相互通信的
python
程序(一个是子进程)。目前,我正在通过
stdin
和
stdout
来做这件事。然而,写入子进程的
stdin
似乎慢得令人痛苦。
stdin
.readline()
stdout
.flush()
stdout</e
浏览 0
提问于2011-03-22
得票数 10
2
回答
使用
python
编写2个
python
脚本
python
、
pipe
我有3个
python
文件:一个用于接受字符串,一个用于反转字符串,另一个用于管道。我是这个概念的新手,所以请帮助我如何实现这一点。= raw_input()2.py for line in sys.
stdin
:pipe.py os.system('
python
1.p
浏览 5
提问于2015-07-20
得票数 3
回答已采纳
1
回答
在非交互式shell会话中运行多个命令并解析输出。
bash
、
shell
、
ssh
、
non-interactive
我想通过它的
stdin
/
stdout
与一个(远程)非交互式shell进行通信,以运行多个命令并读取输出。问题是,如果我在shell
stdin
上填充多个命令,则无法检测单个命令的输出之间的边界。在类似
Python
的伪代码中:sh.
stdin</e
浏览 0
提问于2016-03-07
得票数 1
2
回答
Subprocess命令显示FileNotFoundError:[Errno 2]没有这样的文件或目录
python
、
shell
、
subprocess
我试图在下面的代码中使用subprocess模块来使用
python
运行shell命令,但我不知道为什么我的脚本会像下面这样抛出一个错误。谁能帮我一下我错过的东西吗?=p1.
stdout
,
stdout
=subprocess.PIPE) File "/Library/Developer/CommandLineTools/Library/Frameworks/
Python
3.framework/Versions/3.8/li
浏览 8
提问于2021-11-29
得票数 3
回答已采纳
1
回答
使用popen与
python
交互shell进行交互
python-3.x
我尝试在
python
交互式shell中执行命令,并通过popen打印输出。
stdout
=subprocess.PIPE, process.
stdin
.flush() process.
浏览 0
提问于2020-05-09
得票数 0
1
回答
从一个
python
脚本运行另一个
python
脚本时如何输出到命令行
python-2.7
我有多个
python
脚本,每个脚本都有print语句和输入提示。我从一个单独的
python
脚本运行这些脚本,如下所示。os.system('
python
script1.py ' + sys.argv[1]) os.system('
python
script2.py ' + sys.argv[1]).....
浏览 4
提问于2018-03-17
得票数 1
1
回答
使用
python
的子流程模块打开
python
进程
python
、
subprocess
、
stdout
、
stdin
、
stderr
我试图在
python
脚本中与不同的
python
解释器进行通信。我编写了一个对象,它应该存储子进程并读写它的
stdin
、
stdout
、stderr。= subprocess.Popen("
python
",
stdin
=subprocess.PIPE,
stdout
=subprocess.PIPE, stderr=subprocess.PIPE)(bytes((line + "\n").encode("ascii"
浏览 4
提问于2015-07-17
得票数 2
回答已采纳
2
回答
Python
3 - ascii/utf-8/iso-8859-1不能解码字节0xe5 (瑞典字符)
python
、
unicode
、
character-encoding
、
stdout
、
python-3.3
输入(\xe5) å的问题import syssys.
stdin
= io.TextIOWrapper(sys.
stdin
.detachcodec can't decode byte 0xe5 in position 0: unexpected end of dataimport sys, codecs sys.
stdout<
浏览 4
提问于2013-08-15
得票数 1
回答已采纳
点击加载更多
扫码
添加站长 进交流群
领取专属
10元无门槛券
手把手带您无忧上云
相关
资讯
Python的paramiko实践(一)
程序媛笔记分享——python模块之subprocess模块
Python-调用系统命令的方法,快速完成任务
Python 模块 subprocess 派生新进程
Python_cmd的各种实现方法及优劣
热门
标签
更多标签
活动推荐
运营活动
广告
关闭
领券