About 118,000 results
Open links in new tab
  1. How to create a notepad file in Python? - Stack Overflow

    Dec 5, 2013 · I need to know the code to create a notepad file straight from Python. I have been searching for it but I cant find it. My teacher said that it should create a file automatically. I tried …

  2. How do I create multiline comments in Python? - Stack Overflow

    Apr 9, 2022 · Python does have a multiline string/comment syntax in the sense that unless used as docstrings, multiline strings generate no bytecode -- just like # -prepended comments. In …

  3. python - How do I create a directory, and any missing parent ...

    Apr 24, 2023 · How do I create a directory at a given path, and also create any missing parent directories along that path? For example, the Bash command mkdir -p …

  4. What is the proper way to comment functions in Python?

    Dec 14, 2019 · String literals occurring elsewhere in Python code may also act as documentation. They are not recognized by the Python bytecode compiler and are not accessible as runtime …

  5. Synthesize musical notes (with piano sounds) in Python

    Dec 30, 2018 · I would like to have a python implementation of a musical instrument library (for instance, a piano object) that I can use to convert a list of notes and a duration into sound. For …

  6. How to comment out a block of code in Python [duplicate]

    In Eclipse + PyDev, Python block commenting is similar to Eclipse Java block commenting; select the lines you want to comment and use Ctrl + / to comment. To uncomment a commented …

  7. open() in Python does not create a file if it doesn't exist

    Jun 3, 2010 · Note that a+ creates a file if it does not exist and, crucially, seeks the file to the end. So if you do a read immediately after opening this way, you'll get nothing.

  8. How can I create a text box for a note in markdown?

    Sep 3, 2014 · I am writing a document in markdown. I am using the wonderful pandoc to create docx and tex files from the markdown source. I would like to have a textbox for tips and notes …

  9. python - Automatically create file 'requirements.txt' - Stack Overflow

    Mar 19, 2019 · Sometimes I download the Python source code from GitHub and don't know how to install all the dependencies. If there isn't any requirements.txt file I have to create it by hand. …

  10. Making Music Notes in Python - Stack Overflow

    Nov 10, 2012 · I've got a project to make a sort of music synthesizer with python3. I've got to use numbers from stock data and create a player file and a file with my music class that will output …

Refresh