set emacs for python [duplicate] - python

This question already has answers here:
Emacs python autocompletion
(3 answers)
Closed 9 years ago.
i'm new to emacs, and I want to use it for programing in python. Most important thing for me is autocomplete. I want a step by step tutorial for add a python autocomplete plug-in for emacs 24.
sorry for my bad English.

This Python-focused Emacs resource discusses installing and configuring auto-complete and other useful configuration for Python work in Emacs:
http://www.jesshamrick.com/2012/09/18/emacs-as-a-python-ide/

You will find all information here:
http://www.emacswiki.org/emacs/?action=browse;oldid=PythonMode;id=PythonProgrammingInEmacs

Related

Is it true that python 2.7 will die soon? [duplicate]

This question already has answers here:
End of support for python 2.7?
(8 answers)
Closed 3 years ago.
i've heard that python 2.7 will be removed or something like that. And i just starter so i'm confused if i should start with python 2.7 or the newest one 3.7?
Yes, https://pythonclock.org/
Python 2.7 will not be maintained past 2020.
Until you discover an explicit reason otherwise, use the current stable versions of all software and hardware dependencies to start a project. Some software (e.g. Node.js or browsers) have special releases on the long term support track (LTS), but Python versions should be all equal in this regard, so 3.7 is a good choice in 2019.
An explicit reason might be integration with existing libraries (that do not work on current version and cannot be updated or replaced), or other business reasons.

How to check run time of your code in Python. PyCharm is my IDE [duplicate]

This question already has answers here:
How do I get time of a Python program's execution?
(38 answers)
Closed 6 years ago.
How do I check how long it takes for my code to execute. Is there an inbuilt way in python. Or is there some hidden tool in my IDE PyCharm that let's me do so.
You could try with
cProfile
in this way:
import cProfile
def myFunc():
...
cProfile.run('myFunc()')
Hope this solves your question!
So profiler is already builtin tool in Pycharm, it uses cProfiler by default if you don't have yappi installed. Here is the link to it PyCharm profiler.
And if you want profile your code without any attachment to PyCharm, check that SO question How can you profile a Python script?

Can I block others from seeing my Python code? [duplicate]

This question already has answers here:
Undecompilable Python
(2 answers)
Closed 9 years ago.
Can I block others from seeing my code? I'm working on something in Python. As I save it, it's a (.py) and everyone can right-click and see the code. This is unlike C where I generate an .exe that you can't simply (!) read.
You can read the assembly code generated by the process of the compilation in C. The code is not hidden : it's a bit more complex to read, because it is ASM. But it is totally and definitively not hidden :)
Python is made by Open Source community, so the idea is not about hiding your code. If ever you want to make a .exe from a Python code, you can have a try to Py2Exe or Freeze :
http://www.py2exe.org/
http://wiki.python.org/moin/Freeze
Cheers,
K.

Python programming assistance [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Why do people write #!/usr/bin/env python on the first line of a Python script?
I am currently teaching myself Python and I have a question about python. In many examples of Python, I've seen the same line of code at the top:
#!/usr/bin/env python
My question is what purpose does the code above serve, and why is it necessary? So far, I've been practicing Python code without this line of code. If someone could explain this to me, it would help a lot. Thanks in advance.
#!/usr/local/bin/env python
You are specifying the location to the python executable in your machine, that the rest of the script needs to be interpreted with.
You are pointing to python is located at /usr/local/bin/python.
Python is not always installed at '/usr/local/bin/python'. You can also call different python versions by #!/path/to/your/python/version.
It is describing the location of the python install that your code should use. See here and here.

Which Python IDE [duplicate]

This question already has an answer here:
Closed 11 years ago.
Possible Duplicate:
What IDE to use for Python?
Hi recently started looking at Python, basically for scripting, so far I've been doing exercises from the web, which is OK. I'm using gEdit and its fine. but I'm curious to know what is a good IDE for python, that will still allow me to discover. One of the things I'm used to in Visual Studio is code completion,code snippets and tips, so when you type FOO then CTRL+SPACE you get to see what methods,properties etc are available for FOO. You can select a method press F1 and get HELP on its usage. Really helps discovery and learning. Can anyone recommend a good IDE preferably FREE that works well on windows(Linux is optional) and has features such as code completion,code snippets,code tips
You might want to try Vim or Eclipse.

Categories

Resources