|
|
|
|
|
by taylorfausak
4586 days ago
|
|
Wow, I haven't heard of pathlib [1] before now, but it looks awesome! In particular, using the slash operator to join paths is brilliant. >>> p = PurePath('/etc')
>>> p / 'init.d' / 'apache2'
PurePosixPath('/etc/init.d/apache2')
[1]: http://docs.python.org/3.4/library/pathlib.html |
|
Slash for Scala is not used by default though for path joining, but it can be by adding an implicit function:
Shell friendly syntax can be used for stdin/stdout in Scala as well (already in the stdlib with no implicits required):#< Redirect STDIN
#> Redirect STDOUT
#>> Append to STDOUT
#&& Create an AND list
#!! Create an OR list
http://stackoverflow.com/questions/12772605/scala-shell-comm...
http://alvinalexander.com/scala/scala-execute-exec-external-...