I'm looking for a text editor that supports Python nicely. Something a bit better than what comes standard in Python's IDE.
P_S
ID:276361
![]() Aug 10 2005, 12:57 am
|
|
![]() Aug 10 2005, 2:26 pm
|
|
Try pnotepad. Works well for some stuff, and you could probably find a python syntax for it.
|
I tried learning python once... but it came with like a command-line compiler or something... and I have no idea how to work those. For some reason I didn't even think of getting a text editor for it.
*Makes a note to look up good text editors for Python, and reconsider learning the language* Hiead |
Python is a scripting language, if I am not mistaken, so you don't compile it, just run it(Normaly by dragging and dropping the python file onto the .exe it comes with).
|
If you're running windows, all you have to do is install Python's IDLE. IDLE is the IDE for python, it has a good python editor in it, probably good enough that I don't need to find another editor, but I still asked, hoping someone might have found one better.
P_S |
Hiead, you should really reconsider. Python is a great language, and isn't terribly hard. And as Scoobert said, it is a scripting language, so no compiling. All you have to do is, after you write a script, and save the script with a python extension (.py or .pyw), double click the file in windows, or press F5 in editor.
Also, just for your sake, here's a direct link to the latest windows install for python. http://www.python.org/ftp/python/2.4.1/python-2.4.1.msi P_S |
Scoobert wrote:
Python is a scripting language, if I am not mistaken, so you don't compile it, just run it(Normaly by dragging and dropping the python file onto the .exe it comes with). Oh....I thought that box that resembled Command Prompt was the compiler...and couldnt figure it out. Hiead |
So I'm running the setup...looking in Advanced Options... there's a box I can check with the description(by default, it's unchecked):
Compile .py files to byte code after installation So does this mean that Python is a virtual code language, and that checking this would change it to being directly processed like a file produced by C++? Can it be changed later? Which is better anyways? By being a virtual machine language, it would gain extra portability, but would run slower, right? Hiead |
Hiead wrote:
So does this mean that Python is a virtual code language, and that checking this would change it to being directly processed like a file produced by C++? Can it be changed later?I'm not sure about this, I didn't notice that box. But I think that means it would make into a stand alone executable... I think. Which is better anyways? By being a virtual machine language, it would gain extra portability, but would run slower, right? This is true. Python scripts have a portability across most any OS, but do run slower than a lower level language like your C languages. Another thing to check out when(or if) you get into Python, is Pygame. It's a Python extension for help with developing games. P_S |
Prodigal Squirrel wrote:
I'm not sure about this, I didn't notice that box. But I think that means it would make into a stand alone executable... I think. No, it just compiles source code (PY) files to bytecode (PYD) files. PYD files are similar to BYOND's DMB files; they're not stand-alone executables, but they are compiled into bytecode. Which is better anyways? By being a virtual machine language, it would gain extra portability, but would run slower, right? Yup. There are ways to speed it up, including psyco, but Python will almost always run slower than, say, C. Note that some libraries (particularly pygame) are actually implemented in C, so the performance hit is not always as bad as you think it's going to be. |
I think PY2EXE can make python files into stand alone exe's.
|
No, it just compiles source code (PY) files to bytecode (PYD) files. PYD files are similar to BYOND's DMB files; they're not stand-alone executables, but they are compiled into bytecode. In case anyone's interested, Python does come with a py2exe utility that packs everything into an exe file. It's still interpreted, it just that the interpreter and source files are all packed together, which is easier to distribute. It doesn't "protect your code" or anything, though. It's trivial to get it back out. |
Yup, py2exe is very useful. Though the files it creates are quite large, due to the need to bundle the interpreter with them!
Last I checked it doesn't actually come with Python - you have to download it separately, but doing so is easy. |