Notepad++ Formatting Issue [closed] - python

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
I have an issue, I am working on a jython project while editing it with Notepad++. I'm having an issue where I save the file, open it in normal notepad.exe and the file comes out completely different to how i edited it on Notepad++. It seems to be that wherever I pressed Enter for a new line, notepad++ formatted it to have a few spaces and the whole 150+ line code is word wrapped around five lines of carriage returns.
Any idea how I can fix this? I figure it's in settings but I don't know how to google for it and don't want to try every option until it works as notepad++ is quite feature rich!

Found out myself! Edit > EOL conversion > Windows Format Thanks ME! No, wait, credit goes to: this guy.

Related

how to open an excel file with python and push a button? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 months ago.
Improve this question
When I open and excel file, the excel show me a message.
"Do you want to open this excel file anyway?" Yes, No, Cancel
I want to open it by python and automatically click Yes by python too, afterr that I will start to edit the excel by python program. I don't know what to do with pushing the yes button! I am totally beginner in python. I would be grateful if anyone can help me.
The Python module pandas can help you. If you change the file extension to .xlsx as pyzer mentioned, you can access your data with pandas as explained in this tutorial.
For a few general resources on learning Python, I recommend the official documentation and The Hitchiker's Guide to Python.
Best of luck!

What is wrong with my code?? or is it the editor? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 1 year ago.
Improve this question
i use atom editor for my python. i am self learning how to code with this book i bought. i am at loops now and when i put this code ,the code doesn't work:
Names = ["joy", "darwin", "jake"]
for name in Names:
print(f"{name.title()}, Hi!")
i have tried multiple things to try to make it work and none have worked so far
i don't know why because when my friends tried it in their editors it worked fine. Is there a certain package i have to download or something??? pls i need help
Try fixing your indentation:
Names = ["joy", "darwin", "jake"]
for name in Names:
print(f"{name.title()}, Hi!")
If this doesn't work, try changing editors.

Starting fresh without pycharm [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 1 year ago.
This post was edited and submitted for review 1 year ago and failed to reopen the post:
Original close reason(s) were not resolved
Improve this question
I would like to get more experience with the different elements that running and writing python involves. I used Pycharm to start writing code.
Pycharm is great at simplifying the whole process, which includes obscuring even the simplest parts.
I'd like to move my projects to a more hands-on editor.
I really like syntax highlighting and completion so an editor with those attributes is preferred.
You can try to use Atom or VSCode. More information about atom can be found here: https://atom.io/
About VSCode try this link:
https://code.visualstudio.com/
When it comes to moving projects to another text editor, PyCharm creates certain files in order to store the scripts, and you can find those files like this:
as you can see, this is the left side window in pycharm, and next to the title there is a path. That path is where the file is located.
You can drag and drop the scripts to the icon of the new text editor in order to open them from there.

What are the `LRE` and `PDF` characters that appear on my code when opening a file in PyCharm? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
Do you know what the problem is, and how to fix it?
This happens when I open a simple .py file to Pycharm,
I'm using a Mac.
These are Unicode characters indicating Left-Right Embedding and Pop Directional Formatting. These characters are included in text that is written in multiple languages where some of the languages are written right to left and other are written left to right. Each line then needs to be labelled with it's format and the PDF marks the end of a particular formatted block.
So my best guess is either you or whoever wrote this bit of code at one point had multiple languages written in it. Once that was the case, all the lines were reformatted to include these marker characters.

Display a file to the user with Python [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I am trying to find a way to display a txt/csv file to the user of my Python script. Everytime I search how to do it, I keep finding information on how to open/read/write etc ... But I just want to display the file to the user.
Thank you in advance for your help.
if you want the file to open with its associated default program, use startfile.
os.startfile("path/to/file") # may only work on Windows
It really depends what you mean by "display" the file. When we display text, we need to take the file, get all of its text, and put it onto the screen. One possible display would be to read every line and print them. There are certainly others. You're going to have to open the file and read the lines in order to display it, though, unless you make a shell command to something like vim file.txt.

Categories

Resources