python - What does "~" mean in gdal? -
i'm new in programming , try use gdal library python. execute gdalinfo command, don't know "~" mean in "gdalinfo somedir/somefile.tif" example. explain me?
i assume looking @ obtain latitude , longitude geotiff file, line is:
dalinfo ~/somedir/somefile.tif
here ~
unix style shell expansion , shortcut current user's home directory. nearest equivalent on windows environment variable %homedir%
.
on unix style systems represented environment variable value $home
.
the user's home directory current directory ("folder", if must) used when first logon. on unix systems holds files containing user preferences , start-up files, using filenames beginning dot, example .profile
. won't see using ls
, need ls -a
. home directory on windows used, many end-users not aware of it, although software products (particularly portable ones) use it.
the ~
means different in programming language, , cannot used part of filename without invoking shell.
in python, home directory need read environment variable, example os.environ['home']
.
Comments
Post a Comment