从Node.js杀死脚本

时间:2019-04-06 17:04:45

标签: node.js python-3.x

我正在使用child_process杀死Raspbian Stretch上的python3脚本,但这不起作用。

>>> class Student:
...     def __init__(self, student_name, student_id, student_phone):
...         self.student_name = student_name
...         self.student_id = student_id
...         self.student_phone = student_phone
... 
>>> obj = Student("ELizaa",1253251,16165544)
>>> print("student name",obj.student_name,"\nstudent id",obj.student_id,"\nStudent phone",obj.student_phone)
student name ELizaa 
student id 1253251 
Student phone 16165544
>>> 
>>> obj = Student("ELizaa",1253251,"016165544")                                
>>> print("student name",obj.student_name,"\nstudent id",obj.student_id,"\nStudent phone",obj.student_phone)
student name ELizaa 
student id 1253251 
Student phone 016165544
>>> 

在服务器端,我确实看到了控制台消息(“子进程已被终止”),但是脚本一直运行,我缺少什么?

0 个答案:

没有答案