English 中文(简体)
次级处理
原标题:subprocess.call not acting as intended

我正试图通过以下法典多次执行一个有 p子的外部方案。

3 javarun= java -classpath /home/jrm6u/code/weka_dir/weka.jar 
4 java1= java 
5 java2= -classpath 
6 java3= /home/jrm6u/code/weka_dir/weka.jar 
7 weka_args= weka.clusterers.DBScan 
8 db_type= weka.clusterers.forOPTICSAndDBScan.Databases.SequentialDatabase 
9 db_dist= weka.clusterers.forOPTICSAndDBScan.DataObjects.EuclidianDataObject 

............

28   traindir =  ./arff_dir/ 
29   trainfile =  of3_O_0_0.arff 
30   trainer = traindir + trainfile

............

45       subprocess.call([java1, java2, java3, weka_args,  -E , str(eps),  -M , str(min),  -I , db_type,  -D , db_dist,  -t , trainer], shell=True)

ep和min分别载于<代码>0.125和10

在执行我的《on法》时,我有以下错误:

Usage: java [-options] class [args............]
       (to execute a class)
or  java [-options] -jar jarfile [args............]
       (to execute a jar file)
where options include:
-d32          use a 32-bit data model if available
-d64          use a 64-bit data model if available
-server       to select the "server" VM
              The default VM is server.

之后加上进一步产出。 这是完全相同的产出,即从简单输入<编码>java到粉末。 这使我相信,在某种程度上,分进程。 电话不读任何一种论点。 情况如何? 如何正确评价这一指挥?

指出这一指令可以人工输入,但使用这一文字的动机是通过<代码>min和eps。 以及培训档案,以便可以自动执行。

问题回答

我并不认为它忽视了参数,而是试图避免壳牌参数,除非有必要,有时它有过错的行为(共同的平线关系,而不是on)。

我不知道 Java,但是,如果说你给它错误的参数,那么产出错误就没有告诉我们(除了找到<代码>java,而且它不会忘记正确的参数外,这并不意味着它不会忘记任何。

想对你转往下级的独裁者进行欺骗。 电话(即使有简单的印刷或<代码>进口的pdb,并打电话到pdb.set_trace(),以便在原线上找到一个小差错”,并检查与这些参数的指挥是否按预期运作。

我知道,这不是一个适当的答案,但对一条评论线来说,这太长了。





相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签