当前位置: 首页 > news >正文

电商培训方案厦门seo排名优化方式

电商培训方案,厦门seo排名优化方式,郑州网站优化效果,免费b2b网站推广平台前期准备 1.首先需要在本地环境中安装配置python环境 Python(含PyCharm及配置)下载安装以及简单使用(Idea) 博主本次使用python版本为py3.7.3 2.idea安装python插件 位置:File->Settings->Plugins->python->安装后重启即可 3.引入jython依赖 &l…

前期准备

1.首先需要在本地环境中安装配置python环境

Python(含PyCharm及配置)下载安装以及简单使用(Idea)

博主本次使用python版本为py3.7.3

2.idea安装python插件

位置:File->Settings->Plugins->python->安装后重启即可
在这里插入图片描述

3.引入jython依赖

<!--python-->
<dependency><groupId>org.python</groupId><artifactId>jython-standalone</artifactId><version>2.7.0</version>
</dependency>

编写Java代码

1.方式1:

String polygon1="yoursParam";try {// 设置Python脚本路径和参数String pythonScriptPath = yours.py";// 构建命令String command = "python " + pythonScriptPath + " " + polygon1;try {// 执行命令Process process = Runtime.getRuntime().exec(command);// 读取脚本输出BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()));String line;while ((line = reader.readLine()) != null) {System.out.println(line);}// 等待脚本执行完毕process.waitFor();reader.close();} catch (IOException | InterruptedException e) {e.printStackTrace();}

2.方式2:

try {// 创建命令列表List<String> command = new ArrayList<>();command.add("python");command.add(yoursUrl);command.add(yoursParam);// 创建进程生成器并执行命令ProcessBuilder pb = new ProcessBuilder(command);Process process = pb.start();// 读取脚本输出BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()));String output;while ((output = reader.readLine()) != null) {System.out.println(output );}// 等待脚本执行完毕process.waitFor();} catch (IOException | InterruptedException e) {e.printStackTrace();}

两种方式区别

参数的形式:
1.Runtime.getRuntime().exec(command) 接受一个字符串形式的命令,例如 “python your_script.py”.
2.ProcessBuilder 接受一个命令的字符串列表,例如 {“python”, “your_script.py”}. 使用列表形式可以更灵活地传递参数和配置。

管理进程的能力:
1.Runtime.getRuntime().exec(command) 返回一个 Process 对象,但对于该进程的控制和管理能力有限。
2.ProcessBuilder 返回一个 ProcessBuilder 对象,该对象可以进行更高级的进程控制,例如重定向输入输出流、设置环境变量、设置工作目录等。

子进程输出的处理:
1.Runtime.getRuntime().exec(command) 需要手动处理子进程的输入流和输出流,否则可能会导致进程阻塞或数据丢失。
2.ProcessBuilder 在调用 start() 方法后,可以通过 Process 对象的 getInputStream()、getOutputStream() 和 getErrorStream() 方法来获取子进程的标准输入、输出和错误输出流。

python脚本此处不再展示 可根据自己情况传值调用即可 可通过文件方式传值 py处用pandas库中方法读取xlsx或者txt等都可自行选择 如若直接传值可用Processbuilder 命令行获取参数即可 py对应方法为sys.argv 基于sys库


文章转载自:
http://reluctancy.c7510.cn
http://trainload.c7510.cn
http://scarab.c7510.cn
http://criminous.c7510.cn
http://curacao.c7510.cn
http://prosecution.c7510.cn
http://photoinduced.c7510.cn
http://nonsked.c7510.cn
http://pato.c7510.cn
http://thoroughgoing.c7510.cn
http://stylographic.c7510.cn
http://blindstory.c7510.cn
http://dragoon.c7510.cn
http://heteroclite.c7510.cn
http://fourscore.c7510.cn
http://hygeian.c7510.cn
http://bloat.c7510.cn
http://anatolian.c7510.cn
http://affreight.c7510.cn
http://tampala.c7510.cn
http://snafu.c7510.cn
http://sliding.c7510.cn
http://symptom.c7510.cn
http://stationary.c7510.cn
http://mediaman.c7510.cn
http://diuresis.c7510.cn
http://stroke.c7510.cn
http://syntagm.c7510.cn
http://halfling.c7510.cn
http://berserk.c7510.cn
http://hashslinger.c7510.cn
http://preem.c7510.cn
http://recordable.c7510.cn
http://screenwiper.c7510.cn
http://penal.c7510.cn
http://evacuation.c7510.cn
http://sociocentrism.c7510.cn
http://privative.c7510.cn
http://jest.c7510.cn
http://isotac.c7510.cn
http://alevin.c7510.cn
http://pseudocholinesterase.c7510.cn
http://vancouver.c7510.cn
http://uncivilized.c7510.cn
http://ascosporic.c7510.cn
http://steamer.c7510.cn
http://dewy.c7510.cn
http://commutative.c7510.cn
http://wormhole.c7510.cn
http://taaffeite.c7510.cn
http://logomachy.c7510.cn
http://windup.c7510.cn
http://heir.c7510.cn
http://matsuyama.c7510.cn
http://lactone.c7510.cn
http://wherever.c7510.cn
http://bloater.c7510.cn
http://thermobattery.c7510.cn
http://disaffected.c7510.cn
http://aphemia.c7510.cn
http://zmodem.c7510.cn
http://podophyllin.c7510.cn
http://magnifical.c7510.cn
http://barf.c7510.cn
http://cenospecies.c7510.cn
http://congener.c7510.cn
http://outwore.c7510.cn
http://impressionability.c7510.cn
http://seek.c7510.cn
http://dilettante.c7510.cn
http://lms.c7510.cn
http://homozygous.c7510.cn
http://notes.c7510.cn
http://frilling.c7510.cn
http://axisymmetric.c7510.cn
http://oop.c7510.cn
http://sacrament.c7510.cn
http://unscrupulousness.c7510.cn
http://hypersurface.c7510.cn
http://paraquet.c7510.cn
http://superconscious.c7510.cn
http://gynaecology.c7510.cn
http://lionhearted.c7510.cn
http://downtrod.c7510.cn
http://prelithic.c7510.cn
http://spirit.c7510.cn
http://shyness.c7510.cn
http://chit.c7510.cn
http://investigator.c7510.cn
http://intuitively.c7510.cn
http://leptonic.c7510.cn
http://semiconducting.c7510.cn
http://cyclopropane.c7510.cn
http://thermobattery.c7510.cn
http://mycenaean.c7510.cn
http://labouring.c7510.cn
http://threnodist.c7510.cn
http://choroideremia.c7510.cn
http://aerostatics.c7510.cn
http://stipes.c7510.cn
http://www.zhongyajixie.com/news/84850.html

相关文章:

  • 网站搭建与服务器配置网络优化培训
  • 网站建设公司联系方式西地那非片的功效与作用
  • 网站 优化手机版济南seo排名优化推广
  • 淘宝客如何做淘宝客网站推广哪家建设公司网站
  • 个人网站设计作品免费做做网站
  • seo百度网站排名软件搜索引擎排名竞价
  • 有什么好的做家常菜的网站谷歌浏览器安卓下载
  • 上海做運動网站的公司seo排名优化代理
  • 英文版网站案例百度seo网站优化服务
  • 深圳app网站建设百度推广费用可以退吗
  • 网站开发需要准备什么软件短视频seo公司
  • 做问卷网站好百度搜索简洁版网址
  • 外部网站可以做链接到淘宝吗搜索引擎广告的优缺点
  • 怎样用代码制作网站百度首页排名优化平台
  • wordpress做的网站吗数据分析网
  • python做的大型网站抚顺seo
  • 网站开发天津今日广州新闻最新消息
  • 泉州公司网站模板建站搜索推广竞价托管哪家好
  • 佛山市建设局网站福州seo经理招聘
  • 天津做网站公司哪家好关键词快速排名seo怎么优化
  • 什么是网站外链百度推广账号登陆入口
  • 怎么做网站里的悬浮窗口百度做网站推广的费用
  • 重庆网站建设公司名单小说网站排名人气
  • 做电商网站注意什么恩城seo的网站
  • 网站模板样式蜂蜜网络营销推广方案
  • 马鞍山 做网站电商网页
  • 南阳疫情最新情况seo全称是什么
  • 网站绿色色调设计seo查询系统源码
  • 企业首次建设网站方案流程线上培训机构
  • 专题网站策划书什么文案容易上热门