Re: Eclipse and the Python plugin

2012-08-04 Thread lipska the kat

On 04/08/12 00:29, Cousin Stanley wrote:

lipska the kat wrote:



I can now create, debug and test a simple IRC server
written in Java and an IRC Bot that I am attempting
to build in Python



   For a bit of inspiration python-irc-bot-wise
   you might look at supybot 



Yep, it's there (here). Thanks for the heads up

lipska

--
Lipska the Kat: Troll hunter, sandbox destroyer
and farscape dreamer of Aeryn Sun
--
http://mail.python.org/mailman/listinfo/python-list


Eclipse and the Python plugin

2012-08-03 Thread lipska the kat
A while ago someone asked me what I thought of the Eclipse plugin for 
python, well I just downloaded and installed the latest version of 
Eclipse for Java (Juno) followed by the Python plugin. After a while 
messing about with it I can only say ... phew, what a relief. The plugin 
looks like it automates a whole bunch of tasks such as packaging and you 
can configure it to use Jython, Iron Python (neither of which I have 
used) and some other stuff I have never heard of


I installed all this on Ubuntu Linux 12.04 with no problems whatsoever.

There's a debugger (which I haven't tried), code completion, error 
highlighting and much more.


Installing the plugin is documented here
http://www.rose-hulman.edu/class/csse/resources/Eclipse/eclipse-python-configuration.htm

And the most amazing thing of all is it's all completely free.

I can now create, debug and test a simple IRC server written in Java
and an IRC Bot that I am attempting to build in Python side by side in 
the same IDE simply by switching profiles (click one button). Astonishing.


You might like to try it

Just FYI so please don't tell me off (again).

lipska

--
Lipska the Kat: Troll hunter, sandbox destroyer
and farscape dreamer of Aeryn Sun
--
http://mail.python.org/mailman/listinfo/python-list


Re: Eclipse and the Python plugin

2012-08-03 Thread Mark Lawrence

On 03/08/2012 12:34, lipska the kat wrote:

A while ago someone asked me what I thought of the Eclipse plugin for
python, well I just downloaded and installed the latest version of
Eclipse for Java (Juno) followed by the Python plugin. After a while
messing about with it I can only say ... phew, what a relief. The plugin
looks like it automates a whole bunch of tasks such as packaging and you
can configure it to use Jython, Iron Python (neither of which I have
used) and some other stuff I have never heard of

I installed all this on Ubuntu Linux 12.04 with no problems whatsoever.

There's a debugger (which I haven't tried), code completion, error
highlighting and much more.

Installing the plugin is documented here
http://www.rose-hulman.edu/class/csse/resources/Eclipse/eclipse-python-configuration.htm


And the most amazing thing of all is it's all completely free.

I can now create, debug and test a simple IRC server written in Java
and an IRC Bot that I am attempting to build in Python side by side in
the same IDE simply by switching profiles (click one button). Astonishing.

You might like to try it

Just FYI so please don't tell me off (again).

lipska



My opinion of Eclipse is unchanged by your words, it's like trying to 
run a legless carthorse in the Grand National or the Derby.


--
Cheers.

Mark Lawrence.

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


Re: Eclipse and the Python plugin

2012-08-03 Thread lipska the kat

On 03/08/12 13:10, Mark Lawrence wrote:

On 03/08/2012 12:34, lipska the kat wrote:

A while ago someone asked me what I thought of the Eclipse plugin for
python,


snip





My opinion of Eclipse is unchanged by your words, it's like trying to
run a legless carthorse in the Grand National or the Derby.


:-)) There's this image in my mind ... jeez, get a grip.

I'm sorry to hear that, what would you recommend.

lipska

--
Lipska the Kat: Troll hunter, sandbox destroyer
and farscape dreamer of Aeryn Sun
--
http://mail.python.org/mailman/listinfo/python-list


Re: Eclipse and the Python plugin

2012-08-03 Thread Mark Lawrence

On 03/08/2012 13:23, lipska the kat wrote:

On 03/08/12 13:10, Mark Lawrence wrote:

On 03/08/2012 12:34, lipska the kat wrote:

A while ago someone asked me what I thought of the Eclipse plugin for
python,


snip





My opinion of Eclipse is unchanged by your words, it's like trying to
run a legless carthorse in the Grand National or the Derby.


:-)) There's this image in my mind ... jeez, get a grip.

I'm sorry to hear that, what would you recommend.

lipska



Sorry I can't recommend anything as I use Python for small personal 
projects, so I find a combination of Notepad++ and PythonWin totally 
adequate for my needs.  Eclipse is also popular, so simply because I 
don't like it speed wise doesn't mean that it's not for you.  Picking an 
IDE often gets down to your own preferences and perhaps budget.


--
Cheers.

Mark Lawrence.

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


Re: Eclipse and the Python plugin

2012-08-03 Thread lipska the kat

On 03/08/12 13:40, Mark Lawrence wrote:

On 03/08/2012 13:23, lipska the kat wrote:

On 03/08/12 13:10, Mark Lawrence wrote:

On 03/08/2012 12:34, lipska the kat wrote:

A while ago someone asked me what I thought of the Eclipse plugin for
python,


snip


it's like trying to
run a legless carthorse in the Grand National or the Derby.


:-)) There's this image in my mind ... jeez, get a grip.

I'm sorry to hear that, what would you recommend.


Sorry I can't recommend anything as I use Python for small personal
projects, so I find a combination of Notepad++ and PythonWin totally
adequate for my needs. Eclipse is also popular, so simply because I
don't like it speed wise doesn't mean that it's not for you.


I've been using it for years for Java, I just recently found the Python 
plugin.



Picking an IDE often gets down to your own preferences and perhaps budget.


It's free ... good enough reason for me. I'm Always interested to hear 
of alternatives though.


lipska

--
Lipska the Kat: Troll hunter, sandbox destroyer
and farscape dreamer of Aeryn Sun
--
http://mail.python.org/mailman/listinfo/python-list


Re: Eclipse and the Python plugin

2012-08-03 Thread rusi
On Aug 3, 4:34 pm, lipska the kat lipskathe...@yahoo.co.uk wrote:
 A while ago someone asked me what I thought of the Eclipse plugin for
 python, well I just downloaded and installed the latest version of
 Eclipse for Java (Juno) followed by the Python plugin.

Thanks Lipska for reporting back.
I personally find the eclipse UI frightening but I am unwilling to
conclude that its eclipse and not me.

By comparison, when I first heard of emacs, (about 20 years ago) the
local guru would come in the morning and start emacs then go out for a
smoke.  When he came back it had finished started up.
So the acronym: Eight Megabytes And Constantly Swapping made a lot of
sense then.  I guess today it would have to be Eight-hundred to make
any sense.

More to the point, it seems to me that eclipse was today what emacs
was then -- seemingly too large but in time I expect it will not seem
so large.

So one more request from me:

Can you try the refactoring support and tell us how it fares?
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Eclipse and the Python plugin

2012-08-03 Thread lipska the kat

On 03/08/12 14:54, rusi wrote:

On Aug 3, 4:34 pm, lipska the katlipskathe...@yahoo.co.uk  wrote:

A while ago someone asked me what I thought of the Eclipse plugin for
python, well I just downloaded and installed the latest version of
Eclipse for Java (Juno) followed by the Python plugin.


Thanks Lipska for reporting back.
I personally find the eclipse UI frightening but I am unwilling to
conclude that its eclipse and not me.


snip.

I have no vested interest in Eclipse but I don't believe that you would 
feel the same once you got your head around the basics. I don't pretend 
to be an expert, far from it, but I have taught myself enough to go into 
a contract and hit the ground running, loading the source tree into 
Eclipse is a great way to start to understand the code and the libraries 
it uses. Well it works for me anyway.



More to the point, it seems to me that eclipse was today what emacs
was then -- seemingly too large but in time I expect it will not seem
so large.


It can be bewildering I agree but the basics are not too intimidating.
I remember early versions of IBMs VisualAge for Java ... guaranteed to 
give you brain damage.



So one more request from me:

Can you try the refactoring support and tell us how it fares?


Well, I don't really have enough Python code to refactor anything at the 
moment however I did try something that may or may not prove to be 
informative.


If I create a Java class and right click in the code window and select 
refactor from the context menu there is a HUGE list of things I can do. 
Why I might want to do some of them I have no idea, but there they are. 
In contrast if I create a Python class and select refactor I get a 
significantly smaller list of things I can do. Inline local variable, 
Extract local variable, Extract method, Rename, Generate constructors, 
Generate properties and Override/Implement methods. I think this may be 
a result of Pythons different (from Java) grammar rules. I can write a 
Python class and call it Foo and save it in a file called Bar and it's 
no big deal (at least Eclipse doesn't get excited) If I try that in Java 
the sky falls in. Of course I'm about as far away from being a Python 
expert as it's possible to be.


Anyway, if and when I find out more I'll let you know. It will be a 
while though.


lipska

--
Lipska the Kat: Troll hunter, sandbox destroyer
and farscape dreamer of Aeryn Sun
--
http://mail.python.org/mailman/listinfo/python-list


Re: Eclipse and the Python plugin

2012-08-03 Thread Steven D'Aprano
On Fri, 03 Aug 2012 16:51:26 +0100, lipska the kat wrote:

 I can write a
 Python class and call it Foo and save it in a file called Bar and it's
 no big deal (at least Eclipse doesn't get excited) If I try that in Java
 the sky falls in.

:)

Correct. Python does not require, or even encourage, the one-class-per-
file rule of Java. You are encouraged to encapsulate related code into 
related units, for whatever is appropriate according to the situation. 
Whether than means one class in a module or ten will depend on the 
classes in question.

And although it was quite prevalent in the past, these days the 
convention is avoid having the module and class name to be identical, as 
in time.time, unless you really have to. Preferred is something like 
decimal.Decimal.

What I consider close to the extreme of what is comfortable in Python is 
the decimal module, which includes 19 classes and 21 module-level 
functions. It's not quite as scary as it seems -- many of those classes 
and functions are only a few lines each, and most of those are 
documentation. *Short* lines at that, this isn't Perl. The bulk of the 
module is only two classes, Decimal and Context.

Mind you, both of those are seriously large, Decimal has 117 methods and 
Context around 70-80 (I stopped counting). So as I said, that's about the 
upper limit for what I consider reasonable in a single module.



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


Re: Eclipse and the Python plugin

2012-08-03 Thread lipska the kat

On 03/08/12 17:40, Steven D'Aprano wrote:

On Fri, 03 Aug 2012 16:51:26 +0100, lipska the kat wrote:


I can write a
Python class and call it Foo and save it in a file called Bar and it's
no big deal (at least Eclipse doesn't get excited) If I try that in Java
the sky falls in.


:)

Correct. Python does not require, or even encourage, the one-class-per-
file rule of Java.


snip

Well it's actually one public class per file, you can have as many 
package visible classes as you like not to mention inner classes and 
anonymous classes, but I know what you mean.


I used to know a developer who though that any file (class) that 
contained more lines of code than could fit on an A4 sheet of paper at 
10 points was too large ... a little extreme perhaps.



Mind you, both of those are seriously large, Decimal has 117 methods and
Context around 70-80 (I stopped counting). So as I said, that's about the
upper limit for what I consider reasonable in a single module.


117 methods seems a lot doesn't it. I'm still trying to get my head 
around Python packages, I think Eclipse will help me with this and the 
whole module mix of functions and classes is taking a while to get used 
to. The standard included libraries are pretty impressive though and it 
is certainly easier to write quick throwaway prototypes in Python. I 
guess this will become even quicker once I understand the language better.


lipska

--
Lipska the Kat: Troll hunter, sandbox destroyer
and farscape dreamer of Aeryn Sun
--
http://mail.python.org/mailman/listinfo/python-list


Re: Eclipse and the Python plugin

2012-08-03 Thread Temia Eszteri
On Fri, 3 Aug 2012 06:54:04 -0700 (PDT), rusi rustompm...@gmail.com
wrote:

On Aug 3, 4:34 pm, lipska the kat lipskathe...@yahoo.co.uk wrote:
 A while ago someone asked me what I thought of the Eclipse plugin for
 python, well I just downloaded and installed the latest version of
 Eclipse for Java (Juno) followed by the Python plugin.

Thanks Lipska for reporting back.
I personally find the eclipse UI frightening but I am unwilling to
conclude that its eclipse and not me.

By comparison, when I first heard of emacs, (about 20 years ago) the
local guru would come in the morning and start emacs then go out for a
smoke.  When he came back it had finished started up.
So the acronym: Eight Megabytes And Constantly Swapping made a lot of
sense then.  I guess today it would have to be Eight-hundred to make
any sense.

More to the point, it seems to me that eclipse was today what emacs
was then -- seemingly too large but in time I expect it will not seem
so large.

So one more request from me:

Can you try the refactoring support and tell us how it fares?

Having used PyDev for Eclipse for a while, I can honestly say its
memory consumption, while definitely rather large for the task, isn't
so large as to cause any trouble for most modern systems. I'm able to
keep it in the background with no notable performance impact, and if I
do have to reopen it for whatever reason, it only takes about ten
seconds.

A small price to pay for easy code completion, docstrings in tooltips,
and a more user-friendly debugger (though some things like weakref
containers will happily fool it and make debugging a little more
difficult).

~Temia
-- 
Invective! Verb your expletive nouns!
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Eclipse and the Python plugin

2012-08-03 Thread Cousin Stanley
lipska the kat wrote:

 
 I can now create, debug and test a simple IRC server 
 written in Java and an IRC Bot that I am attempting 
 to build in Python 
 

  For a bit of inspiration python-irc-bot-wise
  you might look at supybot  

  It's currently available in debian wheezy
  so probably also available in ubuntu 

# apt-cache show supybot

  A few years back I ran it 24/7 for several months
  on a very low spec debian box and was impressed
  with its performance, configurability, and 
  plugin usage  

  However, I haven't looked at or used
  recent versions 
  

-- 
Stanley C. Kitching
Human Being
Phoenix, Arizona

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


Re: Eclipse and the Python plugin

2012-08-03 Thread rusi
On Aug 3, 10:04 pm, lipska the kat lipskathe...@yahoo.co.uk wrote:

 117 methods seems a lot doesn't it. I'm still trying to get my head
 around Python packages, I think Eclipse will help me with this and the
 whole module mix of functions and classes is taking a while to get used
 to. The standard included libraries are pretty impressive though and it
 is certainly easier to write quick throwaway prototypes in Python.

Good that you get this early.  The python libraries are well crafted
and well documented.
They are also not over engineered so that you can get to what you want
without a lng:
org.dada.lang.servlet.dada... (Which is also why 117 can be ok)

The thing about python that experienced C++ and Java programmers are
most likely to miss is a mode of playful working in which trying out
small pieces in the interpreter is a key part of the development
process.  (and which is why functions are ok, not just classes)

If eclipse supports this well I'd be interested to know.
If not you need to supplement eclipse with (something like)
- python inside shell
- ipython inside shell
- python inside python-mode inside emacs

[The first turns out to be a pain because import wont work more than
once, reload wont work the first time, and if you do import * nothing
will work after the first time]
-- 
http://mail.python.org/mailman/listinfo/python-list