How do I bring up the page where I write Python program, compile and run it, and see the output? - linux

Sorry if my questions are extremely stupid, but I'm quite at a loss while trying to use Python from Ubuntu Linux. My friend installed the Pycharm for me. I can go without using any commands, to files-->Pycharm projects---> click on one project and see the files, which I can open.
But I'm lost as of how to compile and run the files and see the output at this step? The .py files saved before (written with hello world and some really simple ones) are opening, but how can I see the output?
Also, when I go to the programs by files-->Pycharm projects---> file1.py, file 2.py...etc., do we code and run them from the terminal, using the Linux features? If not, how can I do all of the coding and running from the terminal?
Many thanks!!!

I'm not sure what you mean but "how can I do all of the coding and running from the terminal?" you can use nano to edit to code and run the code on the terminal too
see this link to know more about nano : HERE

Related

Is it possible to run a python script when another computer connects to the website?

Im trying to set up a prank for my coder friends(have to clarify its not something bad, its just a harmless joke) and they are much more experienced than me. They like to brag about it, so I wanted to make them look like they got hacked by getting a singular file from their computer. Is it possible to run a script to take a their file from their computer as soon as they click on a link that i can share on discord?
I got python script to get a file, but its only when you download the script and use it, it also requires you to have any python version 3+ to run the code. Tried to make a short link but couldnt get it work either.

Mac executable not working when downloaded online

I have made a small (8 MB) program into a MAC executable (.app?)
It works great if I share it using a thumbstick, but if I try to upload it to google drive and then download it it doesn't work. By this I mean It first tells me that It is an unidentified source (this seems reasonable)
But then if I click "open"
It opens as a text file with junk data:
If I try to force it to open on the terminal, how the other program opens, it just shows the heartbeat thing that MACs do when opening a file, but never opens anything.
It is certifiably the same exact file. Same size, same name, same goobldygoop if I open both of them as text files instead of executables.
I am really confused, the only thing I can think of is the "signature" that apple uses is lost when it is compressed into a zip, but I'm probably totally off base.
The code uses python 3.7, pyinstaller, pynput, and selenium.
I am using MAC OS Catalina to write and make into an EXE, then another Catalina to try to run the program.
EDIT: Clarify what doesn't work means
Please help.
I found the answer, simply zip the file from my mac and send it that way!
Yay!

I want to be able to run my Python through Atom like i have been able to do on my phone with dcoder

So Im very new to programming and computers in general... Over the last couple months i have learned everything i know on my phone using Dcoder with android. I have been searching for a program that is similar but on a laptop that can compile my .py files. So i downloaded Atom and have installed atom-python-run and other packages to run my code through the terminal (even though I would rather it compile like on Dcoder) but it says that python is not a file... so i changed the path in the control panel to the right folder but now it says no pyvenv.cfg file... in cmd it doesnt work when i type in python but it works when i type in py... idk
honestly if anyone knows how i can get a program like dcoder on my laptop i would greatly appreciate it... i am way more familiar with phones than i am with laptops... but im trying to learn.
I have tried everything. This is my last hope before giving up
error message one on atom: windows cannot find python make sure you have spelled it right
is there anyway to just get it to search for py????
If you want to run python using the Atom editor you must first load python into Atom. This is simple. Go to this site and install the extension 'laungage python'. Then search for and install the package 'Script'. Script will successfully run your python files. Run Atom and enter your python file. Then go to the packages menu and click on Script. I haven't been able to get Python Runner or Code runner to run my python files, only Script.
Dcoder has a web app also at https://code.dcoder.tech, Dcoder uses cloud storage, makes it easier to switch between phone and laptop to code when needed.

How can I run my program without using PyCharm?

I have to finish the program on which I worked six months. This is my very first program.
I designed with PyCharm and I have a database and several module.
How can I run my program without using PyCharm?
Based on the fact that you are working on this project for the last 6 months, my guess is that you were running it through PyCharm. In most cases when you run your project through PyCharm you can see that on PyCharm "Run" console the first line logged is something like that:
/path/to/setup/bin/python<version> path/to/your_project/file_contains_main.py --argumnent1=value1 --argumnent2=value2...
Scenario 1
If you see something like that, then you can copy your project in a system that has python installed and run the same file_contains_main.py as below:
python path/to/your_project/file_contains_main.py --argumnent1=value1 --argumnent2=value2...
Some more details for Windows here and for Linux here.
Scenario 2
If you do not see the command above logged in PyCharm then you may find this solution more appropriate.

Why does komodo edit require a duplicate .py file to execute my commands?

I am using Komodo edit 7.1 on a macbook pro running OS X mountain lion
Note that the duplicated file needs a space at the beginning. e.g:
to execute hello-world.py, I wrote the code given in the lesson but when running the command i get an error
/bin/sh: /usr/bin/pythonhello-world.py: No such file or directory.
When I create a file name: _hello-world.py (the underscore is actually white space) and execute it from there, the command completes the action correctly
'/usr/bin/python hello-world.py' returned 0.
Interestingly enough, the code for the duplicated file can be blank, somehow it is choosing the proper file.
p.s. obviously I am brand new at this. I have searched google for similar problems but haven't found what I need. Please help!
Thank you
The path to the python executable is not setup correctly. Use the Terminal to fix it.

Resources