在python3.5.2中无法使用“import turtle”

时间:2017-04-20 08:33:34

标签: python turtle-graphics

我得到的错误是: curl -i -u guest:guest -H "content-type:application/json" -X POST http://127.0.0.1:15672/api/queues/%2f/my_queue/get -d'{"count":5,"requeue":true,"encoding":"auto","truncate":50000}'

我尝试过使用: No module named '_tkinter'

乌龟在python2.7.1

中工作

1 个答案:

答案 0 :(得分:0)

你可能只为python 2.7安装了乌龟。

function onEdit(event) {

  var row = event.range.getRow();     //we get the current row of the range so we do not have to worry about it later
  var col = event.range.getColumn();  //we get the current column of the range so we do not have to worry about it later

//  In this section we simply check if the edited column was column A. If not we do not care for the rest of the code and stop the script with a return
  if (col !== 1) {
    return 1;
  }
//  ------------------------------------------------------------------------------------------------------------------------------------------------------

  var rule
  var targetRange
  var sp = SpreadsheetApp.getActiveSheet()

  if (sp.getIndex() !== 1) {
    return 1
  }

  if (event.value == 'Bend') {
    targetRange = sp.getRange(row, 2)
    setRule(targetRange, 'bend_dyes')

    targetRange = sp.getRange(row, 3)
    setRule(targetRange, 'type_of_bend')

    targetRange = sp.getRange(row, 4)
    setRule(targetRange, 'bend_size')
  }
  else {
    targetRange = sp.getRange(row, 2, 1, 3) //we want to clear all data validation if it was set to something else
    targetRange.clearDataValidations()
  }

}

function setRule(targetRange, ruleName){
  var ruleRange = SpreadsheetApp.getActiveSpreadsheet().getRangeByName(ruleName)
  var rule = SpreadsheetApp.newDataValidation().requireValueInRange(ruleRange, true)
  targetRange.setDataValidation(rule)

}

(以及您可能需要的其他人)