Python Forum

Full Version: How to transfer a music file, from "Telechargements" into my project
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
my question here: Hi all! In my project, every time I load a music or an image it drops in my directory "Telechargements". But I should like it drops in my project. What shall I do ? Thanks
(Sep-02-2017, 01:15 PM)sylas Wrote: [ -> ]What shall I do ?

Thou shalt post thy code that thee has so far.
Not correct image.
That's not code!
The picture is not complete.
Please post code as text and not encoded in base64 as picture where more of the half data is missing because the message is too long.
I am on a project(game) with about 40 files. As I load a music, I save in the "uploads", but there, it is of no use for me. I must do something to transfer it in my project. Can you help me ? The screenshot was tried in order to show you my project. Within C++ , I knew how to . With our python forum I don't. Thanks for your reply.
Quote:save in the "uploads",
Since you have some sort of save routine, does it allow you to save to a file on your local computer?
If so, save it as a binary file. You can then read it into your program with something like:
with open('My_file_name_here', 'rb'), as f:
    my_picture = f.read()