Newbie Question: Intellisense for Web2Py?

305 views
Skip to first unread message

Tweety

unread,
Jan 20, 2010, 1:24:44 AM1/20/10
to web...@googlegroups.com, Massimo Di Pierro
Hello,

I am a newbie both with web2py, python and computer and web development
in general. I am trying to digest Massimo's book which I bought from
Lulu. I just want to ask anybody if they can suggest an IDE that has
intellisense that can make learning much more easier for me?

Right now, I am just trying to memorize all the functions and it is
really hard for me :(

I am desperate to learn but am wondering if anybody can suggest an IDE
that can work with web2py that has intellisense?

I hope someday Web2Py will have intellisense :)

Thanks 2 you all,

Tweety

tiago almeida

unread,
Jan 20, 2010, 5:19:29 AM1/20/10
to web...@googlegroups.com
Hi.
You can try pydev which is an IDE based on eclipse for python.
I've never used it with web2py so I can't give you more details. Google is your friend.

See ya
Tiago

--
You received this message because you are subscribed to the Google Groups "web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to web2py+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/web2py?hl=en.




vihang

unread,
Jan 20, 2010, 5:22:05 AM1/20/10
to web2py-users
Since web2py apps do not need to explicitly import any gluon packages,
the intellisense in pydev does not work very well. There was a hack
given somewhere on this forum, which did work to an extend.


On Jan 20, 3:19 pm, tiago almeida <tiago.b.alme...@gmail.com> wrote:
> Hi.
> You can try *pydev* which is an IDE based on eclipse for python.


> I've never used it with web2py so I can't give you more details. Google is
> your friend.
>
> See ya
> Tiago
>

> On Wed, Jan 20, 2010 at 6:24 AM, Tweety <tweetych...@gmail.com> wrote:
> > Hello,
>
> > I am a newbie both with web2py, python and computer and web development in
> > general. I am trying to digest Massimo's book which I bought from Lulu. I
> > just want to ask anybody if they can suggest an IDE that has intellisense
> > that can make learning much more easier for me?
>
> > Right now, I am just trying to memorize all the functions and it is really
> > hard for me :(
>
> > I am desperate to learn but am wondering if anybody can suggest an IDE that
> > can work with web2py that has intellisense?
>
> > I hope someday Web2Py will have intellisense :)
>
> > Thanks 2 you all,
>
> > Tweety
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "web2py-users" group.
> > To post to this group, send email to web...@googlegroups.com.
> > To unsubscribe from this group, send email to

> > web2py+un...@googlegroups.com<web2py%2Bunsu...@googlegroups.com>

Ivan P

unread,
Jan 20, 2010, 6:57:48 AM1/20/10
to web2py-users
While completion is nice, I think that what seems like a steep
learning curve is actually not that much. You mostly use a few of the
framework functions and variables, unless you adding something new to
your project, like authentication or maybe a new table. So I'd say
that you don't need it. And if using a framework like this is a bit
too much at first, try some offline project with smaller libraries.
I'm sure you could come up with some fun little scripts to write, with
PyGame for example.
In general I'd say that while completion in python speeds things up
(ipython is a really pleasant tool for that reason), it is of much
less use than in Java for example, with which I've worked quite a bit
(oh the years of sorrow!).

mdipierro

unread,
Jan 20, 2010, 10:04:41 AM1/20/10
to web2py-users
I know Eclipse works with web2py. I do not use it but I think it has
intellisense.

Thadeus Burgess

unread,
Jan 20, 2010, 3:26:07 PM1/20/10
to web...@googlegroups.com
To get web2py to work with code completion. This will work with
eclipse + pydev, or wing IDE, or netbeans + python.

add this to the top of your file (unfortunately it has to be on every
file you want code completion).


if 0:
from gluon.tools import *
from gluon.sqlhtml import *
from gluon.sql import *
#...etc etc for every module you want to import

-Thadeus

> --
> You received this message because you are subscribed to the Google Groups "web2py-users" group.
> To post to this group, send email to web...@googlegroups.com.

> To unsubscribe from this group, send email to web2py+un...@googlegroups.com.

mdipierro

unread,
Jan 20, 2010, 4:46:36 PM1/20/10
to web2py-users
I have not tried by perhaps putting

if 0:
from gluon.tools import *
from gluon.sqlhtml import *
from gluon.sql import *
#...etc etc for every module you want to import

in web2py/w.py

and importing

from w import *

in very file is a more compact solution.

On Jan 20, 2:26 pm, Thadeus Burgess <thade...@thadeusb.com> wrote:
> To get web2py to work with code completion. This will work with
> eclipse + pydev, or wing IDE, or netbeans + python.
>
> add this to the top of your file (unfortunately it has to be on every
> file you want code completion).
>
> if 0:
>    from gluon.tools import *
>    from gluon.sqlhtml import *
>    from gluon.sql import *
>    #...etc etc for every module you want to import
>
> -Thadeus
>

Thadeus Burgess

unread,
Jan 20, 2010, 5:03:53 PM1/20/10
to web...@googlegroups.com
It is not, it will not pull in the imports of other files.

You have to specifically declare all modules that are imported that
you want available in the file that you want code completion on.

-Thadeus

Anand Vaidya

unread,
Jan 21, 2010, 1:05:44 AM1/21/10
to web2py-users
I use a combination of vim and ipython. I find that the fastest
combination.

I have tested a few IDEs :

- Eclipse - with pydev : I dislike eclipse for its monstrous
complexity, and I had problems getting pydev to run on the day I
tested. Abandoned.

- Aptana : Eclipse based, did not work at all... I did not try any
troubleshooting

- Netbeans : NB 6.8 supports Python development - install the python
dev plugin. create a new project and import the entire web2py/* by
selecting "create project from existing source". Code-completion
works. but also brings up hundreds of irrelevant autocomplete choices,
I guess it "goes up" all the way to Object and gets all the methods.
The other problem is NB is 100% java . My laptop with 2.4GHz Dual
Core, 4GB, Nvidia gfx & kubuntu 9.10 was fully loaded and the fans
were spinning like crazy. No hope of surviving on battery power.

- eric4 : ugly UI, autocompletion advertised but does not work, need
to retest newer release.

- SPE (Stani's Py Editor): code completion does not work properly,
works partially, otherwise nice editor

- WingWare: All features work as advertised. Not a free or OSS
software. web2py is supported http://www.wingware.com/doc/howtos/web2py
I am planning to switch to Wingware soon.


Regards
Anand

On Jan 21, 6:03 am, Thadeus Burgess <thade...@thadeusb.com> wrote:
> It is not, it will not pull in the imports of other files.
>
> You have to specifically declare all modules that are imported that
> you want available in the file that you want code completion on.
>
> -Thadeus
>

Thadeus Burgess

unread,
Jan 24, 2010, 1:21:15 AM1/24/10
to web...@googlegroups.com
Not sure what you did wrong with netbeans.

I just installed netbeans 6.8 php version, installed python plugin,
and then created a new project, added web2py/gluon, and added
applications/blogitizer. Waited some time for netbeans to index my
python 2.6.4 and my project files.

On top of my model/controller files I did.

if 0:
from gluon.sql import *
from gluon.sqlhtml import *
from gluon.html import *
db = DAL()
#optionally use table references instead of db reference
mytable = Table()

I get correct code completion that is relevant, it does populate with
the other methods from inherited classes, but those are in order of
inheritance, so the "obj" methods are at the last of the list and the
DAL methods are at the top.

-Thadeus

DL

unread,
Feb 2, 2010, 5:31:35 PM2/2/10
to web2py-users
Are you sure? I thought '__all__' was made for cases like this..

> >> >>intellisensethat can make learning much more easier for me?


>
> >> >> Right now, I am just trying to memorize all the functions and it is
> >> >> really hard for me :(
>
> >> >> I am desperate to learn but am wondering if anybody can suggest an IDE
> >> >> that can work with web2py that hasintellisense?
>

> >> >> I hope someday Web2Py will haveintellisense:)

Thadeus Burgess

unread,
Feb 2, 2010, 5:40:16 PM2/2/10
to web...@googlegroups.com
Have you tried it?

-Thadeus

Reply all
Reply to author
Forward
0 new messages