博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
idea提醒不区分大小写_跨平台区分大小写差异的提醒
阅读量:2520 次
发布时间:2019-05-11

本文共 1628 字,大约阅读时间需要 5 分钟。

idea提醒不区分大小写

This is just a very brief reminder about something you might run into when you’re trying to get your code to work on multiple platforms – in this case, OS X, Linux and Windows.

这只是一个简短的提醒,提醒您在尝试使代码在多个平台(例如OS X,Linux和Windows)上运行时可能遇到的问题。

Basically: file names/paths are case-sensitive on Linux, but not on OS X or Windows.

基本上:文件名/路径在Linux上区分大小写,但在OS X或Windows上不区分大小写。

Therefore, you could have some Python code like this:

因此,您可能会有类似以下的Python代码:

f = open(os.path.join(base_path, 'LE72020252003106EDC00_B1.tif'))f = open(os.path.join(base_path, 'LE72020252003106EDC00_B1.tif'))

which you might use to open part of a Landsat 7 image – and it would work absolutely fine on OS X and Windows, but fail on Linux. I initially assumed that the failure on Linux was due to some of the crazy path manipulation stuff that I had done to get base_path – but it wasn’t.

您可以使用它来打开Landsat 7映像的一部分–它在OS X和Windows上绝对可以正常运行,但在Linux上则无法运行。 我最初以为Linux上的失败是由于我为获取base_path所做的一些疯狂的路径操纵而base_path ,但事实并非如此。

It was purely down to the fact that the file was actually called LE72020252003106EDC00_B1.TIF, and Linux treats LE72020252003106EDC00_B1.tif and LE72020252003106EDC00_B1.TIF as different files.

纯粹是因为该文件实际上称为LE72020252003106EDC00_B1.TIF ,而Linux将LE72020252003106EDC00_B1.tifLE72020252003106EDC00_B1.TIF视为不同的文件。

I’d always known that paths on Windows are not case-sensitive, and that they are case-sensitive on Linux – but I’d naively assumed that OS X paths were case-sensitive too, as OS X is based on a *nix backend, but I was wrong.

我一直都知道Windows上的路径不区分大小写,而在Linux上则区分大小写-但我天真地认为OS X路径也区分大小写,因为OS X基于* nix后端,但我错了。

翻译自:

idea提醒不区分大小写

转载地址:http://zwhwd.baihongyu.com/

你可能感兴趣的文章
《程序是怎样跑起来的》第四章读后感
查看>>
遍历datatable的几种方法(C# )
查看>>
Oracle记录(三) Scott用户的表结构
查看>>
centos静默式安装Oracle11g
查看>>
软件评测师下午题笔记
查看>>
性能测试的概念
查看>>
JavaScript中的函数上下文和apply,call
查看>>
中文排序
查看>>
少数股东损益
查看>>
SecureCRT的安装
查看>>
POJ2635-The Embarrassed Cryptographer
查看>>
css中font-family的中文字体
查看>>
学习笔记:CentOS 7学习之十二:查找命令
查看>>
delphi回调函数
查看>>
收到了TUSC寄来的V$ View For Oracle Database 11g
查看>>
gc buffer busy/gcs log flush sync与log file sync
查看>>
Java String.intern的深入研究
查看>>
动态上下线集群详解
查看>>
帝国cms修改栏目后文章列表的url错误怎么解决
查看>>
Linux下查看用户列表
查看>>