Path separator char in Python

0 votes
Is there any other way to obtain the platform's path separator char than os.path.normcase('/') in Python 2.4?
I am looking for something like a os.path.separator constant.
Jan 4, 2019 in Python by ana1504.k
• 7,890 points
1,161 views

1 answer to this question.

0 votes
There is an alternative way. you can use os.sep
answered Jan 4, 2019 by SDeb
• 13,250 points

Related Questions In Python

0 votes
1 answer

How to add to the python path in Windows?

You know what has worked for me ...READ MORE

answered Jul 25, 2018 in Python by Frankie
• 9,810 points
242 views
0 votes
1 answer

Shortest path from source to and from a negative cycle using Bellman Ford in Python

class NegativeWeightFinder: def __init__(self, graph: nx.Graph): ...READ MORE

answered Nov 13, 2018 in Python by Nymeria
• 3,520 points
452 views
0 votes
1 answer

How to get absolute path in python?

Instead of using os.path.dirname method which returns the relative ...READ MORE

answered Feb 3, 2019 in Python by Omkar
• 69,030 points
4,035 views
0 votes
1 answer

How to get path with filename in python?

There is no direct way to get ...READ MORE

answered Feb 3, 2019 in Python by Omkar
• 69,030 points
647 views
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 6, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 1,467 views
0 votes
0 answers
0 votes
1 answer

Get path from open file in Python

The key here is the name attribute ...READ MORE

answered Jan 16, 2019 in Python by SDeb
• 13,250 points
247 views
0 votes
1 answer

Indentation of Python in Notepad++

To indent the block, select the entire ...READ MORE

answered Sep 18, 2018 in Python by SDeb
• 13,250 points
884 views