python is going to die! =(

C

CarlosRivera

I got F'ing annoyed when I had to use VB because it forced one to write
a GUI. I just wanted to write a simple program that would send output
to stdout. I had to create a list box and append each line. Of course,
I could not pipe the output of that program into another program. Screw
GUI programs! Just kidding. I don't like to be forced to do either.
It nice to be able to do whatever one needs. If I had to write a GUI
program with python, I am not sure what I would use. I am not asking
which to use. I am just making a comment.
 
C

CarlosRivera

What is happening with Jython now adays? I vaguely remember something
about the main develope got hired by M$.
 
A

Alex Martelli

CarlosRivera said:
What is happening with Jython now adays? I vaguely remember something
about the main develope got hired by M$.

Jim Hugunin (the guy who just got hired by Microsoft) _initiated_
JPython but he hadn't been active on the project for awhile; he's
currently been doing IronPython, roughly a Jython-equivalent for dotNet,
and his work with the Common Language Runtime is no doubt part of why
Microsoft hired him.


Alex
 
C

Cameron Laird

Jim Hugunin (the guy who just got hired by Microsoft) _initiated_
JPython but he hadn't been active on the project for awhile; he's
currently been doing IronPython, roughly a Jython-equivalent for dotNet,
and his work with the Common Language Runtime is no doubt part of why
Microsoft hired him.
.
.
.
Meanwhile, back to the original question: <URL: http://www.jython.org/ >.
Summary: Jython continues without Jim, but episodically; the Web site can
go months at a time without apparent updates. <URL:
http://sourceforge.net/mailarchive/forum.php?forum_id=5588 >, for example,
illustrates that work continues.
 
M

Marcio Rosa da Silva

Chris said:
The trick that I like most about emacs+python right now is inserting
import pdb; pdb.set_trace() and then running the python script from a
*shell* buffer. It just happens to load the exact same code that would
occur from running pdb.py directly so code lines can be synced up.

I am trying for a long time a way to run pdb from emacs and have the
code synchronized.

I searched google for emacs+python+debug or emacs+pdb but the
instructions would say: "M-x pdb" but then emacs asked the command line
to run the debug and I tried "pdb" "pydb" "pydb filename" but nothing
worked.

When I tryed "M-x pdb" then "pydb" I need to use "file <filename>" (and
the completion doesn't work here for the filename), then the debugger
worked, but no sync with the source code :-(

From the help of GUD, I tried "M-x pdb <RET> FILE <RET>" also without
success.

Anyone can help me with this? I really don't know how to make it work. I
have seen in the python-emacs-mode that there are some code to
synchronize the code, but I could not make it work in this way (I don't
know enough elisp) :-(

But anyway, thanks Chris for the tip. This one worked for me :) It is
possible to set breakpoints using the source buffer instead of using the
line number?

Marcio
 
S

Steffen Ries

Marcio Rosa da Silva said:
I am trying for a long time a way to run pdb from emacs and have the
code synchronized.

I searched google for emacs+python+debug or emacs+pdb but the
instructions would say: "M-x pdb" but then emacs asked the command
line to run the debug and I tried "pdb" "pydb" "pydb filename" but
nothing worked.

When I tryed "M-x pdb" then "pydb" I need to use "file <filename>"
(and the completion doesn't work here for the filename), then the
debugger worked, but no sync with the source code :-(

From the help of GUD, I tried "M-x pdb <RET> FILE <RET>" also without
success.

You can either start pdb as "python <path-to-python-libs/pdb.py" or to
make your life easier install an executable that does that. I'm using
the following script in /usr/local/bin/pdb for this purpose:

--8<--
#! /bin/sh
lib=`python -c "import sys; print '%s/lib/python%s' % (sys.prefix, sys.version[:3])"`

python -u $lib/pdb.py "$@"
--8<--

with this script you start pdb as "M-x pdb <RET> pdb yourscript.py
script arguments... said:
Anyone can help me with this? I really don't know how to make it
work. I have seen in the python-emacs-mode that there are some code to
synchronize the code, but I could not make it work in this way (I
don't know enough elisp) :-(

But anyway, thanks Chris for the tip. This one worked for me :) It is
possible to set breakpoints using the source buffer instead of using
the line number?

C-x <SPC> in the source buffer.

hth,
/steffen
 
M

Marcio Rosa da Silva

Steffen said:
You can either start pdb as "python <path-to-python-libs/pdb.py" or to
make your life easier install an executable that does that. I'm using
the following script in /usr/local/bin/pdb for this purpose:

I tought that was what pydb (not pdb) does. But pydb doesn't worked for
me (it is in /usr/bin/pydb on my system)
--8<--
#! /bin/sh
lib=`python -c "import sys; print '%s/lib/python%s' % (sys.prefix, sys.version[:3])"`

python -u $lib/pdb.py "$@"
--8<--

but this one works! Thanks!!!
with this script you start pdb as "M-x pdb <RET> pdb yourscript.py
script arguments...<RET>"
:)



C-x <SPC> in the source buffer.

This works running pdb as you suggested, but with the set_trace() trick,
not (at least for me)

Problem solved now!

Thank you!!

Marcio
 
I

Ian J Cottee

Chris said:
http://cedet.sourceforge.net/semantic.shtml is a project working on
the backend parsing to be able to be at the point where that context
sensitive dynamic completions can happen ( well, as well as they could
in python ).

And don't forget the excellent Emacs Code Browser -
http://ecb.sourceforge.net, which utilises cedet. From the web page:

"ECB stands for "Emacs Code Browser". While Emacs already has good
editing support for many modes, its browsing support is somewhat
lacking. That's where ECB comes in: it displays a number of
informational windows that allow for easy source code navigation and
overview."

Works great with Python

Ian
 
C

Christos TZOTZIOY Georgiou

(Please, please, please: "its", not "it's"... pretty please...)

(Late reply that maybe can make one smile)

Alex, you are 99% correct. Leave a 1% chance that Max referred to
"julio" as "it"... :) Trolls are genderless!
 
B

Bengt Richter

(Late reply that maybe can make one smile)

Alex, you are 99% correct. Leave a 1% chance that Max referred to
"julio" as "it"... :) Trolls are genderless!

If a troll posts, it's its fault if its its's and its "it's"s (it'ses ?!)
are not used correctly ;-) Ok, I stuck my neck out, but I suspect
Alex is at least 99.999% right ;-)

BTW, did you notice that and's letter count is 3, and also that it's letter count is 2 ;-)

Regards,
Bengt Richter
 
A

Anna Martelli Ravenscroft

Christos said:
(Late reply that maybe can make one smile)

Alex, you are 99% correct. Leave a 1% chance that Max referred to
"julio" as "it"... :) Trolls are genderless!


Sorry, Christos. Alex was correct: "its" is the appropriate usage here.
"it's" is a contraction of "it is", and NOT the possessive form of it.
Furthermore, Alex was quite kind in *not* correcting the mismatch
between the singular form of the verb "is" and the plural noun "points".
I, otoh, am not so generous.

The sentence *should* have read:
"Well, not to feed the troll, but there are a few relevant points in its
posting."

Anna (pedants-r-us) Martelli
 
B

Bengt Richter

Sorry, Christos. Alex was correct: "its" is the appropriate usage here.
"it's" is a contraction of "it is", and NOT the possessive form of it.
Furthermore, Alex was quite kind in *not* correcting the mismatch
between the singular form of the verb "is" and the plural noun "points".
I, otoh, am not so generous.

The sentence *should* have read:
"Well, not to feed the troll, but there are a few relevant points in its
posting."
I almost posted a similar comment ;-) OTOH ...
How many relevant points do you need to start a debate?
How would you answer that question?

A few is enough?
A few are enough?
A few relevant points suffices, or a few relevant points suffice?
A small number suffices, or a small number suffice?
A dozen is sufficient?
A dozen are sufficient?

I suspect that there are some semantic subtleties at work. I.e., when you focus
mentally on the few points as a single collection, the singular forms feel right,
but when you focus on the few points as separate entities, plural forms feel right.
Thus you want the verb (e.g.,is/are) to agree numerically with _some entities_, or with
_a collection_, according to your focus.
I think some sentences can be read either way, depending on which way your attention
is directed (e.g. by word order and discourse context etc.) "A few" can work as noun or
adjective, it seems.

I like words too ;-)

Regards,
Bengt Richter
 
A

Alex Martelli

Steve Holden said:
pedant I had real trouble with. It reads "Some village in Texas is
missing their idiot", and the reason for my perplexity was, while I feel

Aha, I have my pet anti-peeve on that one issue, _singular "their"_ (and
"they", but we can argue that one once the easier possessive case is
more accepted;-). I may have read and appreciated too much 18th-century
and earlier English...;-) -- anyway,
<http://www.crossmyt.com/hc/linghebr/austheir.html> expresses my own
feelings in the matter pretty well (lots of useful links from that page,
too).
this week, I'm much more prepared to let people break the rules when I
think that they realize they *are* breaking the rules. I have less
patience with those who either don't know (sad) or don't care
(inexcusable) about the rules.

And what about those of us who are convinced that (some of) the rules
are _wrong_ -- that '''18th-century grammarians started making arbitrary
judgements as to what is "good English" and "bad English", based on a
kind of pseudo-"logic" deduced from the Latin language, that has nothing
whatever to do with English''', and that such _bloopers_ as the ban
against "singular their" (and other even more blatant cases, such as the
ban against "splitting ifinitives" and against ending a sentence with a
preposition...) should be fought against...?

Ultimately, language is intended to serve the purpose of communication,
and we shouldn't be too upset to see it mangled as long as it serves
that purpose. But when I hear politicians speak in sentences that don;t
even make sense (and hear rooms full of people applauding them, making
it obvious that no critical thought intervenes), *then I start to get my
dander up. There'll be a special room in hell for people who don;t
understand that language is *the* critical component of thought.

I have no disagreement whatsoever with this. But the "rules of
language" (mostly, a kind of guidelines...;-) that one should cherish
for proper communication may often have little to do with grammar per
se. Passive forms are grammatically correct, for example, but more
often than not they make expression of ideas needlessly contorted -- we
see a lot of those in technical and scientific writing, where we're
often shy about choosing a _subject_ for our sentences... and often
strive to avoid a singular "they"!-). Politicians (not necessarily the
kind that run for elections) love the obfuscation passives often bring,
of course. "Singular 'they' is widely considered incorrect", for
example, craftily avoids naming a subject _because any subject would
point out the thesis' weakness_ -- by saying "Pedants widely consider
...." one would reveal one's colors, by saying "Native speakers of
English widely consider ..." one would express a direct lie that's
easily shown up as such.

Admittedly, the role of language is often to communicate _with
ambiguity_ -- this may be sad, or even morally repugnant, but it's a
fact... language evolved as a survival trait of human beings, and pretty
often being able to communicate with ambiguity, so as to trick somebody
and yet later be able to defend the claim that all you said was
perfectly true, is obviously adaptive. Creative ambiguity has often
been the only way some treatise or contract could be "sold" to the
voters or stockholders of both nations or firms, enabling the
politicians or executives of each side to interpret the words that were
being signed in such a way as to mollify their constituency...

So, in fighting to express ourselves clearly and directly, we _are_
indeed fighting against the grain of a substantial portion of language's
biological purpose (helped, fortunately, by _another_ portion of it;-).
In this fight, good rules help (particularly, they help a good writer
who's able to pick the one case in a hundred where even a good rule is
best broken in the advantage of clarity and directness), but bad rules
hinder even more...


Alex
 
D

David Rush

Ville Vainio said:
That's the whole problem with emacs - lack of resources. Nobody
bothers do anything "seriously".

And they do in the Eclipse world? Bah. I've just spent two weeks trying
to come to terms with Eclipse. I couldn't even how to figure out how to
get brace-matching to work for a scripting language that is not supported
by the default distribution.
And when people within the emacs
community do things they pick bizarre ways of doing things, possibly
because they are often Lisp lovers that like to "think different".

It's not because Lisp-heads like to think different. It's because Lisp
allows you to think differently. Programming for Emacs though is a bit
of a different animal from most programming because of the basic data
model. When the goal of a program is (extensive) side-effects on a
string things look a bit ... different. Just wait. Eclipse programming
will go down this road by the time it reaches the level of maturity of
current Emacsen.
Eclipse will no doubt take over.

I do see the possibility, but the Eclipse community is going to have to
more eagerly embrace the non-Java world.
Emacs might need a fresh start,
but it's hardly likely; most probably a new project would be seen as
further dillution of already scarce emacs resources.

The big problem is backward compatibility with the *huge* base of
existing elisp code.
Luckily we emacs fans still have hope in eclipse -

How? I'm feeling awfully let down that the appearance of the Eclipse
community does not seem to match the reality.

david rush
 
R

Richie Hindle

[David]
I do see the possibility [of Eclipse taking over from Emacs], but
the Eclipse community is going to have to more eagerly embrace the
non-Java world.

I tried Eclipse this week as a possible alternative to SciTE, which is
my current preferred Python editor. I discovered two things:

1. There is no File/Open. You can't just open an arbitrary file and
edit it; the file must be part of a project. This makes (some) sense
for Java because your CLASSPATH limits where source files can be
picked up from (but what about non-source files? or files that are
indirectly related to your project?)

2. In the Python debugger (I was using the PyDev plugin) a Step took
between 3 and 4 seconds on my 3GHz PC. (I'd previously tried
TruStudio and had been unable to make their debugger work at all.)

I uninstalled the whole thing sharpish. If there are Eclipse/PyDev fans
out there who want to say "No, you've missed the 'let me open arbitrary
files' and 'make the Python debugger work at a decent speed' options",
I'm all ears!
 
V

Ville Vainio

Richie> 1. There is no File/Open. You can't just open an
Richie> arbitrary file and edit it; the file must be part of a
Richie> project. This makes (some) sense

File / Open external file. It's not drag-and-drop, but better than
nothing.

Richie> 2. In the Python debugger (I was using the PyDev plugin) a
Richie> Step took between 3 and 4 seconds on my 3GHz PC. (I'd
Richie> previously tried

I tried the debugger only briefly - it was not that slow. It wasn't
snappy, but at least it felt faster than w/ some older version of
PyDev (that was pydev 0.6.1).
 
C

Christos TZOTZIOY Georgiou

Sorry, Christos. Alex was correct: "its" is the appropriate usage here.
"it's" is a contraction of "it is", and NOT the possessive form of it.
Furthermore, Alex was quite kind in *not* correcting the mismatch
between the singular form of the verb "is" and the plural noun "points".
I, otoh, am not so generous.

The sentence *should* have read:
"Well, not to feed the troll, but there are a few relevant points in its
posting."

I see marriage has *its* advantages... :)

Actually, my post was a rather silly pun (think "It" by Stephen King),
and that is the reason I inserted a smiley. I know that Alex was
correct. It's my fault that I didn't make myself absolutely clear I was
joking (I firmly believe that the speaker/writer has the responsibility
to make themselves understood assuming good intentions from the side of
the audience --and good intentions are the norm here on clpy :).

Thanks for taking the time to reply, though!
 
R

Richie Hindle

[Richie]
There is no File/Open. You can't just open an arbitrary file and
edit it; the file must be part of a project.
[Ville]
File / Open external file.

I'm calling the optician now.
It's not drag-and-drop, but better than nothing.

Lack of drag-and-drop was another problem I'd noticed, yes. :cool:

Thanks,
 
V

Ville Vainio

David> And they do in the Eclipse world? Bah. I've just spent two

The results might not be ideal, but the effort seems to be serious;
corporate money is being poured into it. I'm aware that corporate
money is being poured into emacs customization as well, but at least
w/ eclipse the corporations know about it ;-).

David> to come to terms with Eclipse. I couldn't even how to
David> figure out how to get brace-matching to work for a
David> scripting language that is not supported by the default
David> distribution.

Me neither. Perhaps this is something to be brought up w/ pydev
people.


David> It's not because Lisp-heads like to think different. It's
David> because Lisp allows you to think differently. Programming
David> for Emacs though is a bit of a different animal from most
David> programming because of the basic data model. When the goal

As far as the emacs data model goes - it's remarkably similar to the
Python data model, and I don't really see any reason why emacs should
be in elisp (apart from inertia).


David> I do see the possibility, but the Eclipse community is
David> going to have to more eagerly embrace the non-Java world.

Indeed. I think we just need to give it some time. As it stands, the
potential for the passing of time to actually amounting to something
seems much better for Eclipse than it appears to be for Emacs.


David> The big problem is backward compatibility with the *huge*
David> base of existing elisp code.

I guess the legacy code just needs to be dropped, translated or
"emulated". Translation doesn't seem entirely impossible, at least for
the bulk of code that is written in "standard" fashion (w/o excessive
use of macros and whatnot). A lot of the elisp codebase is not
necessary for normal use anyway.

David> How? I'm feeling awfully let down that the appearance of
David> the Eclipse community does not seem to match the reality.

That happened to me too. My hope was rekindled when I tried the recent
PyDev and saw that CDT got code compention working in C++. And some
other things. Eclipse needs to do a lot of growing up, but at least it
seems to *want* to grow up - unlike the grumpy old grandad that emacs
has become.

I bumped into this on #emacs; emacs users might find it interesting:

http://pinard.progiciels-bpi.ca/opinions/editors.html
 
A

Anna Martelli Ravenscroft

Christos said:
I see marriage has *its* advantages... :)

LOL

Actually, Alex and I first met over my correcting a subtle error in a
posting he had made (playing the "more pedantic than thou" game). ;-)
Actually, my post was a rather silly pun (think "It" by Stephen King),

Ah. Didn't catch the reference. One of (the few) Stephen King books I
haven't read.
and that is the reason I inserted a smiley. I know that Alex was
correct. It's my fault that I didn't make myself absolutely clear I was
joking

Actually, that you were being jocular was pretty clear...

(I firmly believe that the speaker/writer has the responsibility
to make themselves understood assuming good intentions from the side of
the audience --and good intentions are the norm here on clpy :).

Yep. Agreed - it's a great community.

Anna
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,792
Messages
2,569,639
Members
45,351
Latest member
RoxiePulli

Latest Threads

Top