Page 1 of 1

Python in notepad

Posted: Tue Jun 19, 2012 5:12 pm
by Darktiger138
How do you use python using notepad???

Re: Python in notepad

Posted: Wed Jun 20, 2012 12:15 am
by 3ICE
Generally you don't.

Notepad doesn't have syntax highlighting, code completion, macros, an easy was to compile or run your code, etc.

You should get Notepad++ or IDLE:

Re: Python in notepad

Posted: Thu Jun 21, 2012 1:57 pm
by Darktiger138
Oh lol, that's already what I use.

Re: Python in notepad

Posted: Thu Jun 21, 2012 2:36 pm
by 3ICE
So what was your intent with the above question?
Are you not happy with IDLE?

Personally I found it kind of slow so I switched to Notepad++ right away.
Was that your goal?

Re: Python in notepad

Posted: Thu Jun 21, 2012 5:07 pm
by Darktiger138
I was just wondering because at school I sometimes use a different computer that doesn't have IDLE installed on it and I can't be bothered installing it on every computer I use.

Re: Python in notepad

Posted: Thu Jun 21, 2012 11:25 pm
by 3ICE
Ah. So what do they expect you to use?
Or do they just leave you to your own devices? To try and figure it out alone?
How can they expect any student to study if they don't provide the tools needed for studying...

If they don't even set you up with the Python compiler, they are truly evil.

You can invoke the basic command line compiler with:

Code: Select all

python path/to/your/script.py
Or if it isn't even set up properly to be included in your system's PATH environmental variable, you need to know the location of python.exe as well:

Code: Select all

C:\Program Files (x86)\Python\python.exe path/to/your/script.py
but that is just ugly. Especially if it is a shared install:

Code: Select all

\\server1\shared\school\apps\programming\pythons\v2.7\Python\python.exe path/to/your/script.py
Ouch.

In my programming classes we always have multiple possible IDEs to choose from on every computer. For example with Haskell we got four, and I went with GHCi (Glasgow Haskell Compiler Interactive) for compiling and coded in Notepad++. For Powershell we got three choices, and I went with ISE (Windows PowerShell Integrated Scripting Environment) for both compiling and writing code, occasionally returning to Notepad++ because I'm more used to it.

Re: Python in notepad

Posted: Fri Jun 22, 2012 1:10 am
by Darktiger138
Well in my programming class all the computers in there have IDLE installed, but the school has multiple different computer labs all over the place, I was just bored in my English class and felt like screwing around with notepad.

Re: Python in notepad

Posted: Fri Jun 22, 2012 3:17 am
by 3ICE
Ah. Then you need Python Portable. I have it on all my pendrives.

Re: Python in notepad

Posted: Fri Jun 22, 2012 3:41 am
by Darktiger138
I don't really need it, I was just curious.