Re: Any speech to text conversation python library for Linux and mac box

2013-06-13 Thread Alan Gauld
On 13/06/13 04:59, Ranjith Kumar wrote: Hello all, I'm looking for speech to text conversation python library for linux and mac box, I found few libraries but non of them supports any of these platform. This list is for people learning the python language and standard library. If you are looki

Re: Pymongo Error

2012-06-19 Thread Alan Gauld
On 19/06/12 06:22, Ranjith Kumar wrote: I tried Django with Mongodb while running manage.py syncdb I endup with this error You might be better off trying a mongo forum./mailing list since this list is for Python beginners and focuses on the Python language and std library. Django is not in t

Re: Fall in love with bpython

2011-07-27 Thread Alan Gauld
Karim wrote: I use bpython interpreter. This is a very good interactive CLI. I had never heard of it and had to google for it. It appears to be a curses based CLI for *nix and MacOS I want to create a CLI with the same features than bpython. But the cmd std module seems no to be used in thi

Re: Python/New/Learn

2022-05-05 Thread Alan Gauld
On 05/05/2022 02:36, Patrick 0511 wrote: > Hello, I'm completely new here and don't know anything about python. Do you know any other programming languages? That makes a huge difference in what you should start with! > Can someone tell me how best to start? > So what things should I learn first

Re: an oop question

2022-10-31 Thread Alan Gauld
On 30/10/2022 14:01, Julieta Shem wrote: > I wrote the classes > > class Empty: > ... > class Pair: > ... > > (*) How to build a stack? > > These Lisp-like sequences are clearly a stack. That is a very important observation. A Pair IS-A Stack(sort of). If you had a stack you coul

Re: an oop question

2022-11-02 Thread Alan Gauld
On 01/11/2022 17:58, Julieta Shem wrote: > nowhere in trying to detect in high-precision what is OOP and what is > not. Stefan has given a good answer but essentially OOP is a program that is structured around objects communicating by sending messages to one another. Objects are, in most (but n

Re: [correction]an oop question

2022-11-02 Thread Alan Gauld
On 02/11/2022 20:21, Dennis Lee Bieber wrote: >> shows that in Python we do *not* need subclassing/inheritance >> for polymorphism! >> > To me, that is not really an example of polymorphism, but more an > example of Python's "duck typing". But duck typing is a perfectly good implementatio

Re: an oop question

2022-11-03 Thread Alan Gauld
On 03/11/2022 00:25, Julieta Shem wrote: >> |OOP to me means only messaging, local retention and protection and >> |hiding of state-process, and extreme late-binding of all things. > > I'm wondering how Python fails to satisfy his definition. Python doesn't do any form of data protection/hiding.

Re: an oop question

2022-11-03 Thread Alan Gauld
On 03/11/2022 18:29, Chris Angelico wrote: > On Fri, 4 Nov 2022 at 05:21, Julieta Shem wrote: >> >> Chris Angelico writes: >> >>> On Thu, 3 Nov 2022 at 21:44, Alan Gauld wrote: >>>> Also Python is not a purely OOP language, in that you can write >&g

Re: Does one have to use curses to read single characters from keyboard?

2022-12-12 Thread Alan Gauld
On 11/12/2022 21:07, dn wrote: > On 11/12/2022 23.09, Chris Green wrote: >> Is the only way to read single characters from the keyboard to use >> curses.cbreak() or curses.raw()? If so how do I then read characters, >> it's not at all obvious from the curses documentation as that seems to >> think

Re: Does one have to use curses to read single characters from keyboard?

2022-12-13 Thread Alan Gauld
On 12/12/2022 17:45, Alan Gauld wrote: Absolutely nothing apparently! But in practce I did pen some esponses to Davids post. However this list seems to strip out what I've written, its happened a few times now. Not every time but enough that I rarely post here. But I'll try once mor

Re: String to Float, without introducing errors

2022-12-17 Thread Alan Gauld
On 17/12/2022 11:51, Paul St George wrote: > I have a large/long array of numbers in an external file. The numbers look > like this: > > -64550.727 > -64511.489 > -64393.637 > -64196.763 > -63920.2 > When I bring the numbers into my code, they are Strings. To use the > numbers in my code, I wan

Re: NoneType List

2022-12-31 Thread Alan Gauld
On 31/12/2022 05:45, Goran Ikac wrote: > b = a.append(3) > I mean: why b = a.append(something) is the None type, and how to make a new > list that contains all the items from a and some new items? append() like many other collection methods in Python works in place and returns None. But the act

Re: RE: NoneType List

2023-01-02 Thread Alan Gauld
On 02/01/2023 02:14, avi.e.gr...@gmail.com wrote: > I used PASCAL before C and I felt like I was wearing a straitjacket at times > in PASCAL when I was trying to write encryption/decryption functions and had > to find ways to fiddle with bits. Similar things were easy in C, and are > even easier in

Re: Usenet vs. Mailing-list (was: evaluation question)

2023-01-31 Thread Alan Gauld
On 28/01/2023 21:36, Dennis Lee Bieber wrote: > Now -- last time I checked the gmane server says posting is prohibited. > I used to use gmane as it retrieved directly from the mailing list I still use gmane but its no posting thing is a pain because responding (or posting new stuff) is a n

Re: TypeError: can only concatenate str (not "int") to str

2023-02-26 Thread Alan Gauld
On 26/02/2023 00:54, Greg Ewing via Python-list wrote: > On 26/02/23 10:53 am, Paul Rubin wrote: >> I'm not on either list but the purpose of the tutor list is to shunt >> beginner questions away from the main list. I'm not sure that's why we set it up but it is certainly a large part of our remit

Re: Which more Pythonic - self.__class__ or type(self)?

2023-03-03 Thread Alan Gauld
On 02/03/2023 20:54, Ian Pilcher wrote: > Seems like an FAQ, and I've found a few things on StackOverflow that > discuss the technical differences in edge cases, but I haven't found > anything that talks about which form is considered to be more Pythonic > in those situations where there's no funct

Re: RE: Which more Pythonic - self.__class__ or type(self)?

2023-03-04 Thread Alan Gauld
On 04/03/2023 17:38, avi.e.gr...@gmail.com wrote: > > Of course each language has commonly used idioms > That's the point, the correct term is probably "idiomatic" rather than "pythonic" but it is a defacto standard that idiomatic Python has become known as Pythonic. I don't think that's a prob

Re: Lambda returning tuple question, multi-expression

2023-03-09 Thread Alan Gauld
On 08/03/2023 21:56, aapost wrote: > When making a UI there are a lot of binding/trace operations that need > to occur that lead to a lot of annoying 1 use function definitions. I > don't really see lambda use like below. Lambdas are very common in GUI callbacks but I admit I've never seen tuple

Fwd: Friday finking: IDE 'macro expansions'

2023-03-17 Thread Alan Gauld
Oops! I meant to send this to the group not just Dave. Forwarded Message On 16/03/2023 22:55, dn via Python-list wrote: > Do you make use of your IDE's expansionist tendencies, and if-so, which > ones? When I'm writing Java/C++/C# yes, I need all the IDE help I can get. Netb

Re: Fwd: Friday finking: IDE 'macro expansions'

2023-03-18 Thread Alan Gauld
On 17/03/2023 17:55, Thomas Passin wrote: >> I used Delphi and Smalltalk/V which both pretty much only exist within >> their own IDEs and I used their features extensively. > > Back when Delphi first came out, when I first used it, I don't remember > any IDE; one just used a text editor. I thin

Re: Fwd: Friday finking: IDE 'macro expansions'

2023-03-18 Thread Alan Gauld
On 18/03/2023 12:15, Peter J. Holzer wrote: >> I think you might be meaning TurboPascal, Delphi's forerunner. It just >> had a compiler and text editor. > > I'd still classify Turbo Pascal as an IDE. It wasn't a standalone > compiler you would invoke on source files you wrote with some other It

Re: Windows installer from python source code without access to source code

2023-03-31 Thread Alan Gauld
On 31/03/2023 13:00, Jim Schwartz wrote: > I want a windows installer to install my application that's written in > python, but I don't want the end user to have access to my source code. Others have commented that at some level it will always be thre but on a more pragmatic level tools like py2

Re: Windows Gui Frontend

2023-04-01 Thread Alan Gauld
On 01/04/2023 18:21, Jim Schwartz wrote: > Are there any ide’s that will let me design the screen and convert it to > python? There is nothing remotely like the VB or Delphi GUI builders. There are some tools somewhat similar to the Java Swing and FX GUI builders with varying degrees of buggine

Re: Weak Type Ability for Python

2023-04-13 Thread Alan Gauld
On 13/04/2023 20:35, Chris Angelico wrote: > REXX - where everything is a string, > It was quite the experience back in the day (as OS/2's native > scripting language), I briefly met REXX on a mainframe, but I did play with OS/2 for a year or two. Back when it looked like it might be a rival to

Re: RE: Weak Type Ability for Python

2023-04-13 Thread Alan Gauld
On 14/04/2023 00:25, avi.e.gr...@gmail.com wrote: > Is there any concept in Python of storing information in some way, such as > text, and implementing various ideas or interfaces so that you can query if > the contents are willing and able to be viewed in one of many other ways? Are you talking

Re: tksheet - Copy and Paste with headers

2023-04-16 Thread Alan Gauld
> 在 2023/4/15 2:33, angela vales 写道: >> I have recently created a tkinter app and need the ability to copy and > paste data from tksheet table into an Excel file. First thanks for drawing my attention to tksheet. I've long been desiring a decent table widget in tkinter and was on the verge of t

Re: PyCharm's strict PEP and not so strict?

2023-04-19 Thread Alan Gauld
On 19/04/2023 10:51, Kevin M. Wilson via Python-list wrote: >  I'm in a bit of a quandary, I want some strict syntax errors to be flagged, OK, You might want to use a "linter" in that case because most tools use the interpreter itself to flag syntax errors. > but the use of single quotes vs dou

Re: Python curses missing form library?

2023-04-24 Thread Alan Gauld
On 24/04/2023 17:26, Grant Edwards wrote: > Does the Python curses support in the standard library not include > support for the curses form library? It seems to include support for > the panel library, but I can't find any mention of the form library. I don't believe so. If you are building termi

Re: [pygettext] --package-name and --package-version unknown

2023-05-04 Thread Alan Gauld
On 04/05/2023 22:38, c.bu...@posteo.jp wrote: > Hello, > > am I right to assume that "pygettext" is part of the official Python3 > "package"? So it is OK to aks here? > No it doesn't appear to be. It is not listed in the standard library. It is mentioned in the documentation for gettext which i

Re: What to use instead of nntplib?

2023-05-16 Thread Alan Gauld
On 15/05/2023 22:11, Grant Edwards wrote: > I got a nice warning today from the inews utility I use daily: > > DeprecationWarning: 'nntplib' is deprecated and slated for removal in > Python 3.13 > > What should I use in place of nntplib? I'm curious as to why nntplib is deprecated? Surely t

Re: What to use instead of nntplib?

2023-05-16 Thread Alan Gauld
On 16/05/2023 10:06, Cameron Simpson wrote: >> I'm curious as to why nntplib is deprecated? Surely there are still a >> lot of nntp servers around, both inside and outside corporate firewalls? >> Is there a problem with the module or is it just perceived as no longer >> required? > > See PEP 594:

Re: Silly (maybe) question re imported module(s)

2023-05-19 Thread Alan Gauld
On 19/05/2023 07:44, Grizzy Adams via Python-list wrote: > when typed in console or editor and run with F5 (which saves before it can > run) > > But sometimes saved work (albeit small) when imported does not work any longer Looks like you are using IDLE? If so, it's possible that in the origin

Re: Silly (maybe) question re imported module(s)

2023-05-19 Thread Alan Gauld
On 19/05/2023 13:36, Grizzy Adams wrote: >> Looks like you are using IDLE? > > Yes > > > From consol > import cube cubes > Traceback (most recent call last): > File "", line 1, in > cubes > NameError: name 'cubes' is not defined You imported cube but tried to use cubes. I'm

Re: Silly (maybe) question re imported module(s)

2023-05-19 Thread Alan Gauld
On 19/05/2023 19:46, Grizzy Adams wrote: > Tried that > RESTART: D:\Shades\Tools\Python\Temp\cube.py cubes() > Traceback (most recent call last): > File "", line 1, in > cubes() > TypeError: 'list' object is not callable Ah, now I understand. cubes is

Fwd: Re: sum() vs. loop

2021-10-12 Thread Alan Gauld
On 10/10/2021 09:49, Steve Keller wrote: > I have found the sum() function to be much slower than to loop over the > operands myself: > > def sum_products(seq1, seq2): > return sum([a * b for a, b in zip(seq1, seq2)]) > > def sum_products2(seq1, seq2): > sum = 0 > for a, b in zip(seq1, seq2): > s

Re: Advanced ways to get object information from within python

2021-12-23 Thread Alan Gauld
On 23/12/2021 11:01, Julius Hamilton wrote: > Lastly, the "help" function. > > I find "help" to similarly be a situation of information overload. I assume you know that you can target help() to the specific attribute or function you need not just the top level classes? So combined with dir() yo

Fwd: Re: Long running process - how to speed up?

2022-02-19 Thread Alan Gauld
On 19/02/2022 11:28, Shaozhong SHI wrote: > I have a cvs file of 932956 row That's not a lot in modern computing terms. > and have to have time.sleep in a Python > script. Why? Is it a requirement by your customer? Your manager? time.sleep() is not usually helpful if you want to do things qui

Python app on a Mac

2022-04-15 Thread Alan Gauld
I've just migrated from a Linux PC to a Mac mini running Monterey. I have a Python GUI(Tkinter) app that I wrote on Linux and have managed to get working on MacOS except When I start the program I get a Terminal window as well as the GUI. On Windows I'd run it with pythonw and in Linux I jus

Re: Python app on a Mac

2022-04-15 Thread Alan Gauld
On 15/04/2022 19:53, MRAB wrote: >> When I start the program I get a Terminal window as well >> as the GUI. On Windows I'd run it with pythonw and in Linux >> ... >> Does anyone know how to launch a Python program from the >> desktop without a Terminal window (or at least with an >> iconified on

Re: [Tutor] need a tutorial in tokens ,different types

2005-11-20 Thread Alan Gauld
> could any one suggest me tutorials in different tokenizations and > clear describtion of how can i use token type and assign diff attributes > to tokens What kind of tokens? Are we talking l;exical tokens in a parser or security tokens or what? > also good tutorials in diff data types in

Re: Complementary language?

2005-01-01 Thread Alan Gauld
On Sat, 25 Dec 2004 18:40:31 -0500, HackingYodel <[EMAIL PROTECTED]> wrote: > Hello all! I'm learning to program at home. I can't imagine a better > language than Python for this. The ideal situation, for me, would be to > study two languages at the same time. Probably sounds crazy, but it >

Re: The Industry choice

2005-01-01 Thread Alan Gauld
On Sat, 01 Jan 2005 16:08:07 GMT, [EMAIL PROTECTED] (Cameron Laird) wrote: > I argue that it's a false opposition to categorize projects in > terms of use of single languages. Many projects are MUCH better > off with a mix In practice I have *never* worked on an industrial scale project that on

Re: What can I do with Python ??

2005-01-01 Thread Alan Gauld
On Sat, 1 Jan 2005 21:57:32 +0100, BOOGIEMAN < > (let's say C#). Can you make fullscreen game with it (for example) ? You can but please don't! Make your game run fast in a window. I hate fascist games programmers who insist on monopolising a 21 inch 1600x1200 display and assuming I have nothing

Re: screen clear question

2005-01-02 Thread Alan Gauld
On Sun, 02 Jan 2005 14:23:07 +0800, Craig Ringer <[EMAIL PROTECTED]> wrote: > On Sun, 2005-01-02 at 11:31, jcollins wrote: > > Is there a command in Python to clear the screen? That is without writing > > multiple blank lines. > > Without knowing what 'screen' you're talking about, it's hard to s

Re: Frameworks for "Non-Content Oriented Web Apps"

2005-01-02 Thread Alan Gauld
On 1 Jan 2005 20:51:06 -0800, [EMAIL PROTECTED] wrote: > Is there something that can ease the development of application that > are not content oriented(I call them "NON CONTENT-ORIENTED WEB > APPLICATIONS" because I don't know what else to call them). I mean the > applications like, accounting, h

Re: screen clear question

2005-01-02 Thread Alan Gauld
On Mon, 03 Jan 2005 02:15:23 +1000, Nick Coghlan > Alan Gauld wrote: > > But the bottom line is that there is no builtin command > > because the mechanism is different on each platform. > > I'd have said it was because the inpreter is line-oriented rather than &

Re: Securing a future for anonymous functions in Python

2005-01-06 Thread Alan Gauld
On Thu, 30 Dec 2004 23:28:46 +1000, Nick Coghlan <[EMAIL PROTECTED]> wrote: > GvR has commented that he want to get rid of the lambda keyword for Python > 3.0. > Getting rid of lambda seems like a worthy goal, Can I ask what the objection to lambda is? 1) Is it the syntax? 2) Is it the limita

Re: Securing a future for anonymous functions in Python

2005-01-07 Thread Alan Gauld
On Thu, 06 Jan 2005 21:02:46 -0600, Doug Holton <[EMAIL PROTECTED]> wrote: > used, but there are people who do not like "lambda": > http://lambda-the-ultimate.org/node/view/419#comment-3069 > The word "lambda" is meaningless to most people. Of course so is "def", > which might be why Guido van Ro

Re: Securing a future for anonymous functions in Python

2005-01-07 Thread Alan Gauld
On Fri, 07 Jan 2005 08:44:57 -0700, Steven Bethard <[EMAIL PROTECTED]> wrote: > > The unfamiliar argument doesn't work for me. After all most > > people are unfamiliar with complex numbers (or imaginary) numbers > > complex numbers. Lambdas, on the other hand, show up in all kinds of > code, and

Re: Automatic Windows printer creation?

2005-01-23 Thread Alan Gauld
On Wed, 19 Jan 2005 14:35:22 -0500, "GMane Python" <[EMAIL PROTECTED]> wrote: > Anyone know if there's a module which will allow me to 'create' windows > printer definitions? Not from a Windows domain network, but just to add a > printer that sends to a jet-direct-attached printer. The easiest w

Re: how to ncurses on win32 platform

2005-01-24 Thread Alan Gauld
On Mon, 24 Jan 2005 17:06:52 +0100, Brane <[EMAIL PROTECTED]> wrote: > please advice You can use ncurses via cygwin. There are DOS ports too but I couldn't get any of them to work on my XP box, YMMV... Search the Vaults of Parnassus for the DOS Stuff. Alan G. Author of the Learn to Program webs

Re: Advice on OSX cocoa app with Python backend

2005-02-02 Thread Alan Gauld
On Tue, 01 Feb 2005 12:12:15 -0500, Socheat Sou <[EMAIL PROTECTED]> wrote: > the RDBMS, but some have suggested looking into OODBMS, like PostgreSQL, > but from what I know of OODBMS they don't seem like the right fit for > this project. Calling PostGres an OODBMS might be stretching it a wee bit,

Re: noob question

2005-06-27 Thread Alan Gauld
"Matt Hollingsworth" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Very new to python, so a noob question. When I've written stuff in > JavaScript or MEL in the past, I've always adopted the variable naming > convention of using a $ as the first character (no, I don't use perl, Ca

Re: Life of Python

2005-06-27 Thread Alan Gauld
"Uwe Mayer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > con: If you are planning larger applications (for a reasonable value of > "large") you have to discipline yourself to write well structured code. As always. > Then you will want to specify interfaces, accessor functions wi

Ann: New SQL topic in Tutorial

2005-09-19 Thread Alan Gauld
I've added the fist in a series of planned new topics to my online tutorial. It's on using databases and covers SQLite and the Python DB API. Since I'm no expert on either topic (an Oracle and Interbase user from C++) any feedback is welcomed. http://www.freenetpages.co.uk/hp/alan.gauld/tutdbms.h

Re: Python and Unix Commands

2005-09-19 Thread Alan Gauld
> I have a question relating to how Unix commands can be issued > from > Python programs. There are numerous methods including the commands module that you have already discovered, the os.system() call and the various os.popen/os.execXX calls. Also Python 2.4 has introduced the subprocess modu

lambda strangeness??

2005-02-27 Thread Alan Gauld
I was playing with lambdas and list compregensions and came across this unexpected behaviour: >>> adds = [lambda y: (y + n) for n in range(10)] >>> adds[0](0) 9 >>> for n in range(5): print adds[n](42) ... 42 43 44 45 46 >>> adds[0](0) 4 Can anyone explain the different answers I'm getting? FWIW

Re: lambda strangeness??

2005-02-27 Thread Alan Gauld
On Sun, 27 Feb 2005 09:07:28 + (UTC), Alan Gauld <[EMAIL PROTECTED]> wrote: > >>> adds = [lambda y: (y + n) for n in range(10)] > >>> adds[0](0) > 9 > >>> for n in range(5): print adds[n](42) > ... > 42 > 43 > the for loop... It seem

Re: lambda strangeness??

2005-02-28 Thread Alan Gauld
On Sun, 27 Feb 2005 09:39:49 GMT, Roel Schroeven <[EMAIL PROTECTED]> wrote: > adds = [lambda y: (y + n) for n in range(10)] > You're picking it up not as y but as n, since n in the lambda is > evaluated when you call the lambde, not when you define it. > >>> for n in range(10): > def f

Re: Newbie question

2005-02-28 Thread Alan Gauld
On Mon, 28 Feb 2005 16:17:03 +0200, "Ryan White" <[EMAIL PROTECTED]> wrote: > How do I display an image in Python? - I've run over Tkinter, but obviously > in all the wrong places. Someone else suggested PIL. But in Tkinter you create a PhotoImage object then insert it into either a Canvas or a

Re: windows bat file question

2005-03-04 Thread Alan Gauld
On 4 Mar 2005 10:18:08 GMT, Duncan Booth <[EMAIL PROTECTED]> wrote: > You will find even more information if you try 'set /?' or 'for /?' at a > command prompt. As you say, you can now do quite complicated scripting in > command files but it needs masochism second only to Perl programming. And u

Re: survey

2005-03-04 Thread Alan Gauld
On Fri, 4 Mar 2005 14:14:05 -0800 (PST), Dave Zhu <[EMAIL PROTECTED]> wrote: > Is there any survey on scripting languages? I would > like to get information on several scripting languages > including Python, Perl, Ruby, Tcl, etc. There are several such comparisons on the web but most will natural

Re: teaching OO

2004-12-06 Thread Alan Gauld
On 24 Nov 2004 18:31:13 GMT, Gabriel Zachmann <[EMAIL PROTECTED]> wrote: > You know, I keep wondering exactly what we will be teaching as programming > languages become easier and easier to learn. > > Programming itself? -- won't be enough for a whole semester. Oh no way. You could teach a whole

Re: BASIC vs Python

2004-12-18 Thread Alan Gauld
On Sat, 18 Dec 2004 08:41:46 +0100, Gregor Horvath <[EMAIL PROTECTED]> wrote: > That means that you can set a breakpoint. While the debugger stops you > can edit the sourcecode (to some extent) without stopping program > execution and let the interpreter run this new code without restarting > t

Re: BASIC vs Python

2004-12-19 Thread Alan Gauld
OK, I'll play... > > Productive in? C, C++, Pascal (inc OP/Delphi/Kylix), Python, PL/Sql, 80x86 assembler > > Familiar enough to at least produce code in? awk, perl, Java, ksh, Lisp, Logo, VBScript, Javascript, Tcl, DOS batch, SDL > You forgot an important category here. Can debug, if

Re: Language fluency (was Re: BASIC vs Python)

2004-12-20 Thread Alan Gauld
On 19 Dec 2004 16:22:03 -0500, [EMAIL PROTECTED] (Aahz) wrote: > >I'm curious about that last statement. Are you saying that if you > >write, full time, code for "production", that fluency will decrease? Or > >that the nifty recent features of Python (generators, etc.) are not > >useful in "produc

Re: BASIC vs Python

2004-12-20 Thread Alan Gauld
> >>> was too late). A machine designed to be run on Forth would have been > >>> unbelievably powerful from the late 70s to the mid 90s (it would be > >>> more painful now than the x86 legacy, but still). A small data point here is that Sun still use Forth in their Sparc workstations. Their syste

Re: BASIC vs Python

2004-12-21 Thread Alan Gauld
On Tue, 21 Dec 2004 16:26:57 GMT, Scott Robinson <[EMAIL PROTECTED]> wrote: Speaking of Forth... > was making the point it would be good for general purpose. I suspect > that it would quickly run up against memory limitations and would go > no faster than the machine driving the memory market (wit

Re: Lambda going out of fashion

2004-12-23 Thread Alan Gauld
On Thu, 23 Dec 2004 14:13:28 +1000, Stephen Thorne <[EMAIL PROTECTED]> wrote: > I'm a little worried about the expected disappearance of lambda in > python3000. I've had my brain badly broken by functional programming > in the past, and I would hate to see things suddenly become harder > than they

Re: Lambda going out of fashion

2004-12-23 Thread Alan Gauld
On 22 Dec 2004 23:21:37 -0800, [EMAIL PROTECTED] wrote: > but if lambda keyword is removed, I swear I will not use the python > anymore. While I would be dissappointed to lose lambda, I think losing Python would hurt me a lot more! After all we aren't losing functionality here, just adding sonme

Re: BASIC vs Python

2004-12-24 Thread Alan Gauld
On Fri, 24 Dec 2004 12:30:15 +, Alan Kennedy <[EMAIL PROTECTED]> wrote: > [Alan Gauld] > > I dunno. Here in the UK there was a small home computer called (I > > think) the Oric(*) > I'm afraid your memory fails you ... > > The Oric-1 had a keyboard

Re: The Industry choice

2004-12-31 Thread Alan Gauld
On 30 Dec 2004 08:58:36 -0800, "Sridhar R" <[EMAIL PROTECTED]> wrote: > What makes such companies to choose Java over dynamic, productive > languages like Python? Are there any viable, technical reasons for > that? Decisions are made by men in suits who read very expensive business magazines, re

Re: which book to read next??

2014-04-21 Thread Alan Gauld
On 21/04/14 15:13, lee wrote: Hi, I have read the book 'a byte of python' and now I want to read another book. But I just get confused about which one to read next. There is a book list below: 1, pro python 2, python algorithms 3, python cookbook 4, the python standard library by examples which o

Re: Question About Image Processing in Python

2015-05-28 Thread Alan Gauld
On 28/05/15 11:34, Serge Christian Ibala wrote: I want to know which version of Python is compatible (or can be associated with which version of which "tools or package" for image processing) It would help if you told us what kind of image processing. If you mean programmatic manipulation of i

Re: try/exception - error block

2014-08-03 Thread Alan Gauld
On 03/08/14 18:52, bruce wrote: but in all that.. no one could tell me .. why i'm not getting any errs/exceptions in the err file which gets created on the exception!!! Does the file actually get created? Do you see the print statement output - are they what you expect? Did you try the things

Re: [Tutor] Convert Qstring to string in windows

2014-10-16 Thread Alan Gauld
On 16/10/14 19:14, Danny Yoo wrote: need more information. But I think you may get better help on a Qt-specific mailing list; I suspect very few of us here have Qt experience. There are at least 2 Python Qt mailing lists and also two for Side which is Nokia's public domain fork of Qt. That's

Re: What is the difference between "new Class()" and "Class()"?

2011-11-20 Thread Alan Gauld
On 20/11/11 21:16, Herman wrote: What is so special about the "new" operator? Assuming you mean the __new__() method? __new__() gets called when the class is being constructed, it returns the new instance. It is the real Pyhon constructor. As opposed to __init__() which is called after the

Re: Top Programming Languages of 2013

2007-10-07 Thread Alan Gauld
"Dick Moores" <[EMAIL PROTECTED]> wrote > > Interesting, but I'm not sure what the criteria for "top" is. Is it a measure of power, popularity, usage? Scary that HTML/CSS should be so high though given its not a programming language at all! Ala

Re: Traversing python datatypes via http

2008-02-05 Thread Alan Gauld
e a set of indices that will allow you to iterate by more unusual step sizes And you can use normal indexing to go to the first element(0) or the last element(-1) I'm not sure if that answers your question. -- Alan Gauld Author of the Learn to Program web site http://www.freenetpage

Re: [Tutor] Having Issues with CMD and the 'python' command

2008-12-15 Thread Alan Gauld
"bob gailer" wrote Try this: Start->Settings->Control Panel->System->Advanced->Environment Variables Highlight PATH under System Variables & Click Edit. Add ;C:\python26 And notice that Bob said ADD - DO NOT REPLACE the existing setting or you will likely break stuff and its not easy to fi

Re: Help with my program

2009-10-23 Thread Alan Gauld
ects should do it to themselves" Otherwise known as the Law of Demeter. HTH, -- Alan Gauld Author of the Learn to Program web site http://www.alan-g.me.uk/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Python-os. Command Execution

2011-02-19 Thread ALAN GAULD
> when user click install, It will start one GUI installation script and > exit my application > > This my task.. The problem was the installation script started but > control will be transfered to > > other window ... when installation finished the GUI application will be >closed.. > > c

Re: Arguments from the command line

2010-09-06 Thread Alan Gauld
; as the commit name) Take a look at the Talking to the User topic in my tutorial which has a section on reading command line arguments. Interestingly, most of the queries I get on that section are from GUI users who don't understand the concept of command line arguments! :-) -- Alan G

Re: Commercial or Famous Applicattions.?

2010-11-08 Thread Alan Gauld
here. HTH, -- Alan Gauld Author of the Learn to Program web site http://www.alan-g.me.uk/ -- http://mail.python.org/mailman/listinfo/python-list

Fwd: Re: AUTO EDITOR DIDN'T WORK

2023-06-12 Thread Alan Gauld via Python-list
On 12/06/2023 10:26, Real Live FootBall Tv via Python-list wrote: > I did it because I was going to use it with another application, A VIDEO > EDITING APP, Auto EDITOR but it didn't work for some reasons unknown to me. You need to define "didn't work" Did it work as a python interpreter? ie. Di

Fwd: AUTO EDITOR DIDN'T WORK

2023-06-13 Thread Alan Gauld via Python-list
d and reinstalled about twice and still no success hence I uninstalled it. On Mon, 12 Jun 2023, 23:33 Alan Gauld via Python-list, mailto:python-list@python.org>> wrote: On 12/06/2023 10:26, Real Live FootBall Tv via Python-list wrote: > I did it because I was going to use it with another

Re: Fwd: AUTO EDITOR DIDN'T WORK

2023-06-15 Thread Alan Gauld via Python-list
On 15/06/2023 08:58, Real Live FootBall Tv via Python-list wrote: > I have followed the instructions given on how to install the app. What I > needed was an application to cut of silence from my video and I saw auto > editor demonstrated as one of the applications that could do that. It does > cut

Re: Multiple inheritance and a broken super() chain

2023-07-04 Thread Alan Gauld via Python-list
On 03/07/2023 19:39, Chris Angelico via Python-list wrote: > On Tue, 4 Jul 2023 at 03:39, Peter Slížik via Python-list >> The legacy code I'm working with uses a classic diamond inheritance. > What happens when Top is initialized twice? This seems like a problem > waiting to happen, and when you

Re: Multiple inheritance and a broken super() chain

2023-07-05 Thread Alan Gauld via Python-list
On 05/07/2023 01:27, Chris Angelico via Python-list wrote: >> So I'm curious about how big this "big problem with MI" is in > > Who said it's a big problem with MI? I think it's a very common perception, particularly with newer programmers who have never used it in anger. Any time anyone discus

Re: Why do I always get an exception raised in this __init__()?

2023-09-01 Thread Alan Gauld via Python-list
On 31/08/2023 22:15, Chris Green via Python-list wrote: > class Gpiopin: > > def __init__(self, pin): > # > # > # scan through the GPIO chips to find the line/pin we want > # > for c in ['gpiochip0', 'gpiochip1', 'gpioch

Re: Why doc call `__init__` as a method rather than function?

2023-09-15 Thread Alan Gauld via Python-list
On 15/09/2023 11:49, scruel tao via Python-list wrote: > ```python class A: > ... def __init__(self): > ... pass > On many books and even the official documents, it seems that > many authors prefer to call `__init__` as a "method" rather > than a "function". That' because in OOP term

Re: Question(s)

2023-10-24 Thread Alan Gauld via Python-list
On 24/10/2023 22:51, Grant Edwards via Python-list wrote: >>> Is there a way to verify that a program is going to do what it is >>> supposed to do even before all the hardware has been assembled and >>> installed and tested? > And the specified customer requirements are usually wrong too. Sure, >

Re: Question(s)

2023-10-24 Thread Alan Gauld via Python-list
On 25/10/2023 00:08, o1bigtenor via Python-list wrote: > So how does one test software then? Testing is very different to proving! As an industry we do a lot of testing at many different levels. On bigger projects you'll find: - Unit tests - testing small fragments of a bigger program - Integrati

Re: Question(s)

2023-10-25 Thread Alan Gauld via Python-list
On 25/10/2023 12:44, o1bigtenor via Python-list wrote: > Haven't heard of a python IDE - - - doesn't mean that there isn't such - - There are literally dozens with varying degrees of smartness. The big 4 all have Python plugins/environments: Eclipse, Netbeans, VisualStudio, IntelliJ And of cours

Re: xor operator

2023-11-13 Thread Alan Gauld via Python-list
On 14/11/2023 00:33, Mats Wichmann via Python-list wrote: > Hardware and software people may have somewhat different views of xor I've come at it from both sides. I started life as a telecomms technician and we learned about xor in the context of switching and relays and xor was a wiring configura

Re: Newline (NuBe Question)

2023-11-15 Thread Alan Gauld via Python-list
On 15/11/2023 07:25, Grizzy Adams via Python-list wrote: > for s in students: > grades.append(s.school) > grades.append(s.name) > grades.append(s.finalGrade()) > if s.finalGrade()>82: > grades.append("Pass") >

Amy known issues with tkinter /ttk on latest MacOS?

2023-11-16 Thread Alan Gauld via Python-list
I have a little app that I wrote ages ago (2015) using tkinter/ttk and it just works. Or it did, up until the latest MacOS version upgrade and now it has become very sporadic in response to mouse clicks. For example I have a drop-down list and I can drop the list but then it won't let me select an

Re: Amy known issues with tkinter /ttk on latest MacOS?

2023-11-19 Thread Alan Gauld via Python-list
On 17/11/2023 03:38, Terry Reedy wrote: > There have been other reports on the cpython issue tracker than Sonoma > broke bits of tk behavior. > https://github.com/python/cpython/issues?q=is%3Aissue+label%3AOS-mac+is%3Aclosed > > shows a couple Thanks Terry, I had a browse and it seems I'm no

Exploring terminfo

2021-01-14 Thread Alan Gauld via Python-list
During lockdown I've been digging deeper into the curses module and lately into the ti family of functions that reside there. I've written a short program that is supposed to - *clear the screen*, - read some input - display the result in a message *highlighted in bold*. - get input to end the

  1   2   3   >