Recent Changes - Search:

Oktatás

* Programozás 1
  + feladatsor
  + GitHub oldal

* Szkriptnyelvek
  + feladatsor
  + quick link

Teaching

Programming 1 (BI)
  ▸ exercises
  ▸ quick link

teaching assets


Félévek

* 2025/26/2
* archívum


Linkek

* kalendárium
* tételsorok
* jegyzetek
* szakdolgozat / PhD
* ösztöndíjak
* certificates
* C lang.
* C#
* D lang.
* Java
* Nim
* Nim2
  + exercises
* XC=BASIC
* old
  ✦C++, ✦Clojure, ✦Scala


[ edit | logout ]
[ sandbox | passwd ]

HOME directory

HOME dir.
from pathlib import Path

HOME = Path.home()

print(HOME)        # /home/jabba

print(type(HOME))  # <class 'pathlib.PosixPath'>

print(str(HOME))   # /home/jabba ; as a string
import std/strutils
import std/os

func rstrip*(s: string, chars: string): string =
  var bs: set[char] = {}
  for c in chars:
    bs = bs + {c}
  s.strip(leading=false, trailing=true, chars=bs)

let HOME = getHomeDir()

echo HOME  # /home/jabba/  ; notice the trailing '/'

echo HOME.rstrip("/")  # /home/jabba

So do this:

let HOME = getHomeDir().rstrip("/")
Cloud City

  

Blogjaim, hobbi projektjeim

* The Ubuntu Incident
* Python Adventures
* @GitHub
* heroku
* extra
* haladó Python
* YouTube listák


Debrecen | la France


[ edit ]

Edit - History - Print *** Report - Recent Changes - Search
Page last modified on 2026 May 17, 18:43