Re: [Tutor] More IDE's (was: Boa-Constructor)

2005-09-14 Thread George Flaherty
Yeah, I have been using PyDev with Eclipse. It is pretty good, since with the 
latest version the debugger is working and they have include the ability to add 
additional paths in the PYTHONPATH variable.

I honestly would prefer to use Emacs, but I have not found any tool that 
provides code-completion with python. Until I have been using Eclipse (with 
Emacs running minimized :)

-g

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of D. Hartley
Sent: Tuesday, September 13, 2005 10:27 PM
To: Python tutor
Subject: [Tutor] More IDE's (was: Boa-Constructor)

This thread made me wonder:

Is anyone out there using Eclipse and PyDev? (I started using Eclipse when I 
was toying around in Jython, and know others that are using it for C/C++, but I 
am curious if others have tried out PyDev and what they think).

~Denise
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] running scripts with windows...slightly OT

2005-09-15 Thread George Flaherty
Yeah be careful with some of the cygwin tools. I had an issue with the jar 
command being picked up from cygwin/bin instead of JAVA_HOME and it was 
corrupting the contents of a jar file.

-george

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of R. Alan Monroe
Sent: Thursday, September 15, 2005 5:24 PM
To: tutor@python.org
Subject: Re: [Tutor] running scripts with windows

>> Cygwin (http://www.cygwin.com/)  It gives you a bash shell in 
>> Windows.

> Actually it gives you a whole Unix environment including X Windows and 
> over 500 unix command line tools plus GNU C, sendmail, etc etc...

Watch out, because cygwin-native python can conflict with win32 python, if 
they're both in your path. Buddy of mine had various .py files not work because 
of this.

Alan

___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] More IDE's (was: Boa-Constructor)

2005-09-19 Thread George Flaherty
Well, for starters.

1. PyDEV does not have any type of prespective. I use the java prespective or 
resources.

2. Check out this guide, granted it is a bit old(2003'ish) but it is still 
pretty good.
http://www-128.ibm.com/developerworks/opensource/library/os-ecant/

3. Terry, what do you mean by "other functions?" Are you talking about the 
ant/python extension libraries? 

4. Denise, regarding the code-completion as long as you have the libs within 
the PYTHONPATH you should be able to generate the code completion. Do you have 
some specific example of a library that is not working for you?

Cheers
-george


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of ->Terry<-
Sent: Saturday, September 17, 2005 12:07 AM
To: D. Hartley
Cc: tutor@python.org
Subject: Re: [Tutor] More IDE's (was: Boa-Constructor)

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


Today (Sep 16, 2005) at 5:29pm, D. Hartley spoke these wise words:

- ->I know how to use the code completion (hooray for me!) but so far,
- ->most everything else that's going on in PyDev/Eclipse is a mystery to
- ->me.  But I managed to get an interactive interpreter as an external
- ->tool, so that's a lot of progress for me.
- ->
- ->Technically I suppose this is OT, but did you guys that have used/are
- ->using PyDev/Eclipse use any kind of tutorials for those other
- ->functions? (Not sure if there even *are* any, besides the standard
- ->documentation on PyDev's website)  Most of the things I've found on
- ->eclipse are for much more advanced eyes than mine, it would seem.
- ->
- ->I'd appreciate any pointers! :)
- ->
- ->~Denise

I too am having problems getting my head wrapped around Pydev/Eclipse.
The docs on Eclipse don't seem to be geared toward Pydev and the FAQ on the 
Pydev site is rather sparse. At this point, I'm not even sure the install went 
properly since I see error messages such as:

An internal error occurred during:"Pydev code completion:rebuilding modules"

among others I didn't take the time to copy down. For now I am back to Gedit 
and an xterm. If you run across more documentation could you please cc me as 
well?

Thanks,
- -- 
Terry

 ,-~~-.___. Terry Randall 
/ |  ' \
   <   )0Linux Counter Project User# 98233
\_/, ,-'
     //
  /  \-'~;/~~~(0)
 /  __/~|   /  |   If only Snoopy had Slackware...
   =( __| (|

"He is your friend, your partner, your defender, your dog.
You are his life, his love, his leader. He will be yours, faithful and true, to 
the last beat of his heart. You owe
it to him to be worthy of such devotion."-- Unknown

 (Best viewed with a mono-spaced font.)

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.7 (GNU/Linux)

iD8DBQFDK5aDQvSnsfFzkV0RAv4YAJ4jPjR8z7X/afxscr+wt3eyeKcvnACeLfj9
TMyOGvnEYPqrZNQfQc67mBs=
=0pNZ
-END PGP SIGNATURE-

___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Python Editors (particualrly Vim)

2005-09-21 Thread George Flaherty
 comments are inline...

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ed Singleton
Sent: Wednesday, September 21, 2005 9:00 AM
To: tutor@python.org
Subject: [Tutor] Python Editors (particualrly Vim)

I've been trying to decide which editor to use to edit Python (on Windows 
mostly).

My wishlist of features would be:

- automatic code formatting (indentation etc)

[george]: Emacs works great with this if you have python mode. Eclispe is the 
same.

- collapsible code (to collapse def's etc)

[george]: Eclipse is a little easier to perform this, but you can hide lines in 
Emacs as well. In emacs things are just a bit, "less visual" than eclipse.

- automatic code coloring (that's easily changeable)

[george]: Pretty much any editor will provide with this type of functionality.

- auto-completion of namespaces

[george]: Emacs does not (or I should say I have not found) any type of mode 
for code complete in python. There are rumors with improvements with 
CEDET(intellisense) for python, I haven't been able to use them. Eclipse with 
PyDEV works great, and if you are hardcore linux Eric3 will work too. Although 
you can run Eric3 on win32 there are a few extra steps needed to install. Also 
if you work in a commercial development shop, QT licensing for Eric3 might be 
an issue?

- easy to run scripts from the editor (a shortcut key to run them or something)

[george]: Emacs provides you a shell for which you can execute a script. You 
can extend lisp in Emacs as well, which is extremely flexible. I am not sure 
with eclipse regarding external scripts since I have just recently converted to 
eclipse from emacs(gasp!).I know you can call up python in interactive mode 
from eclipse, but I not sure how to call something likemyfoo.bat or 
myfoo.sh.
As with anything in eclipseI am sure there has to be some type of plug-in 
or something for it.

As I also do a lot of html, css and javascript it would be cool to have an 
editor that could also handle them, in which case I would want the same 
features for those languages, as well as the ability to write macros, scripts, 
etc in python.

[george]: Lots of editors will support various mode. As for the code completion 
in javascipt and html I do not have an answer for those. 


Having looked at loads of editors, I've ended up looking at emacs and vim.

Emacs seems too difficult with not enough support for using the mouse.

[george]: Even though I am "some what" moving away from emacs, it is still a 
great editor. I am sure vim is good too, just my preference to use emacs. For 
mouse support

Try including this in your .emacs file

(autoload 'mwheel-install "mwheel" "Enable wheely mouse")
(mwheel-install)


Vim seemed better, and I get the impression that it is possible to use python 
to script the editor, but I can't find much information on using vim as a 
python editor on windows.

[george]: I think that is fine, I do not have much experience with vim. I only 
use it about 5% out of the day, hopefully someone else could help you out.

My various questions are:

What other features should I be looking for?

[george]: I think you have them covered You might want to look at 
integrations with source control (cvs, svn, etc.) too. Also debuggers should be 
included as well.

What would be the best editor for a beginner to start using, with a view to the 
long term?

[george]: I think that is really user preference. Try them all out, you will 
most likely fall into which one fits your own needs.

Where can I find some authoritative information about setting emacs or vim up 
as a fully featured python editor?

[george]: check out sourceforge or freshmeat for add-ons and other modes.

[george]
Good luck
[/george]


Thanks

Ed
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Python Editors (particualrly Vim)

2005-09-21 Thread George Flaherty
No editor wars here, my suggestion as I tried to state below is use what 
you like. Try'em all and take them for a test spin. Granted I might be slightly 
biased towards eclipse/emacs.but that is just my world :)

Just out of curiosity, does vim have code completion for python? 

Cheers
-george


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gabriel Farrell
Sent: Wednesday, September 21, 2005 12:56 PM
To: tutor@python.org
Subject: Re: [Tutor] Python Editors (particualrly Vim)

Uh oh, looks like you're begging for an editor war. 

That said, I'm in the vim camp.  It can do everything you specified for all of 
the languages you mention (well, I'm not sure about collapsible code...web 
search...aha![1]).  After using it for four years, I'm still learning new 
tricks (see, for example, this page I found today on indentation[2]).

vim's extendable with python scripts, but a lot of what you need for coding is 
already built in.  I find most of my info either in the help manual that comes 
with it (:h) or at vim.org.

gsf

[1] http://www.dgp.toronto.edu/~mjmcguff/learn/vim/folding.txt
[2] http://www.vim.org/tips/tip.php?tip_id=83


On Wed, Sep 21, 2005 at 02:00:20PM +0100, Ed Singleton wrote:
> I've been trying to decide which editor to use to edit Python (on 
> Windows mostly).
> 
> My wishlist of features would be:
> 
> - automatic code formatting (indentation etc)
> - collapsible code (to collapse def's etc)
> - automatic code coloring (that's easily changeable)
> - auto-completion of namespaces
> - easy to run scripts from the editor (a shortcut key to run them or 
> something)
> 
> As I also do a lot of html, css and javascript it would be cool to 
> have an editor that could also handle them, in which case I would want 
> the same features for those languages, as well as the ability to write 
> macros, scripts, etc in python.
> 
> Having looked at loads of editors, I've ended up looking at emacs and vim.
> 
> Emacs seems too difficult with not enough support for using the mouse.
> 
> Vim seemed better, and I get the impression that it is possible to use 
> python to script the editor, but I can't find much information on 
> using vim as a python editor on windows.
> 
> My various questions are:
> 
> What other features should I be looking for?
> 
> What would be the best editor for a beginner to start using, with a 
> view to the long term?
> 
> Where can I find some authoritative information about setting emacs or 
> vim up as a fully featured python editor?
> 
> Thanks
> 
> Ed
> ___
> Tutor maillist  -  Tutor@python.org
> http://mail.python.org/mailman/listinfo/tutor
> 
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


[Tutor] FW: Python Editors (particualrly Vim)

2005-09-21 Thread George Flaherty



forwarding.


From: Pujo Aji [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, September 21, 2005 2:39 PMTo: George 
FlahertySubject: Re: [Tutor] Python Editors (particualrly 
Vim)

I tried pydev, xemacs, komodo, vim, wingide, scite, drPython, pype, 
idle
Each has each own strength point. If I choose the three of them I will 
choose:
1. wingide (good intellisense, but you have to setup some preferences to 
suit your need)
2. komodo (has good colour choice)
3. scite (very simple)
 
All are great and I use all of the three.
 
You can only try one by one and decide which one is good for you.
 
Sincerely Yours,
pujo 
On 9/21/05, George 
Flaherty <[EMAIL PROTECTED]> 
wrote: 
No 
  editor wars here, my suggestion as I tried to state below is use what you 
  like. Try'em all and take them for a test spin. Granted I might be slightly 
  biased towards eclipse/emacs.but that is just my world :) Just out 
  of curiosity, does vim have code completion for 
  python?Cheers-george-Original 
  Message-From: [EMAIL PROTECTED] [mailto: 
  [EMAIL PROTECTED]] On 
  Behalf Of Gabriel FarrellSent: Wednesday, September 21, 2005 12:56 
  PMTo: tutor@python.orgSubject: 
  Re: [Tutor] Python Editors (particualrly Vim) Uh oh, looks like you're 
  begging for an editor war.That said, I'm in the vim 
  camp.  It can do everything you specified for all of the languages 
  you mention (well, I'm not sure about collapsible code...web 
  search...aha![1]).  After using it for four years, I'm still 
  learning new tricks (see, for example, this page I found today on 
  indentation[2]). vim's extendable with python scripts, but a lot of 
  what you need for coding is already built in.  I find most of my 
  info either in the help manual that comes with it (:h) or at vim.org .gsf[1] http://www.dgp.toronto.edu/~mjmcguff/learn/vim/folding.txt[2] 
  http://www.vim.org/tips/tip.php?tip_id=83 
  On Wed, Sep 21, 2005 at 02:00:20PM +0100, Ed Singleton 
  wrote:> I've been trying to decide which editor to use to edit Python 
  (on> Windows mostly).>> My wishlist of features would be: 
  >> - automatic code formatting (indentation etc)> - 
  collapsible code (to collapse def's etc)> - automatic code coloring 
  (that's easily changeable)> - auto-completion of namespaces> - 
  easy to run scripts from the editor (a shortcut key to run them or > 
  something)>> As I also do a lot of html, css and _javascript_ it 
  would be cool to> have an editor that could also handle them, in which 
  case I would want> the same features for those languages, as well as 
  the ability to write > macros, scripts, etc in python.>> 
  Having looked at loads of editors, I've ended up looking at emacs and 
  vim.>> Emacs seems too difficult with not enough support for 
  using the mouse.>> Vim seemed better, and I get the impression 
  that it is possible to use> python to script the editor, but I can't 
  find much information on> using vim as a python editor on 
  windows.>> My various questions are: >> What other 
  features should I be looking for?>> What would be the best 
  editor for a beginner to start using, with a> view to the long 
  term?>> Where can I find some authoritative information about 
  setting emacs or > vim up as a fully featured python 
  editor?>> Thanks>> Ed> 
  ___> Tutor 
  maillist  -  Tutor@python.org > http://mail.python.org/mailman/listinfo/tutor>___Tutor 
  maillist  -   
  Tutor@python.orghttp://mail.python.org/mailman/listinfo/tutor___Tutor 
  maillist  -   
  Tutor@python.orghttp://mail.python.org/mailman/listinfo/tutor
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


[Tutor] Dynamic Method Creation

2008-07-10 Thread George Flaherty
Hello,

I am trying to port over some old code from Ruby into Python.  In my old ruby 
code I had a UnitTest class that created a bunch of test methods (i.e. def 
test_MyTestFunction) dynamically through the ruby method 
define_method(http://www.ruby-doc.org/core/classes/Module.html#M000396).

This functionally allowed me to create any number of methods dynamically within 
a particular class. My problem is I have never done this nor can find any 
examples of this within python and I am pretty sure python can handle this?

If anyone could point me in the right direction?
thanks

-george


___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor