Re: Python Success stories

2008-04-25 Thread Bob Woodham
On 2008-04-24, AlFire <[EMAIL PROTECTED]> wrote: > Bob Woodham wrote: > >> >> x = x++; >> >> has unspecified behaviour in C. > > what about C++ To the extent that (historically) C++ was a superset of C, it was true of C++ as well. However, I have

Re: Python Success stories

2008-04-25 Thread Bob Woodham
On 2008-04-24, Istvan Albert <[EMAIL PROTECTED]> wrote: > On Apr 23, 2:08 pm, Bob Woodham <[EMAIL PROTECTED]> wrote: > >> x = x++; >> >> has unspecified behaviour in C. That is, it is not specified >> whether the value of x after execution of the statemen

Re: Are spams on comp.lang.python a major nuisance?

2008-09-27 Thread Bob Cortopassi
On 2008-09-26, nntpman68 <[EMAIL PROTECTED]> wrote: > - I'm annoyed by any spam. > It's tough to find good rules, but the incoming spams that I see > currently on comp.lang.python have certain criteas. > > - most email addresses from gmail. ...snip rest of good filter criteria... Killing all mes

SOAPpy, WSDL and objects

2006-03-07 Thread Bob . Capa
Hi, I am trying to access a webservice which needs a login request of the following form: FirstName LastName I am trying to do this with the following code: from SOAPpy import WSDL server = WSDL.Proxy(m_url) request = {'firstname': FirstName, 'lastname': La

Basic Python FTP Question

2006-03-07 Thread Bob Piton
I have just discovered how to do ftp with python, and have a question about using macdef. I can connect to the ftp site, using the .netrc file: machine my.ftpsite.com login myuserid password mypass macdef dload cd maindir get myfile and the python command: cmdline = "ftp my.ftpsite.com" % () o

Re: Basic Python FTP Question

2006-03-08 Thread Bob Piton
On Wed, 08 Mar 2006 00:09:34 -0800, Ravi Teja wrote: > Have you seen Python's ftplib? > http://effbot.org/librarybook/ftplib.htm > http://docs.python.org/lib/module-ftplib.html No I hadn't. Thanks for the references; it looks like that method will do anything I need to do with ftp. -- http://ma

Re: POP3 Mail Download

2006-03-18 Thread Bob Piton
On Sat, 18 Mar 2006 18:34:56 -0500, Kevin F wrote: > Dennis Lee Bieber wrote: >> On Sat, 18 Mar 2006 17:24:05 -0500, Kevin F <[EMAIL PROTECTED]> >> declaimed the following in comp.lang.python: >> >>> I fixed the indentation to: >>> >>> emails = [] >>> for msg in messagesInfo: >>> msgNum

PIL ImageDraw line not long enough

2006-03-30 Thread Bob Greschke
latest of everything. Am I missing a setting somewhere? Thanks! Bob -- http://mail.python.org/mailman/listinfo/python-list

Re: PIL ImageDraw line not long enough

2006-04-01 Thread Bob Greschke
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Bob Greschke wrote: > >> I have to extend the vertical line to y+8, instead of y+7 to get the line >> segment to be drawn long enough. This is on Linux, Solaris, 2.x versions >>

Re: ANN: obfuscate

2010-02-12 Thread Bob Martin
in 16 20100212 034121 Paul Rubin wrote: >See http://en.wikipedia.org/wiki/Colossus_computer >That was almost at the end of the war though. Colossus was working by the end of 1943 - the year that the Americans first dropped bombs on Germany ;-) -- http://mail.python.org/mailman/listinfo/

Re: ANN: obfuscate

2010-02-12 Thread Bob Martin
in 144460 20100212 103319 Jean-Michel Pichavant wrote: >Bob Martin wrote: >> in 16 20100212 034121 Paul Rubin wrote: >> >> >>> See http://en.wikipedia.org/wiki/Colossus_computer >>> That was almost at the end of the war though. >>> >>

Part of RFC 822 ignored by email module

2011-01-20 Thread Bob Kline
essage_from_string("Subject: blah").get('SUBJECT') 'blah' >>> email.message_from_string("Subject:\n blah").get('SUBJECT') ' blah' Note the space in front of the second value returned, but missing from the first. Can someone c

Re: Part of RFC 822 ignored by email module

2011-01-20 Thread Bob Kline
On 1/20/2011 12:23 PM, Carl Banks wrote: On Jan 20, 7:08 am, Bob Kline wrote: I just noticed that the following passage in RFC 822: The process of moving from this folded multiple-line representation of a header field to its single line represen- tation is

Re: Part of RFC 822 ignored by email module

2011-01-20 Thread Bob Kline
ing the leading white space would be reflected documentation (but it isn't). -- Bob Kline http://www.rksystems.com mailto:bkl...@rksystems.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Part of RFC 822 ignored by email module

2011-01-20 Thread Bob Kline
newlines, tabs and spaces make up the whitespace element. That would be true for what the RFC calls "structured" fields, but not for the others (such as the Subject header). -- Bob Kline http://www.rksystems.com mailto:bkl...@rksystems.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Part of RFC 822 ignored by email module

2011-01-20 Thread Bob Kline
On 1/20/2011 5:34 PM, Martin Gregorie wrote: On Thu, 20 Jan 2011 16:25:52 -0500, Bob Kline wrote: On 1/20/2011 3:48 PM, Martin Gregorie wrote: That's only a problem if your code cares about the composition of the whitespace and this, IMO is incorrect behaviour. When the separator be

Re: WxPython versus Tkinter.

2011-01-25 Thread Bob Martin
in 650595 20110124 192332 Bryan wrote: >On Jan 24, 12:05=A0pm, rantingrick wrote: >> On Jan 24, 12:00=A0pm, Bryan wrote: >> >> > Accessibility, like internationalization, is something few programmers >> > spend much time thinking about. >> >> Thats another uninformed statement by you we can add

Re: WxPython versus Tkinter.

2011-01-25 Thread Bob Martin
in 650672 20110125 115033 Bryan wrote: >On Jan 25, 2:02=A0am, Bob Martin wrote: >> in 650595 20110124 192332 Bryan wrote: >> >> >> >> >> >> >On Jan 24, 12:05=3DA0pm, rantingrick wrote: >> >> On Jan 24, 12:00=3DA0pm, Bryan wr

Re: WxPython versus Tkinter.

2011-01-25 Thread Bob Martin
in 650680 20110125 151901 Bryan wrote: >On Jan 25, 6:03=A0am, Bob Martin wrote: >> in 650672 20110125 115033 Bryan wrote: >> >> Do you think the whole world speaks US English? >> >> >No, absolutely not. I don't see how you go from "I don't thi

Re: Are Small Dogs Good with Kids?

2011-02-06 Thread Bob Martin
in 651499 20110206 194312 sahadat shamim wrote: >Are little canines nice with children? Most people can't seem to come >to a consensus about this query. individuals who regularly place >rescue canines with adoptive >more >http://animals-world24.blogspot.com/2011/02/are-small-dogs-good-with-kids.ht

Windows and My Documents

2010-06-03 Thread Bob Greschke
VMWare Shared Folders to show up so I can navigate to files in OSX from WinXP running in VMWare, but My Documents doesn't show up, either. The docs for listdir says it doesn't follow links and I don't think I want to tell os.walk to followlinks as that could be zillions of files.

Re: Windows and My Documents

2010-06-03 Thread Bob Greschke
On 2010-06-03 09:57:11 -0600, Tim Golden said: On 03/06/2010 16:39, Bob Greschke wrote: How do I do a "listdir" (or whatever I need to use) of the Desktop on a Windows machine and have "folders" like My Documents show up in the result? I'm specifically trying to ge

Re: Python "why" questions

2010-08-15 Thread Bob Martin
in 639663 20100815 120123 Lawrence D'Oliveiro wrote: >In message , Ian Kelly >wrote: > >> The ability to change the minimum index is evil. > >Pascal allowed you to do that. And nobody ever characterized Pascal as >“evil”. Not for that reason, anyway... Why do you refer to Pascal in the past

Re: Good books in computer science?

2009-06-14 Thread Bob Martin
in 117455 20090615 044816 Steven D'Aprano wrote: >On Mon, 15 Jun 2009 10:39:50 +1200, Lawrence D'Oliveiro wrote: > >>> Shame on you for deliberately cutting out my more serious and nuanced >>> answer while leaving a silly quip. >> >> Can't have been very "serious and nuanced" if it could be summe

Re: RE: Good books in computer science?

2009-06-19 Thread Bob Martin
in 117815 20090617 221804 Phil Runciman wrote: >Because it reminds me of when things went badly wrong. IBM360, Von Neumann = >architecture, no hardware stacks ... > >IMHO Burroughs and ICL had better approaches to OS design back then but had= >less resources to develop their ideas.=20 > >However,

Re: RE: RE: Good books in computer science?

2009-06-21 Thread Bob Martin
in 118305 20090621 214008 Phil Runciman wrote: >How many instruction sets have you used? I have used at least 9. IBM 1401 IBM 1410 IBM 7090/7094 IBM 1620 IBM 360 IBM System/7 IBM 1130 IBM 1800 IBM Series/1 Intel 8080 etc Motorola 6800 etc Texas 9900 (my second favourite) plus a bunch of IBM micr

Creating multiprocessing processes without forking on MacOSX?

2009-06-29 Thread Bob Petersen
ange. I'm happy to provide a patch if it is useful to others. Thanks, Bob Petersen -- http://mail.python.org/mailman/listinfo/python-list

Re: If Scheme is so good why MIT drops it?

2009-07-19 Thread Bob Martin
in 121683 20090719 210126 Terry Reedy wrote: >Roy Smith wrote: >> In article <1cethsrrw8h6k$.9ty7j7u7zovn@40tude.net>, >> Frank Buss wrote: >> >>> there is one free unique implementation on the 3 major platforms Linux, >>> Windows and MacOS X >> >> Most people would still consider Solaris to

Re: If Scheme is so good why MIT drops it?

2009-07-19 Thread Bob Martin
in 121708 20090720 072858 Frank Buss wrote: >Bob Martin wrote: > >> I think the OP means "major PC operating systems". Those with a wider >> knowledge of the computer world would consider IBM's mainframe operating >> systems to be deserving of the descript

Re: [Tutor] Arguments from the command line

2010-09-06 Thread bob gailer
int sys.argv $hg commit "This is a commit name" ['C:\\hg.py', 'commit', 'This is a commit name'] -- Bob Gailer 919-636-4239 Chapel Hill NC -- http://mail.python.org/mailman/listinfo/python-list

Re: Compare source code

2010-11-01 Thread Bob Martin
in 645437 20101031 230912 Lawrence D'Oliveiro wrote: >In message <4ccd5ad9$0$19151$426a7...@news.free.fr>, jf wrote: > >> I edit each file to remove tabs ... > >expand -i newfile > >> Do you know a tools to compare the initial file with the cleaned one to >> know if the algorithms are the same ?

Re: int vs. float

2017-02-10 Thread boB Stepp
" as an integer, and to respond with an error message in the float case, or "decimal number" case as the OP phrased it. Apparently only positive integers are acceptable input; all other inputs should generate an appropriate error message by input type. -- boB -- https://mail.python.org/mailman/listinfo/python-list

Re: Doubt with files

2017-02-14 Thread boB Stepp
nts of your rtf file as a txt file, showing all of the rtf formatting code. If you want a different result, I suggest you search online for something like: python read write rtf -- boB -- https://mail.python.org/mailman/listinfo/python-list

Re: Doubt with files

2017-02-14 Thread boB Stepp
dirnatural\partightenfactor0 >> >>\f0\fs24 \cf0 1l2m,1svo,1lme} >> >>INSTEAD of: >>1l2m,1svo,1lme >> >>How could I fix it? > > I do not know exactly what encoding rtf or the txt file has but you can use: > > with open(dirFichero,'r'

Re: print odd numbers of lines from tekst WITHOUT space between lines

2017-02-18 Thread boB Stepp
nt line," (Note the trailing comma.), this should suppress the line break that the print statement normally inserts. Another suggestion might be to use enumerate() instead of using a manual counter in your for loop. HTH! -- boB -- https://mail.python.org/mailman/listinfo/python-list

Re: Who are the "spacists"?

2017-03-18 Thread Bob Gailer
On Mar 17, 2017 9:23 PM, "Mikhail V" wrote: > > So Python supports both spaces and tabs for indentation. > > I just wonder, why not forbid spaces in the beginning of lines? > How would one come to the idea to use spaces for indentation at all? One problem for me with tabs: there is no standard vi

Re: syntax error in first-time user script

2017-03-24 Thread Bob Gailer
On Mar 24, 2017 4:53 AM, "john polo" wrote: > > Greetings, > I am attempting to learn Python. I have no programming background. I'm on a computer with Windows 7. I checked the PATH in System Variables and Python and Python\Scripts are in the path. I have a book, Python for Biologists and it suppli

Re: read in a list in a file to list

2017-04-08 Thread boB Stepp
lla gorilla >> >> John > > I'll start you off. > > with open("apefile.txt") as apefile: > for line in apefile: > doSomething(line) > > String methods and/or the csv module might be used here in doSomething(line), > but I'll leave that to you so that you can learn. If you get stuck please > ask again, we don't bite :) -- boB -- https://mail.python.org/mailman/listinfo/python-list

Re: Bigotry and hate speech on the python mailing list

2017-04-18 Thread Bob Martin
in 773391 20170418 141627 "Mario R. Osorio" wrote: >Feels like this is something personal against Steven. You should probably t= >ake this to court. I'd rather read Steven's insightful answers and rants th= >an you crying. None here is meant to sugar coat anything, and if that is wh= >at you are

Re: Bug or intended behavior?

2017-06-02 Thread bob gailer
even if there is only one conversion specifier - that avoids the problem you encountered and makes it easy to add more values when you add more conversion specifiers. print "foo %s" % (1-2,) Bob Gailer -- https://mail.python.org/mailman/listinfo/python-list

Re: python certification

2017-06-08 Thread Bob Gailer
On Jun 8, 2017 7:58 AM, "Gonzalo V" wrote: > > hi, > good day. > where can i get a python certification? I'm not sure there is such a thing. Try Googling. > thanks! > -- > https://mail.python.org/mailman/listinfo/python-list -- https://mail.python.org/mailman/listinfo/python-list

Re: Bug or intended behavior?

2017-06-15 Thread bob gailer
Sending this to docs in hopes of improving documentation of % formatting and operator precedence. Perhaps add "see 6:16 Operator precedence." On 6/3/2017 5:59 PM, Sean DiZazzo wrote: On Friday, June 2, 2017 at 10:46:03 AM UTC-7, bob gailer wrote: On 6/2/2017 1:28 PM, Jussi Piitula

Re: Syntax error for simple script

2017-06-27 Thread boB Stepp
nture > an > opinion, that would be good. That's why I asked Ben if there was something we > could do to make the sentence clearer. Perhaps add a simple usage example? SyntaxError: Missing parentheses in call to 'print'. Correct example: print('Prints this string') Surely a little more verbiage won't be too harmful? -- boB -- https://mail.python.org/mailman/listinfo/python-list

Re: python in chromebook

2017-07-26 Thread boB Stepp
alling Python normally, or (2) going to the app store and installing a Python shell that runs in your browser. Myself, I would prefer (1), but I have never had a Chromebook, so that may not fit in with what you wish to do. HTH! -- boB -- https://mail.python.org/mailman/listinfo/python-list

Re: first code attempt

2017-08-02 Thread boB Stepp
to consider joining the Python Tutor list (https://mail.python.org/mailman/listinfo/tutor). This is meant for newcomers to Python who have a lot of basic questions. This list is more oriented towards already competent Python programmers who tend to go off on interesting technical tangents. ~(:>)) -- boB -- https://mail.python.org/mailman/listinfo/python-list

Re: Code for addition

2017-08-04 Thread Bob Gailer
On Aug 4, 2017 5:27 PM, "Ode Idoko via Python-list" wrote: > > Can anyone help with the python code that can add 101, 102, 103...2033 please? We are here to help but we don't have crystal balls to interpret your request. The best thing you can do is show us what attempts you have made to write c

Re: Planning a Python Course for Beginners

2017-08-08 Thread Bob Gailer
On Aug 8, 2017 10:20 AM, "Stefan Ram" wrote: > > I am planning a Python course. > > I started by writing the course akin to courses I gave > in other languages, that means, the course starts roughly > with these topics: > > - number and string literals > - types of number and string litera

Re: instructor solution manual for MODERN OPERATING SYSTEMS 2nd ed A.S.TANENBAUM

2017-08-10 Thread Bob Gailer
On Aug 10, 2017 7:15 AM, wrote: > > > > solutions manual to MODERN OPERATING SYSTEMS 3rd ed A.S.TANENBAUM > > > can you plz provide it for me.. This mailing list is for the Python programming language, not for operating systems. It is possible that someone else on this list might be able to help

Re: Application Error

2017-08-15 Thread Bob Gailer
On Aug 15, 2017 9:50 AM, "Alhassan Tom Alfa" wrote: > > Dear Sir, > > I just downloaded Python Exactly what did you download? Where did you download it from? There are 32 bit versions and 64-bit versions. Did you download the one corresponding to your computer? Normally when you download python Yo

Re:

2017-08-19 Thread Bob Gailer
Unfortunately the images did not come through, since this is a text-only email list. I suggest you put your images on an online resource such as Photobucket and post the links in your email. Unfortunately your description of the problem is not very precise. Obviously the images would help. Terms l

Re: Reading the documentation

2017-08-24 Thread bob gailer
On 8/24/2017 3:54 PM, Nathan Ernst wrote: You passed a string to "math.floor", not anything resembling a numeric type. Try using an actual float, int or Decimal: It would seem you did not understand the OP's question. It was not "why did I get this traceback." He showed the traceback as leading

Re: Reading the documentation

2017-08-24 Thread bob gailer
On 8/24/2017 3:24 PM, Stefan Ram wrote: This is a transcript: from math import floor floor( "2.3" ) Traceback (most recent call last): File "", line 1, in TypeError: must be real number, not str help(floor) Help on built-in function floor in module math: floor(...) floor(x)

Re: security quirk

2013-01-30 Thread Big Bad Bob
On 01/29/13 20:55, RichD so wittily quipped: I read Wall Street Journal, and occasionally check articles on their Web site. It's mostly free, with some items available to subscribers only. It seems random, which ones they block, about 20%. Anywho, sometimes I use their search utility, the usua

Re: modpython, apache and windows

2005-01-04 Thread Bob Van Zant
ested in seeing what changes you had to make. I'm willing to help you along the way. Not really sure how else to help you at this point. The index.py that you had working was probably on the right track. -Bob On Wed, 2005-01-05 at 01:12 +, Sam wrote: > Hi All, > > I am intere

Re: copying classes?

2004-12-29 Thread Bob Van Zant
copy.deepcopy() should do the trick. This URL answers a little bit of your question about the difficulties in copying "complex" data structures. http://pydoc.org/2.3/copy.html -Bob On Wed, 2004-12-29 at 19:29 +0100, harold fellermann wrote: > Hi all, > > In the documentat

Re: copying classes?

2004-12-29 Thread Bob Van Zant
gt;>> class x: ... def __init__(self): ... self.y = 1 ... >>> obj = x() >>> obj.y 1 >>> >>> import copy >>> z = copy.deepcopy(obj) >>> z.y 1 >>> obj.y = 4 >>> obj.y 4 >>> z = copy.deepcopy(obj) >>&

Re: crash while using PyCharm / Python3

2016-03-22 Thread Big Bad Bob
On 03/21/16 17:23, Adam so wittily quipped: > "Adam" wrote in message > news:ncprqb$tl9$1...@news.albasani.net... >> >> "Jonathan N. Little" wrote in message >> news:ncpjj0$7ug$1...@dont-email.me... >>> Adam wrote: There ought to be a way to just reinstall the graphics subsystem rather >>

scanf in python?

2008-02-20 Thread Bob and Deb
reate statement and the column position in the header) and use scanf to parse this file. What does the Python solution looks like? Thanks in advance. Bob -- http://mail.python.org/mailman/listinfo/python-list

Re: from xx import yy

2017-11-17 Thread Bob van der Poel
In mod1 set var to a value. Lets use 5. Now, in mod2 we do: from mod1 import var And, yes, var is equal to 5. But, to the folks like me who are not complete pythonistas, we'd think it worked and was wonderful. But, if we change the variable in mod1 whit a function in mod1, the value doesn

Re: reading text in pdf, some working sample code

2017-11-22 Thread Bob van der Poel
xt) > -- > https://mail.python.org/mailman/listinfo/python-list > Sorry if I'm late to this party, but I use pdf2txt for this. Works just fine. It has options for different encodings, page range, etc. On Linux just "apt install python-pdfminer" to install. -- Li

Save and load initialized class

2017-12-08 Thread Bob van der Poel
o my program. Doing z=json.load (open("mybuffer", "r")) loads a dictionary ... which makes sense since that is what I saved. So, can I now reset the values in Opts from a saved dictionary? Best, -- Listen to my FREE CD at http://www.mellowood.ca/music/cedars Bob v

Re: Save and load initialized class

2017-12-10 Thread Bob van der Poel
t; > > -- > Steve > “Cheer up,” they said, “things could be worse.” So I cheered up, and sure > enough, things got worse. > > -- > https://mail.python.org/mailman/listinfo/python-list > -- Listen to my FREE CD at http://www.mellowood.ca/music/cedars Bob van

Re: Problem with timeit

2017-12-15 Thread Bob van der Poel
easurements differ drastically from mine (and my manual > measurements match what I'd expect given results of timeit/time.time > whereas yours don't...). > > Paul > -- > https://mail.python.org/mailman/listinfo/python-list > -- Listen to my FREE CD at http://www.me

Re: Where are the moderators?

2018-01-18 Thread Bob van der Poel
mane.org (without the news prefix) does work. -- **** Listen to my FREE CD at http://www.mellowood.ca/music/cedars Bob van der Poel ** Wynndel, British Columbia, CANADA ** EMAIL: b...@mellowood.ca WWW: http://www.mellowood.ca -- https://mail.python.org/mailman/listinfo/python-list

Re: Python "Bad syntax"

2018-02-05 Thread Bob van der Poel
t; item = get_next_item() > if not item: >break > process_item(item) > > Here 'wrong syntax' occurs after the "break". > > How is it possible? Bad version of Python? Which version to use? > >

Re: To clarify how Python handles two equal objects

2023-01-13 Thread Bob van der Poel
ect, with possible multiple > names to it. We can change the object, using one of the names. That is one > and only one operation on one and only one object. Since the different > names refer to the same object, that change will of course be visible > through all of them. > >> Note that 'name' in that sentence doesn't just refer to variables (mx1, > arr1, ...) but also things like indexed lists (mx1[0], mx1[[0][0], ...), > loop variables, function arguments. > >> > >> The correct mental model is important here, and I do think you're on > track or very close to it, but the way you phrase things does give me that > nagging feeling that you still might be just a bit off. > >> > >> -- > >> "Peace cannot be kept by force. It can only be achieved through > understanding." > >> -- Albert Einstein > >> > >> -- > >> https://mail.python.org/mailman/listinfo/python-list > >> > > > > -- > > https://mail.python.org/mailman/listinfo/python-list > > > > -- > https://mail.python.org/mailman/listinfo/python-list > -- Listen to my FREE CD at http://www.mellowood.ca/music/cedars Bob van der Poel ** Wynndel, British Columbia, CANADA ** EMAIL: b...@mellowood.ca WWW: http://www.mellowood.ca -- https://mail.python.org/mailman/listinfo/python-list

Re: editor recommendations?

2021-02-26 Thread Bob van der Poel
web browsing was "a > thing", but I'm sure he found a way to do that inside emacs also. > Of course there is a mode for that: https://www.emacswiki.org/emacs/CategoryWebBrowser -- Listen to my FREE CD at http://www.mellowood.ca/music/cedars Bob van der Poel **

Re: Spot the invalid syntax

2018-03-08 Thread Bob van der Poel
> ==== > Ian Pilcher arequip...@gmail.com > "I grew up before Mark Zuckerberg invented friendship" > > > -- > https://mail.python.org/mailman/listinfo/python-list > -- Listen to my FREE CD at http://www.mellowood.ca/music/cedars Bob van der Poel ** Wynndel, British Columbia, CANADA ** EMAIL: b...@mellowood.ca WWW: http://www.mellowood.ca -- https://mail.python.org/mailman/listinfo/python-list

Re: Calling Matlab (2016a) function from Python(3.6)

2018-03-29 Thread Bob van der Poel
an/listinfo/python-list -- Listen to my FREE CD at http://www.mellowood.ca/music/cedars Bob van der Poel ** Wynndel, British Columbia, CANADA ** EMAIL: b...@mellowood.ca WWW: http://www.mellowood.ca -- https://mail.python.org/mailman/listinfo/python-list

Re: Leading 0's syntax error in datetime.date module (Python 3.6)

2018-05-10 Thread Bob van der Poel
a few times in the past. I used lots of hex over the years, but don't recall ever using octal ... except in frustrating moments when I needed to change permission bits. -- Listen to my FREE CD at http://www.mellowood.ca/music/cedars Bob van der Poel ** Wynndel, British Columbia, CANADA ** EMAIL: b...@mellowood.ca WWW: http://www.mellowood.ca -- https://mail.python.org/mailman/listinfo/python-list

Re: what does := means simply?

2018-05-17 Thread Bob van der Poel
On Thu, May 17, 2018, 8:45 PM Ben Finney, wrote: > Steven D'Aprano writes: > > > If you want to *really* see code that is hard to port, you should try > > porting an Inform 7 program to another language. Any other language. > > Does porting Inform 7 code to Inform 6 count? They are very differen

Re: Indented multi-line strings

2018-05-23 Thread Bob van der Poel
e 'first > line\nlast line\n'. > > If you want additional indentation, then provide a string literal: > > def func(): > foobar > data = >> '': > first line > last line > foobar > > for 'f

Re: Calling an instance method defined without any 'self' parameter

2018-10-04 Thread Bob van der Poel
ve code, is > there any way to call foo? > > Python 2.7 > > > Thanks, > -- > https://mail.python.org/mailman/listinfo/python-list > Use the magic of staticmethod :) class A: @staticmethod def foo(): ... do foo stuff Hope this helps. -- Listen to my FREE CD

Are all items in list the same?

2019-01-07 Thread Bob van der Poel
that this won't scale all that well. Am I missing something? -- Listen to my FREE CD at http://www.mellowood.ca/music/cedars Bob van der Poel ** Wynndel, British Columbia, CANADA ** EMAIL: b...@mellowood.ca WWW: http://www.mellowood.ca -- https://mail.python.org/mailman/listinfo/python-list

Re: Are all items in list the same?

2019-01-08 Thread Bob van der Poel
is > > empty, 'all' will return True anyway. > > Neat! I expected that a[0] would be executed in that case, > but it is not. > > -- > Neil Cerutti > -- > https://mail.python.org/mailman/listinfo/python-list > -- Listen to my FREE CD at http://w

Re: get the terminal's size

2019-01-14 Thread Bob van der Poel
Please, is there something similar for python2 ? > > Cheers > -- > Alex > -- > https://mail.python.org/mailman/listinfo/python-list > try this: http://stackoverflow.com/questions/566746/how-to-get-console-window-width-in-python -- Listen to my FREE CD at http://www.mellowood.c

Re: Exercize to understand from three numbers which is more high

2019-01-29 Thread Bob van der Poel
>MaxNum = N2 > > > elif N1 > >MaxNum = N3 > > > > No. Assuing that you meant to include colons where I think you did, what > > if (N1, N2, N3) == (5, 4, 6)? > > > > -- > > https://mail.python.org/mailman/listinfo/python-list > > > -- > https://mail.python.org/mailman/listinfo/python-list > Isn't the easiest way to do this is: sorted( [n1,n2,n3] )[-1] to get the largest value? -- Listen to my FREE CD at http://www.mellowood.ca/music/cedars Bob van der Poel ** Wynndel, British Columbia, CANADA ** EMAIL: b...@mellowood.ca WWW: http://www.mellowood.ca -- https://mail.python.org/mailman/listinfo/python-list

Re: Implement C's Switch in Python 3

2019-02-03 Thread Bob van der Poel
t! > > > >>> That said, I am aware that I am not in any way a "normal person". > >>> Using month names as per your other example is probably a fair > >>> compromise with other humans. > > In this life, one does have to make allowances... >

Re: Implement C's Switch in Python 3

2019-02-03 Thread Bob van der Poel
On Sun, Feb 3, 2019 at 2:15 PM Chris Angelico wrote: > On Mon, Feb 4, 2019 at 8:02 AM Bob van der Poel wrote: > > > > I'm surprised that no one has yet addressed the year 1 problem. > Hopefully we're doing numeric, not alpha sorts on the stuff before the 1st >

More CPUs doen't equal more speed

2019-05-23 Thread Bob van der Poel
nd, but that is just a guess. Maybe I need to set my sights on bigger, slower programs to see a difference :) -- Listen to my FREE CD at http://www.mellowood.ca/music/cedars Bob van der Poel ** Wynndel, British Columbia, CANADA ** EMAIL: b...@mellowood.ca WWW: http://www.mellowo

Re: More CPUs doen't equal more speed

2019-05-23 Thread Bob van der Poel
ay 23, 2019 at 4:24 PM MRAB wrote: > On 2019-05-23 22:41, Avi Gross via Python-list wrote: > > Bob, > > > > As others have noted, you have not made it clear how what you are doing > is > > running "in parallel." > > > > I have a similar need where I

Re: More CPUs doen't equal more speed

2019-05-24 Thread Bob van der Poel
Ahh, 2 really excellent ideas! I'm reading about parallel right now. And, I know how to use make, so I really should have thought of -j as well. Thanks for the ideas. On Fri, May 24, 2019 at 12:02 AM Christian Gollwitzer wrote: > Am 23.05.19 um 23:44 schrieb Paul Rubin: > > Bo

Re: More CPUs doen't equal more speed

2019-05-24 Thread Bob van der Poel
no one else has brought it up yet, that rather > than manually creating threads and/or process pools for all these > things, this is exactly what the standard concurrent.futures module is > for. It's a fairly brilliant wrapper around all this stuff, and I feel > like it often

Re: More CPUs doen't equal more speed

2019-05-26 Thread Bob van der Poel
On Sun, May 26, 2019 at 11:05 AM Grant Edwards wrote: > On 2019-05-23, Chris Angelico wrote: > > On Fri, May 24, 2019 at 5:37 AM Bob van der Poel > wrote: > >> > >> I've got a short script that loops though a number of files and > >> processes them

Re: How execute at least two python files at once when imported?

2019-11-06 Thread Bob van der Poel
decided that using the work of others was more productive. I've been using parallel with good success. Depends on how much you need to share with the different components. For details see https://www.gnu.org/software/parallel/ -- **** Listen to my FREE CD at http://www.mellowood.ca/music/c

Unicode filenames

2019-12-06 Thread Bob van der Poel
oping for a guideline! Thanks. -- Listen to my FREE CD at http://www.mellowood.ca/music/cedars Bob van der Poel ** Wynndel, British Columbia, CANADA ** EMAIL: b...@mellowood.ca WWW: http://www.mellowood.ca -- https://mail.python.org/mailman/listinfo/python-list

Re: Unicode filenames

2019-12-07 Thread Bob van der Poel
On Sat, Dec 7, 2019 at 4:00 AM Barry Scott wrote: > > > > On 6 Dec 2019, at 18:17, Bob van der Poel wrote: > > > > I have some files which came off the net with, I'm assuming, unicode > > characters in the names. I have a very short program which takes the

Re: Unicode filenames

2019-12-07 Thread Bob van der Poel
On Sat, Dec 7, 2019 at 12:47 PM DL Neil via Python-list < python-list@python.org> wrote: > On 8/12/19 5:50 AM, Bob van der Poel wrote: > > On Sat, Dec 7, 2019 at 4:00 AM Barry Scott > wrote: > >>> On 6 Dec 2019, at 18:17, Bob van der Poel wrote: > >>>

Re: Python, Be Bold!

2020-01-02 Thread Bob van der Poel
/python-list > -- Listen to my FREE CD at http://www.mellowood.ca/music/cedars Bob van der Poel ** Wynndel, British Columbia, CANADA ** EMAIL: b...@mellowood.ca WWW: http://www.mellowood.ca -- https://mail.python.org/mailman/listinfo/python-list

Function to avoid a global variable

2020-04-26 Thread Bob van der Poel
Does this make as much sense as anything else? I need to track calls to a function to make sure it doesn't get called to too great a depth. I had a global which I inc/dec and then check in the function. Works fine, but I do need to keep a global around just for this. So ... instead I wrote a short

Re: Function to avoid a global variable

2020-04-27 Thread Bob van der Poel
e in a function? Is there a PEP? Best, On Sun, Apr 26, 2020 at 8:47 PM Chris Angelico wrote: > On Mon, Apr 27, 2020 at 1:39 PM Bob van der Poel wrote: > > > > Does this make as much sense as anything else? I need to track calls to a > > function to make sure it doesn't

Re: Function to avoid a global variable

2020-04-27 Thread Bob van der Poel
t; On 4/27/20 10:39 AM, Bob van der Poel wrote: > > Thanks Chris! > > > > At least my code isn't (quite!) as bad as the xkcd example :) > > > > Guess my "concern" is using the initialized array in the function: > > > >def myfunct(a, b, c=a

Re: Function to avoid a global variable

2020-05-01 Thread Bob van der Poel
turn f > return deco > > @static(called=0) > def other_function(): > me.called += 1 > ... > > Obviously the name "me" can't be used, as it'd break a bunch of code, > but conceptually this would be incredibly helpful. It'd also be a >

Re: Issue with Python module downloads from Library for a beginner Python coder.

2020-08-02 Thread Bob van der Poel
\Users\sarvesh\AppData\Local\Programs\Python\Python38-32\graphics.py", > line 1Python 3.8.5 (tags/v3.8.5:580fbb0, Jul 20 2020, 15:43:08) [MSC > v.1926 32 bit (Intel)] on win32 ^SyntaxError: invalid syntax > Please do let me know if I am missing out something very basic. >

Re: .replace() to replace elements in a Pandas DataFrame

2020-08-05 Thread Bob van der Poel
rame, df. > > > > > > > > A strange thing is that it worked perfectly in the same Jupyter > > > notebook > > > > this morning. > > > > But all of a sudden, it started not doing the replacement any > more. > > > >

Environment vars

2020-11-25 Thread Bob van der Poel
Listen to my FREE CD at http://www.mellowood.ca/music/cedars Bob van der Poel ** Wynndel, British Columbia, CANADA ** EMAIL: b...@mellowood.ca WWW: http://www.mellowood.ca -- https://mail.python.org/mailman/listinfo/python-list

Re: Environment vars

2020-11-25 Thread Bob van der Poel
On Wed, Nov 25, 2020 at 10:59 AM Chris Angelico wrote: > On Thu, Nov 26, 2020 at 4:36 AM Bob van der Poel wrote: > > > > I've got a program which accepts an optional env variable listing a > single > > or multiple directory for the app to use. I've done a

Re: Environment vars

2020-11-25 Thread Bob van der Poel
On Wed, Nov 25, 2020 at 11:00 AM dn via Python-list wrote: > On 26/11/2020 05:46, Bob van der Poel wrote: > > I've got a program which accepts an optional env variable listing a > single > > or multiple directory for the app to use. I've done a bit of a search

Re: Environment vars

2020-11-25 Thread Bob van der Poel
On Wed, Nov 25, 2020 at 12:43 PM Eryk Sun wrote: > On 11/25/20, Bob van der Poel wrote: > > I've got a program which accepts an optional env variable listing a > single > > or multiple directory for the app to use. > > In Unix one would use colon as the preferred de

Re: Environment vars

2020-11-25 Thread Bob van der Poel
On Wed, Nov 25, 2020 at 2:22 PM dn via Python-list wrote: > > Ahha! Didn't know about os.pathsep. Seems simple enough to use that and > be > > done with it. > > > > I'm just using str.split() just now. Is there a os.splitpath()? I don't > see > > anything in the docs. > > > https://docs.python.or

<    1   2   3   4   5   6   7   >