Python Editor for mobile

2019-08-31 Thread CrazyVideoGamez
Are there any good editors on Apple that don't cost money and already has 
matplotlib, numpy, and other modules already installed?
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Online Python Editor with Live Syntax Checking

2017-03-05 Thread Jason Friedman
>
> I made a tool called PythonBuddy (http://pythonbuddy.com/).
>
> I made this so that MOOCs like edX or codecademy could easily embed and
> use this on their courses so students wouldn't have to go through the
> frustrations of setting up a Python environment and jump right into Python
> programming. Also, professors and teachers could easily set up a server and
> allow students to quickly test out their code with PythonBuddy online.
>
> Github repo: https://github.com/ethanche…/OnlinePythonLinterSyntaxChecker
>

Pretty cool.

Your Github link did not work for me.

This looks like Python 2.  Is there a reason you did not go with 3?
-- 
https://mail.python.org/mailman/listinfo/python-list


Online Python Editor with Live Syntax Checking

2017-02-28 Thread 17chiue
Hi everyone, 

I made a tool called PythonBuddy (http://pythonbuddy.com/). 

I made this so that MOOCs like edX or codecademy could easily embed and use 
this on their courses so students wouldn't have to go through the frustrations 
of setting up a Python environment and jump right into Python programming. 
Also, professors and teachers could easily set up a server and allow students 
to quickly test out their code with PythonBuddy online.

Github repo: https://github.com/ethanche…/OnlinePythonLinterSyntaxChecker

Feel free to ask any questions you have below or any feedback you have! Would 
love to improve this tool in any way :)
-- 
https://mail.python.org/mailman/listinfo/python-list


Open source and Cross platform Python Editor

2016-10-24 Thread don . jayamanne
Hi Everyone,

I'm the author of a Python extension for the open source, MIT licensed and 
cross platform Visual Studio Code Editor (https ://code.visualstudio.com/).
This is developed using nodejs and python, MIT licensed running on all major OS 
(OS X, Linux and Windows).
The major features include:
- Auto complete (intellisense)
- Code navigation
- Linting (mypy, pep8, pylint, flake8, etc)
- Unit tests (pytest, nose, unittest)
- Jupyter (IPython)
- Debugging (django, flask, remote debugging, docker, multi threads, django 
templates, SSH, etc)
- Code formatting (autopep8, yapf)
- Refactoring, 
- Snippets and more

Please note, this is open source and MIT licensed. This isn't meant to be a 
competitor to IDEs like PyCharm, instead is a lightweight and cross platform 
alternative (editor).

I'm looking for some assistance in improving the capabilities of this extension 
(adding more features), looking for feedback suggestions and any help in 
maintaining it as well.
More information here:
- https://marketplace.visualstudio.com/items?itemName=donjayamanne.python
- https://github.com/DonJayamanne/pythonVSCode
-- 
https://mail.python.org/mailman/listinfo/python-announce-list

Support the Python Software Foundation:
http://www.python.org/psf/donations/


Re: Is anyone in this group using Python Editor v5 for Chromebooks?

2016-03-14 Thread Ian Kelly
On Sun, Mar 13, 2016 at 5:00 PM, Jeff Schumaker <schumaker...@gmail.com> wrote:
> I'm trying to use Python Editor v5 for Chromebooks. It works fine, except it 
> won't read data files. I'm just wondering if anyone else is using this editor 
> and has found a solution to this problem.

Sorry, haven't tried it. On my Chromebook I SSH into a Linux host and
use Emacs for code editing. I also use Crouton to run Ubuntu Linux in
a chroot shell on my Chromebook, so I can run a native Python locally
when I want, but I still just use Emacs for that.
-- 
https://mail.python.org/mailman/listinfo/python-list


Is anyone in this group using Python Editor v5 for Chromebooks?

2016-03-13 Thread Jeff Schumaker
I'm trying to use Python Editor v5 for Chromebooks. It works fine, except it 
won't read data files. I'm just wondering if anyone else is using this editor 
and has found a solution to this problem.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Which Python editor has this feature?

2016-01-26 Thread Fabio Zadrozny
On Sun, Jan 10, 2016 at 11:59 PM,  wrote:

> It lets you jump between the current cursor position and the line the
> upper level indentation start, something like the bracket matching in C
> editor. Because of Python use indentation as its code block mark, It might
> be helpful if we can jump between different level of it:-)
>

​You can do this in Eclipse/PyDev by using the scope selector (​Shift + Alt
+ Up multiple times to select outer scopes and Shift + Alt + Down to
deselect) and then use left arrow to go to the start or right arrow to go
to the end (although if you're just navigating methods, you can do
Ctrl+Shift+Up / Down to select the previous/next method, which may be a bit
faster).

Best Regards,

Fabio​
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Which Python editor has this feature?

2016-01-26 Thread Fabio Zadrozny
On Mon, Jan 11, 2016 at 6:40 AM, Gordon Levi <gordon@address.invalid> wrote:

> jf...@ms4.hinet.net wrote:
>
> >It lets you jump between the current cursor position and the line the
> upper level indentation start, something like the bracket matching in C
> editor. Because of Python use indentation as its code block mark, It might
> be helpful if we can jump between different level of it:-)
>
> Jetbrains Pycharm has "go to start of block" and "go to end of block"
> commands <https://www.jetbrains.com/pycharm/>.
>
> Unfortunately the free version of Pycharm does not support remote
> debugging and my main use for Python is for programming a Raspberry
> Pi. I use Visual Studio instead and its "go to end of block" does not
> work in the Python editor
> <https://www.visualstudio.com/en-us/features/python-vs.aspx>.
> --


​Note that you can use Eclipse/ PyDev for remote debugging.​
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Which Python editor has this feature?

2016-01-13 Thread Terry Reedy

On 1/12/2016 8:20 PM, jf...@ms4.hinet.net wrote:

Terry Reedy at 2016/1/12 UTC+8 3:56:03PM wrote:

Revamping IDLE to 1. use ttk widgets and 2. become a modern single
window app with multiple panes, including a tabbed editor pane, is
a goal for 2016.


That will be great, I'm looking forward to it.

By the way, when I was playing around with the IDLE editor yesterday,
I had noticed that during the time the "Search Dialog" was opened,
"Find Next" button will not highlight the item searched, unless the
dialog was closed.


This was a Windows specific problem that was fixed (for me) in all three 
recent (last November/December) bugfix releases.  If you have a problem 
with *current* IDLE, I would like to know.


--
Terry Jan Reedy

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


Re: Which Python editor has this feature?

2016-01-13 Thread Chris Angelico
On Wed, Jan 13, 2016 at 8:05 PM, Terry Reedy  wrote:
> Assuming that sys.__sydout__ is not None is a bug on pip's part. Perhaps you
> could report it to it list or tracker, and point Donald and whoever to
> https://docs.python.org/3/library/sys.html#sys.__stdin__
>
> "Note
>
> Under some conditions stdin, stdout and stderr as well as the original
> values __stdin__, __stdout__ and __stderr__ can be None. It is usually the
> case for Windows GUI apps that aren’t connected to a console and Python apps
> started with pythonw."
>

Thanks! Posted. https://github.com/pypa/pip/issues/3356

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


Re: Which Python editor has this feature?

2016-01-13 Thread Terry Reedy

On 1/12/2016 5:18 AM, Chris Angelico wrote:

On Tue, Jan 12, 2016 at 7:27 PM, Terry Reedy  wrote:



Can psycopg2 be installed with pip?  There is an issue (#23551) to make a
pip GUI and make it accessible from IDLE.  We need someone with both pip and
tkinter knowledge to either design and write it or mentor a GSOC student to
do so.  One written, I would add an IDLE menu item to run it, in a separate
process, just as done now with turtledemo.


Yes, invisible smiley... but with a hint of truth too. Obviously
installing PostgreSQL itself is outside the scope of IDLE, but
psycopg2 is indeed pip-installable... except that it isn't always, on
Windows, because wheels aren't available for all versions. (There's no
Python 3.5 wheel yet; at least, I can't see one on PyPI.)


Maybe someone should give them a prod.  It has been 4 months.
http://www.lfd.uci.edu/~gohlke/pythonlibs/
only has psycopg, for 2.6.

> So what I'm

really looking for isn't an IDLE feature but a Python packaging
feature - some people have talked about setting up build farms that
can produce wheels for people.


Building binaries is a rather different issue, certainly on Windows.


Hmm. I just tried this, and actually, there's some possibly
low-hanging fruit. (Tested on Python 3.4.3 as 3.5 can't install
psycopg2 anyway.)


import pip; pip.main(["install","psycopg2"])


https://bugs.python.org/issue23551
has my report of experimenting with directly using pip.main.  The main 
issue I ran into is that pip creates a cache of 'currently installed 
packages' the first time it needs it and never again during the same 
process.  In other words, pip.main is called exactly once when pip is 
run from the command line.  Another command from the command line starts 
a new process, which makes a new cache.  So calling main() repeatedly 
may fail due to a stale cache.  However, the need to refresh it is 
predictable, so reloading the module may work.



This produces a rather messy display, because pip.main seems to assume
that writing carriage returns to the console will result in the
display nicely overwriting (producing a moving progress bar as the
file gets downloaded). If IDLE can't handle carriage returns as such,
an easy fix would be to simply display them as complete lines; it
would be more verbose than the normal console behaviour, but not as
ugly.


Currently, Idle sends user code output to the tk Text widget as is, 
except for colorizing.  There was an issue about changing this, but it 
was closed, at least for the time being, as Python allows print to send 
output to any file and does not require than stdout be connected to a 
'console', and anyway there is no standard for console behavior.


A gui program that runs pip and displays its output would generally 
parse output for display in differnet widgets.


A couple of other random thoughts from this experiment.

* Going to python.org and pointing the mouse at the download link got
me 3.5.1 32-bit. This is on Google Chrome on a Windows 7 64-bit VM.
* Instead of pip.main(["install","psycopg2"]), I'd like to be able to
say pip.install("psycopg2"). In fact, I might take that to the pip
folks as a suggestion.



* The performance difference between "import pip" on 3.4.3 and 3.5.1
was dramatic! I don't know whether it's CPython that's been sped up or
pip itself, but it's awesome!


Try with 3.4.4, as I believe its installer should also update to the 
most recent pip version.



There's some kind of issue between pip and Idle that means that
installing a non-wheel blows up with an exception:


Traceback (most recent call last):
   File 
"C:\Users\Rosuav\AppData\Local\Programs\Python\Python35-32\lib\site-packages\pip\basecommand.py",
...
 return s.decode(sys.__stdout__.encoding)
AttributeError: 'NoneType' object has no attribute 'encoding'


Assuming that sys.__sydout__ is not None is a bug on pip's part. 
Perhaps you could report it to it list or tracker, and point Donald and 
whoever to https://docs.python.org/3/library/sys.html#sys.__stdin__


"Note

Under some conditions stdin, stdout and stderr as well as the original 
values __stdin__, __stdout__ and __stderr__ can be None. It is usually 
the case for Windows GUI apps that aren’t connected to a console and 
Python apps started with pythonw."


IDLE is a GUI app that on Windows is started with pythonw.exe.  More 
relevant, user code is executed in a windowless pythonw process.  The 
same problem should occur with any IDE that executes user code in a 
pythonw process.


A GUI program could work around the bug by setting sys.__stdin__ to an 
object with a .encoding attribute.  I checked that this can be done.



Maybe calling pip.main just isn't a supported thing, but it'd be nice
if there were _some_ way to do this, even without a fancy GUI.


Calling is once during a process is supported, or supposed to be.
If you ran, at the console,
  > pythonw.exe -c "import pip; pip.main(['install','psycopg2'])"
the same failure would 

Re: Which Python editor has this feature?

2016-01-13 Thread jfong
Terry Reedy at 2016/1/13 UTC+8 5:15:20PM wrote:
> This was a Windows specific problem that was fixed (for me) in all three 
> recent (last November/December) bugfix releases.  If you have a problem 
> with *current* IDLE, I would like to know.

I download/install the latest version 3.4.4 and it works perfectly.

It surprise me that how Python society is so active. I had version 3.4.3 
installed 4 months ago and now this problem had already been taken care of:-) 
Thank you.

--Jach Fong

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


Re: Which Python editor has this feature?

2016-01-12 Thread Terry Reedy

On 1/11/2016 8:09 PM, Chris Angelico wrote:

On Tue, Jan 12, 2016 at 11:55 AM, Bernardo Sulzbach
 wrote:

On Mon, Jan 11, 2016 at 10:14 PM, Chris Angelico  wrote:


Next IDLE feature request: Can you make it so that, across all
platforms, it magically installs PostgreSQL and psycopg2? That would
solve so many of my students' problems...


I detect an invisible smiley at the end of that.

PostgresSQL is not a Python package, hence would need a custom script to 
download and invoke, and would probably need user clicks anyway, at 
least on Windows.  Does/could psycopg2 have such for installing its 
dependency?


Can psycopg2 be installed with pip?  There is an issue (#23551) to make 
a pip GUI and make it accessible from IDLE.  We need someone with both 
pip and tkinter knowledge to either design and write it or mentor a GSOC 
student to do so.  One written, I would add an IDLE menu item to run it, 
in a separate process, just as done now with turtledemo.



Wouldn't this make the installer much bigger?


See invisible smiley ;-).


Yes, and it's also completely and utterly inappropriate. But I am
seeing a lot of cool magic getting added to Idle. Since I met Python,
it's gone from being "well, yeah, Python *does* include a GUI, but
it's pretty unexciting compared to others" to "Python includes a
pretty decent editor, but it's (unsurprisingly) Python-specific, so I
don't use it for multilingual work".

Shout-out to Terry and the other Idle devs for the work they've put in.

> Thanks!

Thank *you*.  It is sometimes thankless work.

--
Terry Jan Reedy

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


Re: Which Python editor has this feature?

2016-01-12 Thread Chris Angelico
On Tue, Jan 12, 2016 at 7:27 PM, Terry Reedy  wrote:
> On 1/11/2016 8:09 PM, Chris Angelico wrote:
>>
>> On Tue, Jan 12, 2016 at 11:55 AM, Bernardo Sulzbach
>>  wrote:
>>>
>>> On Mon, Jan 11, 2016 at 10:14 PM, Chris Angelico 
>>> wrote:


 Next IDLE feature request: Can you make it so that, across all
 platforms, it magically installs PostgreSQL and psycopg2? That would
 solve so many of my students' problems...
>
>
> I detect an invisible smiley at the end of that.
>
> PostgresSQL is not a Python package, hence would need a custom script to
> download and invoke, and would probably need user clicks anyway, at least on
> Windows.  Does/could psycopg2 have such for installing its dependency?
>
> Can psycopg2 be installed with pip?  There is an issue (#23551) to make a
> pip GUI and make it accessible from IDLE.  We need someone with both pip and
> tkinter knowledge to either design and write it or mentor a GSOC student to
> do so.  One written, I would add an IDLE menu item to run it, in a separate
> process, just as done now with turtledemo.

Yes, invisible smiley... but with a hint of truth too. Obviously
installing PostgreSQL itself is outside the scope of IDLE, but
psycopg2 is indeed pip-installable... except that it isn't always, on
Windows, because wheels aren't available for all versions. (There's no
Python 3.5 wheel yet; at least, I can't see one on PyPI.) So what I'm
really looking for isn't an IDLE feature but a Python packaging
feature - some people have talked about setting up build farms that
can produce wheels for people.

Hmm. I just tried this, and actually, there's some possibly
low-hanging fruit. (Tested on Python 3.4.3 as 3.5 can't install
psycopg2 anyway.)

>>> import pip; pip.main(["install","psycopg2"])

This produces a rather messy display, because pip.main seems to assume
that writing carriage returns to the console will result in the
display nicely overwriting (producing a moving progress bar as the
file gets downloaded). If IDLE can't handle carriage returns as such,
an easy fix would be to simply display them as complete lines; it
would be more verbose than the normal console behaviour, but not as
ugly.

A couple of other random thoughts from this experiment.

* Going to python.org and pointing the mouse at the download link got
me 3.5.1 32-bit. This is on Google Chrome on a Windows 7 64-bit VM.
* Instead of pip.main(["install","psycopg2"]), I'd like to be able to
say pip.install("psycopg2"). In fact, I might take that to the pip
folks as a suggestion.
* The performance difference between "import pip" on 3.4.3 and 3.5.1
was dramatic! I don't know whether it's CPython that's been sped up or
pip itself, but it's awesome!

There's some kind of issue between pip and Idle that means that
installing a non-wheel blows up with an exception:


Traceback (most recent call last):
  File 
"C:\Users\Rosuav\AppData\Local\Programs\Python\Python35-32\lib\site-packages\pip\basecommand.py",
line 211, in main
status = self.run(options, args)
  File 
"C:\Users\Rosuav\AppData\Local\Programs\Python\Python35-32\lib\site-packages\pip\commands\install.py",
line 294, in run
requirement_set.prepare_files(finder)
  File 
"C:\Users\Rosuav\AppData\Local\Programs\Python\Python35-32\lib\site-packages\pip\req\req_set.py",
line 334, in prepare_files
functools.partial(self._prepare_file, finder))
  File 
"C:\Users\Rosuav\AppData\Local\Programs\Python\Python35-32\lib\site-packages\pip\req\req_set.py",
line 321, in _walk_req_to_install
more_reqs = handler(req_to_install)
  File 
"C:\Users\Rosuav\AppData\Local\Programs\Python\Python35-32\lib\site-packages\pip\req\req_set.py",
line 505, in _prepare_file
abstract_dist.prep_for_dist()
  File 
"C:\Users\Rosuav\AppData\Local\Programs\Python\Python35-32\lib\site-packages\pip\req\req_set.py",
line 123, in prep_for_dist
self.req_to_install.run_egg_info()
  File 
"C:\Users\Rosuav\AppData\Local\Programs\Python\Python35-32\lib\site-packages\pip\req\req_install.py",
line 410, in run_egg_info
command_desc='python setup.py egg_info')
  File 
"C:\Users\Rosuav\AppData\Local\Programs\Python\Python35-32\lib\site-packages\pip\utils\__init__.py",
line 711, in call_subprocess
line = console_to_str(proc.stdout.readline())
  File 
"C:\Users\Rosuav\AppData\Local\Programs\Python\Python35-32\lib\site-packages\pip\compat\__init__.py",
line 47, in console_to_str
return s.decode(sys.__stdout__.encoding)
AttributeError: 'NoneType' object has no attribute 'encoding'


Maybe calling pip.main just isn't a supported thing, but it'd be nice
if there were _some_ way to do this, even without a fancy GUI.

How much of this is worth doing anything about, and how much is "hey,
you're hacking around calling a command-line tool from inside a GUI,
and stuff ain't a'gonna work right"?

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


Re: Which Python editor has this feature?

2016-01-12 Thread Grant Edwards
On 2016-01-12, Bernardo Sulzbach  wrote:
> On Mon, Jan 11, 2016 at 10:14 PM, Chris Angelico  wrote:
>>
>> Next IDLE feature request: Can you make it so that, across all
>> platforms, it magically installs PostgreSQL and psycopg2? That would
>> solve so many of my students' problems...
>>
>
> Wouldn't this make the installer much bigger?

Whoosh!

-- 
Grant Edwards   grant.b.edwardsYow! I feel like I am
  at   sharing a ``CORN-DOG''
  gmail.comwith NIKITA KHRUSCHEV ...
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Which Python editor has this feature?

2016-01-12 Thread jfong
Terry Reedy at 2016/1/12 UTC+8 3:56:03PM wrote:
> Revamping IDLE to 1. use ttk widgets and 2. become a modern single 
> window app with multiple panes, including a tabbed editor pane, is a 
> goal for 2016.

That will be great, I'm looking forward to it.

By the way, when I was playing around with the IDLE editor yesterday, I had 
noticed that during the time the "Search Dialog" was opened, "Find Next" button 
will not highlight the item searched, unless the dialog was closed.

--Jach Fong

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


Re: Which Python editor has this feature?

2016-01-12 Thread jfong
wxjm...@gmail.com at 2016/1/月12 4:29:08PM wrote:
> IDLE ?
> I need less than 10 seconds to make it crash.

Unwittingly or intentionally?

> The interesting aspect is not only to show that it crashes,
> the very interesting point is to explain why it is crashing.

Can you tell us (in a separate subject title)? I am willing to learn every 
aspects of Python.

--Jach Fong
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Which Python editor has this feature?

2016-01-12 Thread Chris Angelico
On Wed, Jan 13, 2016 at 12:27 PM,   wrote:
> wxjm...@gmail.com at 2016/1/月12 4:29:08PM wrote:
>> IDLE ?
>> I need less than 10 seconds to make it crash.
>
> Unwittingly or intentionally?
>
>> The interesting aspect is not only to show that it crashes,
>> the very interesting point is to explain why it is crashing.
>
> Can you tell us (in a separate subject title)? I am willing to learn every 
> aspects of Python.

Take no notice of the troll.

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


Re: Which Python editor has this feature?

2016-01-12 Thread Steven D'Aprano
On Wed, 13 Jan 2016 12:27 pm, jf...@ms4.hinet.net wrote:

> wxjm...@gmail.com at 2016/1/月12 4:29:08PM wrote:
>> IDLE ?
>> I need less than 10 seconds to make it crash.
> 
> Unwittingly or intentionally?
> 
>> The interesting aspect is not only to show that it crashes,
>> the very interesting point is to explain why it is crashing.
> 
> Can you tell us (in a separate subject title)? I am willing to learn every
> aspects of Python.

Pay no attention to wxjmfauth, he is our resident troll who is obsessed with
Python's Unicode implementation.

When he says "make it crash", he means "raise an exception", which is
absolutely trivial. We can all make Python raise an exception in a fraction
of a second:

1/0

will do it. Or if you prefer to stick to unicode:

u'£'.encode('ascii')


wxjmfauth's obsession started with an alpha release of Python 3.3 that had a
small performance decrease for some operations on non-ASCII characters
under some circumstances. He has taken this tiny decrease in performance as
proof of some grand conspiracy that the Python developers hate non-English
speaking Europeans (he never seems to care about Asians or other non-Latin
based characters, only French and other European ones) and that this small
performance decrease shows that Python can't do Unicode.

I think that is fair to say that he is what the English call "a nutter".


-- 
Steven

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


Re: Which Python editor has this feature?

2016-01-11 Thread Bernardo Sulzbach
On Mon, Jan 11, 2016 at 10:14 PM, Chris Angelico  wrote:
>
> Next IDLE feature request: Can you make it so that, across all
> platforms, it magically installs PostgreSQL and psycopg2? That would
> solve so many of my students' problems...
>

Wouldn't this make the installer much bigger?

-- 
Bernardo Sulzbach
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Which Python editor has this feature?

2016-01-11 Thread Chris Angelico
On Tue, Jan 12, 2016 at 8:21 AM, Terry Reedy  wrote:
>
> The context is currently read-only.  Clicking on context lines does nothing.
> As a result of this thread, I am thinking that clicking on a context line
> should scroll up the main text window to display that line at the top (and
> remove that line and any below from the context box).  I *think* that this
> should be fairly easy.

That'd be pretty cool.

Next IDLE feature request: Can you make it so that, across all
platforms, it magically installs PostgreSQL and psycopg2? That would
solve so many of my students' problems...

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


Re: Which Python editor has this feature?

2016-01-11 Thread Chris Angelico
On Tue, Jan 12, 2016 at 11:55 AM, Bernardo Sulzbach
 wrote:
> On Mon, Jan 11, 2016 at 10:14 PM, Chris Angelico  wrote:
>>
>> Next IDLE feature request: Can you make it so that, across all
>> platforms, it magically installs PostgreSQL and psycopg2? That would
>> solve so many of my students' problems...
>>
>
> Wouldn't this make the installer much bigger?

Yes, and it's also completely and utterly inappropriate. But I am
seeing a lot of cool magic getting added to Idle. Since I met Python,
it's gone from being "well, yeah, Python *does* include a GUI, but
it's pretty unexciting compared to others" to "Python includes a
pretty decent editor, but it's (unsurprisingly) Python-specific, so I
don't use it for multilingual work".

Shout-out to Terry and the other Idle devs for the work they've put in. Thanks!

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


Re: Which Python editor has this feature?

2016-01-11 Thread jfong
Chris Angelico at 2016/1/11  UTC+8 10:59:47AM wrote:
> On Mon, Jan 11, 2016 at 12:59 PM,   wrote:
> > It lets you jump between the current cursor position and the line the upper 
> > level indentation start, something like the bracket matching in C editor. 
> > Because of Python use indentation as its code block mark, It might be 
> > helpful if we can jump between different level of it:-)
> 
> I coded this up as a patch for SciTE/Scintilla at one point, but it
> didn't get accepted. It was used for a while at my work, but never
> really settled in as being useful. Python code tends not to be as big
> and complex as C code often is, so it's not as useful to have a
> feature like this.
> 
> If you want it, I can probably hunt down the patch file somewhere.
> 
> ChrisA

I am studying the PyUSB package now as the learning object of how to write a 
Python program in a "formal" way. In those modules, there are many comment 
inserted between codes to explain what it does. It's good to the user 
comprehension, but also easily makes a Class size expanded to over 100 lines. 
Also many Classes has the same named method such as __getitem__ etc. When 
searching a specific name I usually have to roll back the screen a few times to 
find out what Class I am looking at. That's really annoy.

But, just like you said, this feature may be not so useful to a Python 
programmer. I should try the editor I am using now to see if I can "patch" a 
such feature, just as you had did on SciTE before:-)

--Jach

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


Re: Which Python editor has this feature?

2016-01-11 Thread Gordon Levi
jf...@ms4.hinet.net wrote:

>It lets you jump between the current cursor position and the line the upper 
>level indentation start, something like the bracket matching in C editor. 
>Because of Python use indentation as its code block mark, It might be helpful 
>if we can jump between different level of it:-)

Jetbrains Pycharm has "go to start of block" and "go to end of block"
commands <https://www.jetbrains.com/pycharm/>.

Unfortunately the free version of Pycharm does not support remote
debugging and my main use for Python is for programming a Raspberry
Pi. I use Visual Studio instead and its "go to end of block" does not
work in the Python editor
<https://www.visualstudio.com/en-us/features/python-vs.aspx>.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Which Python editor has this feature?

2016-01-11 Thread jfong
Tim Chase at 2016/1/11 UTC+8 11:16:27AM wrote:
> On 2016-01-10 17:59, jf...@ms4.hinet.net wrote:
> > It lets you jump between the current cursor position and the line
> > the upper level indentation start, something like the bracket
> > matching in C editor. Because of Python use indentation as its code
> > block mark, It might be helpful if we can jump between different
> > level of it:-)
> 
> While not quite what you're asking for, vim offers an "indent text
> object" plugin[1] that allows you to use a block of indentation
> around the cursor as an object.  So you can use vim's grammar to issue
> commands like "dai" to delete the current indentation-defined block;
> or you can use ">ii" to add a level of indentation to the
> indentation-defined block.

Thanks, Tim.
I always admire people who can remember all those detail 
commands/parameters/options which a DOS-style editor as vim has. It's almost 
like a mission impossible to me:-(

> If you want to make a vim mapping that will jump up to the top of the
> previous level of indentation, the following should do the trick
> 
>   :nnoremap  Q '?^'.repeat(' ', (strlen(substitute(getline('.'), 
> '\S.*', '', ''))-)).'\S?e'."\"

But, but... this line??? won't it goes too far for a human being to read?

--Jach

> There might be some edge-cases that I haven't caught there, but, as
> long as you edit with spaces rather than tabs, it should work,
> including the accommodation of your 'shiftwidth', even if it's not
> PEP8 4-spaces-per-indent.
> 
> -tkc
> 
> [1]
> https://github.com/michaeljsmith/vim-indent-object

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


Re: Which Python editor has this feature?

2016-01-11 Thread Terry Reedy

On 1/11/2016 8:51 PM, jf...@ms4.hinet.net wrote:

Terry Reedy at 2016/1/12 UTC+8 5:22:35AM wrote:

IDLE has an optional 'code context' feature that shows header lines that
have scrolled up off the top of the screen.  This would let you see
which class you are in,


Thanks, Terry. It's just what I am looking for:-)
By the way, do you know how to open file in a new tab, instead of in a separate 
window, in the IDLE editor?


Revamping IDLE to 1. use ttk widgets and 2. become a modern single 
window app with multiple panes, including a tabbed editor pane, is a 
goal for 2016.



--
Terry Jan Reedy

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


Re: Which Python editor has this feature?

2016-01-11 Thread jfong
Terry Reedy at 2016/1/12 UTC+8 5:22:35AM wrote:
> IDLE has an optional 'code context' feature that shows header lines that 
> have scrolled up off the top of the screen.  This would let you see 
> which class you are in,

Thanks, Terry. It's just what I am looking for:-)
By the way, do you know how to open file in a new tab, instead of in a separate 
window, in the IDLE editor?

--Jach Fong
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Which Python editor has this feature?

2016-01-11 Thread Terry Reedy

On 1/11/2016 6:04 AM, jf...@ms4.hinet.net wrote:


I am studying the PyUSB package now as the learning object of how to
write a Python program in a "formal" way. In those modules, there are
many comment inserted between codes to explain what it does. It's
good to the user comprehension, but also easily makes a Class size
expanded to over 100 lines. Also many Classes has the same named
method such as __getitem__ etc. When searching a specific name I
usually have to roll back the screen a few times to find out what
Class I am looking at. That's really annoy.


IDLE has an optional 'code context' feature that shows header lines that 
have scrolled up off the top of the screen.  This would let you see 
which class you are in,


In current releases, Code Context is configured in the Extensions tab of 
the Settings dialog.  For previous releases after Aug 2014, it was 
configured in the separate Extensions dialog.


The most important setting is the (fixed) number of lines in the context 
box (default 3).  I would like to make the box re-size as needed, so the 
outermost context (like the class statement) is always visible without 
using more screen space than needed.


The context is currently read-only.  Clicking on context lines does 
nothing.  As a result of this thread, I am thinking that clicking on a 
context line should scroll up the main text window to display that line 
at the top (and remove that line and any below from the context box).  I 
*think* that this should be fairly easy.


--
Terry Jan Reedy

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


Re: Which Python editor has this feature?

2016-01-11 Thread Tim Chase
On 2016-01-11 03:08, jf...@ms4.hinet.net wrote:
> Tim Chase at 2016/1/11 UTC+8 11:16:27AM wrote:
> >   :nnoremap  Q '?^'.repeat(' ',
> > (strlen(substitute(getline('.'), '\S.*', '',
> > ''))-)).'\S?e'."\"
> 
> But, but... this line??? won't it goes too far for a human being to
> read?

Yes, it's a bit obscure.  But it's a mapping that creates a "Q"
command (feel free to map to whatever other key you have available),
so once you've created that mapping (you can put it in your vimrc),
all you have to remember is that "Q", not the whole messy string.

-tkc





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


Re: Which Python editor has this feature?

2016-01-11 Thread Frank Haun
On Sun, 10 Jan 2016 19:49:47 -0800 (PST), Rustom Mody wrote:

> On Monday, January 11, 2016 at 7:30:10 AM UTC+5:30, jf...@ms4.hinet.net wrote:
>> It lets you jump between the current cursor position and the line the
>> upper level indentation start, something like the bracket matching in
>> C editor. Because of Python use indentation as its code block mark,
>> It might be helpful if we can jump between different level of it:-)
>> 
>> 
>> --Jach Fong
>
> Recent emacs' python mode has all these bunch of python-nav-*
> functions.  You may have (as usual with emacs!) to choose which you
> like best, ie not all are not bound to keys.

Emacs is great for python editing. I use elpy-mode on top of emacs
python-mode. And company-mode for completion.

Frank
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Which Python editor has this feature?

2016-01-11 Thread jfong
Gordon Levi at 2016/1/11 UTC+8 4:41:20PM wrote:
> Jetbrains Pycharm has "go to start of block" and "go to end of block"
> commands .

Thanks, Gordon. But this seems only jump between the current code block's start 
and end, not to the code one level above:-(

--Jach
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Which Python editor has this feature?

2016-01-10 Thread Chris Angelico
On Mon, Jan 11, 2016 at 12:59 PM,   wrote:
> It lets you jump between the current cursor position and the line the upper 
> level indentation start, something like the bracket matching in C editor. 
> Because of Python use indentation as its code block mark, It might be helpful 
> if we can jump between different level of it:-)

I coded this up as a patch for SciTE/Scintilla at one point, but it
didn't get accepted. It was used for a while at my work, but never
really settled in as being useful. Python code tends not to be as big
and complex as C code often is, so it's not as useful to have a
feature like this.

If you want it, I can probably hunt down the patch file somewhere.

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


Re: Which Python editor has this feature?

2016-01-10 Thread Tim Chase
On 2016-01-10 17:59, jf...@ms4.hinet.net wrote:
> It lets you jump between the current cursor position and the line
> the upper level indentation start, something like the bracket
> matching in C editor. Because of Python use indentation as its code
> block mark, It might be helpful if we can jump between different
> level of it:-)

While not quite what you're asking for, vim offers an "indent text
object" plugin[1] that allows you to use a block of indentation
around the cursor as an object.  So you can use vim's grammar to issue
commands like "dai" to delete the current indentation-defined block;
or you can use ">ii" to add a level of indentation to the
indentation-defined block.

If you want to make a vim mapping that will jump up to the top of the
previous level of indentation, the following should do the trick

  :nnoremap  Q '?^'.repeat(' ', (strlen(substitute(getline('.'), '\S.*', 
'', ''))-)).'\S?e'."\"

There might be some edge-cases that I haven't caught there, but, as
long as you edit with spaces rather than tabs, it should work,
including the accommodation of your 'shiftwidth', even if it's not
PEP8 4-spaces-per-indent.

-tkc

[1]
https://github.com/michaeljsmith/vim-indent-object





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


Which Python editor has this feature?

2016-01-10 Thread jfong
It lets you jump between the current cursor position and the line the upper 
level indentation start, something like the bracket matching in C editor. 
Because of Python use indentation as its code block mark, It might be helpful 
if we can jump between different level of it:-)


--Jach Fong
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Which Python editor has this feature?

2016-01-10 Thread Rustom Mody
On Monday, January 11, 2016 at 7:30:10 AM UTC+5:30, jf...@ms4.hinet.net wrote:
> It lets you jump between the current cursor position and the line the upper 
> level indentation start, something like the bracket matching in C editor. 
> Because of Python use indentation as its code block mark, It might be helpful 
> if we can jump between different level of it:-)
> 
> 
> --Jach Fong

Recent emacs' python  mode has all these bunch of python-nav-* functions.
You may have (as usual with emacs!) to choose which you like best, ie not all 
are not bound to keys.

Click on a completion to select it.
In this buffer, type RET to select the completion near point.

Possible completions are:
python-nav--beginning-of-defun  python-nav--forward-defun
python-nav--forward-sexppython-nav--lisp-forward-sexp
python-nav--lisp-forward-sexp-safe  python-nav--syntactically
python-nav--up-list python-nav-backward-block
python-nav-backward-defun   python-nav-backward-sexp
python-nav-backward-sexp-safe   python-nav-backward-statement
python-nav-backward-up-list python-nav-beginning-of-block
python-nav-beginning-of-defun   python-nav-beginning-of-statement
python-nav-end-of-block python-nav-end-of-defun
python-nav-end-of-statement python-nav-forward-block
python-nav-forward-defunpython-nav-forward-sexp
python-nav-forward-sexp-safepython-nav-forward-statement
python-nav-if-name-main python-nav-up-list
-- 
https://mail.python.org/mailman/listinfo/python-list


RE: Writing a python editor for blind developers

2015-07-06 Thread Joseph Lee
Hi Germano and others,
First, sorry for this abrupt post without an intro (I'll write a more proper
intro next time) and a possible repeat message.
Second, as a blind developer and a regular contributor to a Python-based
screen reader, I can say that many of us (blind devs) use IDE's nor
Python-specific editors. For our Python tasks, we use a regular text editor
such as Notepad++, and some had success with Visual Studio Python plug-in
and/or Eclipse. Some people were looking at making IDLE itself accessible to
no avail (the way IDLE displays its output is such that it makes it hard for
screen readers to use their display parsing techniques to tell a programmer
what's on screen). This gets more interesting when blind Pythoneers (such as
myself) write GUI apps such as those using WXPython (NonVisual Desktop
Access, or NVDA, the Python-based screen reader is a WXPython app) and PyQT
(apps powered by QT 5 is accessible).
There exists a list like this for blind Pythoneers at:
http://www.freelists.org/list/pythonvis
For more info on NVDA, go to:
http://www.nvaccess.org
P.S. A very short intro: I'm Joseph, a blind Pythoneer and regular code and
translations contributor to NonVisual Desktop Access (NVDA) screen reader
project. I have studied computer science (no degree) and have been speaking
Python for about three years and spoke C++ prior to joining NVDA project in
2012. In NVDA project, I tend to work mostly on supporting new operating
systems, translations, braille display input/output and touchscreen support.
Cheers,
Josep

-Original Message-
From: Python-list
[mailto:python-list-bounces+joseph.lee22590=gmail@python.org] On Behalf
Of germano carella
Sent: Sunday, July 5, 2015 2:56 AM
To: python-list@python.org
Subject: Writing a python editor for blind developers

Hi to all,
I'm new of this list.
I'm Germano from Italy. I'm 39 and I'm a blind developer.
I'm writing a python editor accessible to screen readers, with
autocompletion support.
So, when I write something, a context menu displays all option I can use.
To do this, I'm using inspect module and pkgutil, and parsing docstring of
builtin functions 'cause inspect.getargspec doesn't work with builtins.
Now, when I instantiate a class, for example, I'd like to receive option on
methods when I write name. ...
I tired to use code.InteractiveConsole running in background.
In this way, I can run source code every time I press enter and
code.InteractiveConsole executes it in background.
The problem is when I'm writing a function: InteractiveConsole executes it,
but doesn't update her locals since I finish to write the function; so I
can't retrieve local variables.
There is an other way can you suggest me?
Thanks!
Germano
--
https://mail.python.org/mailman/listinfo/python-list

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


Writing a python editor for blind developers

2015-07-06 Thread germano carella

Hi to all,
I'm new of this list.
I'm Germano from Italy. I'm 39 and I'm a blind developer.
I'm writing a python editor accessible to screen readers, with 
autocompletion support.

So, when I write something, a context menu displays all option I can use.
To do this, I'm using inspect module and pkgutil, and parsing docstring 
of builtin functions 'cause inspect.getargspec doesn't work with builtins.
Now, when I instantiate a class, for example, I'd like to receive option 
on methods when I write name. ...

I tired to use code.InteractiveConsole running in background.
In this way, I can run source code every time I press enter and 
code.InteractiveConsole executes it in background.
The problem is when I'm writing a function: InteractiveConsole executes 
it, but doesn't update her locals since I finish to write the function; 
so I can't retrieve local variables.

There is an other way can you suggest me?
Thanks!
Germano
--
https://mail.python.org/mailman/listinfo/python-list


Re: Writing a python editor for blind developers

2015-07-06 Thread Jacob Kruger

Germano, answering email at top of mail, since think that's the preferred
method for some of us.

I am also a 100% blind developer, and python is also one of my focus areas.

While don't think can really help with this part of development as of yet, I
would be more than willing to help with feedback, etc., and can also put you
in touch with various other blind developers who do also work with python,
etc.

For example, AFAIK, the primary blind programmers mailing list is
progra...@freelists.org, and besides me, there are a few other python
developers on that list as well.

Stay well


Jacob Kruger
Blind Biker
Skype: BlindZA
Roger Wilco wants to welcome you...to the space janitor's closet...

- Original Message - 
From: germano carella germanocarella.l...@gmail.com

To: python-list@python.org
Sent: Sunday, July 05, 2015 11:55 AM
Subject: Writing a python editor for blind developers



Hi to all,
I'm new of this list.
I'm Germano from Italy. I'm 39 and I'm a blind developer.
I'm writing a python editor accessible to screen readers, with 
autocompletion support.

So, when I write something, a context menu displays all option I can use.
To do this, I'm using inspect module and pkgutil, and parsing docstring of 
builtin functions 'cause inspect.getargspec doesn't work with builtins.
Now, when I instantiate a class, for example, I'd like to receive option 
on methods when I write name. ...

I tired to use code.InteractiveConsole running in background.
In this way, I can run source code every time I press enter and 
code.InteractiveConsole executes it in background.
The problem is when I'm writing a function: InteractiveConsole executes 
it, but doesn't update her locals since I finish to write the function; so 
I can't retrieve local variables.

There is an other way can you suggest me?
Thanks!
Germano
--
https://mail.python.org/mailman/listinfo/python-list



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


Re: Writing a python editor for blind developers

2015-07-06 Thread Oscar Benjamin
Hi Germano,

You may want to use the jedi package which you can find at this link:
https://pypi.python.org/pypi/jedi/

I'm not personally involved with the jedi package but I use it within my
own editor Vim and my understanding is that it should be useful for Python
autocompletion support in any IDE. It uses static analysis to infer the
types of variables e.g. an instance of a class so that it can complete the
methods for that class.

--
Oscar

On Mon, 6 Jul 2015 at 09:22 germano carella germanocarella.l...@gmail.com
wrote:

 Hi to all,
 I'm new of this list.
 I'm Germano from Italy. I'm 39 and I'm a blind developer.
 I'm writing a python editor accessible to screen readers, with
 autocompletion support.
 So, when I write something, a context menu displays all option I can use.
 To do this, I'm using inspect module and pkgutil, and parsing docstring
 of builtin functions 'cause inspect.getargspec doesn't work with builtins.
 Now, when I instantiate a class, for example, I'd like to receive option
 on methods when I write name. ...
 I tired to use code.InteractiveConsole running in background.
 In this way, I can run source code every time I press enter and
 code.InteractiveConsole executes it in background.
 The problem is when I'm writing a function: InteractiveConsole executes
 it, but doesn't update her locals since I finish to write the function;
 so I can't retrieve local variables.
 There is an other way can you suggest me?
 Thanks!
 Germano
 --
 https://mail.python.org/mailman/listinfo/python-list

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


Re: Writing a python editor for blind developers

2015-07-06 Thread Terry Reedy

On 7/6/2015 4:42 AM, Joseph Lee wrote:

Some people were looking at making IDLE itself accessible to
no avail (the way IDLE displays its output is such that it makes it hard for
screen readers to use their display parsing techniques to tell a programmer
what's on screen).


Idle itself is not the issue.  It (currently) displays output (and gets 
input) by calling tkinter wrapper functions that interface to the 
cross-platform tcl/tk gui framework. I believe that just about 
everything written to tk can be read back by other functions.


If there is an accessibility module written in Python, I imagine that an 
alternate tkinter-based backend could be written. I imagine that the 
reader could then be incorporated into a tkinter app with an import and 
startup call.  I would be willing to help with the tkinter part of such 
a backend, and test with Idle.



--
Terry Jan Reedy

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


Re: The best, friendly and easy use Python Editor.

2013-01-31 Thread Wayne Werner

On Thu, 24 Jan 2013, Tim Chase wrote:


On 01/24/13 13:34, Leonard, Arah wrote:

All true (especially the holy wars bit!). OP didn't (as far as
I can see) even say which OS he is using. Anyway, my suggestion
is generally that people use the editor with which they are
already comfortable.


Sound advice.  [snip] Whatever works is what works. It's just a
text file after all.


So even ed or edlin or even cat would do ;-)
?
-tkc
?
wq


ed *is* the standard editor.

Also, I see what you did there ;)

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


Re: The best, friendly and easy use Python Editor.

2013-01-29 Thread rusi
On Jan 25, 10:35 pm, Leonard, Arah arah.leon...@bruker-axs.com
wrote:
  It's just a text file after all.

  True indeed, let's not worry about trivial issues like indentation, mixing 
  tabs and spaces or whatever.  Notepad anybody? :)

 Hey, I didn't say Notepad was the *best* tool for the job, just that Python 
 scripts are merely
 text files.

text files ok. Merely text files needs some rebuttal
http://blog.languager.org/2012/10/html-is-why-mess-in-programming-syntax.html
Yeah its a bit tongue-in-cheek and does not directly answer the OP (to
which anyway I said: interpreter is more important than editor)
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: The best, friendly and easy use Python Editor.

2013-01-25 Thread Mark Lawrence

On 24/01/2013 19:34, Leonard, Arah wrote:


It's just a text file after all.



True indeed, let's not worry about trivial issues like indentation, 
mixing tabs and spaces or whatever.  Notepad anybody? :)


--
Cheers.

Mark Lawrence

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


Re: The best, friendly and easy use Python Editor.

2013-01-25 Thread Kirill Pekarov
 I think PyCharm is ideal for you.
 http://www.jetbrains.com/pycharm/

+1 for PyCharm. 
I used many editors, and PyCharm (IDEA) is just perfect. 

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


Re: The best, friendly and easy use Python Editor.

2013-01-25 Thread Ritchie Flick
You could try ninja-ide or Sublime Text 2.


This message was send from my phone
Flick Ritchie
On 25 Jan 2013 10:45, Kirill Pekarov kpeka...@gmail.com wrote:

  I think PyCharm is ideal for you.
  http://www.jetbrains.com/pycharm/

 +1 for PyCharm.
 I used many editors, and PyCharm (IDEA) is just perfect.

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

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


Re: The best, friendly and easy use Python Editor.

2013-01-25 Thread Miki Tebeka
On Thursday, January 24, 2013 2:34:45 AM UTC-8, mik...@gmail.com wrote:
 On Thursday, January 24, 2013 9:43:31 AM UTC, Hazard Seventyfour wrote:
  for all senior can you suggest me the best, friendly and easy use with nice 
  GUI editor for me, and have many a good features such as auto complete/auto 
  correct.
 I personally like Eclipse as I use it for most of my projects (not only 
 Python) so I use Eclipse + PyDev plug-in for Python.
Aptana is doing a great job bundling Eclipse + PyDev (+ other goodies).
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: The best, friendly and easy use Python Editor.

2013-01-25 Thread Wolfgang Keller
 for all senior can you suggest me the best, friendly and easy use
 with nice GUI editor for me, and have many a good features such as
 auto complete/auto correct.

Depends on what you are used to.

If you're used to bare-bones editors such as emacs, vim etc, they can be
used for Python.

If you're used to IDEs, WingIDE is one long-standing competitor. The
101 version is free.

There are also editors implemented *in* Python, which can be used for
programming Python, such as Editra, which features quite a few
useful plugins.

Sincerely,

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


RE: The best, friendly and easy use Python Editor.

2013-01-25 Thread Leonard, Arah

 It's just a text file after all.

 
 True indeed, let's not worry about trivial issues like indentation, mixing 
 tabs and spaces or whatever.  Notepad anybody? :)
 

Hey, I didn't say Notepad was the *best* tool for the job, just that Python 
scripts are merely text files.

Though, that said, I have used Notepad and Wordpad any number of times in the 
past to edit Python files, all without bringing the universe to an untimely 
end.  Even used DOS Edit once.  You use what you have at the time.  A good 
craftsman never blames the tools.  ;)
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: The best, friendly and easy use Python Editor.

2013-01-25 Thread Chris Angelico
On Sat, Jan 26, 2013 at 4:35 AM, Leonard, Arah
arah.leon...@bruker-axs.com wrote:

 It's just a text file after all.


 True indeed, let's not worry about trivial issues like indentation, mixing 
 tabs and spaces or whatever.  Notepad anybody? :)


 Hey, I didn't say Notepad was the *best* tool for the job, just that Python 
 scripts are merely text files.

 Though, that said, I have used Notepad and Wordpad any number of times in the 
 past to edit Python files, all without bringing the universe to an untimely 
 end.  Even used DOS Edit once.  You use what you have at the time.  A good 
 craftsman never blames the tools.  ;)

I've edited files using any number of poor tools, but that doesn't
mean I'd choose them for daily work. Blame your tools no, but choose
which ones you carry around on your belt. I have a couple of
special-purpose editors that absolutely *suck* for general work, but
have a specific feature that makes them good for one particular
situation... one editor has a 32KB limit, no spiffy features, and
sometimes mishandles line endings, but it edits files on my remote
server, and can sometimes work when SSHing isn't an option. But
there's no way I'd use that for any other purpose than remote editing.

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


Re: The best, friendly and easy use Python Editor.

2013-01-25 Thread Michael Torrie
On 01/24/2013 02:14 PM, Tetsuya wrote:
 Vim has everything, you just need a bunch of plugins.
 I code mainly in python and django, and I use these plugins (among others):
 
 powerline (status bar indicating git branch, etc..)
 syntastic (support for pep8, flake8, pyflakes, etc..)
 ctrlp (fuzzy search for filenames)
 jedi (*awesome* python smart autocompletion)
 tagbar (support for ctags, tags in a side window, jump around, etc)
 fugitive (git with vim commands, very useful)
 nerdcommenter (smart comment management)
 nerdtree (filesystem management, tree of files, etc)
 snipmate (snippets and autoexpanding of boilerplates)
 gundo (undo management - vim has a smarter-than-others undo system)
 supertab (autocomplete everything with TAB, smartly depending on 
 language and context).
 
 Is this enough? :-)
 I can continue, but I think that, just to start, is enough. Vim wins.

Awesome.  I'm checking out these plugins right now, especially jedi and
supertab. Thanks so much!
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: The best, friendly and easy use Python Editor.

2013-01-25 Thread Neil Cerutti
On 2013-01-25, Leonard, Arah arah.leon...@bruker-axs.com wrote:
 Though, that said, I have used Notepad and Wordpad any number
 of times in the past to edit Python files, all without bringing
 the universe to an untimely end.  Even used DOS Edit once.  You
 use what you have at the time.  A good craftsman never blames
 the tools.  ;)

DOS Edit was great for quick edits. The file size limit is a
pity, though.

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


Re: The best, friendly and easy use Python Editor.

2013-01-25 Thread Dave Angel

On 01/25/2013 12:54 PM, Neil Cerutti wrote:

On 2013-01-25, Leonard, Arah arah.leon...@bruker-axs.com wrote:

Though, that said, I have used Notepad and Wordpad any number
of times in the past to edit Python files, all without bringing
the universe to an untimely end.  Even used DOS Edit once.  You
use what you have at the time.  A good craftsman never blames
the tools.  ;)


DOS Edit was great for quick edits. The file size limit is a
pity, though.



I once had to write a text editor that would run in a 32k machine 
without a disk drive.  The editor had to fit in RAM with the data, so 
the text files were limited to 320 lines.


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


Re: The best, friendly and easy use Python Editor.

2013-01-25 Thread Tetsuya

On 01/25/2013 06:47 PM, Michael Torrie wrote:

On 01/24/2013 02:14 PM, Tetsuya wrote:

Vim has everything, you just need a bunch of plugins.

[...]

jedi (*awesome* python smart autocompletion)

[...]

supertab (autocomplete everything with TAB, smartly depending on
language and context).


Awesome.  I'm checking out these plugins right now, especially jedi and
supertab. Thanks so much!



;-) you're welcome!
--
http://mail.python.org/mailman/listinfo/python-list


The best, friendly and easy use Python Editor.

2013-01-24 Thread Hazard Seventyfour
Hello,

I new in this python and decided to learn more about it, so i can make an own 
script :),

for all senior can you suggest me the best, friendly and easy use with nice GUI 
editor for me, and have many a good features such as auto complete/auto correct.

any recommend? Thanks ^_^
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: The best, friendly and easy use Python Editor.

2013-01-24 Thread mikprog
On Thursday, January 24, 2013 9:43:31 AM UTC, Hazard Seventyfour wrote:
 Hello,
 
 
 
 I new in this python and decided to learn more about it, so i can make an own 
 script :),
 
 
 
 for all senior can you suggest me the best, friendly and easy use with nice 
 GUI editor for me, and have many a good features such as auto complete/auto 
 correct.
 
 
 
 any recommend? Thanks ^_^

Hi,
an editor is pretty much a matter of personal preferences.
I personally like Eclipse as I use it for most of my projects (not only Python) 
so I use Eclipse + PyDev plug-in for Python.

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


Re: The best, friendly and easy use Python Editor.

2013-01-24 Thread Chris Angelico
On Thu, Jan 24, 2013 at 8:43 PM, Hazard Seventyfour
hseventyf...@gmail.com wrote:
 Hello,

 I new in this python and decided to learn more about it, so i can make an own 
 script :),

 for all senior can you suggest me the best, friendly and easy use with nice 
 GUI editor for me, and have many a good features such as auto complete/auto 
 correct.

 any recommend? Thanks ^_^

Here we go, it's holy war time again! :)

You'll get a HUGE lot of responses. Many use emacs or vim, and you'll
get a few recommendations for IDLE. After that, it's a huge field of
options. I personally use SciTE; it's a good editor, but I don't
particularly like the way the project is run (nothing strong, but I
didn't like the tone on its mailing list). Eclipse has its fans, too.

A Python IDE is not nearly as beneficial as, say, a Java IDE. A good
Python editor just needs to do the basics like indentation, syntax
highlighting, and such; I like IDLE's method info when I'm working
interactively, but it's not a big deal when I'm writing a program. In
fact, all you really need out of an IDE can probably be supplied by
just a good editor, maybe a makefile, and alt-tabbing to IDLE.
However, if you want an IDE, they do exist.

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


Re: The best, friendly and easy use Python Editor.

2013-01-24 Thread John Gordon
In a7c3d4a0-3277-428b-8cfc-c52ea585b...@googlegroups.com Hazard Seventyfour 
hseventyf...@gmail.com writes:

 Hello,

 I new in this python and decided to learn more about it, so i can make
 an own script :),

 for all senior can you suggest me the best, friendly and easy use with
 nice GUI editor for me, and have many a good features such as auto
 complete/auto correct.

Try PyScripter.

http://code.google.com/p/pyscripter/

-- 
John Gordon   A is for Amy, who fell down the stairs
gor...@panix.com  B is for Basil, assaulted by bears
-- Edward Gorey, The Gashlycrumb Tinies

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


Re: The best, friendly and easy use Python Editor.

2013-01-24 Thread Sharwan Joram
On Thursday, January 24, 2013 8:42:19 PM UTC+5:30, John Gordon wrote:
 In a7c3d4a0-3277-428b-8cfc-c52ea585b...@googlegroups.com Hazard Seventyfour 
 hseventyf...@gmail.com writes:
 
 
 
  Hello,
 
 
 
  I new in this python and decided to learn more about it, so i can make
 
  an own script :),
 
 
 
  for all senior can you suggest me the best, friendly and easy use with
 
  nice GUI editor for me, and have many a good features such as auto
 
  complete/auto correct.
 
 
 
 Try PyScripter.
 
 
 
 http://code.google.com/p/pyscripter/
 
 
 
 -- 
 
 John Gordon   A is for Amy, who fell down the stairs
 
 gor...@panix.com  B is for Basil, assaulted by bears
 
 -- Edward Gorey, The Gashlycrumb Tinies

use vim.

~Sharwan Joram
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: The best, friendly and easy use Python Editor.

2013-01-24 Thread rusi
On Jan 24, 2:43 pm, Hazard Seventyfour hseventyf...@gmail.com wrote:
 Hello,

 I new in this python and decided to learn more about it, so i can make an own 
 script :),

 for all senior can you suggest me the best, friendly and easy use with nice 
 GUI editor for me, and have many a good features such as auto complete/auto 
 correct.

 any recommend? Thanks ^_^

What editor you use does not matter. What matters is that you learn to
use the interpreter.

That is learn to use things like
- history
- last expression with _ (underscore)
- Using introspection to find out about odd stuff (ie use dir and
help)
- Loading a python file
- And after things kind-of work, copy pasting into your editor

Here's a test to check whether youve got the idea: Do you think that
to write a program you need to write a 'main?' If yes then no!

[I personally use emacs. It would be sadistic to make that into a
recommendation]
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: The best, friendly and easy use Python Editor.

2013-01-24 Thread Chris Angelico
On Fri, Jan 25, 2013 at 2:54 AM, rusi rustompm...@gmail.com wrote:
 - last expression with _ (underscore)

Small terminology quibble: That's not last expression, but last non-None result.

 1+2
3
 _
3
 _,None
(3, None)
 _
(3, None)
 _[1]
 _
(3, None)

Otherwise, agree totally. Get to know the interactive interpreter, and
keep it handy.

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


Re: The best, friendly and easy use Python Editor.

2013-01-24 Thread John Gordon
In ccf57220-4367-4611-b91b-5bf2a51e3...@googlegroups.com Sharwan Joram 
sharwan.jo...@gmail.com writes:

 use vim.

He said he wanted autocomplete.  Does Vim have that?

-- 
John Gordon   A is for Amy, who fell down the stairs
gor...@panix.com  B is for Basil, assaulted by bears
-- Edward Gorey, The Gashlycrumb Tinies

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


Re: The best, friendly and easy use Python Editor.

2013-01-24 Thread Thomas Heller

Am 24.01.2013 16:54, schrieb rusi:

[I personally use emacs. It would be sadistic to make that into a
recommendation]


It would be truly sadistic to force a long-time emacs user to any
other editor.

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


Re: The best, friendly and easy use Python Editor.

2013-01-24 Thread Tim Chase

On 01/24/13 10:23, Thomas Heller wrote:

Am 24.01.2013 16:54, schrieb rusi:

[I personally use emacs. It would be sadistic to make that into a
recommendation]


It would be truly sadistic to force a long-time emacs user to any
other editor.


I saw the recommendation for Vim elsewhere on the thread and comment 
the same as this sub-thread: I personally use vim. It would be 
sadistic to make that into a recommendation  And likewise, it's 
truly sadistic to force a long-time vim user to any other editor. :-)


Not that Vim isn't great for programming Python (which I do 
daily)...it *is*!  It's just not where I'd throw somebody who 
doesn't already have an existing editor preference *and* doesn't 
know Python.


-tkc





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


Re: The best, friendly and easy use Python Editor.

2013-01-24 Thread Andrew Gudovich
I think PyCharm is ideal for you.

http://www.jetbrains.com/pycharm/
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: The best, friendly and easy use Python Editor.

2013-01-24 Thread Walter Hurry
On Thu, 24 Jan 2013 22:10:21 +1100, Chris Angelico wrote:

 On Thu, Jan 24, 2013 at 8:43 PM, Hazard Seventyfour
 hseventyf...@gmail.com wrote:
 Hello,

 I new in this python and decided to learn more about it, so i can make
 an own script :),

 for all senior can you suggest me the best, friendly and easy use with
 nice GUI editor for me, and have many a good features such as auto
 complete/auto correct.

 any recommend? Thanks ^_^
 
 Here we go, it's holy war time again! :)
 
 You'll get a HUGE lot of responses. Many use emacs or vim, and you'll
 get a few recommendations for IDLE. After that, it's a huge field of
 options. I personally use SciTE; it's a good editor, but I don't
 particularly like the way the project is run (nothing strong, but I
 didn't like the tone on its mailing list). Eclipse has its fans, too.
 
 A Python IDE is not nearly as beneficial as, say, a Java IDE. A good
 Python editor just needs to do the basics like indentation, syntax
 highlighting, and such; I like IDLE's method info when I'm working
 interactively, but it's not a big deal when I'm writing a program. In
 fact, all you really need out of an IDE can probably be supplied by just
 a good editor, maybe a makefile, and alt-tabbing to IDLE. However, if
 you want an IDE, they do exist.

All true (especially the holy wars bit!). OP didn't (as far as I can see) 
even say which OS he is using. Anyway, my suggestion is generally that 
people use the editor with which they are already comfortable.
-- 
http://mail.python.org/mailman/listinfo/python-list


RE: The best, friendly and easy use Python Editor.

2013-01-24 Thread Leonard, Arah
 All true (especially the holy wars bit!). OP didn't (as far as I can see) 
 even say which OS he is using. Anyway, my suggestion is generally that people 
 use the editor with which they are already comfortable.
 

Sound advice.  Most of the time I still use Visual Studio for editing Python 
because I also use it for C++, so it's just what I'm used to.  No big deal, 
really.  Whatever works is what works.  It's just a text file after all.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: The best, friendly and easy use Python Editor.

2013-01-24 Thread Dave Hirschfeld
Leonard, Arah Arah.Leonard at bruker-axs.com writes:

 
  All true (especially the holy wars bit!). OP didn't (as far as I can see) 
 even say which OS he is using.
 Anyway, my suggestion is generally that people use the editor with which 
  they are already comfortable.
  
 
 Sound advice.  Most of the time I still use Visual Studio for editing Python 
 because I also use it for C++, so
 it's just what I'm used to.  No big deal, really.  Whatever works is what 
 works. It's just a text file after all.
 

I assume you're using PyTools (http://pytools.codeplex.com/)?

-Dave

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


Re: The best, friendly and easy use Python Editor.

2013-01-24 Thread Neil Cerutti
On 2013-01-24, John Gordon gor...@panix.com wrote:
 In ccf57220-4367-4611-b91b-5bf2a51e3...@googlegroups.com Sharwan Joram 
 sharwan.jo...@gmail.com writes:

 use vim.

 He said he wanted autocomplete.  Does Vim have that?

Yes, you use its ctags support to get it working, I believe.

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


Re: The best, friendly and easy use Python Editor.

2013-01-24 Thread Neil Cerutti
On 2013-01-24, Tim Chase python.l...@tim.thechases.com wrote:
 On 01/24/13 10:23, Thomas Heller wrote:
 Am 24.01.2013 16:54, schrieb rusi:
 [I personally use emacs. It would be sadistic to make that into a
 recommendation]

 It would be truly sadistic to force a long-time emacs user to any
 other editor.

 I saw the recommendation for Vim elsewhere on the thread and comment 
 the same as this sub-thread: I personally use vim. It would be 
 sadistic to make that into a recommendation  And likewise, it's 
 truly sadistic to force a long-time vim user to any other editor. :-)

 Not that Vim isn't great for programming Python (which I do 
 daily)...it *is*!  It's just not where I'd throw somebody who 
 doesn't already have an existing editor preference *and* doesn't 
 know Python.

I agree.

Vim is great, Emacs is great. I'm glad I know one of them. But
learning one of them is as project unto itself. So selecting
either just for Python is skipping too many decisions and maybe
biting off too big a piece of the snake.

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


Re: The best, friendly and easy use Python Editor.

2013-01-24 Thread Tim Chase

On 01/24/13 13:34, Leonard, Arah wrote:

All true (especially the holy wars bit!). OP didn't (as far as
I can see) even say which OS he is using. Anyway, my suggestion
is generally that people use the editor with which they are
already comfortable.


Sound advice.  [snip] Whatever works is what works. It's just a
text file after all.


So even ed or edlin or even cat would do ;-)
?
-tkc
?
wq




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


RE: The best, friendly and easy use Python Editor.

2013-01-24 Thread Leonard, Arah
 Sound advice.  Most of the time I still use Visual Studio for editing 
 Python because I also use it for C++, so it's just what I'm used to.  
 No big deal, really.  Whatever works is what works. It's just a text 
 file after all.
 
 
 I assume you're using PyTools (http://pytools.codeplex.com/)?
 

Would that I could!  To my knowledge they still haven't backported PyTools to 
VS2008, which I'm presently stuck on because Python 2.7 still doesn't compile 
on VS2010.  :(

Kind of makes you think...
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: The best, friendly and easy use Python Editor.

2013-01-24 Thread llanitedave
On Thursday, January 24, 2013 7:54:55 AM UTC-8, rusi wrote:

 
 [I personally use emacs. It would be sadistic to make that into a
 
 recommendation]

Lol!  That's just too true.  It's also true for Eclipse, which I use very 
comfortably on Windows 7, but has proven to be a nightmare to set up on Ubuntu.

On Linux, I've tried several, but always keep coming back to Geany.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: The best, friendly and easy use Python Editor.

2013-01-24 Thread Tetsuya

On 01/24/2013 04:51 PM, John Gordon wrote:

In ccf57220-4367-4611-b91b-5bf2a51e3...@googlegroups.com Sharwan Joram 
sharwan.jo...@gmail.com writes:


use vim.


He said he wanted autocomplete.  Does Vim have that?



Vim has everything, you just need a bunch of plugins.
I code mainly in python and django, and I use these plugins (among others):

powerline (status bar indicating git branch, etc..)
syntastic (support for pep8, flake8, pyflakes, etc..)
ctrlp (fuzzy search for filenames)
jedi (*awesome* python smart autocompletion)
tagbar (support for ctags, tags in a side window, jump around, etc)
fugitive (git with vim commands, very useful)
nerdcommenter (smart comment management)
nerdtree (filesystem management, tree of files, etc)
snipmate (snippets and autoexpanding of boilerplates)
gundo (undo management - vim has a smarter-than-others undo system)
supertab (autocomplete everything with TAB, smartly depending on 
language and context).


Is this enough? :-)
I can continue, but I think that, just to start, is enough. Vim wins.
--
http://mail.python.org/mailman/listinfo/python-list


Re: The best, friendly and easy use Python Editor.

2013-01-24 Thread Kayode Odeyemi
Simply use Netbeans

On Thu, Jan 24, 2013 at 10:09 PM, llanitedave llanited...@veawb.coopwrote:

 On Thursday, January 24, 2013 7:54:55 AM UTC-8, rusi wrote:

 
  [I personally use emacs. It would be sadistic to make that into a
 
  recommendation]

 Lol!  That's just too true.  It's also true for Eclipse, which I use very
 comfortably on Windows 7, but has proven to be a nightmare to set up on
 Ubuntu.

 On Linux, I've tried several, but always keep coming back to Geany.
 --
 http://mail.python.org/mailman/listinfo/python-list




-- 
Odeyemi 'Kayode O.
http://ng.linkedin.com/in/kayodeodeyemi. t: @charyorde blog:
http://sinati.com/tree/java-cheat-sheet
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: The best, friendly and easy use Python Editor.

2013-01-24 Thread Chris Angelico
On Fri, Jan 25, 2013 at 7:25 AM, Tim Chase
python.l...@tim.thechases.com wrote:
 On 01/24/13 13:34, Leonard, Arah wrote:

 All true (especially the holy wars bit!). OP didn't (as far as
 I can see) even say which OS he is using. Anyway, my suggestion
 is generally that people use the editor with which they are
 already comfortable.


 Sound advice.  [snip] Whatever works is what works. It's just a
 text file after all.


 So even ed or edlin or even cat would do ;-)

Definitely. Especially if your edlin syntax highlights Python.

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


Re: Python Editor or IDE ActiveX control

2010-08-27 Thread Michel Claveau - MVP
Hi!

Scintilla come like a control (a piece for a window), raleted to the
file SciLexer.DLL
For call the scintilla-componant, use messages. Example :
   SendMessage(Sci, SCI_GOTOLINE, line, 0)
For the constant SCI_GOTOLINE, I suggest  scintillacon.py, include in
Pywin32.

@-salutations
-- 
Michel Claveau 
-- 
http://mail.python.org/mailman/listinfo/python-list


Python Editor or IDE ActiveX control

2010-08-26 Thread Sathish S
Hi Ppl,

Is there any python IDE or editor that has an ActiveX control which could be
embed in other Windows applications. I'm basically looking to write a
application that can show the indentations of python, change the color of
keywords etc on a application, which will save this python script and run it
from command prompt.

Thanks,
Sathish
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python Editor or IDE ActiveX control

2010-08-26 Thread Thomas Jollans
On Thursday 26 August 2010, it occurred to Sathish S to exclaim:
 Hi Ppl,
 
 Is there any python IDE or editor that has an ActiveX control which could
 be embed in other Windows applications. I'm basically looking to write a
 application that can show the indentations of python, change the color of
 keywords etc on a application, which will save this python script and run
 it from command prompt.

It sounds to me like you're just looking for any old halfway decent embeddable 
programmer's editor that happens to have syntax definitions for Python.

I'd suggest you have a look at Scintilla. Quite a good editing control, I 
don't think it comes wrapped in ActiveX or anything like that, just interface 
it in your favourite language using the DLL's C API.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python Editor or IDE ActiveX control

2010-08-26 Thread Stef Mientki
 On 27-08-2010 00:22, Thomas Jollans wrote:
 On Thursday 26 August 2010, it occurred to Sathish S to exclaim:
 Hi Ppl,

 Is there any python IDE or editor that has an ActiveX control which could
 be embed in other Windows applications. I'm basically looking to write a
 application that can show the indentations of python, change the color of
 keywords etc on a application, which will save this python script and run
 it from command prompt.
 It sounds to me like you're just looking for any old halfway decent 
 embeddable 
 programmer's editor that happens to have syntax definitions for Python.

 I'd suggest you have a look at Scintilla. Quite a good editing control, I 
 don't think it comes wrapped in ActiveX or anything like that, just interface 
 it in your favourite language using the DLL's C API.
Scintilla is full embedded in wxPython.
cheers,
Stef
-- 
http://mail.python.org/mailman/listinfo/python-list


py.edit.js -- a simple python editor in javascript

2008-11-28 Thread Sriram Thaiyar
I thought people here might be interested
in a simple, lightweight Python editor written in Javascript.
Something to use when blogging or replying to comments.

Its just a proof-of-concept -- something I've had rolling in my head
for a while.

http://py-edit-js.appspot.com/

Features:
 - simplistic auto indent/dedent of lines
 - can output as html, text
 - bookmarklet mode - opens a mini-editor within the current page
 - spaces at the beginning of a line, dedents the next line by that
   many blocks -- an easy way to close blocks.

Bugs:
 - sometimes the Javascript Bookmarklet doesn't close, when the user
   tries to close it

I've tested it with Safari  Firefox under OS X.

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

Support the Python Software Foundation:
http://www.python.org/psf/donations.html


Re: newbie: stani's python editor if-else

2007-09-11 Thread Bruno Desthuilliers
madzientist a écrit :
 hi,

 two quick questions:
 
 a) i am using SPE (latest version) and for some reason, when i type,
 say
 
 if 1==2:
 print not equal
 else:
   print equal
 
 the else is at the same indentation level as the preceding print
 statement, and i get a syntax error

Obviously. As you know, in Python, indentation is signifiant.

 why doesn't spe automatically put the else at the level of the if
 statement ? 

I don't know. Perhaps you should ask the author ?

 what am i dong wrong ?

Mmm, let's see Posting on the wrong place, perhaps ?-)

 once i manually change the
 indentation, the code snippet runs perfectly.

Indeed.

 b) if this is not the group for such elementary questions, please do
 let me know.

Ok, since you ask for it : this is not the group for problems related to 
SPE.

You probably want the SPE mailing-list (if it exists), or whatever the 
project page offers as a mean of sending feedback to the author.

Python-related questions, even elementary ones (provided you at least 
took time to read the official tutorial), are of course welcome !-)

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


Re: newbie: stani's python editor if-else

2007-09-11 Thread Steve Holden
madzientist wrote:
 hi,
 
 two quick questions:
 
 a) i am using SPE (latest version) and for some reason, when i type,
 say
 
 if 1==2:
 print not equal
 else:
   print equal
 
 the else is at the same indentation level as the preceding print
 statement, and i get a syntax error
 
 why doesn't spe automatically put the else at the level of the if
 statement ? what am i dong wrong ? once i manually change the
 indentation, the code snippet runs perfectly.
 
 b) if this is not the group for such elementary questions, please do
 let me know.
 
 thanks 
 
 suresh
 

The point here is that SPE isn't analyzing your source in sufficient 
detail to recognize the need to outdent the else statement. Clearly 
there could be any number of statements at the same indent level as the 
first print statement.

For the record this is not a behavior restricted to SPE, but also occurs 
in Wing IDE, PythonWin and Scite, for starters.

Technically you are correct in the example you give: an IDE could decide 
to remove one level of indentation, but of course there's always the 
dangling else problem: if one if statement is nested inside another 
one, which indentation level would be appropriate for an else?

Generally speaking, only the programmer can know, and so generally you 
are left to enforce these issues for yourself.

regards
  Steve
-- 
Steve Holden+1 571 484 6266   +1 800 494 3119
Holden Web LLC/Ltd   http://www.holdenweb.com
Skype: holdenweb  http://del.icio.us/steve.holden
--- Asciimercial --
Get on the web: Blog, lens and tag the Internet
Many services currently offer free registration
--- Thank You for Reading -

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


Re: newbie: stani's python editor if-else

2007-09-11 Thread kyosohma
On Sep 10, 11:24 pm, madzientist [EMAIL PROTECTED] wrote:
 hi,

 two quick questions:

 a) i am using SPE (latest version) and for some reason, when i type,
 say

 if 1==2:
 print not equal
 else:
   print equal

 the else is at the same indentation level as the preceding print
 statement, and i get a syntax error

 why doesn't spe automatically put the else at the level of the if
 statement ? what am i dong wrong ? once i manually change the
 indentation, the code snippet runs perfectly.

 b) if this is not the group for such elementary questions, please do
 let me know.

 thanks 

 suresh

I agree with Steve. I have yet to see an IDE for Python (or anything
else) that unindents statements. Even IDLE, the Official IDE for
Python, doesn't do that.

Mike

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


RE: newbie: stani's python editor if-else

2007-09-11 Thread Hamilton, William
 -Original Message-
 From: [EMAIL PROTECTED]
[mailto:python-
 [EMAIL PROTECTED] On Behalf Of
 [EMAIL PROTECTED]
 Sent: Tuesday, September 11, 2007 8:26 AM
 To: python-list@python.org
 Subject: Re: newbie: stani's python editor if-else
 
 On Sep 10, 11:24 pm, madzientist [EMAIL PROTECTED] wrote:
  hi,
 
  two quick questions:
 
  a) i am using SPE (latest version) and for some reason, when i type,
  say
 
  if 1==2:
  print not equal
  else:
print equal
 
  the else is at the same indentation level as the preceding print
  statement, and i get a syntax error
 
  why doesn't spe automatically put the else at the level of the if
  statement ? what am i dong wrong ? once i manually change the
  indentation, the code snippet runs perfectly.
 
  b) if this is not the group for such elementary questions, please do
  let me know.
 
  thanks 
 
  suresh
 
 I agree with Steve. I have yet to see an IDE for Python (or anything
 else) that unindents statements. Even IDLE, the Official IDE for
 Python, doesn't do that.
 

IDLE (At least, IDLE 1.0.5) unindents in obvious situations.  I think
it's only on break, continue, pass, and return statements, but there may
be others.

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


Re: newbie: stani's python editor if-else

2007-09-11 Thread Gregor Horvath
[EMAIL PROTECTED] schrieb:

 I agree with Steve. I have yet to see an IDE for Python (or anything
 else) that unindents statements. Even IDLE, the Official IDE for
 Python, doesn't do that.


emacs in python-mode

Just hit TAB and it unindents else in the given example.
Hit TAB again and it cylces in the possible indentations.

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


Re: newbie: stani's python editor if-else

2007-09-11 Thread Steve Holden
Hamilton, William wrote:
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:python-
 [EMAIL PROTECTED] On Behalf Of
 [EMAIL PROTECTED]
 Sent: Tuesday, September 11, 2007 8:26 AM
 To: python-list@python.org
 Subject: Re: newbie: stani's python editor if-else

 On Sep 10, 11:24 pm, madzientist [EMAIL PROTECTED] wrote:
 hi,

 two quick questions:

 a) i am using SPE (latest version) and for some reason, when i type,
 say

 if 1==2:
 print not equal
 else:
   print equal

 the else is at the same indentation level as the preceding print
 statement, and i get a syntax error

 why doesn't spe automatically put the else at the level of the if
 statement ? what am i dong wrong ? once i manually change the
 indentation, the code snippet runs perfectly.

 b) if this is not the group for such elementary questions, please do
 let me know.

 thanks 

 suresh
 I agree with Steve. I have yet to see an IDE for Python (or anything
 else) that unindents statements. Even IDLE, the Official IDE for
 Python, doesn't do that.

 
 IDLE (At least, IDLE 1.0.5) unindents in obvious situations.  I think
 it's only on break, continue, pass, and return statements, but there may
 be others.
 
Wing and Scite also do that, but Emacs seems to have the nicest behavior.

regards
  Steve
-- 
Steve Holden+1 571 484 6266   +1 800 494 3119
Holden Web LLC/Ltd   http://www.holdenweb.com
Skype: holdenweb  http://del.icio.us/steve.holden
--- Asciimercial --
Get on the web: Blog, lens and tag the Internet
Many services currently offer free registration
--- Thank You for Reading -

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


Re: newbie: stani's python editor if-else

2007-09-11 Thread Bruno Desthuilliers
Steve Holden a écrit :
 madzientist wrote:
 hi,

 two quick questions:

 a) i am using SPE (latest version) and for some reason, when i type,
 say

 if 1==2:
 print not equal
 else:
   print equal

 the else is at the same indentation level as the preceding print
 statement, and i get a syntax error

 why doesn't spe automatically put the else at the level of the if
 statement ? 
(snip)
 
 The point here is that SPE isn't analyzing your source in sufficient 
 detail to recognize the need to outdent the else statement. Clearly 
 there could be any number of statements at the same indent level as the 
 first print statement.
 
 For the record this is not a behavior restricted to SPE, but also occurs 
 in Wing IDE, PythonWin and Scite, for starters.
 
 Technically you are correct in the example you give: an IDE could decide 
 to remove one level of indentation, but of course there's always the 
 dangling else problem: if one if statement is nested inside another 
 one, which indentation level would be appropriate for an else?
 
 Generally speaking, only the programmer can know, and so generally you 
 are left to enforce these issues for yourself.

Emacs does a good job here - FWIW, it solves the dangling else problem 
by deindenting one level, then it's up to you to deindent more if 
appropriate. In practice, it turns out to be right most of the times, 
and not a problem in the few special cases.
-- 
http://mail.python.org/mailman/listinfo/python-list


Python code-writing for the blind. Was (Re: newbie: stani's python editor if-else)

2007-09-11 Thread madzientist

Thanks, everybody, for the very very useful and kind responses.

There is a second reason why I asked the question about automatic de-
indenting. I am teaching myself Python partly so I can then help my
technically astute, but blind friend learn programming. For the many
reasons that Pythonistas like to cite often, I thought Python would be
a good choice to learn programming, and that perhaps the indentation
problem would be solved by the use of an intelligent editor.

But now I am not so sure, though I will try Emacs. Is there anyone
here with experience in such issues ? Maybe for her sake, I should
switch to learning Perl ;) ;)

More seriously, the added issue is that SPE uses spaces, not a single
tab to indent the lines, and I believe it is extremely tedious to use
screen-readers to keep track of blank spaces at the beginning of each
line. I have not tried it myself yet, but I will soon.

Is Python a bad choice for the blind programmer, as a result of a
tight linkage between visual aspects of the code and its function ? I
wish the site blindprogramming.com weren't so lifeless...

Thanks, Suresh

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


Re: Python code-writing for the blind. Was (Re: newbie: stani's python editor if-else)

2007-09-11 Thread Gregor Horvath
madzientist schrieb:

 
 Is Python a bad choice for the blind programmer, as a result of a
 tight linkage between visual aspects of the code and its function ? I
 wish the site blindprogramming.com weren't so lifeless...

There was a thread regarding blind people and python indentation shortly:

http://groups.google.com/group/comp.lang.python/browse_thread/thread/80654a87bfa89e3b

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


Re: Python code-writing for the blind. Was (Re: newbie: stani's python editor if-else)

2007-09-11 Thread madzientist

Thanks, Gregor. Very helpful thread.

Suresh

On Sep 11, 1:26 pm, Gregor Horvath [EMAIL PROTECTED] wrote:
 madzientist schrieb:



  Is Python a bad choice for the blind programmer, as a result of a
  tight linkage between visual aspects of the code and its function ? I
  wish the site blindprogramming.com weren't so lifeless...

 There was a thread regarding blind people and python indentation shortly:

 http://groups.google.com/group/comp.lang.python/browse_thread/thread/...

 Gregor


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


newbie: stani's python editor if-else

2007-09-10 Thread madzientist

hi,

two quick questions:

a) i am using SPE (latest version) and for some reason, when i type,
say

if 1==2:
print not equal
else:
  print equal

the else is at the same indentation level as the preceding print
statement, and i get a syntax error

why doesn't spe automatically put the else at the level of the if
statement ? what am i dong wrong ? once i manually change the
indentation, the code snippet runs perfectly.

b) if this is not the group for such elementary questions, please do
let me know.

thanks 

suresh

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


Re: Hot subject: a good python editor and/or IDE?

2007-08-20 Thread Dave Cook
On 2007-08-19, Sébastien [EMAIL PROTECTED] wrote:

 I am currently using Eclipse+PyDev when developping Python projects but 
 I lack a fast, simple editor for tiny bit of scripts. So here is my 
 question: what is, for you, the current best ( but still kind of light! 
 ) Python editor/IDE ? A tiny precision, I am on Ubuntu so I am looking 
 for a linux compatible editor.

JED has a nice python mode for fast, simple editing.  

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


Re: Hot subject: a good python editor and/or IDE?

2007-08-20 Thread Grant Edwards
On 2007-08-20, Dave Cook [EMAIL PROTECTED] wrote:
 On 2007-08-19, Sébastien [EMAIL PROTECTED] wrote:

 I am currently using Eclipse+PyDev when developping Python projects but 
 I lack a fast, simple editor for tiny bit of scripts. So here is my 
 question: what is, for you, the current best ( but still kind of light! 
 ) Python editor/IDE ? A tiny precision, I am on Ubuntu so I am looking 
 for a linux compatible editor.

 JED has a nice python mode for fast, simple editing.  

I second the Jed nomination...

-- 
Grant Edwards   grante Yow! I want EARS!  I want
  at   two ROUND BLACK EARS
   visi.comto make me feel warm
   'n secure!!
-- 
http://mail.python.org/mailman/listinfo/python-list


Hot subject: a good python editor and/or IDE?

2007-08-19 Thread Sébastien
Hi folks,

I am currently using Eclipse+PyDev when developping Python projects but 
I lack a fast, simple editor for tiny bit of scripts. So here is my 
question: what is, for you, the current best ( but still kind of light! 
) Python editor/IDE ? A tiny precision, I am on Ubuntu so I am looking 
for a linux compatible editor.

Cheers,

Sébastien
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Hot subject: a good python editor and/or IDE?

2007-08-19 Thread Bjoern Schliessmann
Sébastien wrote:
 I am currently using Eclipse+PyDev when developping Python
 projects but I lack a fast, simple editor for tiny bit of scripts.
 So here is my question: what is, for you, the current best ( but
 still kind of light! ) Python editor/IDE ?

vim

BTW, this is an FAQ. Please look through the archives for many
threads with many, many IDEs.

Regards,


Björn

-- 
BOFH excuse #140:

LBNC (luser brain not connected)

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


Re: Hot subject: a good python editor and/or IDE?

2007-08-19 Thread Kevin Walzer
Sébastien wrote:
 Hi folks,
 
 I am currently using Eclipse+PyDev when developping Python projects but 
 I lack a fast, simple editor for tiny bit of scripts. So here is my 
 question: what is, for you, the current best ( but still kind of light! 
 ) Python editor/IDE ? A tiny precision, I am on Ubuntu so I am looking 
 for a linux compatible editor.
 
 Cheers,
 
 Sébastien

IDLE

-- 
Kevin Walzer
Code by Kevin
http://www.codebykevin.com
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Hot subject: a good python editor and/or IDE?

2007-08-19 Thread Samuel
On Sun, 19 Aug 2007 11:47:03 +0200, Sébastien wrote:

 Hi folks,
 
 I am currently using Eclipse+PyDev when developping Python projects but
 I lack a fast, simple editor for tiny bit of scripts. So here is my
 question: what is, for you, the current best ( but still kind of light!
 ) Python editor/IDE ? A tiny precision, I am on Ubuntu so I am looking
 for a linux compatible editor.

Vim with SnippetsEMU works great with Python. I made a demo of this in
action here:

http://debain.org/?p=198

Installation/configuration example on Ubuntu:

---
$ sudo apt-get install vim

$ mkdir -p $HOME/.vim/ftplugin/

$ mkdir -p $HOME/.vim/after/ftplugin/

$ wget http://www.vim.org/scripts/download_script.php?src_id=6951 -O se.vba

$ vim se.vba
:so %
:wq

$ echo setlocal sw=4
setlocal ts=4
noremap buffer LocalLeaderpy o/**CRCR/Esc
  ~/.vim/ftplugin/python.vim

$ wget 
http://code.google.com/p/snippetsemu/issues/attachment?aid=-6063627743376712928name=python_snippets.vim

$ cp python_snippets.vim $HOME/.vim/after/ftplugin/

$ echo syntax on 
set sw=2
set ts=2
set nu 
set nuw=3
set autoindent
set expandtab  $HOME/.vimrc
---

(not tested, but it should work)

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

Re: Hot subject: a good python editor and/or IDE?

2007-08-19 Thread Samuel
On Sun, 19 Aug 2007 13:08:35 +, Samuel wrote:

 $ sudo apt-get install vim

I just realized, this should be

$ sudo apt-get install vim-python

or

$ sudo apt-get install vim-full

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


Re: Hot subject: a good python editor and/or IDE?

2007-08-19 Thread Buchoux Sébastien
Bjoern Schliessmann wrote:
 Sébastien wrote:
   
 I am currently using Eclipse+PyDev when developping Python
 projects but I lack a fast, simple editor for tiny bit of scripts.
 So here is my question: what is, for you, the current best ( but
 still kind of light! ) Python editor/IDE ?
 

 vim

 BTW, this is an FAQ. Please look through the archives for many
 threads with many, many IDEs.

 Regards,


 Björn

   
Yeah, I know this is a FAQ, but, as you mention, there is a whole bunch 
of editors, every one of them being updated constantly (+ the new ones 
getting out). So I am quite sure that looking through the archives is 
THE solution since it will only reflect what people thought when 
question was asked. Just type best Python editor on Google and you 
will see that almost all hits are completely out of date.
Fair enough though! ;)
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Hot subject: a good python editor and/or IDE?

2007-08-19 Thread azrael
Try the WingIDE
Great Code Completition, Source Assistant, Debugger, PythonShell,
projects, The codeCompletition is really great.
Give it a try



On Aug 19, 3:37 pm, Buchoux Sébastien [EMAIL PROTECTED] wrote:
 Bjoern Schliessmann wrote:
  Sébastien wrote:

  I am currently using Eclipse+PyDev when developping Python
  projects but I lack a fast, simple editor for tiny bit of scripts.
  So here is my question: what is, for you, the current best ( but
  still kind of light! ) Python editor/IDE ?

  vim

  BTW, this is an FAQ. Please look through the archives for many
  threads with many, many IDEs.

  Regards,

  Björn

 Yeah, I know this is a FAQ, but, as you mention, there is a whole bunch
 of editors, every one of them being updated constantly (+ the new ones
 getting out). So I am quite sure that looking through the archives is
 THE solution since it will only reflect what people thought when
 question was asked. Just type best Python editor on Google and you
 will see that almost all hits are completely out of date.
 Fair enough though! ;)


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


  1   2   3   >