我有以下命令传递给python脚本。
11-06 12:49:45.939 25852-25852/uk.co.nightshadearts.gpscompass V/BackgroundLocationService - MA: in onCreate()
11-06 12:49:45.940 25852-25852/uk.co.nightshadearts.gpscompass V/BackgroundLocationService - MA: starting service
11-06 12:49:45.942 25852-25852/uk.co.nightshadearts.gpscompass V/BackgroundLocationService - MA: binding service
11-06 12:49:45.949 25852-25852/uk.co.nightshadearts.gpscompass V/BackgroundLocationService - BC: in constructor
11-06 12:49:45.973 25852-25852/uk.co.nightshadearts.gpscompass V/BackgroundLocationService - BC: in onStart()
11-06 12:49:46.011 25852-25852/uk.co.nightshadearts.gpscompass V/BackgroundLocationService: in constructor
in onCreate()
11-06 12:49:46.025 25852-25852/uk.co.nightshadearts.gpscompass V/BackgroundLocationService: in onBind()
11-06 12:49:46.111 25852-25852/uk.co.nightshadearts.gpscompass V/BackgroundLocationService - MA: service connected
11-06 12:50:27.048 25852-25852/uk.co.nightshadearts.gpscompass V/BackgroundLocationService - GH: in onLocationChanged()
.... (lots more locations here - below is where it swapped to activity #2)
11-06 12:51:05.044 25852-25852/uk.co.nightshadearts.gpscompass V/BackgroundLocationService - GH: in onLocationChanged()
11-06 12:51:05.650 25852-25852/uk.co.nightshadearts.gpscompass V/BackgroundLocationService - MAP: in onCreate()
binding service
11-06 12:51:06.773 25852-25852/uk.co.nightshadearts.gpscompass V/BackgroundLocationService - MAP: service connected
11-06 12:51:06.776 25852-25852/uk.co.nightshadearts.gpscompass V/BackgroundLocationService - GH: in onLocationChanged()
11-06 12:51:07.040 25852-25852/uk.co.nightshadearts.gpscompass V/BackgroundLocationService - GH: in onLocationChanged()
11-06 12:51:07.411 25852-25852/uk.co.nightshadearts.gpscompass V/BackgroundLocationService - BC: in onStop()
11-06 12:51:08.046 25852-25852/uk.co.nightshadearts.gpscompass V/BackgroundLocationService - GH: in onLocationChanged()
.... (here is where I put the 2nd activity into the background)
11-06 12:51:22.058 25852-25852/uk.co.nightshadearts.gpscompass V/BackgroundLocationService - GH: in onLocationChanged()
11-06 12:51:22.379 25852-25852/uk.co.nightshadearts.gpscompass V/BackgroundLocationService - MAP: in onDestroy() (unbinding service)
11-06 12:51:22.383 25852-25852/uk.co.nightshadearts.gpscompass V/BackgroundLocationService - MAP: in onDestroy (stopping service)
11-06 12:51:23.038 25852-25852/uk.co.nightshadearts.gpscompass V/BackgroundLocationService - GH: in onLocationChanged()
11-06 12:51:24.040 25852-25852/uk.co.nightshadearts.gpscompass V/BackgroundLocationService - GH: in onLocationChanged()
无论我尝试什么,都会造成混乱(操作系统,系统,popen,subprocess.call ...) 我最后的尝试是:
awk '/^>/{n=split($0,a,"_")} /string/{sum+=a[n]} END{print sum}' filein.fasta
这样,我现在没有错误,但是由于它会导致脚本中的错误,因此无法正常工作。 如何在python中正确传递此命令?在这种情况下,引号是一个痛苦的话题