Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe
You can encode a set of Booleans as a number using something like this, though there might often be a better way of doing whatever you are trying to do:

code:
return self.MyBoolean + 2 * self.MyOtherBoolean + 4 * self.YetAnotherBoolean + 8 * self.AndSoOn

Adbot
ADBOT LOVES YOU

Harriet Carker
Jun 2, 2009

I am completely new to programming and am playing around with Python after learning some basics on CodeAcademy. I tried using Notepad++ on a friend's recommendation but it turns out getting Python code to run from it is a pain. The OP of this thread is mostly going over my head and the tutorial on setting up VIM is much more advanced and complicated than anything I need at this point. What is a good, simple IDE to write and run Python code? The wiki has a huge list and I don't know which to pick.

BeefofAges
Jun 5, 2004

Cry 'Havoc!', and let slip the cows of war.

dantheman650 posted:

I am completely new to programming and am playing around with Python after learning some basics on CodeAcademy. I tried using Notepad++ on a friend's recommendation but it turns out getting Python code to run from it is a pain. The OP of this thread is mostly going over my head and the tutorial on setting up VIM is much more advanced and complicated than anything I need at this point. What is a good, simple IDE to write and run Python code? The wiki has a huge list and I don't know which to pick.

Why not just write your code in Notepad++ and then run it from an ordinary command line?

QuarkJets
Sep 8, 2008

^^^ Because he's probably in Windows and the Windows command line is ghetto as hell

dantheman650 posted:

I am completely new to programming and am playing around with Python after learning some basics on CodeAcademy. I tried using Notepad++ on a friend's recommendation but it turns out getting Python code to run from it is a pain. The OP of this thread is mostly going over my head and the tutorial on setting up VIM is much more advanced and complicated than anything I need at this point. What is a good, simple IDE to write and run Python code? The wiki has a huge list and I don't know which to pick.

I really, really like Spyder 2. It comes with Pythonxy, which is basically a big executable full of additional python libraries (numpy and others) and IDEs. Pythonxy is aimed toward people who want to make a switch from MATLAB to Python on Windows systems. It's also free. Even if you're not interested in any of the computational stuff, it's still a great starting point simply because it gives you the option of installing a bunch of different IDEs (so that you can try out a bunch of them out and then keep whichever one you like best) and a bunch of extra libraries to play with (although they're all optional components that you can add later).

Spyder 2 is as simple as you want, but it's also incredibly easy to run your code in it. It comes with a command-line interpreter that has all of the normal additional features that you'd expected of a well-developed command-line interpreter (such as tab completion), but there's also a keyboard shortcut for just running code in a fresh window. I suggest trying it

Unperson_47
Oct 14, 2007



dantheman650 posted:

I am completely new to programming and am playing around with Python after learning some basics on CodeAcademy. I tried using Notepad++ on a friend's recommendation but it turns out getting Python code to run from it is a pain. The OP of this thread is mostly going over my head and the tutorial on setting up VIM is much more advanced and complicated than anything I need at this point. What is a good, simple IDE to write and run Python code? The wiki has a huge list and I don't know which to pick.

A lot of people here, myself included, seem to love Sublime Text 2.

Dominoes
Sep 20, 2007

dantheman650 posted:

I am completely new to programming and am playing around with Python after learning some basics on CodeAcademy. I tried using Notepad++ on a friend's recommendation but it turns out getting Python code to run from it is a pain. The OP of this thread is mostly going over my head and the tutorial on setting up VIM is much more advanced and complicated than anything I need at this point. What is a good, simple IDE to write and run Python code? The wiki has a huge list and I don't know which to pick.
Download and install This Notepad++ pluigin

Run scripts with alt+shift+f5, or ctrl+alt+shift+f5 for GUI-only.

Harriet Carker
Jun 2, 2009

QuarkJets posted:

^^^ Because he's probably in Windows and the Windows command line is ghetto as hell

Precisely.

Thanks for all the information.

Spyder 2 won't install - it gives me a cannot install error "No Python installation found in the registry"

I downloaded the Notepad++ plugin and I have no idea what to do with it. The installation guide says to copy to the Notepad++ directory but should I copy and replace the plugin folder that is already there?

Sublime Text 2 seems to be working just fine though. I guess that's what I'll be sticking with for now since it's the only one I can get to work!

EDIT: I Feel like a complete dummy, but I am getting an EOF error when using the input function. A cursory Google search led me to a few discussions about this, and one of the users wrote: "When running a program within Sublime Text 2, stdin will not be connected to anything (where would you type it?), so this behavior is expected."

It appears as if people have had to build their own plugins just to get input to work.

Is there any basic, simple editor that will just allow me to write and run Python code without all this hassle? I'm not making anything complex here, just extremely simple stuff to practice my basic skills.

Harriet Carker fucked around with this message at 21:06 on May 1, 2013

Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe
If all else fails, you can just write scripts and run them from the Python interactive command-line interpreter using import. You will want to add the directory where you are saving the scripts to your PYTHONPATH so that Python can find them. (On my version of Windows I can do this by going Control Panel -> Classic View -> System -> Advanced system settings -> Advanced -> Environment Variables and adding/editing the PYTHONPATH variable under "System variables".)

Dren
Jan 5, 2001

Pillbug
I don't think there's a lot to be gained in running code inside an editor. This dev configuration works on any platform:
  • whatever editor you like
  • a command prompt for executing your program
  • a command prompt with the interpreter open (for testing out quick one liners while you code)

One advantage of this method is that your test environment (the OS shell) is the same as your production environment. So if you have any weird crap like stdin not being connected it's not just a test environment problem it's a real problem you actually need to solve for production.

Harriet Carker
Jun 2, 2009

Hammerite posted:

If all else fails, you can just write scripts and run them from the Python interactive command-line interpreter using import. You will want to add the directory where you are saving the scripts to your PYTHONPATH so that Python can find them. (On my version of Windows I can do this by going Control Panel -> Classic View -> System -> Advanced system settings -> Advanced -> Environment Variables and adding/editing the PYTHONPATH variable under "System variables".)

OK, I've done this.



Dren posted:

I don't think there's a lot to be gained in running code inside an editor. This dev configuration works on any platform:
  • whatever editor you like
  • a command prompt for executing your program
  • a command prompt with the interpreter open (for testing out quick one liners while you code)

One advantage of this method is that your test environment (the OS shell) is the same as your production environment. So if you have any weird crap like stdin not being connected it's not just a test environment problem it's a real problem you actually need to solve for production.

All right. So I wrote my script in Notepad++ and am trying to run it in the Python shell (is this the correct terminology?) and I get this error.



I have a feeling I'm doing something really silly, but I'm getting frustrated.

Edit: Realized I had the path set incorrectly. Changed it to C:\Users\Dan\Desktop\Programs and still getting the same syntax error.

Harriet Carker fucked around with this message at 21:45 on May 1, 2013

Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe
You are already using the Python interactive interpreter, you are not using the OS's command line. You need to type Python commands, not commands that would be understood by Windows's command line. So to run the code in hello.py you need to type "import hello.py"

"python hello.py" is not valid Python syntax, which is why you see that error.

Harriet Carker
Jun 2, 2009

Hammerite posted:

You are already using the Python interactive interpreter, you are not using the OS's command line. You need to type Python commands, not commands that would be understood by Windows's command line. So to run the code in hello.py you need to type "import hello.py"

"python hello.py" is not valid Python syntax, which is why you see that error.

I just tried that and I am getting this error (although I do notice it ran the script before producing the error):

Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe
I realised that the correct version of the command is "import hello" (without the .py). However, I do not know whether that is the cause of your most recent error message. Try "import hello" and see whether that works better.

Harriet Carker
Jun 2, 2009

Hammerite posted:

I realised that the correct version of the command is "import hello" (without the .py). However, I do not know whether that is the cause of your most recent error message. Try "import hello" and see whether that works better.

Well, no errors this time! However, it also had no output of any sort.

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



Hammerlite misspoke. The .py is implied when you import something, so you can leave it off.

What might be a lot easier for you, especially considering that it takes some effort to reload a module that's been imported, is to run python through the command interpreter. You can just hit Start and type cmd to get it to come up in the search list. Then, I think you can just run you files by typing python <file path with .py>, assuming it's on the PATH, which you evidently already know how to edit. If you CHDIR to the directory your scripts live (chdir C:\Users\Dan\desktop) you can just type python hello.py to run your scripts.

Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe

dantheman650 posted:

Well, no errors this time! However, it also had no output of any sort.

This is probably because you entered the command in the same command-line window as before, and the hello module had been imported already. Once a module has been imported once, importing it again only serves to define variable names in the namespace in which the import statement appears. If you use "reload hello" you will see output, because that re-executes the script in full.

edit: You should probably not get used to using reload, because once you are writing larger scripts that themselves import other scripts of yours, using reload will only re-execute the named script, and not the others nested inside. This is a downside to using the interactive command line.

Hammerite fucked around with this message at 22:02 on May 1, 2013

Harriet Carker
Jun 2, 2009

Munkeymon posted:

Hammerlite misspoke. The .py is implied when you import something, so you can leave it off.

What might be a lot easier for you, especially considering that it takes some effort to reload a module that's been imported, is to run python through the command interpreter. You can just hit Start and type cmd to get it to come up in the search list. Then, I think you can just run you files by typing python <file path with .py>, assuming it's on the PATH, which you evidently already know how to edit. If you CHDIR to the directory your scripts live (chdir C:\Users\Dan\desktop) you can just type python hello.py to run your scripts.

Are you talking about the Windows command prompt or the cmd.py that is in my Python intall directory?

If the former, I get an error that it is not recognized as an intrernal or external command. If the latter, it pops open for a second and then immediately closes.

A friend I'm chatting with recommended changing my script to a function:
def hi():
print ("Hello")
Then in the terminal doing:
import hello
hello.hi()

This also did not work, just for the record, and produced "AttributeError: 'module' object has no attribute 'hi'"

EDIT:

Hammerite posted:

This is probably because you entered the command in the same command-line window as before, and the hello module had been imported already. Once a module has been imported once, importing it again only serves to define variable names in the namespace in which the import statement appears. If you use "reload hello" you will see output, because that re-executes the script in full.

edit: You should probably not get used to using reload, because once you are writing larger scripts that themselves import other scripts of yours, using reload will only re-execute the named script, and not the others nested inside. This is a downside to using the interactive command line.

I closed the terminal, and typed "import hello" on a fresh line. Success! Thank you for your assistance and patience.

Another question now:

So I type import hello, and it runs and outputs "Hello." Now I go into Notepad++, add another line "print ("Hi")" and save it. I have already imported hello, so do I need to close and reopen the terminal to run my updated code?

Harriet Carker fucked around with this message at 22:08 on May 1, 2013

Dren
Jan 5, 2001

Pillbug
I was advocating that you open two terminals. I suggest that you do not make importing your program your normal means of executing your program.

To get the first terminal (for executing your program) do this:
  1. Open a command prompt: Run menu -> 'cmd'
  2. cd to directory containing your program
  3. run your program 'python hello.py'

You may then edit your program with the editor of your choice and rerun it by typing 'python hello.py' again.

To get the second terminal (python interpreter for testing stuff) do this:
  1. Open a command prompt: Run menu -> 'cmd'
  2. cd to directory containing your program
  3. run python 'python'

In this second terminal you'll be able to do stuff like quickly test a one liner or figure out what that method for making a string lowercase is:
code:
Python 2.7.4 (default, Apr 19 2013, 18:28:01) 
[GCC 4.7.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> s = ''
>>> dir(s)
['__add__', '__class__', '__contains__', '__delattr__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getitem__',
 '__getnewargs__', '__getslice__', '__gt__', '__hash__', '__init__', '__le__', '__len__', '__lt__', '__mod__', '__mul__', '__ne__',
 '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__rmod__', '__rmul__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__',
 '_formatter_field_name_split', '_formatter_parser', 'capitalize', 'center', 'count', 'decode', 'encode', 'endswith', 'expandtabs', 'find',
 'format', 'index', 'isalnum', 'isalpha', 'isdigit', 'islower', 'isspace', 'istitle', 'isupper', 'join', 'ljust', 'lower', 'lstrip', 'partition',
 'replace', 'rfind', 'rindex', 'rjust', 'rpartition', 'rsplit', 'rstrip', 'split', 'splitlines', 'startswith', 'strip', 'swapcase', 'title',
 'translate', 'upper', 'zfill']
>>> help(s.lower)

Dren fucked around with this message at 22:10 on May 1, 2013

Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe

dantheman650 posted:

Are you talking about the Windows command prompt or the cmd.py that is in my Python intall directory?

If the former, I get an error that it is not recognized as an intrernal or external command. If the latter, it pops open for a second and then immediately closes.

A friend I'm chatting with recommended changing my script to a function:
def hi():
print ("Hello")
Then in the terminal doing:
import hello
hello.hi()

This also did not work, just for the record, and produced "AttributeError: 'module' object has no attribute 'hi'"

Use the [ code ] tags when posting code, because otherwise people who read your post may not see spacing correctly. This is particularly important for Python because whitespace is syntactically significant.

Did you close and reopen the interpreter, or use reload, as I mentioned?

You might be getting that error from the Windows command line because Python is not in your PATH and so Windows can't find it. Follow the same steps you used to edit the PYTHONPATH variable but this time change the PATH variable (it might be capitalised differently) by adding the path to the directory where python.exe is at the end, after a semicolon.

Harriet Carker
Jun 2, 2009

Dren posted:

I was advocating that you open two terminals. I suggest that you do not make importing your program your normal means of executing your program.

To get the first terminal (for executing your program) do this:
  1. Open a command prompt: Run menu -> 'cmd'
  2. cd to directory containing your program
  3. run your program 'python hello.py'

You may then edit your program with the editor of your choice and rerun it by typing 'python hello.py' again.

To get the second terminal (python interpreter for testing stuff) do this:
  1. Open a command prompt: Run menu -> 'cmd'
  2. cd to directory containing your program
  3. run python 'python'


This works perfectly. Thank you again for your patience and clear explanations.


Hammerite posted:

Use the [ code ] tags when posting code, because otherwise people who read your post may not see spacing correctly. This is particularly important for Python because whitespace is syntactically significant.

Did you close and reopen the interpreter, or use reload, as I mentioned?

You might be getting that error from the Windows command line because Python is not in your PATH and so Windows can't find it. Follow the same steps you used to edit the PYTHONPATH variable but this time change the PATH variable (it might be capitalised differently) by adding the path to the directory where python.exe is at the end, after a semicolon.


I didn't know about the code tag! I will use it in the future. Closing and reopening the interpreter worked fine, and I didn't use reload since you warned against it.

I added the Python directory to PATH and am still getting that error if I first don't CD to my programs directory, but that's ok - it only takes a second to CD and that works fine for now.

I'm going to stop cluttering the thread now and go practice!

evilentity
Jun 25, 2010

dantheman650 posted:

I added the Python directory to PATH and am still getting that error if I first don't CD to my programs directory, but that's ok - it only takes a second to CD and that works fine for now.

I'm going to stop cluttering the thread now and go practice!

You added PYTHONPATH so you can type 'python' in command line. When you do 'python hello.py' cmd knows wheres python, but not hello.py. Thats why you need to cd to your script path first. Alternatively, you can specify full path like so: 'python c:\dev\hello.py'.

You can do [ code=python ] for proper python syntax highlighting.

evilentity fucked around with this message at 23:41 on May 1, 2013

Dominoes
Sep 20, 2007

dantheman650 posted:

I downloaded the Notepad++ plugin and I have no idea what to do with it. The installation guide says to copy to the Notepad++ directory but should I copy and replace the plugin folder that is already there?
Just unzip it into the Notepad++ folder like the instructions say. Your unzip program (ie the built in one with windows) will add its files to the existing plugins directory. Using this, or double-clicking your .py file are easier, quicker methods.

Dominoes fucked around with this message at 00:08 on May 2, 2013

Dren
Jan 5, 2001

Pillbug
Can someone write me a base class that provides to_dict and from_dict for a subclass or show me how to reorganize my objects to get this functionality generalized? I have a feeling that maybe what I want is a metaclass but I'm not entirely certain. I guess the thing I feel shaky about is inheritance with the classmethod.

Python code:
class SOFElement(object):
    fields = [
        'sample_precision',
        'height_in_pixels',
        'width_in_pixels',
        'num_components',
    ]

    @classmethod
    def from_dict(cls, d):
        obj = SOFElement()

        for field in SOFElement.fields:
            setattr(obj, field, d[field])

        return obj

    def __init__(self):
        self.sample_precision = None
        self.height_in_pixels = None
        self.width_in_pixels  = None
        self.num_components   = None

    def to_dict(self):
        d = {}
        
        for field in SOFElement.fields:
            d[field] = getattr(self, field)
        
        return d
Thanks.

evensevenone
May 12, 2001
Glass is a solid.
I think all you actually have to do is change
code:
obj = SOFElement()
to
code:
obj = cls()
When you use @classmethod, it passes in the class instead of the instance. So when you do obj=cls(), you're just creating an object of whatever class you got passed in.

And the from_dict will work just fine as is, unless you want your subclass to have extra fields and the to_dict to return those. But you could just iterate through self.fields instead.

Dren
Jan 5, 2001

Pillbug
Worked perfectly, thanks. That cls() will construct an instance was the piece I was forgetting.

accipter
Sep 12, 2003

Dren posted:

generalized behavior...

This will allow you to reuse the code.

Python code:
class Dictable(object):
    @classmethod
    def from_dict(cls, d):
        self = cls()
        for f in self.fields:
            setattr(self, f, d.get(f, None))

        return self

    def to_dict(self):
        return {f: getattr(self, f) for f in self.fields}

class SOFElement(Dictable):
    fields = [
        'sample_precision',
        'height_in_pixels',
        'width_in_pixels',
        'num_components',
    ]

    def __init__(self):
        self.sample_precision = None
        self.height_in_pixels = None
        self.width_in_pixels  = None
        self.num_components   = None

Dren
Jan 5, 2001

Pillbug
Thanks, that's almost exactly what I ended up writing. Even called it Dictable.

Dren
Jan 5, 2001

Pillbug
I just found out that setup.py will make an rpm for you. That is beyond awesome.

Qwertyiop25
Jan 19, 2011

D is for Dank
It's Hammerin' Hank
Green in his name
And Green in his bank.
I'm trying to make a drop-out stack, I.E. the bottom element of the stack is "deleted" when you push an element after the stack is full. The code I have so far is basically just a default stack, but I tried to modify the push method so that when you push a number of elements larger than the "max size" of the stack, it instead will make the node pointing point to the last node point 2nd to last node instead. What I have here doesn't cause any changes to the output and I'm kind of stuck on where to go from here.

code:
from node import Node

class DropoutStack:
    def __init__(self,n):
       self.top = None
       self.size = 0
       self.n = 0 
       self.n = self.size - (self.size - 1)
       
       
    def push(self, newItem):
        self.top = Node(newItem, self.top)
        self.size += 1
        if self.top == self.n:
            self.top == self.top.next.next
        
        
    def pop(self):
        oldItem = self.top.data
        self.top = self.top.next
        self.size -= 1
        if self.size == 0:
            print "\n" "ERROR: Stack is empty"
            return None
        else:
            return oldItem
    def peek(self):
        if self.size == 0:
            print "\n" "ERROR: Stack is empty"
            return None
        else:
            return self.top.data

    def __len__(self):
        return self.size

    def isEmpty(self):
        return len(self) == 0

    def __str__(self):
        def strHelper(probe):
            if probe is None:
                return ""
            else:
                return strHelper(probe.next)+ \
                       str(probe.data) + " "
        return strHelper(self.top)

                


    
def main():
    s = DropoutStack(5)
    print "Length:", len(s)
    print "Empty:", s.isEmpty()
    print "Push 1-10"
    for i in xrange(10):
        s.push(i + 1)
    print "Peeking:", s.peek() 
    print "Items (bottom to top):",  s
    print "Length:", len(s)
    print "Empty:", s.isEmpty()
    print "Push 11"
    s.push(11)
    print "Popping items (top to bottom):",
    while not s.isEmpty(): print s.pop(),
    print "\nLength:", len(s)
    print "Empty:", s.isEmpty()

main()

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

Qwertyiop25 posted:

code:
from node import Node

class DropoutStack:
    def __init__(self,n):
       self.top = None
       self.size = 0
       self.n = 0 
       self.n = self.size - (self.size - 1)

I'm curious what you think this is going to do.

Extortionist
Aug 31, 2001

Leave the gun. Take the cannoli.

Qwertyiop25 posted:

code:
    def push(self, newItem):
        self.top = Node(newItem, self.top)
        self.size += 1
        if self.top == self.n:
            self.top == self.top.next.next

I think you might also have a few problems here.

I'm guessing self.top == self.n should be self.size == self.n? And I'm figuring that you meant to decrement size (or hold off incrementing it) when you reached the stack's size limit, and also that you meant to have an assignment in that last line, instead of a comparison.

...And I'm going to guess that self.top = self.top.next.next isn't going to do what you want the stack to be doing.

Extortionist fucked around with this message at 08:54 on May 3, 2013

tef
May 30, 2004

-> some l-system crap ->

Qwertyiop25 posted:

I'm trying to make a drop-out stack, I.E. the bottom element of the stack is "deleted" when you push an element after the stack is full.

c.f ring buffers?

quote:

def isEmpty(self):
return len(self) == 0

instead of the Javaesque isEmpty, you could instead provide a __bool__ method.


Or perhaps you can do the following.

code:
import collections

bounded_stack = collections.deque(maxlen=10)

for i in range(0,20):
    bounded_stack.append(i)

for i in bounded_stack:
    print i
http://docs.python.org/2/library/collections.html#collections.deque

Smarmy Coworker
May 10, 2008

by XyloJW

dantheman650 posted:

This works perfectly. Thank you again for your patience and clear explanations.



I didn't know about the code tag! I will use it in the future. Closing and reopening the interpreter worked fine, and I didn't use reload since you warned against it.

I added the Python directory to PATH and am still getting that error if I first don't CD to my programs directory, but that's ok - it only takes a second to CD and that works fine for now.

I'm going to stop cluttering the thread now and go practice!

Python on Windows comes bundled with an IDE (Idle) as well as a commandline shell environment and I would seriously just use those. Both are literally in its start menu folder. If you are using Windows 8 I am sorry for your lots.

As an alternative, I would recommend PyDev for Eclipse even though Eclipse is a terrible program and PyDev is an terrible okay plugin (comes equipped with PyUnit stuff). The only thing I really like about it is how it has an "autocomplete" (I don't know how to describe it) window that displays all the methods/variables available to you when you do <module/class/whatever>.<a window pops up> which is incredibly helpful if you don't want to have docs open all the time.

Smarmy Coworker fucked around with this message at 19:10 on May 3, 2013

bonds0097
Oct 23, 2010

I would cry but I don't think I can spare the moisture.
Pillbug

ARACHNOTRON posted:

Python on Windows comes bundled with an IDE (Idle) as well as a commandline shell environment and I would seriously just use those. Both are literally in its start menu folder. If you are using Windows 8 I am sorry for your lots.

As an alternative, I would recommend PyDev for Eclipse even though Eclipse is a terrible program and PyDev is a terrible plugin. The only thing I really like about it is how it has an "autocomplete" (I don't know how to describe it) window that displays all the methods/variables available to you when you do <module/class/whatever>.<a window pops up> which is incredibly helpful if you don't want to have docs open all the time.

If you're looking for autocomplete, Sublime Text 2 is much nicer than Eclipse, without the unnecessary bloat. It has some great Python plugins. Also, it's the best text editor in the universe.

Smarmy Coworker
May 10, 2008

by XyloJW
Honestly I just use gedit and VIM most of the time but that editor looks really rad and I might at least download it.

I don't know if I can deal with ctrl+D not being Delete Line though

JetsGuy
Sep 17, 2003

science + hockey
=
LASER SKATES

ARACHNOTRON posted:

Honestly I just use gedit and VIM most of the time but that editor looks really rad and I might at least download it.

I don't know if I can deal with ctrl+D not being Delete Line though

Aquamacs. :smug:

bonds0097
Oct 23, 2010

I would cry but I don't think I can spare the moisture.
Pillbug

ARACHNOTRON posted:

Honestly I just use gedit and VIM most of the time but that editor looks really rad and I might at least download it.

I don't know if I can deal with ctrl+D not being Delete Line though

The keybinds (and preferences) are just JSON files so you can tweak that however you like. Furthermore, it has a 'Vintage' mode which basically works like VIM with Command and Insert mode.

And if you don't jizz in your pants the first time you do multiple simultaneous edits, you have no soul.

Dren
Jan 5, 2001

Pillbug
What do you mean multiple simultaneous edits?

bonds0097
Oct 23, 2010

I would cry but I don't think I can spare the moisture.
Pillbug

Dren posted:

What do you mean multiple simultaneous edits?

You can edit multiple parts of the same file simultaneously. You can see it in action here: http://www.sublimetext.com/

Here's an example of it in Visual Studio via an extension: http://www.hanselman.com/blog/SimultaneousEditingForVisualStudioWithTheFreeMultiEditExtension.aspx

Adbot
ADBOT LOVES YOU

deimos
Nov 30, 2006

Forget it man this bat is whack, it's got poobrain!
This is multi-selection editing:


Smart rearrange is also awesome:

  • Locked thread