python宽度语法

2024-10-02 06:26:08 发布

您现在位置:Python中文网/ 问答频道 /正文

我用python2.7.2运行Ubuntu。在

脚本

python \
/home/blainer/Desktop/convert/converter.py \
/home/blainer/Desktop/convert/urban.shp \
/home/blainer/Desktop/convert/result.js \
--width 900 \
--country_name_index 4 \
--where "ISO = 'USA'" \
--codes_file /home/blainer/Desktop/convert/codes-en.tsv \
--insets '[{"codes": ["US-AK"], "width": 200, "left": 10, "top": 370}, {"codes": ["US-HI"], "width": 100, "left": 220, "top": 400}]' \
--minimal_area 4000000 \
--buffer_distance -3000 \
--simplify_tolerance 1000 \
--longtitude0 10w \
--name us

错误

^{pr2}$

Tags: namepy脚本converthomeubuntutopwidth
1条回答
网友
1楼 · 发布于 2024-10-02 06:26:08

这不是Python脚本,而是运行Python的shell脚本。在

  1. 把它命名为script.sh,而不是.py。在
  2. 在顶部添加一个“shebang”行:#!/bin/bash
  3. 使其可执行:chmod +x ./script.sh
  4. 运行它:blainer@ubuntu:~/Desktop/convert$ ./script.sh

相关问题 更多 >

    热门问题