Re: Find the path of a shell command

2022-10-12 Thread Joe Pfeiffer
Cameron Simpson writes: > On 12Oct2022 20:54, Jon Ribbens wrote: >>On 2022-10-12, Jon Ribbens wrote: >>> On 2022-10-12, Joe Pfeiffer wrote: >>>> Jon Ribbens writes: >>>>> on Amazon Linux: >>>>> >>>>> $

Re: Find the path of a shell command

2022-10-12 Thread Joe Pfeiffer
Jon Ribbens writes: > On 2022-10-12, Michael F. Stemper wrote: >> On 12/10/2022 07.20, Chris Green wrote: >>> ... and rm will just about always be in /usr/bin. >> >> On two different versions of Ubuntu, it's in /bin. > > It will almost always be in /bin in any Unix or Unix-like system, > because

Re: SyntaxError: multiple statements found while compiling a single statement

2022-08-07 Thread Joe Pfeiffer
Sohail Ahmad writes: > kindly please help me about issues > SyntaxError: multiple statements found while compiling a single statement > how to solve this issues Please post the code that got the error. Preferably several lines before the actual error, and the line with the error itself. -- h

Re: Functionality like local static in C

2022-04-14 Thread Joe Pfeiffer
Cecil Westerhof writes: > In C when you declare a variable static in a function, the variable > retains its value between function calls. > The first time the function is called it has the default value (0 for > an int). > But when the function changes the value in a call (for example to 43), > t

Re: doubt About import machine

2021-11-21 Thread Joe Pfeiffer
Daniel Eduardo Almeida Correa writes: > Hello, I'm trying to use the machine library in python 3.10 version, but I > can't import it with the pip install machine, could you tell me a way to > solve it or a python version compatible with the library? Thank you a lot > for your answer. The "machi

Re: XML Considered Harmful

2021-09-21 Thread Joe Pfeiffer
r...@zedat.fu-berlin.de (Stefan Ram) writes: > - S expressions (i.e., LISP notation) If you're looking at hierarchical data and you don't have some good reason to use something else, this is very likely to be your simplest option. -- https://mail.python.org/mailman/listinfo/python-list

Re: XML Considered Harmful

2021-09-21 Thread Joe Pfeiffer
Eli the Bearded <*@eli.users.panix.com> writes: > In comp.lang.python, Michael F. Stemper wrote: >> I've heard of JSON, but never done anything with it. > > You probably have used it inadvertantly on a regular basis over the > past few years. Websites live on it. If the user has any interaction

Re: Friday Finking: Contorted loops

2021-09-12 Thread Joe Pfeiffer
r...@zedat.fu-berlin.de (Stefan Ram) writes: > Alan Gauld writes: >>OK, That's a useful perspective that is at least consistent. >>Unfortunately it's not how beginners perceive it > ... > > Beginners perceive it the way it is explained to them by > their teacher. My life as a professor would

Re: Friday Finking: Contorted loops

2021-09-10 Thread Joe Pfeiffer
2qdxy4rzwzuui...@potatochowder.com writes: > On 2021-09-10 at 15:08:19 -0600, > Joe Pfeiffer wrote: > >> r...@zedat.fu-berlin.de (Stefan Ram) writes: > >> > The existence of statements like "break" renders >> > proof techniques for loops (suc

Re: Friday Finking: Contorted loops

2021-09-10 Thread Joe Pfeiffer
r...@zedat.fu-berlin.de (Stefan Ram) writes: > r...@zedat.fu-berlin.de (Stefan Ram) writes: >>can be misleading, because the "..." part can still contain >>"break", "raise", "continue", and "return" statement. So one >>better should always be on the watch when reading source code >>of a language l

Re: on floating-point numbers

2021-09-07 Thread Joe Pfeiffer
Hope Rouselle writes: > Christian Gollwitzer writes: >> >> I believe it is not commutativity, but associativity, that is >> violated. > > Shall we take this seriously? (I will disagree, but that doesn't mean I > am not grateful for your post. Quite the contary.) It in general > violates assoc

Re: Bloody rubbish

2021-05-06 Thread Joe Pfeiffer
Skip Montanaro writes: >> >> Machine language is so much simpler, and you can code with just a hexpad. >> > > Pshaa... All you need are front panel switches. ;-) (Yes, I had a professor > who required is to 'key' in our programs on the front panel, of a rack > mounted PDP-11 as I recall. Needless

Re: Bloody rubbish

2021-05-05 Thread Joe Pfeiffer
Mr Flibble writes: > Python is slow and significant whitespace is patently absurd. Why am I not surprised to learn your "fast" implementation turns out to be something other than python? -- https://mail.python.org/mailman/listinfo/python-list

Re: all versions of python fail to indent after conditional statement

2021-04-02 Thread Joe Pfeiffer
It's not a bug, it's a design choice you are disagreeing with: managing indentation is your job, not the interpreter's. For anything other than an absolutely trivial three-line script, I write in an editor that does a good job helping me manage indentation (in my case, emacs in Python mode). wr

Re: name for a mutually inclusive relationship

2021-02-25 Thread Joe Pfeiffer
Ethan Furman writes: > On 2/24/21 1:54 PM, 2qdxy4rzwzuui...@potatochowder.com wrote: >> Ethan Furman wrote: > >>> I didn't say it was a good example. ;-) Hopefully it gets the idea across. >> Ditto. ;-) >> IMO, the whole idea of "my program has two options, and the user has >> to >> specify bo

Re: name for a mutually inclusive relationship

2021-02-25 Thread Joe Pfeiffer
Ethan Furman writes: > I'm looking for a name for a group of options that, when one is specified, > all of them must be specified. I don't fully understand the question (yes, I read the part I snipped). Why is this not just a single option? Or is it hierarchical or something so option 1 impli

Re: Review, suggestion etc?

2020-12-18 Thread Joe Pfeiffer
Grant Edwards writes: > On 2020-12-18, Joe Pfeiffer wrote: > >> Recursion has very limited application, but where it's the right >> tool it's invaluable (top-down parsers, some graph algorithms...). >> We teach it primarily because by the time a student has

Re: Review, suggestion etc?

2020-12-17 Thread Joe Pfeiffer
Bischoop writes: > On 2020-12-17, Dennis Lee Bieber wrote: >>> >> >> The main concern is that you are using a RECURSIVE call. It is much >> better for such input checking to use an ITERATIVE (loop) scheme. >> >> def marriage(): >> #loop forever >> while True:

Re: Function returns old value

2020-12-12 Thread Joe Pfeiffer
Bischoop writes: > On 2020-12-12, Joe Pfeiffer wrote: >> Bischoop writes: >> >>> I've function asking question and comparing it, if is not matching 'yes' >>> it does call itself to ask question again. The problem is that when >>> fu

Re: Function returns old value

2020-12-11 Thread Joe Pfeiffer
Bischoop writes: > I've function asking question and comparing it, if is not matching 'yes' > it does call itself to ask question again. The problem is that when > function is called second time it returns old value or with additional > else statement it returns none. > > Code: https://bpa.st/KVG

For Creatives and Developers Only

2020-10-10 Thread Joe Mayami
We are recruiting Developers, and Creatives to join our community into building personal portfolios, personal development skills, work on Open Source Projects, Devops, Collaboration, User Testing and Supports. Community members include experts in product designs, python programming, data scienc

Fwd: Python 3..9.0

2020-10-09 Thread Joe via Python-list
Hi, I just downloaded the above for Windows but am unable to get it to run.  I have gone to the directory and double-clicked the "python.exe" file but that just brings me to the command prompt. Any suggestions as to what I am doing wrong? Thank you. Joe -- https://mail.python.o

Re: Use of a variable in parent loop

2020-09-27 Thread Joe Pfeiffer
Stephane Tougard writes: > On 2020-09-27, Stefan Ram wrote: >>>Is there any other instruction to end a if than pass and ensure Emacs >>>does not break the indentation during a copy paste or an indent-region ? >> >> We usually do not wish to tie our code to a defective editor. >> I use vi, an

Re: Where read() is documented

2020-08-29 Thread Joe Pfeiffer
Chris Green writes: > Stefan Ram wrote: >> Chris Green writes:I can't find the documentation for >> >read(). It's not a built-in function and it's not documented with >> >(for example) the file type object sys.stdin. >> >> |read() (asyncio.StreamReader method), 894 >> |read() (chunk.Chunk

Re: Fwd: [BUG] missing ')' causes syntax error on next line

2020-07-22 Thread Joe Pfeiffer
Jeff Linahan writes: > > See attached image. Would be nice if it printed "SyntaxError: unbalanced > parens" as it can difficult to see the problem if code like this is run in > an environment that only prints the problematic line, which in this case > the compiler is confused and one line off. I

Re: FW: Pycharm Won't Do Long Underscore

2020-06-30 Thread Joe Pfeiffer
"Peter J. Holzer" writes: > On 2020-06-24 15:33:16 -0600, Joe Pfeiffer wrote: >> One other note -- while you may want various good-looking fonts with >> ligatures in other domains, for writing code a monospace font with no >> ligatures lets you see exactly w

Re: FW: Pycharm Won't Do Long Underscore

2020-06-24 Thread Joe Pfeiffer
One other note -- while you may want various good-looking fonts with ligatures in other domains, for writing code a monospace font with no ligatures lets you see exactly what's there and saves a host of problems. My personal favorite for these purposes is called "Terminus Regular", but which speci

Re: problem in installing packages

2019-05-29 Thread Joe Pfeiffer
Joel Goldstick writes: > On Wed, May 29, 2019 at 1:17 AM Sri Tharun wrote: >> >> Problem not resolved.Yet >> >> On Wed 29 May, 2019, 6:39 AM Tharun, wrote: >> >> > >> > >>> sudo apt-get update >> > >> > File "", line 1 >> > >> > sudo apt-get update >> >^ >> > SyntaxError:

Re: Why float('Nan') == float('Nan') is False

2019-02-14 Thread Joe Pfeiffer
Chris Angelico writes: > > Or even better, use None instead of nan. There's nothing in Python > says you have to (ab)use a floating-point value as a signal. Or use > "while True" and add a break if the exception isn't thrown. Good point. -- https://mail.python.org/mailman/listinfo/python-list

Re: Why float('Nan') == float('Nan') is False

2019-02-14 Thread Joe Pfeiffer
ast writes: > Le 13/02/2019 à 14:21, ast a écrit : >> Hello >> >> >>> float('Nan') == float('Nan') >> False >> >> Why ? >> >> Regards >> > > Thank you for answers. > > If you wonder how I was trapped with it, here > is the failing program. > > > r = float('Nan') > > while r==float('Nan'): >

Re: Why float('Nan') == float('Nan') is False

2019-02-13 Thread Joe Pfeiffer
u...@speedy.net writes: > There are more integers than odd numbers, and more odd numbers than prime > numbers. An infinite set may be a subset of another infinite set although > they may both have the same cardinality. Or in other words, the number of > elements in each set is not equal. One has m

Re: Why float('Nan') == float('Nan') is False

2019-02-13 Thread Joe Pfeiffer
songbird writes: > Chris Angelico wrote: >> On Thu, Feb 14, 2019 at 7:12 AM Test Bot wrote: >>> >>> This definition of NaN is much better in mentally visualizing all the so >>> called bizarreness of IEEE. This also makes intuitive that no 2 NaN will be >>> equal just as no 2 infinities would be

Re: Why float('Nan') == float('Nan') is False

2019-02-13 Thread Joe Pfeiffer
ast writes: > Hello > float('Nan') == float('Nan') > False > > Why ? > > Regards Others have given the real answer -- IEEE says so, and the people who wrote the standard are smarter than me. All the same, this is my take on the reason for it: NaN is specifically a representation for "this

Re: 03 digression by brute force

2018-12-11 Thread Joe Pfeiffer
"Avi Gross" writes: > SYNOPSIS: One way to solve math puzzle by brute force. (message sent earlier > disappeared) > > > > Quick note. Jack started by asking why python does not like decimal > numbers with leading zeroes. When asked to explain, he said he was > trying to solve word problems usi

Re: Why Python don't accept 03 as a number?

2018-12-07 Thread Joe Pfeiffer
jf...@ms4.hinet.net writes: > MRAB at 2018/12/8 UTC+8 AM10:04:51 wrote: >> Before Python 3, a leading 0 in an integer literal would indicate an >> octal (base 8) number. > > So, the reason is historical. > >> The old form is now invalid in order to reduce the chance of bugs. > > I encounter this

Re: Looking for a Scrapy cheatsheet

2018-09-14 Thread Joe Gulizia
I just goolged for SANS Scrapy Cheatsheetthey have several SANS.org From: Python-list on behalf of Jim Sent: Friday, September 14, 2018 8:15:05 AM To: python-list@python.org Subject: Re: Looking for a Scrapy cheatsheet On 09/14/2018 01:27 AM, Danyelle Da

Re: Kindness

2018-07-13 Thread Joe Pfeiffer
I notice a correlation: the less people have interacted with Bart, the more tolerant they are. He once went on for *weeks* about C's (yes, this was in c.l.c) failure to have what he regards as a "proper" for-loop. -- https://mail.python.org/mailman/listinfo/python-list

Re: File names with slashes [was Re: error in os.chdir]

2018-07-04 Thread Joe Pfeiffer
Mikhail V writes: > [Steven D'Aprano] > >> (The same applies to Unix/Linux systems too, of course.) But while you're >> using Python to manipulate files, you should use Python rules, and that >> is "always use forward slashes". >> >> Is that reasonable? >> >> Under what circumstances would a user

Re: Folk etymology, was Re: Python list vs google group

2018-06-18 Thread Joe Pfeiffer
Peter Otten <__pete...@web.de> writes: > Grant Edwards wrote: > >> On 2018-06-18, Joe Pfeiffer wrote: >>> Peter Otten <__pete...@web.de> writes: >>> >>>> Gene Heskett wrote: >>>> >>>>> This biggest single thing wron

Re: Python list vs google group

2018-06-18 Thread Joe Pfeiffer
Peter Otten <__pete...@web.de> writes: > Gene Heskett wrote: > >> This biggest single thing wrong with any of those old scsi interfaces is >> the bus's 5 volt isolation diode, the designer speced a shotkey(sp) >> diode, and some damned bean counter saw the price diff and changed it to > > Is this

Re: "Data blocks" syntax specification draft

2018-05-21 Thread Joe Pfeiffer
Mikhail V writes: > On Mon, May 21, 2018 at 1:41 PM, Chris Lindsay via Python-list > wrote: > >> If a block of static data is large enough to start to be ugly, a common >> approach is to load the data from some other file, in a language which is >> designed around structured data. > > > Maybe it

Re: Entering a very large number

2018-03-26 Thread Joe Pfeiffer
Steven D'Aprano writes: > On Mon, 26 Mar 2018 02:37:44 +0100, bartc wrote: > >> If I instead initialise C using 'C = int("288712...")', then timings >> increase as follows: > > Given that the original number given had 397 digits and has a bit length > of 1318, I must admit to some curiosity as t

Re: Entering a very large number

2018-03-25 Thread Joe Pfeiffer
bartc writes: > On 25/03/2018 15:53, Joe Pfeiffer wrote: >> ast writes: > >>> C = int( >>> "28871482380507712126714295971303939919776094592797" >>> "22700926516024197432303799152733116328983144639225&qu

Re: Entering a very large number

2018-03-25 Thread Joe Pfeiffer
ast writes: > Hi > > I found this way to put a large number in > a variable. > > C = int( > "28871482380507712126714295971303939919776094592797" > "22700926516024197432303799152733116328983144639225" > "94197780311092934965557841894944174093380561511397" > "42154241693397290542371100275104208

IDLE help.

2017-10-08 Thread Joe Wilde
so I don't have a lot of technical knowledge. Thanks in advance, Joe. -- https://mail.python.org/mailman/listinfo/python-list

Re: [ANN] New Slack Group Dedicated to learning Python

2017-02-21 Thread Joe Anonimist
On Wednesday, 22 February 2017 08:07:01 UTC+1, Joe Anonimist wrote: > Hello all! > > Me and a few other Python enthusiasts started a Slack group dedicated to > learning Python. All of us know the basics of Python and our goal is to > acquire new skills that would help us get

[ANN] New Slack Group Dedicated to learning Python

2017-02-21 Thread Joe Anonimist
Hello all! Me and a few other Python enthusiasts started a Slack group dedicated to learning Python. All of us know the basics of Python and our goal is to acquire new skills that would help us get jobs as Python developers. Our plan is to collaborate on Python projects to get experience and be

Re: [OT] Altair

2016-08-30 Thread Joe
Am 30.08.2016 um 17:52 schrieb D'Arcy J.M. Cain: On Tue, 30 Aug 2016 15:56:07 +0200 Joe wrote: Am 30.08.2016 um 13:01 schrieb D'Arcy J.M. Cain: On Mon, 29 Aug 2016 21:21:05 -0700 Larry Hudson via Python-list wrote: I remember it well. It's what I used to initially

Re: Multimeter USB output

2016-08-30 Thread Joe
Am 30.08.2016 um 13:01 schrieb D'Arcy J.M. Cain: On Mon, 29 Aug 2016 21:21:05 -0700 Larry Hudson via Python-list wrote: I remember it well. It's what I used to initially learn C. I'm a completely self-taught, hobby programmer. Been around since the MITS Altair. How many remember that beast?

Re: Multimeter USB output

2016-08-30 Thread Joe
Am 30.08.2016 um 06:24 schrieb Paul Rubin: Larry Hudson writes: with BDS-C under CP/M. Somebody remenbering this no-fp compiler from the dark age before PC und Linux? I remember it well. It's what I used to initially learn C. Source code is online here: http://www.bdsoft.com/resources/bdsc

Re: Multimeter USB output

2016-08-29 Thread Joe
Am 29.08.2016 um 10:54 schrieb Joe: it was with BDS-C under CM/M. under CP/M, of course. -- https://mail.python.org/mailman/listinfo/python-list

Re: Multimeter USB output

2016-08-29 Thread Joe
Am 28.08.2016 um 17:22 schrieb Dennis Lee Bieber: If you can read spaghetti coded C, you might want to study https://sourceforge.net/projects/ut61/ Interesting, but... The last time I did something with c, it was with BDS-C under CM/M. Somebody remenbering this no-fp compiler from the dark ag

Re: Is duck-typing misnamed?

2016-08-28 Thread Joe
Am 28.08.2016 um 00:34 schrieb Terry Reedy: On 8/26/2016 7:58 PM, ROGER GRAYDON CHRISTMAN wrote: "If it walks like a duck, quacks like a duck,... " so there is indeed precedence for this so-called 'duck typing' but wouldn't it be more Pythonic to call this 'witch typing'? "How do you know sh

Multimeter USB output

2016-08-28 Thread Joe
Am 28.08.2016 um 00:45 schrieb Terry Reedy: > On 8/27/2016 3:35 PM, Joe wrote: >> Hi, >> >> I'm using Python 3.5.1 with PyUSB 1.0 under Win 10 (64). We try to read >> the USB output of a DMM 'UT61B'. >> >> import usb.core >> i

Multimeter USB output

2016-08-27 Thread Joe
read timeout) File "D:\Python3\Lib\site-packages\usb\backend\libusb1.py", line 936, in __read _check(retval) File "D:\Python3\Lib\site-packages\usb\backend\libusb1.py", line 595, in _check raise USBError(_strerror(ret), ret, _libusb_errno[ret]) usb.core.USBError: [Errno 10060] Operation timed out What's wrong? How to fix? Regards -- Joe -- https://mail.python.org/mailman/listinfo/python-list

RE: Guys, can you please share me some sites where we can practice python programs for beginners and Intermediate.

2016-06-23 Thread Joe Gulizia
t with FSF.org (Free Software Foundation) or EFSF (European FSF) https://fsfe.org/ Joe -- https://mail.python.org/mailman/listinfo/python-list

OT?: Where can I find python programming material in different languages?

2016-06-22 Thread Joe Gulizia
Potentially Off Topic I am looking for python programming related blogs, papers, videos in Swahili, Tagalog, Somali, Javanese (Indonesian?), Lithuanian, Pashto, Bulgarian, Farsi, Amharic, Georgian, Kazakh, and Tamil. Although blogs are not online I am looking for material that is not easily a

Re: Find the number of robots needed to walk through the rectangular grid

2016-04-09 Thread Joe
On Saturday, 9 April 2016 21:55:50 UTC+2, Mark Lawrence wrote: > On 09/04/2016 20:41, Joe wrote: > > > > Sorry, I was desperate > > I deleted the post > > > > You didn't. This will be showing in the archives in several places, e.g > https://mail.py

Re: Find the number of robots needed to walk through the rectangular grid

2016-04-09 Thread Joe
On Saturday, 9 April 2016 21:24:02 UTC+2, Mark Lawrence wrote: > On 09/04/2016 18:13, Joe wrote: > > On Saturday, 9 April 2016 18:44:20 UTC+2, Ian wrote: > >> On Sat, Apr 9, 2016 at 8:18 AM, Joe wrote: > >>> How to find the number of robots needed to walk throu

Re: Find the number of robots needed to walk through the rectangular grid

2016-04-09 Thread Joe
On Saturday, 9 April 2016 18:44:20 UTC+2, Ian wrote: > On Sat, Apr 9, 2016 at 8:18 AM, Joe wrote: > > How to find the number of robots needed to walk through the rectangular grid > > The movement of a robot in the field is divided into successive steps > > > > In one s

Find the number of robots needed to walk through the rectangular grid

2016-04-09 Thread Joe
How to find the number of robots needed to walk through the rectangular grid The movement of a robot in the field is divided into successive steps In one step a robot can move either horizontally or vertically (in one row or in one column of cells) by some number of cells A robot can move in one

Which Python do I need for the below?

2015-08-01 Thread Joe Sanders
Hello- Which Python do I need for the below? with instructions please! [cid:image001.png@01D0C9FD.677CDED0] Kind Regards, Gerald"Joe"Sanders Customer Global Quality Accounts 951 SanDisk Drive, building #5 | Milpitas, CA 95035 USA | cell +1,512.818.7798 corporate + 1.408.801.1000 |

Re: beautifulSoup 4.1

2015-04-04 Thread Joe Farro
Could use zip: tds = iter(soup('td')) for abbr, defn in zip(tds, tds): print abbr.get_text(), defn.get_text() -- https://mail.python.org/mailman/listinfo/python-list

Re: Python Unicode handling wins again -- mostly

2013-12-02 Thread joe
How would a grapheme library work? Basic cluster combination, or would implementing other algorithms (line break, normalizing to a "canonical" form) be necessary? How do people use grapheme clusters in non-rendering situations? Or here's perhaps here's a better question: does anyone know any non-l

Re: Python GUI?

2013-09-13 Thread Joe Junior
g. None of the mentioned graphical toolkits forces you to use them. And if you like debugging, GUI is not the main dish! Try networking and concurrent programming, loads and loads of fun! Of course, that's lots of other unnecessary time consuming stuff you can do. You just have to use your imagin

Re: Python GUI?

2013-09-13 Thread Joe Junior
on a keyboard was never the hard part of coding. > Nor the fun part. Joe -- https://mail.python.org/mailman/listinfo/python-list

Re: better and user friendly IDE recommended?

2013-09-12 Thread Joe Junior
eed impacts so much programmer's productivity. In my experience I spend a lot more time as a programmer (big emphasis on "lot") reading, thinking and designing then writing code. So I find a good navigation tool more important. My solution/suggestion for python: emacs (in cua-mode for me) with Jedi. Joe -- https://mail.python.org/mailman/listinfo/python-list

Re: user interfaces python3.x

2013-09-02 Thread Joe Junior
On 2 September 2013 14:30, Joel Goldstick wrote: > On Mon, Sep 2, 2013 at 1:16 PM, Joe Junior wrote: >> On 2 September 2013 14:00, Paul Rice wrote: >>> >>> I know that most of my time will be writing . I dont think i specified very >>> well what im asking.

Re: user interfaces python3.x

2013-09-02 Thread Joe Junior
Application. The examples Steven cited like GTK and Qt are libraries that provides it. The word "Interface" means a lot of things in programming. -- Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: Interface and duck typing woes

2013-08-29 Thread Joe Junior
On 29 August 2013 10:07, Chris Angelico wrote: > Hmm. l don't know of any good articles off-hand. But what I'm talking > about is simply developing the skill of reading exceptions, plus a few > simple things like knowing where it's appropriate to catch-and-log; > sometimes, what that means is actu

Re: Interface and duck typing woes

2013-08-29 Thread Joe Junior
Well, the main reason for me asking this question here was because of the Java/C#/Whatever developer in me craving for an Interface for the container's items, and I noticed that I'm not alone in this. But I was actually expecting the "We're all consenting adults, here", I guess I just needed the co

Interface and duck typing woes

2013-08-28 Thread Joe Junior
t to check isistance(), I like duck typing, but should I check if hasattr() and callable() before adding to the container? What is the pythonic way to deal with it? Am I worrying too much ;-)? Thanks, Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: Class hierarchy problem

2013-08-06 Thread Joe Junior
On Tue, Aug 6, 2013 at 12:36 PM, BrJohan wrote: > On 06/08/2013 16:02, Chris Angelico wrote: > >>> My classhierarchy is like a multilevel tree where each non-leaf node >>> (class) >>> is given knowledge about its nearest subclasses and their 'capacities'. >>> >>> So, my idea is to let the 'upper'

Re: Debugging difficulty in python with __getattr__, decorated properties and AttributeError.

2013-05-15 Thread Mr. Joe
On Wed, May 15, 2013 at 12:15 PM, dieter wrote: > > If Python would automatically redecorate overridden methods in a derived > class, I would have no control over the process. What if I need > the undecorated method or a differently decorated method (an > uncached or differently cached met

Re: Debugging difficulty in python with __getattr__, decorated properties and AttributeError.

2013-05-14 Thread Mr. Joe
Sorry for digging this old topic back. I see that my "'property' does not play well with polymorphic code" comment generated some controversy. So here's something in my defense: Here's the link to stackoveflow topic I am talking about: http://stackoverflow.com/questions/237432/python-properties-a

Differences of "!=" operator behavior in python3 and python2 [ bug? ]

2013-05-12 Thread Mr. Joe
I seem to stumble upon a situation where "!=" operator misbehaves in python2.x. Not sure if it's my misunderstanding or a bug in python implementation. Here's a demo code to reproduce the behavior - """ # -*- coding: utf-8 -*- from __future__ import unicode_literals, print_function class DemoClass

Re: Debugging difficulty in python with __getattr__, decorated properties and AttributeError.

2013-05-03 Thread Mr. Joe
Thanks for clearing up. Developers of python should address this issue, in my opinion. 3.4/3.5 maybe, but better late than never. Recently, I've been beaten back for using some exotic features of python. One is this[ Took me hours to get to the bottom ]. The other one is 'property' decorator. I wa

Debugging difficulty in python with __getattr__, decorated properties and AttributeError.

2013-05-02 Thread Mr. Joe
Is there any way to raise the original exception that made the call to __getattr__? I seem to stumble upon a problem where multi-layered attribute failure gets obscured due to use of __getattr__. Here's a dummy code to demonstrate my problems: """ import traceback class BackupAlphabet(object):

Compiler Error for build Python -3.3.0 (Suggestions)

2012-10-22 Thread Joe Davis
The version of Python I have on my old Solaris boxes is old and isn't supported and dosn't have all the modules that I need.I have downloaded the new 3.3 version and have been trying to compile it and have no luck: After running the ./configure command I run "make" and it gives me the foll

Re: OT: Entitlements [was Re: Python usage numbers]

2012-02-18 Thread random joe
On Feb 18, 12:34 pm, Rick Johnson wrote: > Louie-the-loose-screw Said: "I'll give you $15 if you'll give me $15!" $15 dolla too beau coup! 5 dolla each! -- http://mail.python.org/mailman/listinfo/python-list

Re: Help with python-list archives

2012-01-06 Thread random joe
On Jan 6, 1:41 am, Ian Kelly wrote: > One could also avoid creating the intermediate file by using a > StringIO to keep it in memory instead: Yes StringIO is perfect for this. Many thanks to all who replied. -- http://mail.python.org/mailman/listinfo/python-list

Re: Help with python-list archives

2012-01-05 Thread random joe
On Jan 5, 10:01 pm, random joe wrote: > On Jan 5, 9:00 pm, MRAB wrote: > > import gzip > > > in_file = gzip.open(r"C:\2012-January.txt.gz") > > out_file = open(r"C:\2012-January.txt.tmp", "wb") > > out_file.write(in_file.read()) > &

Re: Help with python-list archives

2012-01-05 Thread random joe
On Jan 5, 9:00 pm, MRAB wrote: > On 06/01/2012 02:14, random joe wrote: > > > On Jan 5, 7:27 pm, MRAB  wrote: > > >>  I've found that if I gunzip it twice (gunzip it and then gunzip the > >>  result) using the gzip module I get the text file. > > > O

Re: Help with python-list archives

2012-01-05 Thread random joe
On Jan 5, 7:27 pm, MRAB wrote: > I've found that if I gunzip it twice (gunzip it and then gunzip the > result) using the gzip module I get the text file. On a windows machine? If so, can you post a code snippet please? Thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: Help with python-list archives

2012-01-05 Thread random joe
On Jan 5, 6:10 pm, Ian Kelly wrote: > Interesting.  I tried this on a Linux system using both gunzip and > your code, and both worked fine to extract that file.  I also tried > your code on a Windows system, and I get the same result that you do. > This appears to be a bug in the gzip module under

Re: Help with python-list archives

2012-01-05 Thread random joe
On Jan 5, 5:39 pm, Miki Tebeka wrote: > Is the Google groups search not good enough? That works but i would like to do some regexes and set up some defaults. > Also, can you give an example of the code and an input file? Sure. Take the most recent file as example. "2012 - January.txt.gz". If yo

Help with python-list archives

2012-01-05 Thread random joe
Hi. I am new to python and wanted to search the python-list archives for answers to my many questions but i can't seem to get the archive files to uncompressed? What gives? From what i understand they are gzip files so i assumed the gzip module would work, but no! The best i could do was to get a

Re: Design Pattern and Python: Any book recommendation? Your view?

2011-11-04 Thread Joe Riopel
On Fri, Nov 4, 2011 at 8:28 AM, John Roth wrote: > The first is that if you use TDD (Test Driven Development) and > refactor relentlessly to remove duplication, most of the basic design > patterns will emerge naturally from the code as you work. I agree, and there is a pretty good series of artic

Re: import os or import os.path

2011-09-06 Thread Joe Riopel
On Tue, Sep 6, 2011 at 5:25 PM, Jabba Laci wrote: > Hi, > > If I want to use the 'os.path' module, it's enought to import 'os': > > import os > if os.path.isfile('/usr/bin/bash'): >    print 'got it' > > In other source codes I noticed that people write 'import os.path' in > this case. Which is be

Determine attributes of calling method

2011-06-03 Thread Joe
n't know how to do it :( """ print "bar" s=BlueServer() c=Client(s) print c.foo.color print c.fu.color c.foo() c.fu() Thanks for your help! Joe -- http://mail.python.org/mailman/listinfo/python-list

if statement on lenght of a list

2011-05-17 Thread Joe Leonardo
print 'YAY!' If I pass: breakLine([]) I get: YAY! I expect: You must pass a list that contains 19 fields. If I print len(value) I get: 0 What is going on here? Thanks! [cid:image001.png@01CC148A.3C0C1950] Joe Leonardo | Business Intelligence Analyst | DataLogix<h

Re: FBI wants public help solving encrypted notes from murder mystery

2011-04-02 Thread Joe Snodgrass
On Apr 1, 10:54 am, David Bernier wrote: > haha doh wrote: > > On Mar 31, 3:15 pm, Joe Snodgrass  wrote: > > [...] > > > > >> As to which crime was being committed, I'm going with numbers running > >> or loan sharking.  There's no reason for

Re: FBI wants public help solving encrypted notes from murder mystery

2011-03-31 Thread Joe Snodgrass
On Mar 30, 10:18 pm, "Stretto" wrote: > "Joe Snodgrass" wrote in message > > news:c37e8e0b-a825-4ac5-9886-8828ab1fa...@x8g2000prh.googlegroups.com... > > > > > > > FBI cryptanalysis hasn’t decrypted notes from 1999 murder mystery > >

FBI wants public help solving encrypted notes from murder mystery

2011-03-30 Thread Joe Snodgrass
FBI cryptanalysis hasn’t decrypted notes from 1999 murder mystery http://tinyurl.com/4d56zsz The FBI is seeking the public's help in breaking the encrypted code found in two notes discovered on the body of a murdered man in 1999. The FBI says that officers in St. Louis, Missouri discovered the

Re: Validating Command Line Options

2011-03-23 Thread Joe Riopel
On Wed, Mar 23, 2011 at 10:10 AM, T wrote: > For a Python script with multiple command line options, what is the > best way to go about validating that only certain options are used > together?  For example, say -s, -t, and -v are all valid options, but > should never be used together (i.e. -s -t

adodbapi integer parameters and MS Access

2011-03-13 Thread Joe
Here is my environment: Windows 7 x64 SP1 Python 3.2 adodbapi 2.4.2 MS Access Although the above environment is what I am currently using I have encountered this same problem with Python 3.1.1. It is not a problem with Python 2.x. The problem is as follows: If you are using a select statement

RE: newby qn about functions

2011-01-18 Thread Joe Goldthwaite
I'm not sure I understand the question completely but maybe the function below does what you want. def lower_case(s): return “Testing Functions-lower case: ” + s.lower() print lower_case(‘AbCdEfG’) From: python-list-bounces+joe=goldthw

RE: Functions Not Fun (yet)-please help!

2011-01-16 Thread Joe Goldthwaite
print my_func(a, b, c) You get an undefined error on c. This is because at this point, c has been created but hasn't had anything assigned to it. In other words, you're actually passing the undefined c variable from here into my_func. _____ From: python-list-bounc

Python 3 and SNMP Traps

2010-12-29 Thread Joe Hughes
his and able to give suggestions? Thanks, Joe -- http://mail.python.org/mailman/listinfo/python-list

RE: Parsing markup.

2010-11-29 Thread Joe Goldthwaite
Hi MRAB, I was trying to avoid regex because my poor old brain has trouble with it. I have to admin though, that line is slick! I'll have to go through my regex documentation to try and figure out what it actually means. Thanks! -Original Message- From: python-list-bounce

  1   2   3   4   5   6   >