Re: [Tutor] Spell checking source code?

2009-06-02 Thread ALAN GAULD
> From: "wormina...@gmail.com" > To: Alan Gauld > Sent: Tuesday, 2 June, 2009 1:09:39 AM > Subject: Re: [Tutor] Spell checking source code? > > In vim, > > :set spell > :set nospell > :help spell But that will check the whole file. The OP only wanted to spell check the comments. Unless I'm m

[Tutor] Text.index()

2009-06-02 Thread prasad rao
Hello I created a gui app.I am finding it impossible to use Text.insert().please some one give an example of using it. def fshow(): x=entry1.get() try: value1,value2=x.split(',') text.insert(len(myfiles(value1,value2)),myfiles(value1,value2)) except: text.insert(

Re: [Tutor] delphi, pascal and Python

2009-06-02 Thread Andy Cheesman
After Much Looking and pointers from the author, There is this most excellent post by the same author at http://wiki.lazarus.freepascal.org/Developing_Python_Modules_with_Pascal This nearly works but I have issue with the linking of the new module. The error is Linking PyMinMod.so /usr/bin/ld: P

Re: [Tutor] Text.index()

2009-06-02 Thread Lie Ryan
prasad rao wrote: > Hello > I created a gui app.I am finding it impossible to > use Text.insert().please some one give an example of using it. > In Tkinter.Text, insert's argument is a string of the form "line.collumn" instead of a number. >>> tb.insert("2.6", 'abc') you usually use %-format

Re: [Tutor] Spell checking source code?

2009-06-02 Thread W W
On Tue, Jun 2, 2009 at 3:15 AM, ALAN GAULD wrote: > > > From: "wormina...@gmail.com" > > To: Alan Gauld > > Sent: Tuesday, 2 June, 2009 1:09:39 AM > > Subject: Re: [Tutor] Spell checking source code? > > > > In vim, > > > > :set spell > > :set nospell > > :help spell > > > But that will check th

Re: [Tutor] Text.index()

2009-06-02 Thread Alan Gauld
"prasad rao" wrote I created a gui app.I am finding it impossible to use Text.insert().please some one give an example of using it. Look in my tutorial at event driven programming and the Case study. Both use the Text widget. For more detailed info try this introduction: http://www.linu

Re: [Tutor] serious problem with graphics module

2009-06-02 Thread roberto
On Tue, May 26, 2009 at 12:28 AM, Gregor Lingl wrote: > > > roberto schrieb: > Do you use Python from the command line (terminal) or do you use IDLE? > I ask this, because these two show different behaviour. i use IDLE, in Python 3.0 >> >> i have a problem with python 3.0 graphics module: >> >> n

Re: [Tutor] serious problem with graphics module

2009-06-02 Thread roberto
On Tue, May 26, 2009 at 12:45 AM, Gregor Lingl wrote: > I know one situation in which can happen what you describe: > > If you use IDLE, issue the above commands and your Idle-shell-window > covers the graphics window - then you have to move the shell window in order > to see what's on the graphic

[Tutor] python workspace

2009-06-02 Thread roberto
hello, i'd like to ask if there is anything in python which helps to see what variables have been defined and their type and their dimension etc; if any of you has ever used Matlab, i mean something really similar to its workspace, where all the user created variables are stored and constantly upd

Re: [Tutor] python workspace

2009-06-02 Thread Gökhan SEVER
Hi, Have you tried Ipython? https://launchpad.net/ipython And also there is and on-going work called pydee ( http://code.google.com/p/pydee/) which they plan to integrate Ipython into a GUI very similar to the one in Matlab. Gökhan On Tue, Jun 2, 2009 at 10:54 AM, roberto wrote: > hello, >

Re: [Tutor] serious problem with graphics module

2009-06-02 Thread Lie Ryan
roberto wrote: > On Tue, May 26, 2009 at 12:45 AM, Gregor Lingl wrote: >> I know one situation in which can happen what you describe: >> >> If you use IDLE, issue the above commands and your Idle-shell-window >> covers the graphics window - then you have to move the shell window in order >> to see

Re: [Tutor] python workspace

2009-06-02 Thread Lie Ryan
roberto wrote: > hello, > i'd like to ask if there is anything in python which helps to see what > variables have been defined and their type and their dimension etc; > > if any of you has ever used Matlab, i mean something really similar to > its workspace, where all the user created variables ar

Re: [Tutor] python workspace

2009-06-02 Thread roberto
On Tue, Jun 2, 2009 at 6:07 PM, Gökhan SEVER wrote: > Hi, > > Have you tried Ipython? > > https://launchpad.net/ipython not yet > > And also there is and on-going work called pydee > (http://code.google.com/p/pydee/) which they plan to integrate Ipython into > a GUI very similar to the one in Mat

Re: [Tutor] python workspace

2009-06-02 Thread Emile van Sebille
On 6/2/2009 8:54 AM roberto said... hello, i'd like to ask if there is anything in python which helps to see what variables have been defined and their type and their dimension etc; In appropriate contexts, you may be able to use a variant of: from pprint import pprint pprint (locals()) HTH,

[Tutor] How o convert spaces into tabs??

2009-06-02 Thread jyotsna guleria
Hello every one, I am trying to parse a file: I want to convert all the spaces in between the characters to single tab. e.g: my file has contents like: 1G579011 10 2 0 00 0 0 00 5Ht-2 60459 11 0

Re: [Tutor] How o convert spaces into tabs??

2009-06-02 Thread W W
On Tue, Jun 2, 2009 at 12:42 PM, jyotsna guleria wrote: > > Hello every one, > > I am trying to parse a file: > > I want to convert all the spaces in between the characters to single tab. > > e.g: my file has contents like: > > 1G579011 10 2 0 00 >

Re: [Tutor] python workspace

2009-06-02 Thread Dave Angel
roberto wrote: On Tue, Jun 2, 2009 at 10:54 AM, roberto wrote: >> >> hello, >> i'd like to ask if there is anything in python which helps to see what >> variables have been defined and their type and their dimension etc; >> >> if any of you has ever used Matlab, i mean something really sim

Re: [Tutor] How o convert spaces into tabs??

2009-06-02 Thread vince spicer
regex will do it import re line = re.sub(r"\s+", "\t", line) print line Vince On Tue, Jun 2, 2009 at 11:42 AM, jyotsna guleria wrote: > > Hello every one, > > I am trying to parse a file: > > I want to convert all the spaces in between the characters to single tab. > > e.g: my file has con

Re: [Tutor] python workspace

2009-06-02 Thread Gökhan SEVER
In Ipython If you just type local() you get a pretty printed out without a need for an explicit pprint call. Secondly, Ipython works only for 2.4-5-6 as of now. Here what the documentation says: "We have not begun to test IPython on Python 2.6 or 3.0, but we expect it will work with some minor c

Re: [Tutor] How o convert spaces into tabs??

2009-06-02 Thread शंतनू (Shantanoo)
jyotsna guleria wrote: Hello every one, I am trying to parse a file: I want to convert all the spaces in between the characters to single tab. e.g: my file has contents like: 1G579011 10 2 0 0 0 0 0 00 5Ht-2

Re: [Tutor] How o convert spaces into tabs??

2009-06-02 Thread jyotsna guleria
Thank you very much..:) On Tue, Jun 2, 2009 at 1:22 PM, W W wrote: > On Tue, Jun 2, 2009 at 12:42 PM, jyotsna guleria < > jyotsna.gule...@gmail.com> wrote: > >> >> Hello every one, >> >> I am trying to parse a file: >> >> I want to convert all the spaces in between the characters to single tab.

Re: [Tutor] python workspace

2009-06-02 Thread Emile van Sebille
On 6/2/2009 11:34 AM Gökhan SEVER said... In Ipython Good for IPYTHON -- I wasn't presuming that. Emile ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] How o convert spaces into tabs??

2009-06-02 Thread Martin Walsh
vince spicer wrote: > > regex will do it > > > import re > > line = re.sub(r"\s+", "\t", line) > > print line The above replaces the newline, which reminds me that even seemingly trivial uses of 're' can become not-so-trivial in a hurry. In [1]: import re In [2]: line = '1 2 3 4 5\n' In

Re: [Tutor] Spell checking source code?

2009-06-02 Thread David
ALAN GAULD wrote: But that will check the whole file. The OP only wanted to spell check the comments. Unless I'm missing something? "Allen Fowler" wrote Are there any utilities to help "spell check" source code? (Docstrings, etc) I came up with this; [sample file] #!/usr/bin/python

Re: [Tutor] python workspace

2009-06-02 Thread W W
On Tue, Jun 2, 2009 at 1:30 PM, Dave Angel wrote: > roberto wrote: > > On Tue, Jun 2, 2009 at 10:54 AM, roberto wrote: >> >> >>> >> >>> >> hello, >>> >> i'd like to ask if there is anything in python which helps to see what >>> >> variables have been defined and their type and their dimension

[Tutor] Suggested source code folder layout

2009-06-02 Thread Allen Fowler
Hello, I'm looking for some suggestions as to the filesystem source code layout for a new project. Here is what I am thinking so far: root_folder/ - app/ -- Code for our pylons/django/TG/etc web app - web/ -- Public static web files (and wsgi / fastCGI connector files) - db/ -- SQlite DB - scr

Re: [Tutor] python workspace

2009-06-02 Thread Alan Gauld
"roberto" wrote i'd like to ask if there is anything in python which helps to see what variables have been defined and their type and their dimension etc; Bear in mind that Python variables are simply names so they have no type or dimension information. That belongs to the objects to which

Re: [Tutor] serious problem with graphics module

2009-06-02 Thread Gregor Lingl
Lie Ryan schrieb: roberto wrote: On Tue, May 26, 2009 at 12:45 AM, Gregor Lingl wrote: I know one situation in which can happen what you describe: ... ok, it works all right now the minor issue is that i could not create the shortcut with the -n flag as you pointed out, tha

Re: [Tutor] serious problem with graphics module

2009-06-02 Thread W W
On Tue, Jun 2, 2009 at 7:12 PM, Gregor Lingl wrote: > > Does anyone have experience with using IPython with Tkinter? Plenty, and it works wonderfully. I've never had any errors (that I know of) that weren't of my own making ;) My personal development environment consists of ipython for trying