PyDoc - Python Documentation Plugin for Eclipse
Greets! Since i'm new to Python, i've decided to create a handy plugin for Elipse SDK which is my primary dev environment. Practically the plugin is a simple html archive from python documentation website running inside Eclipse so you can call it using Eclipse help system. As for now it is pretty large (~7 mb), but i'm planning to optimize it in near future. For more information, please visit: http://pydoc.tk/ or https://sourceforge.net/projects/pydoc/ Advices are appreciated! Contact e-mail: [email protected] -- http://mail.python.org/mailman/listinfo/python-list
PyDoc - Python Documentation Plugin for Eclipse
Greets! Since i'm new to Python, i've decided to create a handy plugin for Elipse SDK which is my primary dev environment. Practically the plugin is a simple html archive from python documentation website running inside Eclipse so you can call it using Eclipse help system. As for now it is pretty large (~7 mb), but i'm planning to optimize it in near future. For more information, please visit: http://pydoc.tk/ or https://sourceforge.net/projects/pydoc/ Advices are appreciated! Contact e-mail: [email protected] -- http://mail.python.org/mailman/listinfo/python-list
Re: PyDoc - Python Documentation Plugin for Eclipse
On 6/10/2012 4:22 AM, Alexey Gaidamaka wrote: > Practically the plugin is a simple html archive from python > documentation website running > inside Eclipse so you can call it using Eclipse help system. > As for now it is pretty large (~7 mb), but i'm planning to optimize it > in near future. Rather than archive documentation, why not use a simple static page that points to the different sections for each version of Python on docs.python.org? The 2.7.3 documentation is mostly useless to me since I'm using 3.3 (and of course there are some using 2.6 or 3.2 or 3.1...), but I can easily access it from a link in the page you've archived. Not only would this reduce the size of the plugin to almost nothing, but it would prevent the documentation from being outdated. > For more information, please visit: > https://sourceforge.net/projects/pydoc/ Why isn't it installed like other Eclipse plugins? Is it even possible to update the plugin via Eclipse? This does look like a very useful plugin, though. Great idea. -- CPython 3.3.0a3 | Windows NT 6.1.7601.17790 -- http://mail.python.org/mailman/listinfo/python-list
Re: Pythonic cross-platform GUI desingers à la Interface Builder (Re: what gui designer is everyone using)
On 10 June 2012 07:16, rusi wrote: > This is worth a read in this context: http://osteele.com/archives/2004/11/ides Interesting! I definitely fall nicely at one extreme of this dichotomy. Every time I've tried to use an IDE, it's made me feel inadequate and I've quickly retreated to my comfort zone (emacs + xterm). I felt inadequate because I felt like the IDE was hindering me rather than helping me. All I ask from the program that I use to write code is: * syntax highlighting * sensible auto-indenting * as little reliance on the mouse as possible * emacs key bindings :) This article makes me feel more positive about my inability to feel comfortable in an IDE. Thanks for the link! -- Arnaud -- http://mail.python.org/mailman/listinfo/python-list
Re: which one do you prefer? python with C# or java?
[becky_lewis ] > Lisp and Clojure are functional languages. No, they're not. But you can (and often will) do quite a bit of functional programming in Lisp, as it lends itself quite naturally to that way of thinking. But in (Common) Lisp you also have CLOS, which is a rather different way to do object oriented programming. It will widen your horizon in more than one way. The advice to learn just one programming language at a time seems sound, though. I would take it, if I were you. -- * Harald Hanche-Olsen http://www.math.ntnu.no/~hanche/> - It is undesirable to believe a proposition when there is no ground whatsoever for supposing it is true. -- Bertrand Russell -- http://mail.python.org/mailman/listinfo/python-list
Re: Pythonic cross-platform GUI desingers à la Interface Builder (Re: what gui designer is everyone using)
Am 10.06.2012 08:16, schrieb rusi: This is worth a read in this context: http://osteele.com/archives/2004/11/ides So which language would you suggest to use next? ;-) I've read the article. It presents some nice ideas, but probably the author has not used Python before. Otherwise he would have noticed that the overall productivity does not only depend on language and IDE/editor, but on the complete environment which in the case of Python includes the ability to use the interpreter interactively. For many tasks that's a major productivity boost. But that's a point that many people don't see because their current language like C# or Java does not have an interpreter and when they just look at the syntax, the find "there's not enough improvement to switch". Also, I'm not sure whether the author counts the libraries as language or tool feature. In my opinion the environment and the libraries should be listed on their own in such an article. Libraries are developed after the language, but usually they are ahead of the other tools/IDEs. The author lists many IDE features that I personally don't find too important (the refactoring capabilities of a simple text editor are fine for me...). But following the link to Laszlo made the reason quite clear because his IDE background is from Eclipse not from Python. Btw.: I've been using Python for 16 or 17 years now. Only 3 years ago I did the switch from Editor to IDE (Wing IDE) and this has brought a *significant* boost of productivity (especially the good debugger allows you to code in a different way as you can use the interactive interpreter at any point in your program). But back to my original point, this time in the context of the article: If you want to 'sell' a programming language for corporate use, you absolutely need the tools. And this includes an easy-to-use GUI editor which does not only allow to create the GUI, but also to fill it with code. Most corporate users are casual users, not full time programmers. Regards, Dietmar -- http://mail.python.org/mailman/listinfo/python-list
Re: which one do you prefer? python with C# or java?
My mistake about Lisp being purely functional (I have very little experience with common Lisp itself), though Clojure is. That doesn't change my point, to which you appear to agree, Lisp and Clojure teach folks a different way of approaching problems, which is always useful :) On Jun 10, 12:25 pm, Harald Hanche-Olsen wrote: > [becky_lewis ] > > > Lisp and Clojure are functional languages. > > No, they're not. > > But you can (and often will) do quite a bit of functional programming in > Lisp, as it lends itself quite naturally to that way of thinking. > > But in (Common) Lisp you also have CLOS, which is a rather different way > to do object oriented programming. It will widen your horizon in more > than one way. > > The advice to learn just one programming language at a time seems sound, > though. I would take it, if I were you. > > -- > * Harald Hanche-Olsen http://www.math.ntnu.no/~hanche/> > - It is undesirable to believe a proposition > when there is no ground whatsoever for supposing it is true. > -- Bertrand Russell -- http://mail.python.org/mailman/listinfo/python-list
looking for a python script disk/storage benchmark
Hi All, I am started to write a utility (python 3.x) to test storage/disk benchmark , my thought were using binary buffered Io, but i would like to see if there any script out there written so i would use as template searching via Google found only one but not what exactly what i am looking for. if someone knows or have one please share. Thanks -- http://mail.python.org/mailman/listinfo/python-list
Re: Nexus Programming Language
On 10/06/2012 1:45 AM, rusi wrote:
On Jun 10, 7:46 am, Adam Campbell wrote:
The Nexus programming language version 0.5.0 has been released. It is
an "object-oriented, dynamically-typed, reflective programming
language", drawing from Lua and Ruby.www.nexuslang.org
What does nexus have that python doesn't?
Yeah I know this kind of question leads to flames but a brief glance
at the about page does not tell me anything in this direction.
It has a more complex block structure, with lots of braces {}.
Colin W.
--
http://mail.python.org/mailman/listinfo/python-list
Another non blocking method in thread
Hi, I have created a very simple client-server model using sockets. Server is created by sub classing threading.thread. The 'run' method is continuously listening for client's response. When server send a string to client, client response back by changing that string into uppercase. I would like to synchronize send and receive. For example: def sendmsg(self, msg): self.client.send(msg) #wait until next msg is received in 'run' return self.response I tried using a while loop for waiting but it's blocking the 'run' method. Don't know much about threading event and lock and if they can help me here. Any pointers? Prashant -- http://mail.python.org/mailman/listinfo/python-list
Re: which one do you prefer? python with C# or java?
On 10/06/12 00:44, Yesterday Paid wrote: I'm planning to learn one more language with my python. Just my personal experience, but after passively learning many many languages, I came to the conclusion that I (and I suppose many others) am able to learn only one platform well. The point is that you are never interested in learning *a language*, everybody who has at least some touch with programming can learn most languages in one session in the afternoon. But nobody is interested in you knowing a language, you need to know the platform with all libraries, standards, style, and culture. And *that* demands you focus on one language completely. Yes, of course, you will know couple of other languages and be able to write a thing in it (everybody needs to know a bit of JavaScript these days, and if you are on Unix/Linux,Mac OS X, you need to know a bit of shell scripting), but that's different from "Zen & Writing" (that's my personal homage to recently deceased Ray Bradbury and his essay http://www.worldcat.org/search?qt=wikipedia&q=isbn%3A1877741094). The language in which you write those 100 lines of code per day (that's my rough estimate of an equivalent for Bradbury's daily portion of prose to be written) should be IMHO only the one. I think the similarity with story writing makes a lot of sense. Yes, many people speak and write more than one language (me included, English is not my first language), but that's not the same as writing stories professionally. At the moment, I can think only about one successful famous writer how changed his main language (Kundera), but I don't recall ATM any writer who would be writing in multiple languages at one time. (yes, switches between main programming languages is more possible, because programming languages are endlessly less complicated than natural ones) Just my 0.02CZK Matěj -- http://mail.python.org/mailman/listinfo/python-list
Re: which one do you prefer? python with C# or java?
On Sun, Jun 10, 2012 at 11:40 PM, Matej Cepl wrote: > Just my personal experience, but after passively learning many many > languages, I came to the conclusion that I (and I suppose many others) am > able to learn only one platform well. The point is that you are never > interested in learning *a language*, everybody who has at least some touch > with programming can learn most languages in one session in the afternoon. > But nobody is interested in you knowing a language, you need to know the > platform with all libraries, standards, style, and culture. And *that* > demands you focus on one language completely. Currently, I'm working professionally in Pike, C++, bash, PHP, and Javascript, but only one platform: Unix. Everything's done to our own internal philosophy, which mostly aligns with the Unix notion of building small tools that link together (rather than monoliths for entire tasks). Learning and managing multiple languages isn't itself a problem, though I do recommend learning just one at a time until you stop considering yourself a novice (master a half-dozen languages or so, that's a start). ChrisA -- http://mail.python.org/mailman/listinfo/python-list
Re: PyDoc - Python Documentation Plugin for Eclipse
On Sun, 10 Jun 2012 05:02:35 -0500, Andrew Berg wrote: > On 6/10/2012 4:22 AM, Alexey Gaidamaka wrote: >> Practically the plugin is a simple html archive from python >> documentation website running >> inside Eclipse so you can call it using Eclipse help system. As for now >> it is pretty large (~7 mb), but i'm planning to optimize it in near >> future. > Rather than archive documentation, why not use a simple static page that > points to the different sections for each version of Python on > docs.python.org? The 2.7.3 documentation is mostly useless to me since > I'm using 3.3 (and of course there are some using 2.6 or 3.2 or 3.1...), > but I can easily access it from a link in the page you've archived. Not > only would this reduce the size of the plugin to almost nothing, but it > would prevent the documentation from being outdated. > >> For more information, please visit: >> https://sourceforge.net/projects/pydoc/ > Why isn't it installed like other Eclipse plugins? Is it even possible > to update the plugin via Eclipse? > > > This does look like a very useful plugin, though. Great idea. Thanx! All that you've mentioned is planned in the next versions of the plugin. -- http://mail.python.org/mailman/listinfo/python-list
Re: which one do you prefer? python with C# or java?
Matej Cepl writes: > The point is that you are never interested in learning *a language*, > everybody who has at least some touch with programming can learn most > languages in one session in the afternoon. Really, that's only if the new language is pretty much the same as the old ones, in which case you haven't really learned much of anything. Languages that use interesting new concepts are challenges in their own right. Here is an interesting exercise for statically typed languages, unsuitable for Python but not too hard in Haskell: http://blog.tmorris.net/understanding-practical-api-design-static-typing-and-functional-programming/ It doesn't require the use of any libraries, standards, style, or culture. I can tell you as a fairly strong Python programemr who got interested in Haskell a few years ago, it took me much longer than an afternoon to get to the point of being able to solve a problem like the above. It required absorbing new concepts that Python simply does not contain. But it gave me the ability to do things I couldn't do before. That's a main reason studying new languages is challenging and worthwhile. -- http://mail.python.org/mailman/listinfo/python-list
Re: Pythonic cross-platform GUI desingers à la Interface Builder (Re: what gui designer is everyone using)
On 6/8/12 8:27 AM, Wolfgang Keller wrote: What "GUI designer" would come the closest to the way that Cocoa's Interface Builder works? I.e. is there any one (cross-platform) that allows to actually "connect" the GUI created directly to the code and make it available "live" in an IDE? If you're developing on the Mac, PyObjC allows you to use Interface Builder for developing Python apps. However, there are those of us who are deeply uncomfortable with IB and related tools, such as RealBasic and LiveCode/Runtime Revolution. These tools make code organization very hard by reducing the amount of code written to the point of the UI working by "magic," and/or by breaking up your code into little snippets that you can only view by clicking on the widget in the UI tool. A related issue is that using a tool such as this makes you heavily dependent on that particular tool, and subject to its developers' priorities, release schedule, and bugs. The pace of Xcode development--with Apple making frequent changes to project formats in a backwards-incompatible way--is an example of this. One reason I prefer to code UI's by hand is because a) in Tkinter it's very easy to do, and b) it allows me to have a much better mental model of my code and my app's functionality--I can put everything into as many .py files as I need to, and can edit my code with any text editor. I think these issues are a reason that the slick "drag-and-drop" UI builders tend to be developed by commercial software shops to support their language and/or IDE, but find little traction among open-source developers and languages. --Kevin -- Kevin Walzer Code by Kevin http://www.codebykevin.com -- http://mail.python.org/mailman/listinfo/python-list
Re: Nexus Programming Language
On Jun 10, 7:21 am, "Colin J. Williams" wrote:
> On 10/06/2012 1:45 AM, rusi wrote:
> > What does nexus have that python doesn't?
> > Yeah I know this kind of question leads to flames but a brief glance
> > at the about page does not tell me anything in this direction.
>
> It has a more complex block structure, with lots of braces {}.
So in other words, it another Ruby?
--
http://mail.python.org/mailman/listinfo/python-list
Re: Nexus Programming Language
On Jun 10, 12:45 am, rusi wrote: > On Jun 10, 7:46 am, Adam Campbell wrote: > > > The Nexus programming language version 0.5.0 has been released. It is > > an "object-oriented, dynamically-typed, reflective programming > > language", drawing from Lua and Ruby.www.nexuslang.org > > What does nexus have that python doesn't? > Yeah I know this kind of question leads to flames but a brief glance > at the about page does not tell me anything in this direction. Oh rusi, you're not fooling anybody. We know your a total ruby fanboy and probably an "unoffical" member of the nexus dev team. -- http://mail.python.org/mailman/listinfo/python-list
Re: what gui designer is everyone using
On Jun 7, 4:18 pm, Kevin Walzer wrote: > On 6/5/12 10:10 AM, Mark R Rivet wrote: > > > I want a gui designer that writes the gui code for me. I don't want to > > write gui code. what is the gui designer that is most popular? > None. I write GUI code by hand (Tkinter). I second that notion. Writing GUI code by hand is the only way. -- http://mail.python.org/mailman/listinfo/python-list
Re: Pythonic cross-platform GUI desingers à la Interface Builder (Re: what gui designer is everyone using)
On Jun 8, 7:27 am, Wolfgang Keller wrote: > This whole cycle of "design GUI"->"generate code"->add own code to > generated code"->"run application with GUI" has always seemed very > un-pythonic to me. A dynamic, interpreted language should allow to work > in a more "lively", "direct" way to build a GUI. I strongly agree with this statement also. -- http://mail.python.org/mailman/listinfo/python-list
Re: which one do you prefer? python with C# or java?
On 10/06/12 18:32, Paul Rubin wrote: Really, that's only if the new language is pretty much the same as the old ones, in which case you haven't really learned much of anything. Languages that use interesting new concepts are challenges in their own right. Well, I could at least passively read many languages (starting with Pascal, C, and unsuccessful attempt to learn Prolog, so even statically typed languages are not that mysterious to me), so learning new ones is not that problem. And yes, to be completely honest, functional languages are my weakest part (although I have used Emacs for some time, I still haven't learned writing in any Lisp properly). Matěj -- http://mail.python.org/mailman/listinfo/python-list
Re: Pythonic cross-platform GUI desingers à la Interface Builder (Re: what gui designer is everyone using)
On Jun 9, 8:25Â am, Dietmar Schwertberger
wrote:
> Before anyone now writes "Good GUIs are coded by hand":
> I agree, but for many purposes only simple GUIs are required
> and it should be possible to create these without studying manuals
> (on toolkit and GUI editor).
It is possible. Try Tkinter for the "get-you-from-a-to-b" solution,
or, wxPython if you like fog lamps, heated seats, and navigation
systems.
> A typical simple GUI would e.g. be for a measurement / data aquisition
> program, where you just need some buttons and fields.
Buttons and feilds are just a few short lines of code. Look. You guys
don't need a visual GUI builder. What you need to do is stop being
lazy and spend a few hours studing the basics of Tkinter and wxPyhon
(or whatever else suits your needs). IMO, every single python
programmer who needs GUI interfaces should know the basics of AT LEAST
Tkinter without even looking at the docs. I mean, how difficult is:
import Tkinter as tk
from Tkconstants import *
root = tk.Tk()
root.title('Noob')
for x in range(10):
f = tk.Frame(root)
f.pack(fill=X, expand=YES)
l = tk.Label(f, text="Field_"+str(x))
l.pack(side=LEFT, anchor=W)
e = tk.Entry(f)
e.pack(side=LEFT, fill=X, expand=YES)
root.mainloop()
#
# Or even better. Use grid!
#
root = tk.Tk()
root.title('Amatuer')
root.columnconfigure(1, weight=1)
for x in range(10):
l = tk.Label(root, text="Field_"+str(x))
l.grid(row=x, column=0, sticky=W)
e = tk.Entry(root)
e.grid(row=x, column=1, sticky=W+E)
root.mainloop()
#
# Or become a pro and create reusable objects!
#
class LE(tk.Frame):
def __init__(self, master, **kw):
tk.Frame.__init__(self, master)
self.l = tk.Label(self, **kw)
self.l.pack(side=LEFT)
self.e = tk.Entry(self)
self.e.pack(side=LEFT, fill=X, expand=YES)
root = tk.Tk()
root.title('Pro')
for x in range(10):
le = LE(root, text="Field_"+str(x))
le.pack(fill=X, expand=YES)
root.mainloop()
>
> I think that something in the style of Visual BASIC (version 6) is required
> for either wxPython or PyQt/PySide (or both).
> In the Visual BASIC editor you can e.g. add a GUI element
> and directly go to the code editor to fill methods (e.g. an OnClick
> method).
With Tkinter you add a GUI element IN THE CODE and then you are
ALREADY in the code editor! What an amazing concept! No juggling
editors and windows. No need to mentally switch from one language to
another. Can you imagine how productive you could be?
> If you have not used VB before, you should just try it. You can create
> GUIs within a few minutes even if you haven't used it before.
Allow me to qualify that very naive generalization: "ANYBODY and point
and click, very few can actually write code".
> (Sure, the fact that anyone can use it has the side effect that most
> of these GUIs are not good...)
Well i see that you agree. Look. This is fact. GUI's require you to
write code. You cannot get around this fact. Sure, you can create some
templates. But in the end, you will have to write in order to link the
templates together.
I say. If your GUI kit gives you the feeling that you are writing too
much boilerplate, well, then, it's time to wrap up some re-usable
functionality on your own. I have done this myself with Tkinter AND Wx.
( although much more so with Tkinter being that is a poorly designed
GUI)
> Also:
> Such an editor should support simple manual layouts without enforcing
> the use of sizers (wx) or layout managers (Qt).
> These add an additional level of complexity which is not required
> for simple GUIs.
See above code for example of *gasps* simple layouts in REAL code!
> Background:
> I'm using Python in a corporate environment but I'm more or less
> the only one using it. I could propagate Python for wider use as it
> is the best available language for things like hardware control and
> data acquisition, but the lack of an easy-to-use GUI editor is
> the blocking point.
BS!
> I can teach anyone how to create a program for data
> acquisition, but I don't see how more than a few could create a GUI
> without an easy-to-use tool.
Like Tkinter?
> There's still a lot of VB6 code around as there's no replacement and
> this gap could well be filled by Python.
Visual Basic sucks. I spend more time re-focusing my mental energy
than actually getting work done. There is no replacement for pure raw
code. You visualize GUI's in you mind, and fingers bring that vision
to life through properly written API's.
Never invent a new problem for a solution that does not exist.
--
http://mail.python.org/mailman/listinfo/python-list
Re: Pythonic cross-platform GUI desingers à la Interface Builder (Re: what gui designer is everyone using)
(Sorry for posting without references to the previous messages, but it seems that many messages don't get through to the nntp server that I'm using.) Chris Angelico wrote (in two posts): > There was a time when that was a highly advertisable feature - "build > XYZ applications without writing a single line of code!". I've seen it > in database front-end builders as well as GUI tools, same thing. But > those sorts of tools tend not to be what experts want to use. You end > up having to un-learn the "easy way" before you learn the "hard way" > that lets you do everything. This time is not over. Especially when you look at data acquisition and control applications where tools like Labview are widely used. Personally, I would not want to use such tools as I find it quite complicated to implement any logic with a graphical editor. But when you want to sell an alternative to such tools, then you should not offer a tool which makes it almost impossible for a typical engineer to create a simple GUI. > You refer to "non-programmers" and then point out that they would be > lost trying to add code. That's a natural consequence of not being a > programmer, Sure, but with "non-programmers" I'm referring to typical engineers who can implement some basic programs for measurement, control or data processing. > and of all languages to help someone bridge that gap and > start coding, I would say Python is, if not the absolute best, > certainly up there somewhere. Just as you wouldn't expect a music 100% agreed. It's the only programming language that I can recommend to casual or even non-programmers, but only as long as he/she's not interested in GUI programming. > authoring program to let someone publish score without knowing how to > compose music, you can't expect a GUI tool to relieve you of the need > to write code. The audience of GUI editors is not the artist / professional... > WYSIWYG UI designers suffer badly from a need to guess _why_ the human > did what s/he did. Build your UI manually, and there's no guesswork - > you explicitly _tell_ the computer what to do and why. True for non-trivial applications. I don't have many windows and dialogs that could have been created using a GUI editor in my main wxPython based application. But even then: I've learned wxPython from looking at the code that wxDesigner created. Of course, that was in 1999/2000 when no books on such matters were available. > There's an assumption in most of the Windows world that everything > needs a GUI. For a simple data acquisition program, I wouldn't use one > - I'd have it run in a console. That's something that any programmer > should be able to create without studying complex manuals; all you > need to know is the basics of I/O and possibly argument parsing. Yes, usually I'm using a console as most measurement programs are quite straighforward and linear. But I don't see a way to convince people to go back to the console. They will always want to implement a basic GUI for one or the other program and then they will end up frustrated... (Or I have to implement the GUI for them, which is not an option.) > I've used Visual Basic. My first salaried work was on VB. Making it > easy to throw together a simple GUI doesn't mean a thing when you have > a large project to write - your business logic and UI design work will I would never consider or recommend to write anything significant using a GUI builder. Also, I would never recommend anyone to use VB at all. But given the lack of alternatives, it still has a significant market share. (The fact that anyone can hack together a program in VB has the side- effect that most programs are not very good...) > massively dwarf the effort of actually throwing widgets into a > hierarchy. So the only time it's going to be an issue is with trivial > programs; which means there isn't much to be saved. Just make your > trivial things run in a console, and then either use a GUI builder > (several have been mentioned) or hand-write your UI code. Right, we're talking about non-trivial programs with almost trivial user interfaces. But I don't see a Python GUI builder which a casual user could use to add a GUI to the code. (To be exact: it's easy to create a GUI with one or the other builder, but non-trivial to connect it to the backend.) > Actually, there's a third option these days. Give it no console and no > GUI, make it respond to HTTP connections, and use a web browser as > your UI. :) I don't think that this is easier for the casual user as multiple languages and environments are involved. But on the other hand there are some (mainly commercial) organizations who believe that HTML5, CSS and Javascript are the future for GUI programming. Personally, I prefer Python with console, wx or Qt for local applications and Python/HTTP/HTML/Javascript for multi-user database applications. Regards, Dietmar -- http://mail.python.org/mailman/listinfo/python-list
Re: Pythonic cross-platform GUI desingers à la Interface Builder (Re: what gui designer is everyone using)
Am 10.06.2012 21:36, schrieb Rick Johnson: It is possible. Try Tkinter for the "get-you-from-a-to-b" solution, or, wxPython if you like fog lamps, heated seats, and navigation systems. I prefer wx or Qt. The look and feel is one reason. But the fact that Tkinter is still the standard GUI toolkit tells a lot about the situation... Buttons and feilds are just a few short lines of code. Look. You guys don't need a visual GUI builder. What you need to do is stop being > lazy and spend a few hours studing the basics of Tkinter and wxPyhon > (or whatever else suits your needs). IMO, every single python > programmer who needs GUI interfaces should know the basics of AT LEAST > Tkinter without even looking at the docs. I mean, how difficult is: [snipped code examples] Sure, I know how to code GUIs. But the learning curve is too steep for new users wanting to implement simple GUIs. With Tkinter you add a GUI element IN THE CODE and then you are ALREADY in the code editor! What an amazing concept! No juggling editors and windows. No need to mentally switch from one language to another. Can you imagine how productive you could be? I thought about preparing some templates for typcial applications, but I abandonded this as I don't think that it would work out well. If you have not used VB before, you should just try it. You can create GUIs within a few minutes even if you haven't used it before. Allow me to qualify that very naive generalization: "ANYBODY and point and click, very few can actually write code". Right. I won't comment on the quality of the most VB code. But there are many applications where the quality of the code is not the main objective. It just needs to work e.g. to set up the instrument and read back data. The know-how and value is not the GUI code, but in the instrument setup and data evaluation. I say. If your GUI kit gives you the feeling that you are writing too much boilerplate, well, then, it's time to wrap up some re-usable functionality on your own. I have done this myself with Tkinter AND Wx. ( although much more so with Tkinter being that is a poorly designed GUI) Did the same for wx twelve years ago as I did not like e.g. the event handling. Most of the time I'm still using my own wrappers. Still, once or twice a year I'm writing some small applications where I would use a GUI builder if it was available instead of copying old code as template. I can teach anyone how to create a program for data acquisition, but I don't see how more than a few could create a GUI without an easy-to-use tool. Like Tkinter? Don't like Tkinter, even though the alternatives are not too Pythonic either. Visual Basic sucks. I spend more time re-focusing my mental energy than actually getting work done. There is no replacement for pure raw code. You visualize GUI's in you mind, and fingers bring that vision to life through properly written API's. Never invent a new problem for a solution that does not exist. Sure, VB language sucks, but still I do not see any other tool that would cover the RAD aspect of the VB 6 environment. I would love to see Python for this, even though this would have negative side effects (e.g. attracting stupid people like PHP seems to). Regards, Dietmar -- http://mail.python.org/mailman/listinfo/python-list
err: A cool new chatbot written and extensible in python
Hi all, We have released a cool extensible chatbot for your development teams chatrooms. At my current company we have a ton of fun with it so we have decided to spread the love and release it as an open source project. Of course it is written and extensible in Python. Feel free to give it a try. Any feedback is welcome ! Its homepage is http://gbin.github.com/err/ Some sample commands : http://github.com/gbin/err/wiki/Catalog If you want to see our easy it is to write your own extensions to integrate it with other tools of your company, have a look here : https://github.com/gbin/err/wiki/plugin-dev Feel free to contact us if you have cool plugins to submit ! Guillaume. -- http://mail.python.org/mailman/listinfo/python-list
Re: which one do you prefer? python with C# or java?
Matej Cepl writes: > Well, I could at least passively read many languages (starting with > Pascal, C, and unsuccessful attempt to learn Prolog, so even > statically typed languages are not that mysterious to me), I wouldn't count Pascal or C as statically typed in any interesting way. C++ (template generics), ML, or Haskell would be more meaningful. Prolog is worth spending more time on, and it's on my own list. > so learning new ones is not that problem. And yes, to be completely > honest, functional languages are my weakest part (although I have used > Emacs for some time, I still haven't learned writing in any Lisp > properly). You might start with Abelson and Sussman's classic book: http://mitpress.mit.edu/sicp -- http://mail.python.org/mailman/listinfo/python-list
Re: Pythonic cross-platform GUI desingers à la Interface Builder (Re: what gui designer is everyone using)
On Jun 10, 2:36Â pm, Rick Johnson wrote:
> #
> # Or become a pro and create reusable objects!
> #
> class LE(tk.Frame):
> Â Â def __init__(self, master, **kw):
> Â Â Â Â tk.Frame.__init__(self, master)
> Â Â Â Â self.l = tk.Label(self, **kw)
> Â Â Â Â self.l.pack(side=LEFT)
> Â Â Â Â self.e = tk.Entry(self)
> Â Â Â Â self.e.pack(side=LEFT, fill=X, expand=YES)
> root = tk.Tk()
> root.title('Pro')
> for x in range(10):
> Â Â le = LE(root, text="Field_"+str(x))
> Â Â le.pack(fill=X, expand=YES)
> root.mainloop()
PS: The keywords argument should have been passed to the entry widget
and NOT the label. Yes, occasionally, even pros make subtle mistakes.
--
http://mail.python.org/mailman/listinfo/python-list
Re: which one do you prefer? python with C# or java?
On 10/06/12 22:40, Paul Rubin wrote: You might start with Abelson and Sussman's classic book: http://mitpress.mit.edu/sicp I know that, and it lies on my badtable for some time already, but I just never got enough excited about the idea yet. Python is just much more fun. Matěj -- http://mail.python.org/mailman/listinfo/python-list
Re: which one do you prefer? python with C# or java?
Matej Cepl writes: > I know that, and it lies on my badtable for some time already, but I > just never got enough excited about the idea yet. Python is just much > more fun. Here is an exercise from the book that you might like to try in Python: http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-24.html#%_idx_3894 It's not easy ;-) -- http://mail.python.org/mailman/listinfo/python-list
Re: Passing ints to a function
On Jun 9, 3:29 am, Jussi Piitulainen wrote: > Here's something you could have thought of for yourself even when you > didn't remember that Python does have special built-in support for > applying a function to a list of arguments: > > def five(func, args): > a, b, c, d, e = args > return func(a, b, c, d, e) > > The point is that the function itself can be passed as an argument to > the auxiliary function that extracts the individual arguments from the > list. Good point. However the function "five" is much too narrowly defined and the name is atrocious! I like concise, self-documenting identifiers. py> L5 = [1, 2, 3, 4, 5] py> L4 = [1, 2, 3, 4] py> def f4(a,b,c,d): print a,b,c,d py> def f5(a,b,c,d,e): print a,b,c,d,e py> def apply_five(func, args): a, b, c, d, e = args return func(a, b, c, d, e) py> apply_five(f5, L5) 1 2 3 4 5 py> apply_five(f5, L4) ValueError: need more than 4 values to unpack # # Try this instead: # py> def apply_arglst(func, arglst): return func(*arglst) py> apply_arglst(f4,L4) 1 2 3 4 py> apply_arglst(f5,L5) 1 2 3 4 5 ...of course you could create a general purpose apply function; like the one Python does not possess any longer ;-) -- http://mail.python.org/mailman/listinfo/python-list
Re: Pythonic cross-platform GUI desingers à la Interface Builder (Re: what gui designer is everyone using)
On Mon, Jun 11, 2012 at 5:37 AM, Dietmar Schwertberger
wrote:
> Chris Angelico wrote (in two posts):
>
>> There was a time when that was a highly advertisable feature - "build
>> XYZ applications without writing a single line of code!". I've seen it
>> in database front-end builders as well as GUI tools, same thing. But
>> those sorts of tools tend not to be what experts want to use. You end
>> up having to un-learn the "easy way" before you learn the "hard way"
>> that lets you do everything.
> This time is not over.
> Especially when you look at data acquisition and control applications
> where tools like Labview are widely used.
> Personally, I would not want to use such tools as I find it quite
> complicated to implement any logic with a graphical editor.
> But when you want to sell an alternative to such tools, then you
> should not offer a tool which makes it almost impossible for a
> typical engineer to create a simple GUI.
>
> [chomp lots of other examples - go read 'em in the original post :) ]
Either these people know how to write code, or they don't. If they do,
then building a simple GUI shouldn't be beyond them; if they don't
know that much code, then anything more than trivial _will_ be beyond
them. Here's the window building code from something I just knocked
together, with all comments stripped out:
object mainwindow=GTK2.Window(GTK2.WindowToplevel);
mainwindow->set_title("Timing")->set_default_size(400,300)->signal_connect("destroy",window_destroy);
GTK2.HbuttonBox
btns=GTK2.HbuttonBox()->set_layout(GTK2.BUTTONBOX_SPREAD);
foreach (labels,string lbl)
btns->add(buttons[lbl]=button(lbl,mode_change));
mainwindow->add(GTK2.Vbox(0,0)
->add(GTK2.TextView(buffer=GTK2.TextBuffer())->set_size_request(0,0))
->pack_start(btns,0,0,0))->show_all();
If you're a complete non-programmer, then of course that's an opaque
block of text. But to a programmer, it ought to be fairly readable -
it says what it does. I'm confident that anyone who's built a GUI
should be able to figure out what that's going to create, even if
you've never used GTK before. (And yes, it's not Python. Sorry. I
don't have a Python example handy.)
Modern UI toolkits are generally not that difficult to use. Add just a
few convenience functions (you'll see a call to a "button" function in
the above code - it creates a GTK2.Button, sets it up, and returns
it), and make a nice, well-commented configuration file that just
happens to be executed as Python, and you've made it pretty possible
for a non-programmer to knock together a GUI. They'll have learned to
write code without, perhaps, even realizing it.
ChrisA
--
http://mail.python.org/mailman/listinfo/python-list
Re: Strange Problem with pythonw.exe
> > Hello subscribers, > > > > I've recently encountered a strange problem with Python for Windows. > > I'm using Windows 7 Pro 64 Bit and Python 3.2.3 64 Bit (also tried 32 > > bit). The Problem is, that pythonw.exe does not work at all! > > Therefore no IDLE for me... But python.exe runs just fine. I ran > > Process Monitor, which showed some activity for pythonw.exe, but no > > window is coming up. > > It is not quite clear what you did here, but if you just run > pythonw.exe, you should not see anything, as the 'w' stands for > 'Windows', 'windowless', or 'with user interaction through a gui brought > up by the python program being run'. It make it hard to debug if no gui > is being brought up. > > > The problem isn't restricted to my main python > > installation. I have also tried running portable python and active > > state python. No pythonw.exe of them is working. Reinstallation > > didn't change anything. Windows firewall was deactivated, no > > difference. No firewall-software or any possibilities of blocking > > pythonw.exe. I couldn't find the problem online. My problem was > > triggered by using PyQt. I've loaded an .ui, which did NOT show up. I > > have Ne ver seen IDLE since that "crash". Advice anyone? > > I take it that IDLE *did* work before using PyQT. If this is correct (I > must admit, I hope so), I would ask the author of PyQT whether it or QT > does anything to the system that could persist across installs. The most > likely change to me would be in the registry. So if it were my machine, > I would fire up regedit, back up the registry, search it for 'pythonw', > look at the results, and perhaps delete all pythonw entries. > Then reinstall the core component. You might also try 3.3.0a4, which had > additional bug fixes, or go back to something like 3.2.0. > > -- > Terry Jan Reedy > Thank you for your help. I found the problem at some other place. The registry tweaks didn't solve it. But I found the hint to look up my .idlerc folder. So the problem was entirely IDLE related (yes, it worked before). But it wasnt PyQt'S problem, but the mapping of some keyboard command I made. I used the 'ü' key (german keyboard), which kept me from using IDLE for 4 days now... Deleting the %username%/.idlerc folder got the job done finally! Arthur J -- http://mail.python.org/mailman/listinfo/python-list
Re: [Q] How to specify options for 'setup.py install' by environment variable?
On Sun, Jun 10, 2012 at 3:51 PM, Ned Deily wrote: >> >> Thank you Ned, >> but I can't find environment variable name on that page which is >> equivarent to '--install-scripts' or other options. > > Sorry, I wasn't clear. Using the Distutils config files would be > instead of setting environment variables. For example, you could do > something like this: > > $ cat >$HOME/.pydistutils.cfg < [install] > prefix = local > install-scripts = local/bin > EOF > > That will apply globally whenever you run a Distutils script, unless it > is overridden by a $PWD/setup.cfg file with an [install] section. Thank you Ned, I'm clear. You mean that there is no environment variable equivarent to options, therefore I should create configuration file of distutils. I'll try it. Thank you. -- regards, makoto kuwata -- http://mail.python.org/mailman/listinfo/python-list
Re: Strange Problem with pythonw.exe
On 6/10/2012 7:39 PM, [email protected] wrote: Thank you for your help. I found the problem at some other place. The registry tweaks didn't solve it. But I found the hint to look up my .idlerc folder. So the problem was entirely IDLE related (yes, it worked before). But it wasnt PyQt'S problem, but the mapping of some keyboard command I made. I used the 'ü' key (german keyboard), which kept me from using IDLE for 4 days now... Deleting the %username%/.idlerc folder got the job done finally! I believe there is a patch, either on the tracker or applied since 3.2.3, to catch .idlerc problems and report to the user rather than quit. -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list
Re: Pythonic cross-platform GUI desingers à la Interface Builder (Re: what gui designer is everyone using)
On Jun 10, 4:52Â pm, Dietmar Schwertberger wrote: > Am 10.06.2012 08:16, schrieb rusi:> This is worth a read in this > context:http://osteele.com/archives/2004/11/ides > > > I've read the article. It presents some nice ideas, but probably the > author has not used Python before. > Otherwise he would have noticed that the overall productivity does not > only depend on language and IDE/editor, but on the complete environment > which in the case of Python includes the ability to use the interpreter > interactively. For many tasks that's a major productivity boost. > But that's a point that many people don't see because their current > language like C# or Java does not have an interpreter and when they > just look at the syntax, the find "there's not enough improvement to > switch". Full agreement here > > Also, I'm not sure whether the author counts the libraries as language > or tool feature. In my opinion the environment and the libraries should > be listed on their own in such an article. Libraries are developed > after the language, but usually they are ahead of the other tools/IDEs. That was my main point and the reason for referring to that article. If I may rephrase your points in OSteele's terminology: If python is really a "language maven's" language then it does not do very well: - its not as object-oriented as Ruby (or other arcana like Eiffel) - its not as functional as Haskell - its not as integrable as Lua - its not as close-to-bare-metal as C - etc Then why is it up-there among our most popular languages? Because of the 'batteries included.' And not having a good gui-builder is a battery (cell?) that is lacking. -- http://mail.python.org/mailman/listinfo/python-list
Re: which one do you prefer? python with C# or java?
On Jun 10, 6:40 pm, Matej Cepl wrote: > On 10/06/12 00:44, Yesterday Paid wrote: > > > I'm planning to learn one more language with my python. > > Just my personal experience, but after passively learning many many > languages, I came to the conclusion that I (and I suppose many others) > am able to learn only one platform well. The point is that you are never > interested in learning *a language*, everybody who has at least some > touch with programming can learn most languages in one session in the > afternoon. But nobody is interested in you knowing a language, you need > to know the platform with all libraries, standards, style, and culture. > And *that* demands you focus on one language completely. Hi Matěj! If this question is politically incorrect please forgive me. Do you speak only one (natural) language -- English? And if this set is plural is your power of expression identical in each language? Speaking for myself I can think of examples in Hindi, Marathi, Sanskrit and Tamil that when translated into English are so tame as to almost completely miss the point... -- http://mail.python.org/mailman/listinfo/python-list
Re: which one do you prefer? python with C# or java?
在 2012年6月10日星期日UTC+8上午6时44分44秒,Yesterday Paid写道: > I'm planning to learn one more language with my python. > Someone recommended to do Lisp or Clojure, but I don't think it's a > good idea(do you?) > So, I consider C# with ironpython or Java with Jython. > It's a hard choice...I like Visual studio(because my first lang is VB6 > so I'm familiar with that) > but maybe java would be more useful out of windows. > > what do you think? of course java is the best option in my opinion.There is no need to provide many evidences that java is better than c# because its advantages are really obvious.But java IDEs are not as convenient as visual studio. Anyway,it's on your choice.No matter what you option is,keeping going on it will make your skill more and more mature.Programming languages are just tools,programmer themselves are the key. -- http://mail.python.org/mailman/listinfo/python-list
Re: which one do you prefer? python with C# or java?
On Sun, 10 Jun 2012 21:46:50 -0700 (PDT) Broad Liyn wrote: > of course java is the best option in my opinion.There is no need to > provide many evidences that java is better than c# because its > advantages are really obvious. > Not as obvious as you'd imagine... I can't think of many. -- Corey Richardson -- http://mail.python.org/mailman/listinfo/python-list
