Python Forum
How to transfer a music file, from "Telechargements" into my project - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: How to transfer a music file, from "Telechargements" into my project (/thread-4679.html)



How to transfer a music file, from "Telechargements" into my project - sylas - Sep-02-2017

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


RE: How to transfer a music file, from "Telechargements" into my project - sparkz_alot - Sep-02-2017

(Sep-02-2017, 01:15 PM)sylas Wrote: What shall I do ?

Thou shalt post thy code that thee has so far.


RE: How to transfer a music file, from - sylas - Sep-02-2017

Not correct image.


RE: How to transfer a music file, from "Telechargements" into my project - Larz60+ - Sep-02-2017

That's not code!


RE: How to transfer a music file, from "Telechargements" into my project - DeaD_EyE - Sep-02-2017

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.


RE: How to transfer a music file, from "Telechargements" into my project - sylas - Sep-02-2017

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.


RE: How to transfer a music file, from "Telechargements" into my project - Larz60+ - Sep-02-2017

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()