Re: New to python, do I need an IDE or is vim still good enough?

2013-01-06 Thread Wayne Werner

On Fri, 4 Jan 2013, Roy Smith wrote:


In article ,
Cameron Simpson  wrote:


On 01/04/13 01:34, Anssi Saari wrote:
| Just curious since I read the same thing in a programming book recently
| (21st century C). So what's the greatness that terminal multiplexors
| offer over tabbed terminals? Especially for software development?


There's no doubt that you need access to multiple terminal sessions.
Whether you achieve that with multiple terminal windows on your desktop,
multiple desktops, tabbed terminals, or something like screen is
entirely personal preference.


+1

I use a tiling WM (awesomewm), but I still find that tmux has its place. 
Usually I'll have a terminal per box that I'm working on, and a tmux 
session within that.


This allows me to detach and reattach from any system I'm on. In addition, 
if I lose my connection, I don't have to figure out which processes I had 
in bg. There's also the neat ability (at least with tmux - I haven't used 
screen for a while now) to work across sessions - so I might have a 
personal session (with things like alpine and irssi), a dev session (with 
Vim, a python prompt, and a shell) - and I can either keep them separate 
if I need to focus, or join the windows if I need some help.


One thing that I've noticed that tmux does poorly is handle the mouse for 
selecting. And as I haven't yet written or found a cross-platform/machine 
clipboard manager, using the tmux copy or xclip doesn't really help that 
much :P


I'd say the main benefit (aside from tiling) is the attach/detach. Unless 
your machine powers off or you kill tmux/screen, your sessions will stay 
around.


-W
--
http://mail.python.org/mailman/listinfo/python-list


Re: New to python, do I need an IDE or is vim still good enough?

2013-01-04 Thread Roy Smith
In article ,
 Cameron Simpson  wrote:

> On 01/04/13 01:34, Anssi Saari wrote:
> | Just curious since I read the same thing in a programming book recently
> | (21st century C). So what's the greatness that terminal multiplexors
> | offer over tabbed terminals? Especially for software development?

There's no doubt that you need access to multiple terminal sessions.  
Whether you achieve that with multiple terminal windows on your desktop, 
multiple desktops, tabbed terminals, or something like screen is 
entirely personal preference.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: New to python, do I need an IDE or is vim still good enough?

2013-01-04 Thread Cameron Simpson
On 01/04/13 01:34, Anssi Saari wrote:
| Just curious since I read the same thing in a programming book recently
| (21st century C). So what's the greatness that terminal multiplexors
| offer over tabbed terminals? Especially for software development?

Do you include tiling terminal emulators? I user iTerm2 a lot on Macs,
and it does both tabs (one terminal visible at a time, switch sideways
to change terminals) and tiling/panes: multiple terminals visible in
split panes within the current window.

So I have distinct windows, generally full screen, one per desktop, with
desktops for work zones. One a given desktop, just the one window with a
few panes panes and sometimes more tabs-with-panes.

So superficially, little need for screen or tmux.

However I use screen (tmux some time when I have time to learn to use
it) for the following:

  - named sessions:

I've a small shell script called "scr" to do some common things with
"screen". With no arguments:

  [/Users/cameron]fleet*> scr
  13455.ADZAPPER
  2   59094.CONSOLE_FW1
  3   28691.MACPORTS
  43649.PORTFWD

So 4 named screen sessions. To join one "scr ADZAPPER", for example.

  - detached or at any rate detachable mail editing

I've got my mutt editor set to a script that forked the new message
editing in screen session named after the subject line. Normally I
just compose and send, and that is seamless. But if I have to put
things off for a complex or delayed message, I can just detahc from
the session and be back in mutt to get on with other things.

I imagine I could apply this more widely in some contexts.

Plenty of people use the split screen modes in screen or tmux; personally
I find this a little fiddly because focus-follows-mouse doesn't work
there (though I discovered the other day that vim's split modes can do
focus follow mouse:-)

But in a restricted environment (eg some hostile one with a crude
terminal emulator without these nice tabs/panes) the splitting can be
useful.

On 04Jan2013 10:59, Tim Chase  wrote:
| - the ability to monitor windows for activity/silence (at least GNU 
| Screen offered this; I haven't dug for it yet in tmux which I'm 
| learning).  This is nice for backgrounding a compile and being 
| notified when it goes silent (usually means it's done) or watching a 
| long-running quiet process to get notification when it finally has 
| some output.  I used this feature a LOT back when I did C/C++ work.

I used to do this:

  make foo; alert "MADE FOO (exit=$?)"

where "alert" is a personal script to do the obvious. On a Mac it pops
up a notification. Of course I need to do that at the start, alas.

I used to use iTerm's tab header colouring to notice idleness, and it
was very useful in certain circumstances, generally wordy and slow
startups of multiple things. Don't seem to do it much at present.

Cheers,
-- 
Cameron Simpson 

Having been erased,
The document you're seeking
Must now be retyped.
- Haiku Error Messages 
http://www.salonmagazine.com/21st/chal/1998/02/10chal2.html
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: New to python, do I need an IDE or is vim still good enough?

2013-01-04 Thread Tim Chase

On 01/04/13 01:34, Anssi Saari wrote:

Ben Finney  writes:

And any decent Unix-alike (most OSen apart from Windows) comes with its
own IDE: the shell, a good text editor (Vim or Emacs being the primary
candidates), and a terminal multiplexor (such as ‘tmux’ or GNU Screen).


Just curious since I read the same thing in a programming book recently
(21st century C). So what's the greatness that terminal multiplexors
offer over tabbed terminals? Especially for software development?

For sure I use screen at the remote end of ssh connections where I don't
want the application like irssi to die if the connection goes down but
other than that?


The reattaching is a nice feature--especially since you can start 
some work in one location, then SSH into the box remotely and 
reattach, resuming where you left off.  Other nice things include


- if it's a remote machine, only connecting once.  This is more a 
factor if you need to enter a password, rather than using 
passwordless public/private key auth.  But even with passwordless 
key-pairs, you still have to type "ssh user@host" rather than 
"{prefix key}c" to create a new connection on the same machine.


- the ability to monitor windows for activity/silence (at least GNU 
Screen offered this; I haven't dug for it yet in tmux which I'm 
learning).  This is nice for backgrounding a compile and being 
notified when it goes silent (usually means it's done) or watching a 
long-running quiet process to get notification when it finally has 
some output.  I used this feature a LOT back when I did C/C++ work.


- both offer the ability to do screen-sharing with other parties, as 
well as granting them various permissions (user X can watch but not 
interact with the session, while user Y can issue commands to the 
terminal as well) which is nice for remotely pair programming, or 
teaching somebody the ropes or troubleshooting.


- depending on your tabbed terminal windows, terminal multiplexors 
usually offer some split-screen abilities (last I checked, GNU 
Screen only offered horizontal splits; tmux had both vertical & 
horizontal splits).  As a Vim user (which doesn't have a way to 
include a terminal window inside Vim unless you rebuild it with 
unofficial patches), this allows me to have an editor in one 
{screen|tmux} window and a shell in the other and be able to see 
them together.  I don't use it much, but it's nice to have when I do 
need it.


- tmux offers the ability to transmit keyboard input to all 
linked/synchronized windows, so you can connect to multiple servers 
and then issue the same commands and they get run across all of 
them.  I believe Screen offers a similar ability to broadcast 
keystrokes to all windows, but with a clunkier interface.  Sort of a 
poor-man's "clusterssh".  I've not needed this one, but it's there 
in case you manage clusters or develop/deploy with them.



Those are just a few of the things that come to mind.  Some might be 
replicated by a tabbed terminal window; others less so.


-tkc



--
http://mail.python.org/mailman/listinfo/python-list


Re: New to python, do I need an IDE or is vim still good enough?

2013-01-04 Thread jrodkeyjr
If you are going to review an IDE, or multiple, I would recommend Komodo and 
Komodo Edit.

On Thursday, December 27, 2012 2:01:16 PM UTC-6, mogul wrote:
> 'Aloha!
> 
> 
> 
> I'm new to python, got 10-20 years perl and C experience, all gained on unix 
> alike machines hacking happily in vi, and later on in vim.
> 
> 
> 
> Now it's python, and currently mainly on my kubuntu desktop.
> 
> 
> 
> Do I really need a real IDE, as the windows guys around me say I do, or will 
> vim, git, make and other standalone tools make it the next 20 years too for 
> me? 
> 
> 
> 
> Oh, by the way, after 7 days I'm completely in love with this python thing. I 
> should have made the switch much earlier!
> 
> 
> 
> /mogul %-)

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: New to python, do I need an IDE or is vim still good enough?

2013-01-04 Thread Chris Angelico
On Fri, Jan 4, 2013 at 6:34 PM, Anssi Saari  wrote:
> Ben Finney  writes:
>
>> And any decent Unix-alike (most OSen apart from Windows) comes with its
>> own IDE: the shell, a good text editor (Vim or Emacs being the primary
>> candidates), and a terminal multiplexor (such as ‘tmux’ or GNU Screen).
>
> Just curious since I read the same thing in a programming book recently
> (21st century C). So what's the greatness that terminal multiplexors
> offer over tabbed terminals? Especially for software development?

The main thing is that you'll need a _lot_ of terminals. On my Debian
and Ubuntu GNOME-based systems, I tend to assign one desktop to each
of several "modes", usually with my (tabbed) editor and browser on the
first desktop. At the moment, desktop #3 (hit Ctrl-Alt-RightArrow
twice) is for building Pike, running Gypsum, and git-managing Gypsum;
desktop #2 is for my poltergeist controllers (MIDI to my keyboard),
with a few different windows depending on what I'm doing; and desktop
#1 is... everything else. SciTE, Google Chrome, a couple of Nautilus
windows, and roughly twenty terminals doing various things like
Command & Conquer Renegade, iptables management, SSH sessions to two
other servers, the Yosemite project... wow, what a lot of random junk
I have running on Sikorsky at the moment. It seems I currently have 25
instances of bash running, in addition to the non-bash windows.

Tabbed terminals probably would work fine, but I've personally just
never gotten accustomed to any. You will want some kind of system that
lets you group related shell sessions together (eg one for 'make', one
for running the app, and one for git, all relating to one project),
and add more terminals to a group as required. The most important
editing key is command recall (up arrow or similar), and keeping three
or four different command histories per project is hugely
advantageous.

ChrisA
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: New to python, do I need an IDE or is vim still good enough?

2013-01-04 Thread Anssi Saari
Ben Finney  writes:

> Hans Mulder  writes:
>
>> Don't bother: Python comes with a free IDE named IDLE.
>
> And any decent Unix-alike (most OSen apart from Windows) comes with its
> own IDE: the shell, a good text editor (Vim or Emacs being the primary
> candidates), and a terminal multiplexor (such as ‘tmux’ or GNU Screen).

Just curious since I read the same thing in a programming book recently
(21st century C). So what's the greatness that terminal multiplexors
offer over tabbed terminals? Especially for software development?

For sure I use screen at the remote end of ssh connections where I don't
want the application like irssi to die if the connection goes down but
other than that?

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: New to python, do I need an IDE or is vim still good enough?

2013-01-03 Thread Gisle Vanem

"Wayne Werner"  wrote:


Yep. That's how I feel. I had used ViEmu in Visual Studio for coding in .NET at
work - but I found that the buffers & macros were more powerful. So now I do
most of my programming in Vim, and only head to VS if I need autocomplete or
some of it's auto-generation tools.


Learning X different IDEs for different languages and uses can be 
confusing. So if you use Visual-Studio a lot there is Python Tools for VS [1].

A great but kinda slow extension to VS. Sticking to VS is also useful
if one does Swig and need to debug your crashing .pyd modules.

[1] http://pytools.codeplex.com/

--gv
--
http://mail.python.org/mailman/listinfo/python-list


Re: New to python, do I need an IDE or is vim still good enough?

2013-01-02 Thread Mitya Sirenef

On 01/02/2013 10:17 PM, Wayne Werner wrote:

On Tue, 1 Jan 2013, Mitya Sirenef wrote:


On 01/01/2013 02:02 PM, Roy Smith wrote:
That's true with Vim, as well, especially when I'm making a custom
mapping and I can NEVER remember what some combination does, even though
if I actually needed to use it, it pops right out, so to find out, I
have to try it and then I say, "of course, dammit, I use this command 50
times every single day!"; so it's a curious case of one-directional
memory.


I've found writing macros helps me a lot in this regard. I do 
qaq"aP

fairly frequently.

-W



But how does that help remember commands?

(I also use recording, but I use qq because it's easier to type
and I have a Q mapping that plays back q register).

 -m

--
Lark's Tongue Guide to Python: http://lightbird.net/larks/

--
http://mail.python.org/mailman/listinfo/python-list


Re: New to python, do I need an IDE or is vim still good enough?

2013-01-02 Thread Wayne Werner

On Tue, 1 Jan 2013, Ramchandra Apte wrote:


On Friday, 28 December 2012 01:31:16 UTC+5:30, mogul  wrote:

'Aloha!



I'm new to python, got 10-20 years perl and C experience, all gained on unix 
alike machines hacking happily in vi, and later on in vim.



Now it's python, and currently mainly on my kubuntu desktop.



Do I really need a real IDE, as the windows guys around me say I do, or will 
vim, git, make and other standalone tools make it the next 20 years too for me?



Oh, by the way, after 7 days I'm completely in love with this python thing. I 
should have made the switch much earlier!



/mogul %-)


I use Eclipse only because it has PEP 8 and Pylint integration.
Ezio Melotti, core Python developer, said in personal chat, that he uses Kate.
IDEs aren't that useful when coding in Python.


I concur. I think it's because with a language that has 43(?) keywords and 
I believe it's 12 different statement types, you can easily fit it all in 
your head. What you can't fit in your head is found in the docstrings of 
whatever you're using.


Give me an interactive interpreter, vim, and a web browser, and I'm more 
than fine.


-W
--
http://mail.python.org/mailman/listinfo/python-list


Re: New to python, do I need an IDE or is vim still good enough?

2013-01-02 Thread Wayne Werner

On Tue, 1 Jan 2013, Mitya Sirenef wrote:


On 01/01/2013 02:02 PM, Roy Smith wrote:
That's true with Vim, as well, especially when I'm making a custom
mapping and I can NEVER remember what some combination does, even though
if I actually needed to use it, it pops right out, so to find out, I
have to try it and then I say, "of course, dammit, I use this command 50
times every single day!"; so it's a curious case of one-directional
memory.


I've found writing macros helps me a lot in this regard. I do qaq"aP
fairly frequently.

-W
--
http://mail.python.org/mailman/listinfo/python-list


Re: New to python, do I need an IDE or is vim still good enough?

2013-01-02 Thread Wayne Werner

On Wed, 2 Jan 2013, Michael Torrie wrote:

On 01/01/2013 11:43 AM, Mitya Sirenef wrote:

Therefore, deleting 3 WORDs is 3daW (mnemonic: del a WORD 3 times).


Interesting.  I typically use just d3w.  3daW seems to delete 3 lines
for me, the same result as d3.  Another favorite command is d or
c followed by a number and then the right arrow key, for manipulating
letters instead of words.


Right arrow and not l? Surely you jest! ;)



In any case, I can be way more productive with just a few commands
(maybe 3 or 4 commands or concepts) in Vim than in almost any GUI
editor.  In my experience, Vim users almost always find this to be true
for them as well.  Vim really hits the sweet spot for productivity and
usability.  The only thing about Vim that I find clunky is how code
folding macros work, and also code completion hacks (which I have never
needed anyway).


Yep. That's how I feel. I had used ViEmu in Visual Studio for coding in .NET at
work - but I found that the buffers & macros were more powerful. So now I do
most of my programming in Vim, and only head to VS if I need autocomplete or
some of it's auto-generation tools.

(I'm even writing this email in Vim as my external editor from alpine ;)
-W
--
http://mail.python.org/mailman/listinfo/python-list


Re: New to python, do I need an IDE or is vim still good enough?

2013-01-02 Thread Mitya Sirenef

On 01/02/2013 04:33 PM, Michael Torrie wrote:

On 01/01/2013 11:43 AM, Mitya  Sirenef wrote:

>> Therefore, deleting 3 WORDs is 3daW (mnemonic: del a WORD 3 times).
>
> Interesting. I typically use just d3w. 3daW seems to delete 3 lines
> for me, the same result as d3. Another favorite command is d or
> c followed by a number and then the right arrow key, for manipulating
> letters instead of words.


d3w is a different command, it means delete 3 words *ahead* from cursor.
e.g.:

func() lst[] lst2[ind] foo bar

Now put the cursor on letter 'c' (4th from beginning) and use the
command 3daW, it should delete the 3 WORDs, leaving just the 'foo bar'.





>
> In any case, I can be way more productive with just a few commands
> (maybe 3 or 4 commands or concepts) in Vim than in almost any GUI
> editor. In my experience, Vim users almost always find this to be true
> for them as well. Vim really hits the sweet spot for productivity and
> usability. The only thing about Vim that I find clunky is how code
> folding macros work, and also code completion hacks (which I have never
> needed anyway).


Vim does have a lot of flaws, alas. The highest ones on my list is that
python integration (as a scripting language) is wonky; python can't be
run alongside Vim process; double-escaping is terrible (stuff like
\blah); process of development is slowed down too much by
over-emphasis on backwards compatibility; the way arguments and counts
are implemented between mappings, commands and functions is byzantine
and way overcomplicated..

That said, Vim is still 1k% better than emacs and 3k% better than
anything else :-).

It's really odd that large companies like google, microsoft, ibm,
facebook don't all chip in to give Bram a few million to hire a few
people and knock the Vim out into the stratosphere, given how much these
companies' employees used Vim for many hours, daily, to great benefit
for said companies. Oh well.

 -m


--
Lark's Tongue Guide to Python: http://lightbird.net/larks/

--
http://mail.python.org/mailman/listinfo/python-list


Re: New to python, do I need an IDE or is vim still good enough?

2013-01-02 Thread Michael Torrie
On 01/01/2013 11:43 AM, Mitya Sirenef wrote:
> Therefore, deleting 3 WORDs is 3daW (mnemonic: del a WORD 3 times).

Interesting.  I typically use just d3w.  3daW seems to delete 3 lines
for me, the same result as d3.  Another favorite command is d or
c followed by a number and then the right arrow key, for manipulating
letters instead of words.

In any case, I can be way more productive with just a few commands
(maybe 3 or 4 commands or concepts) in Vim than in almost any GUI
editor.  In my experience, Vim users almost always find this to be true
for them as well.  Vim really hits the sweet spot for productivity and
usability.  The only thing about Vim that I find clunky is how code
folding macros work, and also code completion hacks (which I have never
needed anyway).
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: New to python, do I need an IDE or is vim still good enough?

2013-01-02 Thread Matty Sarro
That's really a question for you - do you want the features of an IDE?
Aptana includes pydev, and is built on eclipse which is a great
swiss-army-knife IDE. If you like KISS, vim is an excellent choice. Go with
whichever you are more comfortable using.


On Wed, Jan 2, 2013 at 1:36 PM, Neil Cerutti  wrote:

> On 2012-12-30, Jamie Paul Griffin  wrote:
> > Stick with what you've been using for the last couple of
> > decades. These tools have stood the test of time for a good
> > reason: they're powerful, efficient and made for the task of
> > programming.
>
> There is a good Python plugin for Vim that will allow simple
> reindenting and a bunch of other cool cursor movement powers I
> don't even use. ctags will also work, though I've never really
> needed it.
>
> --
> Neil Cerutti
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: New to python, do I need an IDE or is vim still good enough?

2013-01-02 Thread Neil Cerutti
On 2012-12-29, Roy Smith  wrote:
> emacs will parse that, highlight the filenames and line numbers
> and if I type M-`, it'll take me to the line of the next error
> (including opening the file if it's not already open).
>
> I assume other smart editors have similar capabilities.
> Different tools have different combinations of these, or
> slightly different implementations.  Find one you like and
> learn all of it's capabilities.  It makes a huge difference in
> how productive you are.

I used that power all the time writing C and C++ code. It felt
indespensable. But even though I can do the same with Python, it
doesn't feel crucial when writing Python. The errors are more
few. ;)

-- 
Neil Cerutti
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: New to python, do I need an IDE or is vim still good enough?

2013-01-02 Thread Neil Cerutti
On 2012-12-30, Jamie Paul Griffin  wrote:
> Stick with what you've been using for the last couple of
> decades. These tools have stood the test of time for a good
> reason: they're powerful, efficient and made for the task of
> programming. 

There is a good Python plugin for Vim that will allow simple
reindenting and a bunch of other cool cursor movement powers I
don't even use. ctags will also work, though I've never really
needed it.

-- 
Neil Cerutti
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: New to python, do I need an IDE or is vim still good enough?

2013-01-01 Thread Ramchandra Apte
On Friday, 28 December 2012 01:31:16 UTC+5:30, mogul  wrote:
> 'Aloha!
> 
> 
> 
> I'm new to python, got 10-20 years perl and C experience, all gained on unix 
> alike machines hacking happily in vi, and later on in vim.
> 
> 
> 
> Now it's python, and currently mainly on my kubuntu desktop.
> 
> 
> 
> Do I really need a real IDE, as the windows guys around me say I do, or will 
> vim, git, make and other standalone tools make it the next 20 years too for 
> me? 
> 
> 
> 
> Oh, by the way, after 7 days I'm completely in love with this python thing. I 
> should have made the switch much earlier!
> 
> 
> 
> /mogul %-)

I use Eclipse only because it has PEP 8 and Pylint integration.
Ezio Melotti, core Python developer, said in personal chat, that he uses Kate.
IDEs aren't that useful when coding in Python.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: New to python, do I need an IDE or is vim still good enough?

2013-01-01 Thread jussij
FWIW on the Windows platform the Zeus IDE has support for Python:

http://www.zeusedit.com/python.html

Zeus does the standard Python syntax highlighting, code completion, smart 
indenting, class browsing, code folding etc.

Zeus also has limited Python debugger support and is fully scriptable 
in Python.

Jussi Jumppanen
Author: Zeus Editor
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: New to python, do I need an IDE or is vim still good enough?

2013-01-01 Thread Mitya Sirenef

On 01/01/2013 02:02 PM, Roy Smith wrote:

In article  ,

> Mitya Sirenef  wrote:
>
>> Clunky is the last word I'd use to describe it (ok maybe for Emacs :-)
>> I probably remember about 200 commands, plus or minus, but a lot of them
>> fit into a consistent scheme which makes them much easier to remember
>
> At some point, it becomes muscle memory, which means you don't even
> consciously know what you're typing. Your brain just says, "delete the
> next three words" and your fingers move in some way which causes that to
> happen. This is certainly true with emacs, and I imagine it's just as
> true with people who use inferior editors :-)
>
> I used to do a bunch of pair programming with another emacs power user.
> Every once in a while, one of us would say something like, "What did you
> just do?", when the other performed some emacs technique one of us was
> not familiar with. Invariably, the answer would be, "I don't know", and
> you would have to back up and recreate the key sequence. Or, just run
> C-? l, which tells you the last 100 characters you typed.
>
> Case in point. I use C-? l moderately often, when I make some typo and
> I'm not sure what I did wrong. But, despite the fact that my fingers
> now how to perform "show me the last stuff I typed", I had to go hunting
> to find the actual keystrokes which does that when typing the above
> paragraph :-)


That's true with Vim, as well, especially when I'm making a custom
mapping and I can NEVER remember what some combination does, even though
if I actually needed to use it, it pops right out, so to find out, I
have to try it and then I say, "of course, dammit, I use this command 50
times every single day!"; so it's a curious case of one-directional
memory.






--
Lark's Tongue Guide to Python: http://lightbird.net/larks/

--
http://mail.python.org/mailman/listinfo/python-list


Re: New to python, do I need an IDE or is vim still good enough?

2013-01-01 Thread Roy Smith
In article ,
 Mitya Sirenef  wrote:

> Clunky is the last word I'd use to describe it (ok maybe for Emacs :-)
> I probably remember about 200 commands, plus or minus, but a lot of them
> fit into a consistent scheme which makes them much easier to remember

At some point, it becomes muscle memory, which means you don't even 
consciously know what you're typing.  Your brain just says, "delete the 
next three words" and your fingers move in some way which causes that to 
happen.  This is certainly true with emacs, and I imagine it's just as 
true with people who use inferior editors :-)

I used to do a bunch of pair programming with another emacs power user.  
Every once in a while, one of us would say something like, "What did you 
just do?", when the other performed some emacs technique one of us was 
not familiar with.  Invariably, the answer would be, "I don't know", and 
you would have to back up and recreate the key sequence.  Or, just run 
C-? l, which tells you the last 100 characters you typed.

Case in point.  I use C-? l moderately often, when I make some typo and 
I'm not sure what I did wrong.  But, despite the fact that my fingers 
now how to perform "show me the last stuff I typed", I had to go hunting 
to find the actual keystrokes which does that when typing the above 
paragraph :-)
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: New to python, do I need an IDE or is vim still good enough?

2013-01-01 Thread Mitya Sirenef

On 12/31/2012 10:46 PM, Steven D'Aprano wrote:

On Sat, 29 Dec 2012 14:00:23  -0500, Mitya Sirenef wrote:

>
>> I think the general idea is that with editors like Vim you don't get
>> distracted by having to do some kind of an editor task, letting you keep
>> your full attention on the code logic. For instance, if I need to change
>> a block inside parens, I type ci) (stands for change inside parens),
>> while with a regular editor I'd have to do it manually and by the time
>> I'm done, I'd forget the bigger picture of what I'm doing with the code.
>
> See, by the time I remembered what obscure (to me) command to type, or
> searched the help files and the Internet, I'd have forgotten what the
> hell it was I was trying to do. Well, almost. My memory is not quite that
> bad, but it would certainly be a much bigger disruption to my coding than
> just doing the edit by hand.


I would agree with you if I had to look up a command every time I use
it. The way it really works for me is that either I use a command often
enough that I remember it from the first time I looked it up, and the
memory is reinforced every time I use it, OR it's such a rare command
that looking it up is not a problem (obviously if it's faster to do it
by hand than to look it up, I can do that, as well, which in Vim means
using lower level commands that still don't require you leaving the home
row.)




> I do love the power of command line tools, but I think that for rich
> applications like editors, the interface is so clunky that I'd rather use
> a less-powerful editor, and do more editing manually, than try to
> memorize "hundreds" of commands.


Clunky is the last word I'd use to describe it (ok maybe for Emacs :-)
I probably remember about 200 commands, plus or minus, but a lot of them
fit into a consistent scheme which makes them much easier to remember:
there's (change delete yank vis-select)*(inner outer)*(letter word WORD 
paragraph )]} )


(Where word includes 'keyword' characters and WORD is separated by spaces).

So, these correspond to commands (cdyv)(ia)(lwWp)]}).

Therefore, deleting 3 WORDs is 3daW (mnemonic: del a WORD 3 times).

I think I have a pretty bad memory but I remembered all of these
commands a few at a time without too much trouble. And they're extremely
useful even now as I'm editing this email.





> With a GUI app, I can run the mouse over the menus and see a high-level
> overview of everything the app can do in a matter of a second or two.
> (Perhaps three or five seconds if the app over-uses hierarchical menus.)
> But with a text interface, commands are much less discoverable. I can
> also use *spacial* memory to zero in on commands much more easily than
> verbal memory -- I have no idea whether the command I want is called
> "Spam" or "Ham" or "Tinned Bully Beef", but I know it's in the top
> quarter of the "Lunch" menu, and I will recognise it when I see it.


It's not a binary choice, GVim has a customizable menu system with a
simple text format for adding menus (from Vim manual):

To create a new menu item, use the ":menu" commands.  They are 
mostly like
the ":map" set of commands but the first argument is a menu item 
name, given

as a path of menus and submenus with a '.' between them. eg:

   :menu File.Save  :w
   :inoremenu File.Save  :w
   :menu Edit.Big\ Changes.Delete\ All\ Spaces  :%s/[ ^I]//g




> On the other hand, it's a lot harder to use a GUI app over a slow SSH
> connection to a remote machine in a foreign country over a flaky link
> than it is to use a command line or text-interface app.


With GVim, you can use gui menus just as easily when you open a file
remotely.




>
>> Another example: >ap stands for "indent a paragraph (separated by blank
>> lines)". And there are many dozens if not hundreds such commands that
>> let you stay focused on the logic of your code.
>
> Ah yes, the famous "a for indent" mnemonic. *wink*


Well, 'a' is mnemonic for 'a', fittingly ;-). > is for indent, just as <
is for dedent. 'a' is to distinguish from inner paragraph command,
which omits blank lines after the paragraph (which matter for other
commands, but not for indent/dedent.): >ip .


 - mitya


--
Lark's Tongue Guide to Python: http://lightbird.net/larks/

--
http://mail.python.org/mailman/listinfo/python-list


Re: New to python, do I need an IDE or is vim still good enough?

2013-01-01 Thread Tim Chase

On 01/01/13 04:12, Cameron Simpson wrote:

I must admit I find Apple's "help" search box neat this way - you
can type a keyword is it will actually find the menu item for
you. Not that I use this for vi, of course...


If you've not used it, Vim's ":helpgrep" command provides full Vim 
regexp power for searching Vim's help.



No, ">" is indent: it means shift-right. For Python you'd set
the shiftwidth to 4


For PEP8, you'd also want to set 'expandtab'.  Just to bring my 
semi-OT reply back around to Python :-)


-tkc



--
http://mail.python.org/mailman/listinfo/python-list


Re: New to python, do I need an IDE or is vim still good enough?

2013-01-01 Thread Cameron Simpson
On 01Jan2013 03:46, Steven D'Aprano  
wrote:
| On Sat, 29 Dec 2012 14:00:23 -0500, Mitya Sirenef wrote:
| > [...] For instance, if I need to change
| > a block inside parens, I type ci) (stands for change inside parens),
| > while with a regular editor I'd have to do it manually and by the time
| > I'm done, I'd forget the bigger picture of what I'm doing with the code.
| 
| See, by the time I remembered what obscure (to me) command to type, or 
| searched the help files and the Internet, I'd have forgotten what the 
| hell it was I was trying to do.

Well, the idea is that your fingers become familiar with the core
commands. An issue of practice. The more complex vi commands are usually
composed from smaller pieces, so the learning curve isn't as steep as it
initially appears. Eg "%" jumps to that matching bracket. And
_therefore_, "c%" changes all text from here to the matching bracket.
There's a whole host of these.

| With a GUI app, I can run the mouse over the menus and see a high-level 
| overview of everything the app can do in a matter of a second or two. 

Well, there is GVim, a GNome X11 interface to vim. I imagine it would
offer that kind of mode.

| (Perhaps three or five seconds if the app over-uses hierarchical menus.) 
| But with a text interface, commands are much less discoverable. I can 
| also use *spacial* memory to zero in on commands much more easily than 
| verbal memory -- I have no idea whether the command I want is called 
| "Spam" or "Ham" or "Tinned Bully Beef", but I know it's in the top 
| quarter of the "Lunch" menu, and I will recognise it when I see it.

I must admit I find Apple's "help" search box neat this way - you can
type a keyword is it will actually find the menu item for you. Not that
I use this for vi, of course...

| > Another example: >ap stands for "indent a paragraph (separated by blank
| > lines)". And there are many dozens if not hundreds such commands that
| > let you stay focused on the logic of your code.
| 
| Ah yes, the famous "a for indent" mnemonic. *wink*

No, ">" is indent: it means shift-right. For Python you'd set the
shiftwidth to 4 (well, I use 2). But again, that's a grammar. Like the
"change" example above it is ">" followed by a cursor motion. So I'm
quite fond of ">}". "}" means jump to next blank line (or end of
paragraph for a prose paradigm). So ">}" means shift right from here to the
next blank line.

When your fingers know the cursor motion commands, folding any of them
into a compound command like "c" or ">" or "<" (guess what that one is)
requires almost no though. It's almost like speaking - you don't think
about grammar in your native language.

| It seems to me, that by the time I would have searched for the right 
| command to use, decided which of the (multiple) matching commands is the 
| right one, then used the command, it would have been quicker and less 
| distracting to have just done the editing by hand. But now I'm just 
| repeating myself.

To repeat yourself in "vi" you just type ".". See? So much faster than
your paragraph above:-)

Cheers,
-- 
Cameron Simpson 

As your attorney, it is my duty to inform you that it is not important that
you understand what I'm doing or why you're paying me so much money. What's
important is that you continue to do so.
- Hunter S. Thompson's Samoan Attorney
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: New to python, do I need an IDE or is vim still good enough?

2012-12-31 Thread Chris Angelico
On Tue, Jan 1, 2013 at 2:55 PM, Steven D'Aprano
 wrote:
> On Sun, 30 Dec 2012 09:30:10 +1100, Chris Angelico wrote:
>
>> Absolutely! Though it's roughly as good to have the current cursor
>> position shown in a status line somewhere, and takes up less real
>> estate. But yes, vital to be able to see that. Even when I'm sitting
>> *right next to* my boss and communicating verbally, I'll talk about the
>> code by quoting line numbers. "Let me explain. (No, there is too much.
>> Let me sum up.) Pull up foobar dot jay ess and go to line 254-ish - see
>> how the frobnosticator always gets called with a quuxed argument?"
>
> I call shenanigans :-P
>
> I don't expect that you keep in your head the line numbers (even the line
> numbers-ish) of interesting or pertinent features of your code,
> *especially* while the code is in active development and the line numbers
> are rapidly changing. I think it is far more likely that you keep
> function, class or method names in your head (after all, you are
> presumably reading and writing those names very often), and when you want
> to demonstrate some feature, you *first* look it up by higher-level
> object ("let's see the frob_quux function") to get the line number.

Neither. You're correct that I don't memorize line numbers; but the
point of them was not to synchronize a screen with a brain, but to
synchronize two screens. So you're also correct that I look it up to
get the line number. But I'm not locating a function; if I wanted
that, I'd use that. No, I'm pointing to a specific line of code.

> Assuming that your functions and methods are not obnoxiously huge, I
> think having a good class browser which lets you jump directly to
> functions or methods is *far* more useful than line numbers, in this
> context.

They're not obnoxiously huge, but even twenty lines is too coarse when
you're trying to explain one line of code. Way too coarse. I want to
pinpoint what I'm talking about.

ChrisA
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: New to python, do I need an IDE or is vim still good enough?

2012-12-31 Thread Steven D'Aprano
On Sun, 30 Dec 2012 09:30:10 +1100, Chris Angelico wrote:

> Absolutely! Though it's roughly as good to have the current cursor
> position shown in a status line somewhere, and takes up less real
> estate. But yes, vital to be able to see that. Even when I'm sitting
> *right next to* my boss and communicating verbally, I'll talk about the
> code by quoting line numbers. "Let me explain. (No, there is too much.
> Let me sum up.) Pull up foobar dot jay ess and go to line 254-ish - see
> how the frobnosticator always gets called with a quuxed argument?"

I call shenanigans :-P

I don't expect that you keep in your head the line numbers (even the line 
numbers-ish) of interesting or pertinent features of your code, 
*especially* while the code is in active development and the line numbers 
are rapidly changing. I think it is far more likely that you keep 
function, class or method names in your head (after all, you are 
presumably reading and writing those names very often), and when you want 
to demonstrate some feature, you *first* look it up by higher-level 
object ("let's see the frob_quux function") to get the line number.

Assuming that your functions and methods are not obnoxiously huge, I 
think having a good class browser which lets you jump directly to 
functions or methods is *far* more useful than line numbers, in this 
context.


-- 
Steven
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: New to python, do I need an IDE or is vim still good enough?

2012-12-31 Thread Steven D'Aprano
On Sat, 29 Dec 2012 14:00:23 -0500, Mitya Sirenef wrote:

> I think the general idea is that with editors like Vim you don't get
> distracted by having to do some kind of an editor task, letting you keep
> your full attention on the code logic. For instance, if I need to change
> a block inside parens, I type ci) (stands for change inside parens),
> while with a regular editor I'd have to do it manually and by the time
> I'm done, I'd forget the bigger picture of what I'm doing with the code.

See, by the time I remembered what obscure (to me) command to type, or 
searched the help files and the Internet, I'd have forgotten what the 
hell it was I was trying to do. Well, almost. My memory is not quite that 
bad, but it would certainly be a much bigger disruption to my coding than 
just doing the edit by hand.

I do love the power of command line tools, but I think that for rich 
applications like editors, the interface is so clunky that I'd rather use 
a less-powerful editor, and do more editing manually, than try to 
memorize "hundreds" of commands.

With a GUI app, I can run the mouse over the menus and see a high-level 
overview of everything the app can do in a matter of a second or two. 
(Perhaps three or five seconds if the app over-uses hierarchical menus.) 
But with a text interface, commands are much less discoverable. I can 
also use *spacial* memory to zero in on commands much more easily than 
verbal memory -- I have no idea whether the command I want is called 
"Spam" or "Ham" or "Tinned Bully Beef", but I know it's in the top 
quarter of the "Lunch" menu, and I will recognise it when I see it.

On the other hand, it's a lot harder to use a GUI app over a slow SSH 
connection to a remote machine in a foreign country over a flaky link 
than it is to use a command line or text-interface app.


> Another example: >ap stands for "indent a paragraph (separated by blank
> lines)". And there are many dozens if not hundreds such commands that
> let you stay focused on the logic of your code.

Ah yes, the famous "a for indent" mnemonic. *wink*


> The trade-off, of course, is that you have to remember all (or most) of
> the commands, but I figured if I spend the next 20-30+ years programming
> in some version of Vim, it's well worth the initial investment.
> 
> By the way, to help me remember the commands, I wrote a small script
> that lets me type in a few characters of a command or its description
> and filters out the list of matching commands. It really helps,
> especially when I change a lot of my mappings.

It seems to me, that by the time I would have searched for the right 
command to use, decided which of the (multiple) matching commands is the 
right one, then used the command, it would have been quicker and less 
distracting to have just done the editing by hand. But now I'm just 
repeating myself.



-- 
Steven
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: New to python, do I need an IDE or is vim still good enough?

2012-12-31 Thread xDog Walker
On Monday 2012 December 31 14:46, Ben Finney wrote:
> “I bought some powdered water, but I don't know what to add.”

Suggest to Stephen Wright to add hot coffee.

-- 
Yonder nor sorghum stenches shut ladle gulls stopper torque wet 
strainers.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: New to python, do I need an IDE or is vim still good enough?

2012-12-31 Thread Chris Angelico
On Tue, Jan 1, 2013 at 9:46 AM, Ben Finney  wrote:
> Hans Mulder  writes:
>
>> Don't bother: Python comes with a free IDE named IDLE.
>
> And any decent Unix-alike (most OSen apart from Windows) comes with its
> own IDE: the shell, a good text editor (Vim or Emacs being the primary
> candidates), and a terminal multiplexor (such as ‘tmux’ or GNU Screen).
>
> Learning to use that development environment will benefit you far more
> than any language-specific tool.

And more than that: Learning to use that development environment gives
you the flexibility to swap out components individually. "The shell"
could be one of several (though bash seems to be the most popular),
the editor is one of many, and there are a good few options for
terminal arrangement (tmux, screen, gnome-terminal, etc). So what if
you decide you don't like vim OR emacs - you can still use the "Unix
IDE" with some other editor. Most IDEs don't have that facility.

It's a question of freedom. Would you let someone else choose what
shoes you're allowed to wear? Then why cede over the choice of
development software? No matter how awesome those shoes are, it's an
unnecessary restriction in freedom.

Of course, you're free to use an IDE if you want to, too. I don't see
much point in it, but if that's how you swing, go for it.

ChrisA
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: New to python, do I need an IDE or is vim still good enough?

2012-12-31 Thread Ben Finney
Hans Mulder  writes:

> Don't bother: Python comes with a free IDE named IDLE.

And any decent Unix-alike (most OSen apart from Windows) comes with its
own IDE: the shell, a good text editor (Vim or Emacs being the primary
candidates), and a terminal multiplexor (such as ‘tmux’ or GNU Screen).

Learning to use that development environment will benefit you far more
than any language-specific tool.

-- 
 \   “I bought some powdered water, but I don't know what to add.” |
  `\—Steven Wright |
_o__)  |
Ben Finney

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: New to python, do I need an IDE or is vim still good enough?

2012-12-31 Thread Hans Mulder
On 31/12/12 12:57:59, Adam Tauno Williams wrote:
> On Thu, 2012-12-27 at 12:01 -0800, mogul wrote:
>> 'Aloha!
>> I'm new to python, got 10-20 years perl and C experience, all gained
>> on unix alike machines hacking happily in vi, and later on in vim.
>> Now it's python, and currently mainly on my kubuntu desktop.
>> Do I really need a real IDE, as the windows guys around me say I do,
> 
> You don't need one.

+1

> You are crazy if you don't WANT one.

ITYM: you'd be crazy if you'd want one.

> Check out geany 

Don't bother: Python comes with a free IDE named IDLE.  Try it
for a few minutes, and you'll find that most of the features
that make vim so wonderful, are missing from IDLE.

Just stay with vim.

-- HansM
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: New to python, do I need an IDE or is vim still good enough?

2012-12-31 Thread Adam Tauno Williams
On Thu, 2012-12-27 at 12:01 -0800, mogul wrote:
> 'Aloha!
> I'm new to python, got 10-20 years perl and C experience, all gained
> on unix alike machines hacking happily in vi, and later on in vim.
> Now it's python, and currently mainly on my kubuntu desktop.
> Do I really need a real IDE, as the windows guys around me say I do,

You don't need one.

You are crazy if you don't WANT one.

Check out geany 

-- 
Adam Tauno Williams 

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: New to python, do I need an IDE or is vim still good enough?

2012-12-30 Thread Jamie Paul Griffin
* Yuvraj Sharma  [2012-12-28 01:37:23 -0800]:

> Use IDLE
> -- 
> http://mail.python.org/mailman/listinfo/python-list
> 

The OP is already a proficient C, C++, perl, ... hacker using console based 
tools and hardcore UNIX editors like vi(1) - I doubt he'll stay with IDLE for 
very long - once you've got accustomed to the UNIX environment and the 
command-line it's difficult and undesirable, in my experience, to switch to GUI 
stuff. 

Stick with what you've been using for the last couple of decades. These tools 
have stood the test of time for a good reason: they're powerful, efficient and 
made for the task of programming. 

Jamie

-- 
Primary Key: 4096R/1D31DC38 2011-12-03
Key Fingerprint: A4B9 E875 A18C 6E11 F46D  B788 BEE6 1251 1D31 DC38
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: New to python, do I need an IDE or is vim still good enough?

2012-12-29 Thread Chris Angelico
On Sun, Dec 30, 2012 at 11:38 AM, Tim Johnson  wrote:
> Along the way, I did use emacs as well and ended doing quite a bit
>   of elisping.

elispsis. n. the intentional omission of unnecessary work which can be
inferred by the editor; often indicated with three consecutive
parentheses ((( )))

ChrisA
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: New to python, do I need an IDE or is vim still good enough?

2012-12-29 Thread Tim Johnson
* Grant Edwards  [121229 10:02]:
> On 2012-12-27, mogul  wrote:
> 
> > I'm new to python, got 10-20 years perl and C experience, all gained
> > on unix alike machines hacking happily in vi, and later on in vim.
> >
> > Now it's python, and currently mainly on my kubuntu desktop.
> >
> > Do I really need a real IDE, as the windows guys around me say I do,
> 
> No.
> 
> > or will vim, git, make and other standalone tools make it the next 20
> > years too for me? 
 
  I've been using vim for 12 years now. And it works pretty good for
  me as an "IDE". I've written a lot of vimscripts to make vim
  better do my bidding and made generous use of contributed scripts.

  I see no reason to think that I would be more productive using
  anything else, but that is just me.

  Along the way, I did use emacs as well and ended doing quite a bit
  of elisping.

  Elisp does have the advantage of asynchronously running the
  interpereter inside of the editor Just one thing that I
  wouldn't mind seeing in vim.

  I do find vim a bit more nimble than emacs, but each to his/her
  own. It's wonderful to have all of the choices.

  """
  They'll take away my vim when they pry it from my cold, dead
  fingers.
  """
-- 
Tim 
tim at tee jay forty nine dot com or akwebsoft dot com
http://www.akwebsoft.com
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: New to python, do I need an IDE or is vim still good enough?

2012-12-29 Thread Chris Angelico
On Sun, Dec 30, 2012 at 9:40 AM, Mitya Sirenef  wrote:
> On 12/29/2012 05:30 PM, Chris Angelico wrote:
>>>
>>> "In the big for loop, a couple of lines down, no, not there, the other
>>> >for loop, yeah, now go down a couple of lines, no that's too far, back
>>> >up one.  Yeah there.  On that line, why do you ..."
>>> >
>>> >with:
>>> >
>>> >"On line 647, why do you ..."
>>
>> Absolutely! Though it's roughly as good to have the current cursor
>> position shown in a status line somewhere, and takes up less real
>> estate.
>
>
> I have to disagree -- if someone is standing next to you
> and they want to refer to a particular line, they can't
> really tell you "move the cursor to that line there, so I
> can read its line number from status line and then tell
> you I'm referring to that line".

Ah, to clarify: We have our separate computers in front of us. So when
I quote a line number, it's by looking at my screen, and allows him to
synchronize his display.

Of course, if you can afford the real estate, and as long as they're
not distracting, a column of numbers doesn't hurt.

ChrisA
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: New to python, do I need an IDE or is vim still good enough?

2012-12-29 Thread Mitya Sirenef

On 12/29/2012 05:30 PM, Chris Angelico wrote:

"In the big for loop, a couple of lines down, no, not there, the other
>for loop, yeah, now go down a couple of lines, no that's too far, back
>up one.  Yeah there.  On that line, why do you ..."
>
>with:
>
>"On line 647, why do you ..."

Absolutely! Though it's roughly as good to have the current cursor
position shown in a status line somewhere, and takes up less real
estate.


I have to disagree -- if someone is standing next to you
and they want to refer to a particular line, they can't
really tell you "move the cursor to that line there, so I
can read its line number from status line and then tell
you I'm referring to that line".

 - mitya

--
Lark's Tongue Guide to Python: http://lightbird.net/larks/

--
http://mail.python.org/mailman/listinfo/python-list


Re: New to python, do I need an IDE or is vim still good enough?

2012-12-29 Thread Chris Angelico
On Sun, Dec 30, 2012 at 8:52 AM, Roy Smith  wrote:
> In article ,
>  Chris Angelico  wrote:
>
>> It's extremely handy; not only errors from
>> compilation/execution, but things like a 'git grep -n' fit too.
>
> Emacs has integrations with many version control systems.  Over the
> years, I've gone back and forth over whether I do my version control
> from within emacs or at the command line.

My point was that it fits _many_ tools, without specific integration
with the tool. But yes, version control integration is a useful tool
(though not one I've personally made use of - I just run git commands
from the command line).

> Again, I would imagine any decent editor these days would have something
> similar.  It just blows my mind when I see people editing program text
> with NotePad or some similar piece of crap.

Yes. And then hopping over to Stack Overflow and trying to figure out
why their PHP script won't create HTTP headers. Combination of poor
language and poor editor...

> Oh, yeah, one other thing I forgot.  You want to use an editor which can
> (preferably as something you can turn on and off easily) put line
> numbers down the left margin of the screen.  For solo editing, it's kind
> of silly.  But if you're doing any kind of pair programming, code
> review, or presentation to a group, it's invaluable.  Compare and
> contrast:
>
> "In the big for loop, a couple of lines down, no, not there, the other
> for loop, yeah, now go down a couple of lines, no that's too far, back
> up one.  Yeah there.  On that line, why do you ..."
>
> with:
>
> "On line 647, why do you ..."

Absolutely! Though it's roughly as good to have the current cursor
position shown in a status line somewhere, and takes up less real
estate. But yes, vital to be able to see that. Even when I'm sitting
*right next to* my boss and communicating verbally, I'll talk about
the code by quoting line numbers. "Let me explain. (No, there is too
much. Let me sum up.) Pull up foobar dot jay ess and go to line
254-ish - see how the frobnosticator always gets called with a quuxed
argument?"

ChrisA
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: New to python, do I need an IDE or is vim still good enough?

2012-12-29 Thread Mitya Sirenef

On 12/29/2012 04:52 PM, Roy Smith wrote:

"In the big for loop, a couple  of lines down, no, not there, the other

> for loop, yeah, now go down a couple of lines, no that's too far, back
> up one. Yeah there. On that line, why do you ..."
>
> with:
>
> "On line 647, why do you ..."


It's even better when it prints line # from top of screen, I have a
handy mapping that jumps directly to a line # and it's much easier to
type 23 or 9 when you jump around a lot.

 - mitya

--
Lark's Tongue Guide to Python: http://lightbird.net/larks/

--
http://mail.python.org/mailman/listinfo/python-list


Re: New to python, do I need an IDE or is vim still good enough?

2012-12-29 Thread Roy Smith
In article ,
 Chris Angelico  wrote:

> Auto-complete is handy, but not critical.

You just wait until your finger joints get to be my age and tell me that 
auto-complete isn't critical :-)

> It's extremely handy; not only errors from
> compilation/execution, but things like a 'git grep -n' fit too.

Emacs has integrations with many version control systems.  Over the 
years, I've gone back and forth over whether I do my version control 
from within emacs or at the command line.

These days (with mercurial), I tend to do most vc-things at the command 
line.  But, I'm addicted to C-x v = (hg diff).  It diffs the current 
buffer against the last checked-in version of the file, and can take me 
directly to any particular changed line.

Again, I would imagine any decent editor these days would have something 
similar.  It just blows my mind when I see people editing program text 
with NotePad or some similar piece of crap.

Oh, yeah, one other thing I forgot.  You want to use an editor which can 
(preferably as something you can turn on and off easily) put line 
numbers down the left margin of the screen.  For solo editing, it's kind 
of silly.  But if you're doing any kind of pair programming, code 
review, or presentation to a group, it's invaluable.  Compare and 
contrast:

"In the big for loop, a couple of lines down, no, not there, the other 
for loop, yeah, now go down a couple of lines, no that's too far, back 
up one.  Yeah there.  On that line, why do you ..."

with:

"On line 647, why do you ..."
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: New to python, do I need an IDE or is vim still good enough?

2012-12-29 Thread Chris Angelico
On Sun, Dec 30, 2012 at 6:52 AM, Roy Smith  wrote:
> Chris Angelico  wrote:
> [regarding
>> Bracket matching
>> Language-sensitive auto-indentation
>> and automatically indents
>
> Yeah, what he said, plus syntax coloring.  And keyword highlighting.
> And autocompletion of variable names.

Syntax coloring I kinda touched on in different pieces; keyword
highlighting isn't, imho, all that important. Apart from reminding you
that the variable name you planned to use is an obscure keyword, it
doesn't save all that much time. Auto-complete is handy, but not
critical.

> And parsing of error messages.
>
> I'll pause a moment to let that sink in.  Grok the fullness of just how
> awesome a feature it is.

And how glaring an omission from my list. Yes. This one *definitely*
belongs there. Though unlike most of the other examples, it's not as
language-specific; you can cover a huge number of utilities by simply
recognizing:

filename:line: message

Coupled with a helpful C compiler, this lets you jump around pretty
easily. For instance, gcc will (if I recall correctly - haven't had to
use this feature in a while, something to do with writing more code in
Python and Pike than C, but anyway), if the arguments to a function
mismatch, show error lines highlighting both the invocation *and* the
declaration, so you can quickly compare (even if they're in different
files).

> emacs will parse that, highlight the filenames and line numbers and if I
> type M-`, it'll take me to the line of the next error (including opening
> the file if it's not already open).
>
> I assume other smart editors have similar capabilities.

Yeah, SciTE has F4 and Shift-F4 to cycle forwards/backwards through
messages, and I expect it's pretty much standard among editors that
can invoke external tools. It's extremely handy; not only errors from
compilation/execution, but things like a 'git grep -n' fit too.

ChrisA
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: New to python, do I need an IDE or is vim still good enough?

2012-12-29 Thread Monte Milanuk

On 12/29/2012 11:52 AM, Roy Smith wrote:


Chris Angelico  wrote:
[regarding

Bracket matching
Language-sensitive auto-indentation
and automatically indents


Yeah, what he said, plus syntax coloring.  And keyword highlighting.
And autocompletion of variable names.


I'll probably get dog-piled by the vim/emacs folks again here... but 
isn't that something most decent text editors do?



On 12/29/2012 11:52 AM, Roy Smith wrote:


And parsing of error messages.

I'll pause a moment to let that sink in.  Grok the fullness of just how
awesome a feature it is.

In emacs, for example. I'll do C-C M (which I have bound to M-X
Compile).  This runs a command and captures the output in a buffer.  If
the output happens to contain something like:

Traceback (most recent call last):
   File
"/home/roy/production/python/local/lib/python2.7/site-packages/nose/case.
py", line 197, in runTest
 self.test(*self.arg)
   File "/home/roy/songza/api2/test_api2.py", line 16, in test_get_api
 data = requests.get(url('api/v2/')).json
   File "/home/roy/songza/api2/test_common.py", line 13, in url
 assert route.startswith('/')
AssertionError

emacs will parse that, highlight the filenames and line numbers and if I
type M-`, it'll take me to the line of the next error (including opening
the file if it's not already open).

I assume other smart editors have similar capabilities.  Different tools
have different combinations of these, or slightly different
implementations.  Find one you like and learn all of it's capabilities.
It makes a huge difference in how productive you are.




While I probably don't use the vast majority of the 'fancy' features of 
most IDEs - most of what I do barely requires any real 'project 
manangement'... there are a couple things that I've gotten *very* used 
to with an IDE.


One is having it run pylint and pep8 checks against code, display the 
output in a friendly format with links straight to the offending items 
and even displaying colored carats in the gutter region and 
high-lighting them.


The other is having it parse my imports, and use them for the 
'auto-complete' aka 'code intelligence' features - and not just the 
standard library stuff, but also GUI toolkits like PyQt4.


I'm pretty sure those things can be done, or something fairly close at 
least, in editors like vim or emacs... but the few times I looked into 
it for vim, it was enough to send me running back to Eclipse/PyDev, even 
if it is kind of an 800lb gorilla otherwise.


It's still on my 'one of these days' list of things to do, though ;)



--
http://mail.python.org/mailman/listinfo/python-list


Re: New to python, do I need an IDE or is vim still good enough?

2012-12-29 Thread Roy Smith
Monte Milanuk  wrote:
> > Maybe its because I'm still just a hobbyist when it comes to coding, but I
> > spend far more time 'thinking' about what I'm doing than typing things in...

If more "professional" programmers spent more time thinking and less 
type typing, the world would be a better place.  Keep doing what you're 
doing.  Really. 

Chris Angelico  wrote:
[regarding 
> Bracket matching
> Language-sensitive auto-indentation
> and automatically indents

Yeah, what he said, plus syntax coloring.  And keyword highlighting.  
And autocompletion of variable names.

And parsing of error messages.

I'll pause a moment to let that sink in.  Grok the fullness of just how 
awesome a feature it is.

In emacs, for example. I'll do C-C M (which I have bound to M-X 
Compile).  This runs a command and captures the output in a buffer.  If 
the output happens to contain something like:

Traceback (most recent call last):
  File 
"/home/roy/production/python/local/lib/python2.7/site-packages/nose/case.
py", line 197, in runTest
self.test(*self.arg)
  File "/home/roy/songza/api2/test_api2.py", line 16, in test_get_api
data = requests.get(url('api/v2/')).json
  File "/home/roy/songza/api2/test_common.py", line 13, in url
assert route.startswith('/')
AssertionError

emacs will parse that, highlight the filenames and line numbers and if I 
type M-`, it'll take me to the line of the next error (including opening 
the file if it's not already open).

I assume other smart editors have similar capabilities.  Different tools 
have different combinations of these, or slightly different 
implementations.  Find one you like and learn all of it's capabilities.  
It makes a huge difference in how productive you are.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: New to python, do I need an IDE or is vim still good enough?

2012-12-29 Thread Mitya Sirenef

On 12/29/2012 12:44 PM, Monte Milanuk wrote:
Maybe its because I'm still  just a hobbyist when it comes to coding, but I spend far more time 
'thinking' about what I'm doing than typing things in... so shaving a 
few seconds here and there are less important to me.



I think the general idea is that with editors like Vim you don't get
distracted by having to do some kind of an editor task, letting you keep
your full attention on the code logic. For instance, if I need to change
a block inside parens, I type ci) (stands for change inside parens),
while with a regular editor I'd have to do it manually and by the time
I'm done, I'd forget the bigger picture of what I'm doing with the code.
Another example: >ap stands for "indent a paragraph (separated by blank
lines)". And there are many dozens if not hundreds such commands that
let you stay focused on the logic of your code.

The trade-off, of course, is that you have to remember all (or most) of
the commands, but I figured if I spend the next 20-30+ years programming
in some version of Vim, it's well worth the initial investment.

By the way, to help me remember the commands, I wrote a small script
that lets me type in a few characters of a command or its description
and filters out the list of matching commands. It really helps,
especially when I change a lot of my mappings.

 - mitya


--
Lark's Tongue Guide to Python: http://lightbird.net/larks/

--
http://mail.python.org/mailman/listinfo/python-list


Re: New to python, do I need an IDE or is vim still good enough?

2012-12-29 Thread Grant Edwards
On 2012-12-27, mogul  wrote:

> I'm new to python, got 10-20 years perl and C experience, all gained
> on unix alike machines hacking happily in vi, and later on in vim.
>
> Now it's python, and currently mainly on my kubuntu desktop.
>
> Do I really need a real IDE, as the windows guys around me say I do,

No.

> or will vim, git, make and other standalone tools make it the next 20
> years too for me? 

I've been writing Python programs for 10-12 years, and I use the same
"IDE" I use for everything else:  Emacs, svn/git/whatever and a command line.

I do use the "meld" visual diff program quite a bit...

-- 
Grant Edwards   grant.b.edwardsYow! As President I have
  at   to go vacuum my coin
  gmail.comcollection!
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: New to python, do I need an IDE or is vim still good enough?

2012-12-29 Thread Chris Angelico
On Sun, Dec 30, 2012 at 4:44 AM, Monte Milanuk  wrote:
> Maybe its because I'm still just a hobbyist when it comes to coding, but I
> spend far more time 'thinking' about what I'm doing than typing things in...
> so shaving a few seconds here and there are less important to me.

The value of a good editor isn't just in saving seconds. A couple of examples:

* Bracket matching helps to catch errors. Especially helpful when
combined with...
* Language-sensitive auto-indentation. If the editor detects that the
last line isn't complete (maybe you opened a parenthesis that you
didn't close...
... like that...)
and automatically indents, then you have instant feedback, before you
even run the program.
* Rapid location of relevant code. In SciTE, I can put the cursor on a
word and hit Ctrl-F3 to search for other occurrences of it - for
instance, put the cursor on a function name and find its definition.
(A strict declare-before-use policy helps here, as you can be fairly
sure that the first occurrence of that word will be the one you want.)
* Highlighting of comments and quoted strings, including all the
esoteric rules about line continuation and nesting.

Several of these points are more important to the polyglot than to
someone who uses only one language ever. For instance, in Python and
C, this would show an error, but in bash and PHP, it's not:

"asdf
qwer"

The difficulty of debugging varies directly with the time between
making and discovering the error. Finding a problem by compiling,
running, and using a program is good (better than it staying till
production); finding that same problem while you're in the
"compilation stage" is better; finding it right at that instant while
you're typing makes the correction trivial. That's why spell-checkers
have migrated from "press Ctrl-Q to check this document" to "red
squiggly lines underneath your text if the computer thinks it's
wrong". (That said, the number of spelling errors in published
documents hasn't gone down since red squigglies were invented, so
instant feedback isn't a panacea!)

Of course, editors are as much a matter of taste as they are science...

ChrisA
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: New to python, do I need an IDE or is vim still good enough?

2012-12-29 Thread Monte Milanuk

On 12/27/2012 12:01 PM, mogul wrote:


I'm new to python, got 10-20 years perl and C experience, all gained
on unix alike machines hacking happily in vi, and later on in vim.



Do I really need a real IDE, as the windows guys around me say I do,
or will vim, git, make and other standalone tools make it the next 20
years too for me?


If you've been using vi/vim happily, then I'd assume you're fully 
comfortable setting it up to do what ever you need.  In that case... I'd 
say stick with what you know.


Me, I have less 'invested' in any particular editor or environment, and 
I certainly don't 'need' a lot of the fancy extras that a lot of IDEs 
have... but setting up pydev/eclipse or spyder takes care of pretty much 
all that I need/want easily, and I can setup a fresh environment the way 
I want inside five minutes with a mouse, fairly intuitively, without 
having to go digging through config scripts and the web and books and 
such to figure out what does what.  I'd rather spend that time working 
on projects, not 'programming' my text editor.  It's neat and all if it 
works for you, but just doesn't turn my crank, personally.


I know a lot is made of the speed with which things can be done with vim 
and similar pure text editors... which is all well and good, but 
somewhere in the not-so-distant past I saw a comment which hit home for 
me.  Maybe its because I'm still just a hobbyist when it comes to 
coding, but I spend far more time 'thinking' about what I'm doing than 
typing things in... so shaving a few seconds here and there are less 
important to me.


YMMV,

Monte


--
http://mail.python.org/mailman/listinfo/python-list


Re: New to python, do I need an IDE or is vim still good enough?

2012-12-28 Thread Chris Angelico
On Sat, Dec 29, 2012 at 1:02 PM, Westley Martínez  wrote:
> I only use vim for everything.  IDEs just seem to get in my way.

I've just (like ten minutes ago) come across a perfect example of what
makes an IDE useful. My mother maintains a collection of documents
(book indexes, historical records, catalogs of items the society owns,
etc) in a word processor called DeScribe. She just wanted to add a
plain text file to the collection, such that she can search it for a
text string (it's an OCR transcription of an old book, I think), and
put it into DeScribe even though it doesn't need any of its
facilities, just so it'd be there with all her others. An IDE is the
right thing for her. For me, though, it's no value.

ChrisA
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: New to python, do I need an IDE or is vim still good enough?

2012-12-28 Thread Westley Martínez
On Thu, Dec 27, 2012 at 12:01:16PM -0800, mogul wrote:
> 'Aloha!
> 
> I'm new to python, got 10-20 years perl and C experience, all gained on unix 
> alike machines hacking happily in vi, and later on in vim.
> 
> Now it's python, and currently mainly on my kubuntu desktop.
> 
> Do I really need a real IDE, as the windows guys around me say I do, or will 
> vim, git, make and other standalone tools make it the next 20 years too for 
> me? 
> 
> Oh, by the way, after 7 days I'm completely in love with this python thing. I 
> should have made the switch much earlier!
> 
> /mogul %-)

I only use vim for everything.  IDEs just seem to get in my way.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: New to python, do I need an IDE or is vim still good enough?

2012-12-28 Thread python培训
too much ide for python
PyCharm 
PyDev(Eclipse) 
Pyscripter 

Sublime Text 
TextMate UliPad
Vim

for beginner best choiceidle
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: New to python, do I need an IDE or is vim still good enough?

2012-12-28 Thread gst
Le jeudi 27 décembre 2012 21:01:16 UTC+1, mogul a écrit :
> 'Aloha!
> 

holà !

> 
> I'm new to python, got 10-20 years perl and C experience, all gained on unix 
> alike machines hacking happily in vi, and later on in vim.
> 

About same than me, though I had not to use/work with perl for new projects, 
only in maintaining some existing stuffs in some previous jobs.


> 
> Now it's python, and currently mainly on my kubuntu desktop.
> 
> Do I really need a real IDE, as the windows guys around me say I do, or will 
> vim, git, make and other standalone tools make it the next 20 years too for 
> me? 
> 

Obviously I have same comments than others ;) though I think it mainly depends 
on the project.. I do think/experience that big projects get some real 
advantage of advanced IDE, like eclipse/pycharm and others "big" python IDE. 
Now which one to use is mainly a matter of taste, as always.


> 
> Oh, by the way, after 7 days I'm completely in love with this python thing. 
> 

as others said: welcome to the club :)


> I should have made the switch much earlier!

Don't be afraid of the late switch : you'll very quickly make amazing stuffs 
with Python and anyway it's (always) better late than never and it could be 
better now than some few years ago (I begin to make the switch about 3-4 years 
ago and now I have the luck to work for a company where I'm 100% working with 
Python :)). 
Python3(.2+) effectively corrects some, I'd say, youth problems related to 
python2 and it's now quite highly deployed and about all majors libraries are 
already supporting it, if not they are about all on their way to do it sooner 
than later ;)

 
> /mogul %-)

good work/fun with Python,

greg.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: New to python, do I need an IDE or is vim still good enough?

2012-12-28 Thread Kwpolska
On Thu, Dec 27, 2012 at 9:01 PM, mogul  wrote:
> 'Aloha!
Hello!
> I'm new to python, got 10-20 years perl and C experience, all gained on unix 
> alike machines hacking happily in vi, and later on in vim.

You are already awesome,

> Now it's python, and currently mainly on my kubuntu desktop.

and now you just became more awesome.  (sans the Kubuntu part, but I
do not care.)

> Do I really need a real IDE, as the windows guys around me say I do, or will 
> vim, git, make and other standalone tools make it the next 20 years too for 
> me?

Do you really think that those Windows idiots know what they are
talking about?  It’s Windows, for fuck’s sake.  The only OS in the
market that does not give a shit about POSIX.  Windows does need an
IDE, then, because it is really hard to do anything useful without
one.  Sure, this mail was sent from Windows, but I am using it for
gaming purposes.  If I want to do some programming, Linux is the
proper environment.  For me, it is Arch Linux with KDE and Konsole,
running tabs of vim (with [python-mode][]) and ipython.  And other
useful tools (among others, Chrome with the docs.)

[python-mode]: https://github.com/klen/python-mode

> Oh, by the way, after 7 days I'm completely in love with this python thing. I 
> should have made the switch much earlier!

That is great news.

-- 
Kwpolska 
stop html mail  | always bottom-post
www.asciiribbon.org | www.netmeister.org/news/learn2quote.html
GPG KEY: 5EAAEA16
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: New to python, do I need an IDE or is vim still good enough?

2012-12-28 Thread Chris Angelico
On Fri, Dec 28, 2012 at 8:52 PM, Andrew Berg  wrote:
> On 2012.12.28 00:51, Jamie Paul Griffin wrote:
>> The benefit of the tmux client (terminal multiplexer) is that I can see
>> all the screens at the same time and quickly switch between them. I
>> believe Linux has screen(1) which does the same thing.
>
> tmux is generally easily available for Linux, and these days, there's
> really no reason to use screen unless you absolutely cannot use tmux for
> some reason.

Hmm, interesting. I often use screen when I need a terminal on a
remote system (via ssh) and I'm mobile on my laptop, with periodic
connection dropouts. With screen(1), I can cope with that, but it's a
bit ugly at times.

*puts tmux on his "look into this some day" list*

ChrisA
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: New to python, do I need an IDE or is vim still good enough?

2012-12-28 Thread Andrew Berg
On 2012.12.28 00:51, Jamie Paul Griffin wrote:
> The benefit of the tmux client (terminal multiplexer) is that I can see
> all the screens at the same time and quickly switch between them. I
> believe Linux has screen(1) which does the same thing. 

tmux is generally easily available for Linux, and these days, there's
really no reason to use screen unless you absolutely cannot use tmux for
some reason.

To answer the OP's question, it's mostly personal preference. Use
whatever makes you productive.
-- 
CPython 3.3.0 | Windows NT 6.2.9200.16461
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: New to python, do I need an IDE or is vim still good enough?

2012-12-28 Thread Yuvraj Sharma
Use IDLE
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: New to python, do I need an IDE or is vim still good enough?

2012-12-27 Thread Jamie Paul Griffin
* mogul  [2012-12-27 12:01:16 -0800]:

> 'Aloha!
> 
> I'm new to python, got 10-20 years perl and C experience, all gained on unix 
> alike machines hacking happily in vi, and later on in vim.
> 
> Now it's python, and currently mainly on my kubuntu desktop.
> 
> Do I really need a real IDE, as the windows guys around me say I do, or will 
> vim, git, make and other standalone tools make it the next 20 years too for 
> me? 
> 
> Oh, by the way, after 7 days I'm completely in love with this python thing. I 
> should have made the switch much earlier!
> 
> /mogul %-)

If these are the tools you're used to, stick with them. 

I have a tmux session with however many terminals open I need. I use the
traditional vi editor (not vim) and the python shell/interpreter as well
as the UNIX tools I need. A web browser and a separate urxvt window for
my mutt client when I need to mail a list for some help. That's it. 

The benefit of the tmux client (terminal multiplexer) is that I can see
all the screens at the same time and quickly switch between them. I
believe Linux has screen(1) which does the same thing. 
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: New to python, do I need an IDE or is vim still good enough?

2012-12-27 Thread Steven D'Aprano
On Thu, 27 Dec 2012 12:01:16 -0800, mogul wrote:

> 'Aloha!
> 
> I'm new to python, got 10-20 years perl and C experience, all gained on
> unix alike machines hacking happily in vi, and later on in vim.
> 
> Now it's python, and currently mainly on my kubuntu desktop.
> 
> Do I really need a real IDE, as the windows guys around me say I do, or
> will vim, git, make and other standalone tools make it the next 20 years
> too for me?

You only *need* an IDE when your environment has feeble stand-alone 
tools, like Windows. As far as I am concerned, Unix (including Linux) is 
itself the ultimate in hot-plug IDEs.

http://blog.sanctum.geek.nz/series/unix-as-ide/

My own preferred IDE is:

* The KDE editor Kate[1];

* For preference, KDE's Konsole with multiple tabs, although any decent 
terminal app will do:

- one tab for file system operations (e.g. renaming files) and source code
  control using hg or git;
- one for running the script or stand-alone application I am writing,
  e.g. "python myscript.py", or if a library, for running unittests
  or doctests, e.g. "python -m doctest mylibrary.py"
- at least one for running an interactive Python shell for testing code,
  reading documentation ("help(some_object)") etc.
- anything else needed e.g. monitoring system load with top, etc.

* A browser for searching the web and accessing the Python docs.

I've never really got into automatic refactoring tools, but if I needed 
something more powerful than my editor's Find And Replace, I would 
investigate Bicycle Repair Man, or Rope. At a pinch, there's always sed, 
although I'm not a sed expert. (I can just about spell it... *wink*)

I'm sure that IDEs have their good points, but in my experience whatever 
good points they have are overshadowed by the negatives (e.g. a clunky 
editor that doesn't respond instantly when you type). A Swiss Army Knife 
might be the best Swiss Army Knife money can buy, but in general it is no 
substitute for a toolbox filled with independent tools.

In sports, it is said that "a champion team will beat a team of 
champions", but in software the opposite is the case: a set of excellent 
single-purpose tools is usually more powerful than a single tool that 
tries to do it all.

Having said all that, if somebody has a personal preference for a 
specific IDE, then good for them, I certainly wouldn't tell them that 
they shouldn't use it.



[1] KDE 3 only. KDE 4 is unspeakable. Gedit from Gnome 2 is almost a good 
substitute.

-- 
Steven
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: New to python, do I need an IDE or is vim still good enough?

2012-12-27 Thread Roy Smith
In article <50dcf145$0$24782$607ed...@cv.net>,
 "TommyVee"  wrote:

> Do I really need a real IDE, as the windows guys around me say I do, or will 
> vim, git, make and other standalone tools make it the next 20 years too for 
> me?

You'll do fine with vim (or emacs, or whatever).  You may find an IDE 
convenient, but it's certainly not necessary.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: New to python, do I need an IDE or is vim still good enough?

2012-12-27 Thread TommyVee
"mogul"  wrote in message 
news:ea058e5c-518f-4210-b80e-49ae2baab...@googlegroups.com...


'Aloha!

I'm new to python, got 10-20 years perl and C experience, all gained on unix 
alike machines hacking happily in vi, and later on in vim.


Now it's python, and currently mainly on my kubuntu desktop.

Do I really need a real IDE, as the windows guys around me say I do, or will 
vim, git, make and other standalone tools make it the next 20 years too for 
me?


Oh, by the way, after 7 days I'm completely in love with this python thing. 
I should have made the switch much earlier!


/mogul %-)

I'd say start with IDLE.  I wouldn't exactly consider it an "IDE", but it 
gives you a decent Python-oriented editor.  For me it handles 95% of what I 
need to do (for more ambitious projects, I use PyScripter on the Windows 
platform).


--
http://mail.python.org/mailman/listinfo/python-list


Re: New to python, do I need an IDE or is vim still good enough?

2012-12-27 Thread Chris Angelico
On Fri, Dec 28, 2012 at 7:01 AM, mogul  wrote:
> Do I really need a real IDE, as the windows guys around me say I do, or will 
> vim, git, make and other standalone tools make it the next 20 years too for 
> me?

Welcome!

No, you don't *need* an IDE. Some people like them and are the more
productive for them, but if standalone tools have served you well for
20 years, they'll continue to do so. My current editor is SciTE,
because it supports all the languages I use (except LilyPond - must
look into that one day) and is available on Windows as well (I support
both platforms), but there are plenty of other excellent editors, and
vim is definitely one of them.

When I'm on Windows, I like to keep IDLE handy, but not for editing
source files. IDLE feels much nicer than command-line Python for
interactive work; the ability to recall entire blocks of code, rather
than individual lines, is hugely advantageous. (I don't do enough on
Linux IDLE to be able to call the difference there, but GNU readline
is so much better than the Windows interactive line reader that it's
not as big an issue.) To me, IDLE is my calculator, my test space for
python-list posts, and so on, but SciTE is where I write actual code.

ChrisA
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: New to python, do I need an IDE or is vim still good enough?

2012-12-27 Thread Cameron Simpson
On 27Dec2012 12:01, mogul  wrote:
| I'm new to python, got 10-20 years perl and C experience, all gained
| on unix alike machines hacking happily in vi, and later on in vim.
| 
| Now it's python, and currently mainly on my kubuntu desktop.
| 
| Do I really need a real IDE, as the windows guys around me say I do,
| or will vim, git, make and other standalone tools make it the next 20
| years too for me?

Your Windows guys are weak. Use the tools that make you happy.

Personally, my normal programming env is an editor window (vim for me,
or vi) and a shell window. With the docs (2.x or 3.x, local
all-in-one-HTML file saved on my desktop for instant open at need and
offline use) in a browser window behind the terminals. (I'm usually on a
Mac, so terminals and browser side-by-side aren't so easy with its
desktop metaphor - it is a single keystroke to toggle back and forth
though).

| Oh, by the way, after 7 days I'm completely in love with this python
| thing. I should have made the switch much earlier!

I thought that after biting the bullet a few years ago. I had (well,
still have, though it grows not these days) this personal Perl library
that kept me back, and hadn;t realised:

  - how many batteries are already included in the stdlib

  - how little of that library was current; re-implement the live stuff
(better and cleaner) and move on - very liberating

Cheers,
-- 
Cameron Simpson 

Avoid bickering and petty arguments by immediately punching anyone with whom
you disagree.   - youn...@netcom.com (John Young)
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: New to python, do I need an IDE or is vim still good enough?

2012-12-27 Thread Modulok
> 'Aloha!
>
> I'm new to python, got 10-20 years perl and C experience, all gained on unix
> alike machines hacking happily in vi, and later on in vim.
>
> Now it's python, and currently mainly on my kubuntu desktop.
>
> Do I really need a real IDE, as the windows guys around me say I do, or will
> vim, git, make and other standalone tools make it the next 20 years too for
> me?
>
> Oh, by the way, after 7 days I'm completely in love with this python thing.
> I should have made the switch much earlier!
>
> /mogul %-)


No. If you want to test one out, great. If not, it's totally not required. I
use jEdit (text editor) and a bunch of command line tools on FreeBSD. I've
tried various IDEs and have yet to find one I totally agree with. Yet, I know
guys who use them and wouldn't part with them 'til death. I always end up back
in a customized text editor and a *nix command shell. I prefer it.

There's a lot of *very* skilled programmers in both camps.
-Modulok-
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: New to python, do I need an IDE or is vim still good enough?

2012-12-27 Thread Michael Torrie
On 12/27/2012 02:25 PM, Tim Chase wrote:
> Alas, one of the worst parts about programming in Python is that I
> now find it hard to go back to any of the other languages that I
> know. :-)

Amen.  I find myself wishing for a python-like language for programming
Arduino boards.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: New to python, do I need an IDE or is vim still good enough?

2012-12-27 Thread Michael Torrie
On 12/27/2012 01:01 PM, mogul wrote:
> Do I really need a real IDE, as the windows guys around me say I do,
> or will vim, git, make and other standalone tools make it the next 20
> years too for me?

I've never ever used an IDE with Python.  With Python I can code for an
hour in vim and it runs with only maybe one minor syntax error.  Often
the code runs first try, and runs correctly.  Having a reference to the
python standard library is about the only thing I need.  I typically use
python in a nutshell (dead tree) or just a browser page open to the
official docs.  Fortunately Python's use of namespaces and allowing the
use of singleton objects (we call them modules!) eliminates must of the
verbose rubbish that Java's libraries have.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: New to python, do I need an IDE or is vim still good enough?

2012-12-27 Thread Tim Chase
On 12/27/12 14:01, mogul wrote:
> Do I really need a real IDE, as the windows guys around me say I
> do, or will vim, git, make and other standalone tools make it the
> next 20 years too for me?

Coding Python (and before that C, Pascal, and even some VB in there)
using vi/vim has worked for about 10 of the last 15 years of my
career.  Most VCS concepts carry over, even if the exact technology
changes:  I started off with zipfiles, then an unfortunate dance
with VSS & CVS before finding Subversion, then Mercurial, and now
git.  So time spent with git won't be lost.

Some like the hand-holding of a full-blown IDE, but I prefer to get
intimate with the code and stick to a text editor.

> Oh, by the way, after 7 days I'm completely in love with this
> python thing. I should have made the switch much earlier!

Alas, one of the worst parts about programming in Python is that I
now find it hard to go back to any of the other languages that I
know. :-)

-tkc



-- 
http://mail.python.org/mailman/listinfo/python-list


Re: New to python, do I need an IDE or is vim still good enough?

2012-12-27 Thread Walter Hurry
On Thu, 27 Dec 2012 12:01:16 -0800, mogul wrote:

> 'Aloha!
> 
> I'm new to python, got 10-20 years perl and C experience, all gained on
> unix alike machines hacking happily in vi, and later on in vim.
> 
> Now it's python, and currently mainly on my kubuntu desktop.
> 
> Do I really need a real IDE, as the windows guys around me say I do, or
> will vim, git, make and other standalone tools make it the next 20 years
> too for me?

If you don't want an IDE, don't use one (I don't). Just use whatever text 
editor you prefer. Although I avoid the editor wars, one advantage of vi 
is that it's always available on client *nix sites. Handy if you move 
around.

One suggestion though: It's probably a good idea not to post to this list 
using G**gle Groups. Many will ignore such posts.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: New to python, do I need an IDE or is vim still good enough?

2012-12-27 Thread Terry Reedy

On 12/27/2012 3:01 PM, mogul wrote:

'Aloha!

I'm new to python, got 10-20 years perl and C experience, all gained
on unix alike machines hacking happily in vi, and later on in vim.

Now it's python, and currently mainly on my kubuntu desktop.

Do I really need a real IDE, as the windows guys around me say I do,
or will vim, git, make and other standalone tools make it the next 20
years too for me?


We try to avoid religious issues on this list.
Programming editors are a religious issue.
Therefore ... ;-)

Kidding aside, I am sure there is at least one core Python developer 
using vim (as well as emacs). I believe there are one or more 
'customization files' (or settings packages? don't know proper term for 
vim) which you should be able to find if you have not already.


Some 'real IDE' users consider IDLE a limited beginner's toy. I use it 
happily for what *I* do. I don't even use all the features if *does* have.


The one thing I would suggest is to make sure that you can run a python 
file with the '-i' flag so that the interpreter drops into interactive 
mode and gives a prompt instead of exiting when done. Then, if you get 
an exception like

AttributeError: 'Foo' object has no 'frobulate attribute
and you know the Foo object is named foo, you can enter (in the 
interpreter) 'dir(foo)' and perhaps see that it *does* has a 'fribulate' 
attribute. (When IDLE runs the code in an editor window, it stops with 
an interactive prompt in the shell window, and one can then enter code 
such as above.)



Oh, by the way, after 7 days I'm completely in love with this python
thing. I should have made the switch much earlier!


Welcome to the club.

--
Terry Jan Reedy

--
http://mail.python.org/mailman/listinfo/python-list


Re: New to python, do I need an IDE or is vim still good enough?

2012-12-27 Thread Alister
On Thu, 27 Dec 2012 12:01:16 -0800, mogul wrote:

> 'Aloha!
> 
> I'm new to python, got 10-20 years perl and C experience, all gained on
> unix alike machines hacking happily in vi, and later on in vim.
> 
> Now it's python, and currently mainly on my kubuntu desktop.
> 
> Do I really need a real IDE, as the windows guys around me say I do, or
> will vim, git, make and other standalone tools make it the next 20 years
> too for me?
> 
> Oh, by the way, after 7 days I'm completely in love with this python
> thing. I should have made the switch much earlier!
> 
> /mogul %-)

I don't use vi/vim myself but would suggest that if you are happy 
developing C without an IDE then python should be a walk in the park.




-- 
For 20 dollars, I'll give you a good fortune next time ...
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: New to python, do I need an IDE or is vim still good enough?

2012-12-27 Thread peter

On 12/27/2012 05:01 PM, mogul wrote:

'Aloha!

I'm new to python, got 10-20 years perl and C experience, all gained on unix 
alike machines hacking happily in vi, and later on in vim.

Now it's python, and currently mainly on my kubuntu desktop.

Do I really need a real IDE, as the windows guys around me say I do, or will 
vim, git, make and other standalone tools make it the next 20 years too for me?

Oh, by the way, after 7 days I'm completely in love with this python thing. I 
should have made the switch much earlier!

/mogul %-)
You going to create a war here. My honest advice, is just taste the 
different ides that are out there.


- emacs
- vi
- aptana
- eclipse
- pycharm
- wingide.
- etc
- etc.

I currently use emacs for everything.
--
http://mail.python.org/mailman/listinfo/python-list


Re: New to python, do I need an IDE or is vim still good enough?

2012-12-27 Thread Daniel Fetchinson
> I'm new to python, got 10-20 years perl and C experience, all gained on unix
> alike machines hacking happily in vi, and later on in vim.
>
> Now it's python, and currently mainly on my kubuntu desktop.

Welcome to the club!

> Do I really need a real IDE, as the windows guys around me say I do, or will
> vim, git, make and other standalone tools make it the next 20 years too for
> me?

Sure they will!

> Oh, by the way, after 7 days I'm completely in love with this python thing.

Again, welcome to the club!

> I should have made the switch much earlier!

Indeed..

BTW, I also use vim only,
Daniel


-- 
Psss, psss, put it down! - http://www.cafepress.com/putitdown
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: New to python, do I need an IDE or is vim still good enough?

2012-12-27 Thread ian douglas
Some would argue that vim is always good enough, especially with its plugin
system.

I bounce between vim and Sublime Text 2, and recently bought PyCharm went
it went on sale a week ago.
-- 
http://mail.python.org/mailman/listinfo/python-list


New to python, do I need an IDE or is vim still good enough?

2012-12-27 Thread mogul
'Aloha!

I'm new to python, got 10-20 years perl and C experience, all gained on unix 
alike machines hacking happily in vi, and later on in vim.

Now it's python, and currently mainly on my kubuntu desktop.

Do I really need a real IDE, as the windows guys around me say I do, or will 
vim, git, make and other standalone tools make it the next 20 years too for me? 

Oh, by the way, after 7 days I'm completely in love with this python thing. I 
should have made the switch much earlier!

/mogul %-)
-- 
http://mail.python.org/mailman/listinfo/python-list