社区所有版块导航
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
反馈   公告   社区推广  
产品
短视频  
印度
印度  
私信  •  关注

thedz

thedz 最近创建的主题
thedz 最近回复了
14 年前
回复了 thedz 创建的主题 » 如何在PyCharm中按顺序运行代码?

你不应该这样做。相反,要做到:

测试1。py:

 def print_test():
      print "I am a test"
      print "see! I do nothing productive."

服务py

#near the top
from test1 import print_test
#lots of stuff here
print_test()