Guys I've been reading on PEP 8 and I see that one should use it especially to make sure that programs are standard. Please can anybody help as to how i can install it with my python 3.2 and how to use. Thanks in advance.

Recommended Answers

All 9 Replies

Wow thanks so much, will try that out and let you know.

Also you can do above process for http://pypi.python.org/packages/source/d/distribute/distribute-0.6.15.tar.gz#md5=ea52e1412e7ff560c290266ed400e216

run the distribute_setup.py with python32, after you can run easy_install:

C:\Python32>Scripts\easy_install.exe pep8
Creating c:\python32\lib\site-packages\site.py
Searching for pep8
Reading http://pypi.python.org/simple/pep8/
Reading http://github.com/cburroughs/pep8.py/tree/master
Reading http://github.com/jcrocholl/pep8
Best match: pep8 0.6.1
Downloading http://pypi.python.org/packages/source/p/pep8/pep8-0.6.1.tar.gz#md5=
49380cdf6ba2e222e8630cb0afe29d66
Processing pep8-0.6.1.tar.gz
Running pep8-0.6.1\setup.py -q bdist_egg --dist-dir c:\docume~1\veijal~1.yks\loc
als~1\temp\easy_install-r4nmr_\pep8-0.6.1\egg-dist-tmp-r0zvr6
Adding pep8 0.6.1 to easy-install.pth file
Installing pep8-script.py script to C:\Python32\Scripts
Installing pep8.exe script to C:\Python32\Scripts

Installed c:\python32\lib\site-packages\pep8-0.6.1-py3.2.egg
Processing dependencies for pep8
Finished processing dependencies for pep8

This new easy_install has command line switch to automatically run pure Python2 packages through 2to3 script and you do not download files separately, only you must know the name (try the module name imported in code you want to run but does not run). Of course libraries in binary form do not install if they are not converted specifically for Python3.

In case of pep8.py script it is easy to include in your source code dictionary like vegaseat told and run from there, it is single file script.

I have already downloaded the distribute package, i guess i have been seeing easy_install and don't know what it means. But now that i have both packages is there not a way i can install without having to be connected. Please bail me out.

Okay I'm getting something, are you saying after unpacking the PEP8 all i have to do is to put it in the directory the program I'm working on.
And then

import pep8

or

from pep8 import*

in the program i'm writing then i can call methods from it.

I am so sorry i can't confirm now, the system i'm using right now does not have any archiver i can use to unpack, so i'll have to wait till i get home.
But you can still explain then i'll try it out and let you know.

No you must enter the command line (CMD in windows, xterm etc. in Linux), cd to your source code directory containing also pep8.py, then you must run the script from there:

K:\test3>c:\python32\python pep8.py --show-pep8 --show-source my_program.py
commented: Another great one. +1

Okay it has to be done from the command line i think i get that.
Are you saying now that once i've unpacked it i should just place in CWD and run the cmd(windows)n to the dir and then do whatever i want to with it.

Thanks tonyjv, I've been able to get the pep8 to work, thanks so much. you've solved this thread.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.