Sample code for 30+ languages & platforms
Chilkat2-Python

Example: Http.GetUrlPath method

Demonstrates the GetUrlPath method.

Chilkat Chilkat2-Python Downloads

Chilkat2-Python
import chilkat2

success = False

http = chilkat2.Http()
url = "https://example.com/folder/page?lang=en&sort=asc#section2"
print(http.GetUrlPath(url))

# Output:

# /folder/page