Use it aslike this.
Use os.path.join instead of string manipulation to join paths. It is os independent. Also checking for /
isn't a good idea. You can use os.sep
which again is osOS independent. But it would be a good idea to make sure that filename
does not contain /
by itself.
In the comments you are saying that full path must be given but in the function you are checking for that. Why? Decide what you want the function to do. It does both? Then you can use this:
I skipped a lot of the code because it is quite big.
Hope this helped.
About me being able to see what's going on by the comments. Not really. You missed what the main
function is doing.
Use it as this.
Use os.path.join instead of string manipulation to join paths. It is os independent. Also checking for /
isn't a good idea. You can use os.sep
which again is os independent. But it would be a good idea to make sure that filename
does not contain /
by itself.
In the comments you are saying that full path must be given but in the function you are checking for that. Why? Decide what you want the function to do. It does both? Then you can use this
I skipped a lot of the code because it is quite big.
Hope this helped.
Use it like this.
Use os.path.join instead of string manipulation to join paths. It is os independent. Also checking for /
isn't a good idea. You can use os.sep
which again is OS independent. But it would be a good idea to make sure that filename
does not contain /
by itself.
In the comments you are saying that full path must be given but in the function you are checking for that. Why? Decide what you want the function to do. It does both? Then you can use this:
I skipped a lot of the code because it is quite big.
About me being able to see what's going on by the comments. Not really. You missed what the main
function is doing.
About the strings being messy. Yes, they are. Try to change the things I have mentioned and I'll take a look again. Add your updated code like done in this question this question instead of modifying it.
About the strings being messy. Yes, they are. Try to change the things I have mentioned and I'll take a look again. Add your updated code like done in this question instead of modifying it.
About the strings being messy. Yes, they are. Try to change the things I have mentioned and I'll take a look again. Add your updated code like done in this question instead of modifying it.
About me being able to see what's going on by the comments. Not really. You missed what the `main` function is doing
About the strings being messy. Yes, they are. Try to change the things I have mentioned and I'll take a look again. Add your updated code like done in this question instead of modifying it.
About me being able to see what's going on by the comments. Not really. You missed what the `main` function is doing
About the strings being messy. Yes, they are. Try to change the things I have mentioned and I'll take a look again. Add your updated code like done in this question instead of modifying it.