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 in Python by ana1504.k
• 7,870 points
351 views

1 answer to this question.

0 votes
There is an alternative way. you can use os.sep
answered Jan 4 by SDeb
• 13,180 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
124 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
166 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 in Python by Omkar
• 67,660 points
409 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 in Python by Omkar
• 67,660 points
130 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 in Python by Neha
• 330 points

edited Jul 8 by Kalgi 330 views
0 votes
1 answer

Get path from open file in Python

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

answered Jan 16 in Python by SDeb
• 13,180 points
29 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,180 points
299 views