Error with co_filename when loading modules from zip file

2012-03-05 Thread Bob
pyc in the zip file! I've tried putting only the pyc files, only the py files and both in the zip file. Any help? Thanks, Bob run.py: import logging class Handler(logging.Handler): def __init__(self): logging.Handler.__init__(self) def emit(self, record):

consecutive node sequence and pathlength problem using networkx graph

2012-06-13 Thread bob
Let say,I have a conjugated cyclic polygon and its nodes are given by the list: list_p=[a,b,c,d,e,f,g,a,a,b,d,d,d,d,d,c,c,e,e,a,d,d,g]. If X & Y are any elements in a list_p except d, and Z is also an element of list_p but has value only d, i.e, Z=d. Now,I want to compute the number of

RE: ModuleNotFoundError: No module named 'email.mime'; 'email' is not a package

2019-12-08 Thread bob
ning Python 3.8.0  In example, Mosh 12 hr course, he did an exercise on sending email from within Python, so here is the code : from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText import smtplib message = MIMEMultipart() message[&qu

Accessing Outlook Public Folders

2005-11-25 Thread Bob
ipts\tp2outlook.py", line 13, in -toplevel- print cust.FullName + " -> " + cust.FileAs File "D:\Python23\Lib\site-packages\win32com\client\dynamic.py", line 489, in __getattr__ raise AttributeError, "%s.%s" % (self._username_, attr) AttributeError: .FullName Anyone an idea how I can access those contactitems? Thanks, Bob -- http://mail.python.org/mailman/listinfo/python-list

pulling info from website

2005-01-10 Thread bob
i am trying to write a script for Xbox media center that will pull information from the bbc news website and display the headlines , how do i pull this info into a list??? -- http://mail.python.org/mailman/listinfo/python-list

Re: pySerial Windows write problem

2005-07-28 Thread bob
I forgot to mention that once the Python program(s) fail, THEN the C++ program also fails to opne the port, and the equipment has to be power-cycled to get things to work again. Bob -- http://mail.python.org/mailman/listinfo/python-list

Re: pySerial Windows write problem

2005-07-30 Thread bob
have some bugs in it. Shouldn't it? :) Anyway, here's a short page about the program, just for fun www.greschke.com/unlinked/pocus01.htm Thanks! Bob -- http://mail.python.org/mailman/listinfo/python-list

problem with datetime

2004-12-10 Thread Bob
d = datetime.datetime.today() >>> d datetime.datetime(2004, 12, 10, 6, 13, 28, 154472) >>> But when I try to run the following small program I get the following results: import datetime d = datetime.datetime.today() print d Traceback (most recent call last): File "datetime.

Re: problem with datetime

2004-12-10 Thread Bob
Thanks. That did it. And I know better than to use the module name. Bob -- http://mail.python.org/mailman/listinfo/python-list

Re: 70% [* SPAM *] Re: multiprocessing.Queue blocks when sending large object

2011-12-05 Thread boB
that I arranged the program such that the main process did >not need to know when the others have finished, so I changed the process join >call with a queue get call, until a None (one per process) is returned. > >Best, > >David Why do people add character like[* SPAM *]

python and dbus - beginner seeking some help

2006-07-28 Thread bob
Hello, First of all, does anyone know whether dbus will allow be to do 3 things: 1. query whether or not there is a dvd drive. 2. query whether or not there is a blank disc in it. 3. query what it's capacity is. If I'm barking up the wrong tree, what should I be considering instead ? If I am

python and dbus - beginner seeking some help

2006-07-28 Thread bob
I've found some information at: http://www.freedesktop.org/wiki/Software/dbus However, if anyone knows of simpler or perhaps just easier to follow articles online or knows that I'm barking up the wrong tree, your help will still be appriciated. Meanwhile I'm off to RTFM to see if I can make sen

Re: python and dbus - beginner seeking some help

2006-07-28 Thread bob
On Fri, 28 Jul 2006 19:03:00 +0100, bob wrote: > Hello, > > First of all, does anyone know whether dbus will allow be to do 3 things: > > 1. query whether or not there is a dvd drive. > 2. query whether or not there is a blank disc in it. > 3. query what it's capaci

simple dbus python problem ... please help

2006-07-28 Thread bob
Hi, I have this sample python script from the hal sources, but it doesn't work for me. This is despite other example python scripts I have to help me are working fine. The problem is that this script is the closet to what it is I actually want to learn to do. The error is: Traceback (most recent

How to move optparse from main to function?

2006-02-23 Thread Bob
I'm playing around with optparse and created the code below. How do I move that to a function and what variable do I pass? >From the documentation it seems like "options.optparse_test" would have the value zero if its option, either "-t" or "--test", is not detected at the command line. When I iss

Re: How to move optparse from main to function?

2006-02-23 Thread Bob
The module documentation helped me construct the meat of my code bu it didn't lend a hand on how to build the real meal deal the way Jason's explanation did. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to move optparse from main to function?

2006-02-23 Thread Bob
Yes the documentation is helpful, but I wouldn't have been able to do what you did in your code by just looking at section 6.21.2.9. I thought I could put "parser = parserSetup()" and "(options, args) = parser.parse_args()" in the function. Thanks for helping out with that! -- http://mail.python.

How would you open this file?

2006-02-23 Thread Bob
I want to open a file in a function and pass the file back to main so another function can manipulate the file, something like this: # begin def open_file() filename=open(options.filename_input,'r') return filename open_file() print filename.read() filename.close() # end But this doesn't wor

Re: How would you open this file?

2006-02-23 Thread Bob
Thanks all! That helps out a lot! Python is kinda' cool... -- http://mail.python.org/mailman/listinfo/python-list

Can optparse do dependencies?

2006-02-25 Thread Bob
I'd like to setup command line switches that are dependent on other switches, similar to what rpm does listed below. From the grammar below we see that the "query-options" are dependent on the query switch, {-q|--query}. Can "optparse" do this or do I have to code my own "thing"? Thanks. QUERYING

trying to gzip uncompress a StringIO

2007-05-22 Thread bob
t getting me anything, because the len(fileContent) call is returning 0. Any suggestions? thanks, Bob ### import sys, base64, gzip, StringIO infile = sys.argv[1] outfile = sys.argv[2] # When unencoding base64 file, write to a string that a

Re: trying to gzip uncompress a StringIO

2007-05-22 Thread bob
Perfect, thanks! Now I have a working WMF file and everything. Bob -- http://mail.python.org/mailman/listinfo/python-list

Re: trying to gzip uncompress a StringIO

2007-05-22 Thread bob
Perfect, thanks! Now I have a working WMF file and everything. Bob -- http://mail.python.org/mailman/listinfo/python-list

Re: trying to gzip uncompress a StringIO

2007-05-22 Thread bob
Perfect, thanks! Now I have a working WMF file and everything. Bob -- http://mail.python.org/mailman/listinfo/python-list

Re: trying to gzip uncompress a StringIO

2007-05-22 Thread bob
Perfect, thanks! Now I have a working WMF file and everything. Bob -- http://mail.python.org/mailman/listinfo/python-list

iputils module

2006-04-28 Thread bob
Anyone know where to get the iputils module for python? -- http://mail.python.org/mailman/listinfo/python-list

regex to exctract informations

2006-05-04 Thread Bob
Dears, I am trying to search and replace strings with regex. The string is identified by a keyword : IDImage("1M234567"); DescriptionImage("Desc of the Image 1"); I want to exctract the IDImage (1M234567 ) and the Description. The ID are characters and numbers, the description too. Thx, Bert

Cannot catch _mysql_exceptions.OperationalError

2008-01-17 Thread Bob
or') != -1: error_handling() else: raise This seems silly. If we used any other exception, the except clause seems to work correctly. Is there a problem with _mysql_exceptions.OperationalError? Is there a better work-around? Thanks, Bob -- http://mail.python.org/mailman/listinfo/python-list

messenger plus! live

2008-06-17 Thread bob
Messenger Plus! Live is an add-on for Windows Live Messenger that adds tons of features and extras to the software. Extend the possibilities of Messenger and make your experience a lot more entertaining! For more on this subject check out this cool site www.msgpluslive.net -- http://mail.python.or

can't send email

2010-09-07 Thread Bob
import smtplib File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/ python2.6/smtplib.py", line 46, in import email.utils File "/Users/Bob/Code/email.py", line 5, in from email.mime.text import MIMEText ImportError: No module named mime.te

Re: can't send email

2010-09-07 Thread Bob
On Sep 7, 10:27 pm, Chris Rebert wrote: > On Tue, Sep 7, 2010 at 1:12 PM, Bob wrote: > > Hello. > > I'm trying to send email using python 2.6.1 under snow leopard, but I > > can't get it to work. I'm trying one of the many examples I found on > &

formatted input

2010-09-07 Thread Bob
Hi All, I have another question about formatted input. Suppose I am reading a text file, and that I want it to be something like this word11 = num11, word12 = num12, word13 = num13 etc... word21 = num21, word22 = num12, word23 = num23 etc... etc... where wordx1 belongs to a certain dictionary of

uninitialize PyEval_InitThreads()

2012-06-25 Thread Bob Rossi
n is wrong, please let me know. Thanks, Bob -- http://mail.python.org/mailman/listinfo/python-list

Re: distutils bdist_wininst failure on Linux

2012-08-06 Thread Bob Bowles
Steven D'Aprano-11 wrote > > And I have a work-around that seems to work for me. Put this at the top > of your setup.py install script: > > > > # Work around mbcs bug in distutils. > # http://bugs.python.org/issue10945 > import codecs > try: > codecs.lookup('mbcs') > except LookupError: >

Re: Top-posting &c. (was Re: [ANNC] pybotwar-0.8)

2012-08-21 Thread Bob Martin
in 679182 20120821 181439 Dennis Lee Bieber wrote: >On Tue, 21 Aug 2012 08:07:33 +0200, Alex Strickland >declaimed the following in gmane.comp.python.general: > >> On 2012/08/17 12:42 AM, Madison May wrote: >> >> > As a lurker, I agree completely with Chris's sentiments. >> >> I too, but I'd pref

Re: Newbie: where's the new python gone?

2012-09-11 Thread Bob Aalsma
c.c Description: Binary data Op 10 Sep 2012, om 22:53 heeft William R. Wing (Bill Wing) het volgende geschreven: > On Sep 10, 2012, at 11:17 AM, Bob Aalsma wrote: > >> Well, Bill, better late than never - thanks for stepping in. >> You are right, my problems are not yet

Re: Newbie: where's the new python gone?

2012-09-11 Thread Bob Aalsma
macpro1:Python-2.7.3 debaas$ make install /usr/bin/install -c python.exe /usr/local/bin/python2.7 install: /usr/local/bin/python2.7: Permission denied make: *** [altbininstall] Error 71 So how to proceed here? -Bob Op 11 Sep 2012, om 14:26 heeft William R. Wing (Bill Wing) het volgende geschreve

Re: Newbie: where's the new python gone?

2012-09-11 Thread Bob Aalsma
On 11 Sep 2012, at 15:31, William R. Wing (Bill Wing) wrote: > On Sep 11, 2012, at 9:12 AM, Bob Aalsma wrote: > >> Hmm, this feels embarrassing but the good news is that, on seeing the >> errors, I remember using a "sudo" with the make install and only later >

Re: Article on the future of Python

2012-09-28 Thread Bob Martin
in 681910 20120927 131113 Devin Jeanpierre wrote: >On Thu, Sep 27, 2012 at 2:13 AM, Steven D'Aprano > wrote: >> On Tue, 25 Sep 2012 09:15:00 +0100, Mark Lawrence wrote: >> And a response: >> >> http://data.geek.nz/python-is-doing-just-fine > >Summary of that article: > >"Sure, you have all these l

Re: RE: Unpaking Tuple

2012-10-08 Thread Bob Martin
in 682592 20121008 232126 "Prasad, Ramit" wrote: >Thomas Bach wrote:=0D=0A> Hi there,=0D=0A> =0D=0A> On Sat, Oct 06, 2012 at = >03:08:38PM +, Steven D'Aprano wrote:=0D=0A> >=0D=0A> > my_tuple =3D my_= >tuple[:4]=0D=0A> > a,b,c,d =3D my_tuple if len(my_tuple) =3D=3D 4 else (my_= >tuple + (None,

Re: Obnoxious postings from Google Groups

2012-11-03 Thread Bob Martin
in 684220 20121102 093654 Jamie Paul Griffin wrote: >/ ru...@yahoo.com wrote on Thu 1.Nov'12 at 15:08:26 -0700 / > >> On 11/01/2012 03:55 AM, Jamie Paul Griffin wrote: >> > Anybody serious about programming should be using a form of >> > UNIX/Linux if you ask me. It's inconceivable that these sys

Re: datetime module and timezone

2012-02-10 Thread Bob Martin
in 671891 20120210 212545 Olive wrote: >In the datetime module, it has support for a notion of timezone but is >it possible to use one of the available timezone (I am on Linux). Linux >has a notion of timezone (in my distribution, they are stored >in /usr/share/zoneinfo). I would like to be able 1

Re: Error with co_filename when loading modules from zip file

2012-03-05 Thread Bob Rossi
On Mon, Mar 05, 2012 at 02:22:55PM -0800, Vinay Sajip wrote: > On Mar 5, 8:36 pm, Bob wrote: > > > The logging package gets the filename and line number > > of the calling function by looking at two variables, the filename > > of the frame in the stack trace and the v

Re: Error with co_filename when loading modules from zip file

2012-03-05 Thread Bob Rossi
On Mon, Mar 05, 2012 at 02:22:55PM -0800, Vinay Sajip wrote: > On Mar 5, 8:36 pm, Bob wrote: > > > The logging package gets the filename and line number > > of the calling function by looking at two variables, the filename > > of the frame in the stack trace and the v

Re: Error with co_filename when loading modules from zip file

2012-03-06 Thread Bob Rossi
On Tue, Mar 06, 2012 at 02:38:50AM -0800, Vinay Sajip wrote: > On Mar 6, 2:40 am, Bob Rossi wrote: > > > Darn it, this was reported in 2007 > >  http://bugs.python.org/issue1180193 > > and it was mentioned the logging package was effected. > > > > Yikes. &

Problem with time.time() standing still

2012-05-05 Thread Bob Cowdery
can affect the time.sleep() function making it return immediately but that only seems to happen in my full application. Any ideas would be very greatly received. Bob -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem with time.time() standing still

2012-05-05 Thread Bob Cowdery
. I really need to understand what mechanism is at play here rather than work around it. Bob The time.clock() function does increment correctly. CPU is around 30% On 05/05/2012 21:17, Danyel Lawson wrote: > Add a time.sleep(0) call to all your loops. Multithreading in Python > is a cooperativ

Re: Problem with time.time() standing still

2012-05-06 Thread Bob Cowdery
On 05/05/2012 23:05, Cameron Simpson wrote: > On 05May2012 20:33, Bob Cowdery wrote: > | I've written a straight forward extension that wraps a vendors SDK for a > | video capture card. All works well except that in the Python thread on > | which I call the extension, after cer

Re: Problem with time.time() standing still

2012-05-06 Thread Bob Cowdery
On 06/05/2012 00:11, Chris Angelico wrote: > On Sun, May 6, 2012 at 6:51 AM, Bob Cowdery wrote: >> The time.clock() function does increment correctly. CPU is around 30% > 30% of how many cores? If that's a quad-core processor, that could > indicate one core completely pegged

Re: Problem with time.time() standing still

2012-05-06 Thread Bob Cowdery
On 06/05/2012 09:24, Chris Angelico wrote: > On Sun, May 6, 2012 at 6:18 PM, Bob Cowdery wrote: >> On 05/05/2012 23:05, Cameron Simpson wrote: >>> Thought #1: you are calling time.time() and haven't unfortunately >>> renamed it? (I doubt this scenario, though th

Re: Problem with time.time() standing still

2012-05-06 Thread Bob Cowdery
On 06/05/2012 09:49, Cameron Simpson wrote: > On 06May2012 09:18, Bob Cowdery wrote: > | On 05/05/2012 23:05, Cameron Simpson wrote: > | > On 05May2012 20:33, Bob Cowdery wrote: > | > | [...] calls to time.time() always return the same > | > | time which is usually severa

Re: Problem with time.time() standing still

2012-05-08 Thread Bob Cowdery
at happens is that it reports the correct time as given by time() by gets the ms from somewhere also. When it goes wrong it reports the same time as ftime(). Bob >>> import mytime >>> mytime.doTime() TIME : 1336474857 FTIME secs 1336474880.00 FTIME ms 0.601000 FTIME

Re: Problem with time.time() standing still

2012-05-08 Thread Bob Cowdery
blems and appears to be frozen as a result. C, only supporting early binding cannot change the function referenced at runtime so how the devil is it managing to do this. On 08/05/2012 12:17, Bob Cowdery wrote: Can anyone make sense of this. I've looked over the Python timemodule.c again a

Re: Problem with time.time() standing still

2012-05-10 Thread Bob Cowdery
fully they will investigate and fix the problem. Bob -- http://mail.python.org/mailman/listinfo/python-list

Hashability questions

2012-05-14 Thread Bob Grommes
I uncomment the above _eq_() implementation, I get the following output: Traceback (most recent call last): File "/Users/bob/PycharmProjects/BGC/Tests.py", line 7, in print(hash(u)) TypeError: unhashable type: 'Utility' Process finished with exit code 1 Obvi

Re: Hashability questions

2012-05-15 Thread Bob Grommes
On Monday, May 14, 2012 8:35:36 PM UTC-5, alex23 wrote: > It looks like this has changed between Python 2 and 3: > > "If a class does not define an __eq__() method it should not define a > __hash__() operation either; if it defines __eq__() but not > __hash__(), its instances will not be usable as

Re: Python Book for a C Programmer?

2012-05-24 Thread boB Stepp
all correctly, that updates its coverage to Python 3.x, which is the book's primary focus, though it points out where 3.x syntax does not work in version 2.x. Cheers! boB -- http://mail.python.org/mailman/listinfo/python-list

PyImport_ImportModule bug in 3.1.2

2011-07-27 Thread bob . wang
Hi: My Python version is 3.1.2. I am programming embedding c with python in windows. When I imported urllib.request in my test py file, PyImport_ImportModule always return NULL. But I imported re or cmd ,they work fine. I found urllib is folder, and request

Re: 'super' object has no attribute '__setitem__'

2011-08-19 Thread Bob Vandy
I'm pretty sure I'd actually read the first 2 links you point to, but the difference between __setattr__ and __setitem__ still never registered with me -- perhaps partly because even the discussion of __setattr__ discusses adding an entry to the "*dictionary* of instance attributes". *MANY* thank

Setting the time in Win7

2011-08-22 Thread Bob Greschke
secpol.msc program and there doesn't seem to be any reason that it can't set the time, but it can't. Any ideas? Thanks! Bob -- http://mail.python.org/mailman/listinfo/python-list

Re: Setting the time in Win7

2011-08-22 Thread Bob Greschke
ePrivilege generally. Sorry; I'm a bit rushed at the moment. Feel free to post back if that isn't clear TJG On 22/08/2011 17:35, Bob Greschke wrote: Permissions! We're running in an account as an administrator (the only account on the laptops) and the program just calls system(t

Re: Setting the time in Win7

2011-08-22 Thread Bob Greschke
s original state and see what happens. Bob On 2011-08-22 11:41:45 -0600, Tim Golden said: If memory serves, you need to enable a specific privilege to set the time in Vista+. Just a moment... Have a look here: http://support.microsoft.com/kb/300022 and look for SeSystemtimePrivile

Re: Setting the time in Win7

2011-08-23 Thread Bob Greschke
On 2011-08-23 02:26:38 -0600, Tim Golden said: On 22/08/2011 20:42, Bob Greschke wrote: Several people have been hacking away on this computer we are testing on, so I'm not sure what settings -- other than all of them -- have been messed with, but popen("time ...") seems to w

my computer is allergic to pickles

2011-03-04 Thread Bob Fnord
I'm using python to do some log file analysis and I need to store on disk a very large dict with tuples of strings as keys and lists of strings and numbers as values. I started by using cPickle to save the instance of the class that contained this dict, but the pickling process started to write th

Re: my computer is allergic to pickles

2011-03-06 Thread Bob Fnord
Miki Tebeka wrote: > > I'm using python to do some log file analysis and I need to store > > on disk a very large dict with tuples of strings as keys and > > lists of strings and numbers as values. > I recommend that you'll use the shelve module. It stores data on disk and is > more memory effic

Re: my computer is allergic to pickles

2011-03-06 Thread Bob Fnord
GSO wrote: > On 5 March 2011 02:14, MRAB wrote: > ... > >> Any comments, suggestions? > >> > > You obviously can't feed your computer pickles then. > > How about a tasty tidbit of XML? Served up in a main dish of DOM, or > serially if preferred? Well, right now it takes three lines to save t

Re: my computer is allergic to pickles

2011-03-07 Thread Bob Fnord
MRAB wrote: > On 05/03/2011 01:56, Bob Fnord wrote: > > I'm using python to do some log file analysis and I need to store > > on disk a very large dict with tuples of strings as keys and > > lists of strings and numbers as values. > > > > I started by usi

Re: my computer is allergic to pickles

2011-03-09 Thread Bob Fnord
Miki Tebeka wrote: > > Or, which situations does shelve suit better and which does > > marshal suit better? > shelve ease of use and the fact it uses the disk to store objects makes it a > good choice if you have a lot of object, each with a unique string key (and a > tuple of strings can be co

Re: my computer is allergic to pickles

2011-03-09 Thread Bob Fnord
"Martin P. Hellwig" wrote: > On 05/03/2011 01:56, Bob Fnord wrote: > > > Any comments, suggestions? > > > No but I have a bunch of pseudo-questions :-) > > What version of python are you using? How about your OS and bitspace > (32/64)? Have you also

Re: my computer is allergic to pickles

2011-03-09 Thread Bob Fnord
Terry Reedy wrote: > On 3/7/2011 4:50 AM, Bob Fnord wrote: > > > I want a portable data file (can be moved around the filesystem > > or copied to another machine and used), > > Used only by Python or by other software? just Python > > Would a database in a f

Re: my computer is allergic to pickles

2011-03-11 Thread Bob Fnord
Peter Otten <__pete...@web.de> wrote: > Bob Fnord wrote: > > I started by using cPickle to save the instance of the class that > > contained this dict, but the pickling process started to write > > the file but ate so much memory that my computer (4 GB RAM) > &g

Re: my computer is allergic to pickles

2011-03-11 Thread Bob Fnord
Miki Tebeka wrote: > > >From looking at the shelve info in the library reference, I get > > the impression it's tricky to change the values in the dict for > > existing keys and be sure they get changed on disk. > You can use writeback=True or call sync at the right places. > > > > How can you

Re: [OT] Free software versus software idea patents

2011-04-08 Thread Bob Martin
in 654905 20110408 171055 Ethan Furman wrote: >Westley Mart�nez wrote: >> On Fri, 2011-04-08 at 01:41 -0500, harrismh777 wrote: >>> >>> Freedom isn't free... you have to fight for it... always. >> >> Why should a business listen to you? You're not gonna buy any software >> anyways. >> > >From a

can't get urllib2 or httplib to work with tor & privoxy

2011-05-09 Thread Bob Fnord
Here's my python code: import httplib, urllib2 proxy_handler = {'http' : 'localhost:8118', 'https' : 'localhost:8118'} def connect_u2(url = 'http://ipid.shat.net/iponly/'):, proxied = urllib2.ProxyHandler(proxy_handler) opnr = urllib2.build_opener(proxied) opnr.addhe

Re: can't get urllib2 or httplib to work with tor & privoxy

2011-05-12 Thread Bob Fnord
Chris Angelico wrote: > On Tue, May 10, 2011 at 4:20 AM, Bob Fnord wrote: > > Both methods give me a 503 error... > > As a networking geek, my first thought would be to fire up a tiny > little "snoop server" and see what, exactly, the two methods are > doin

Re: detaching comprehensions

2017-09-08 Thread bob gailer
om", a spread operator is required! |>>> k =( i for i in range( 3, 5 )) |>>> [ *k ] |[3, 4] "taken from"?? k is a generator object. Clear? Bob Gailer -- https://mail.python.org/mailman/listinfo/python-list

Re: Questions.

2017-09-08 Thread boB Stepp
ay be found at https://mail.python.org/mailman/listinfo/tutor It is a moderated list, so there may be a short delay before your first post(s) may come through. -- boB -- https://mail.python.org/mailman/listinfo/python-list

Re: "comprehend" into a single value

2017-10-07 Thread bob gailer
On 10/7/2017 11:17 PM, Nathan Hilterbrand wrote: dict= {10: ['a',1,'c'], 20: ['d',2,'f']} p = sum([dict[i][1] for i in dict]) Something like that? Ah, but that's 2 lines. sum(val[1] for val in  {10: ['a',1,'c'], 20: ['d',2,'f']}.values()) On Sat, Oct 7, 2017 at 11:07 PM, Andrew Z wrote: He

Re: The "loop and a half"

2017-10-09 Thread boB Stepp
we not let people be who they are, perceived warts (valid or not) and all, and after responding (hopefully gently) to technical errors just let them be??? Peace. -- boB -- https://mail.python.org/mailman/listinfo/python-list

OT: MPC-HC project ending? [Re: Lies in education [was Re: The "loop and a half"]]

2017-10-11 Thread boB Stepp
bute and has C/C++ experience, let me know on IRC or via e-mail. Otherwise, all things come to an end and life goes on. It’s been a nice journey and I’m personally pretty overwhelmed having to write this post. Thanks to everyone who has contributed in any way all these years; Remember,

Re: Python 2 -> 3, urllib.urlOpen

2017-10-13 Thread boB Stepp
e school. Therefore, I'm > looking for something in the Python 3.6 Standard Library. The above is in the standard library. -- boB -- https://mail.python.org/mailman/listinfo/python-list

Re: Python noob having a little trouble with strings

2017-10-26 Thread boB Stepp
. py3: s1 = "Welcome students" py3: s4 = 3 * s1 py3: print(s4) Welcome studentsWelcome studentsWelcome students -- boB -- https://mail.python.org/mailman/listinfo/python-list

Re: General Purpose Pipeline library?

2017-11-20 Thread Bob Gailer
On Nov 20, 2017 10:50 AM, "Jason" wrote: > > a pipeline can be described as a sequence of functions that are applied to an input with each subsequent function getting the output of the preceding function: > > out = f6(f5(f4(f3(f2(f1(in)) > > However this isn't very readable and does not suppor

adding elif to for

2017-12-19 Thread bob gailer
Has any thought been given to adding elif to the for statement? for x in foo:     if y: break elif a==b:     something else:     something else as a shortcut to: for x in foo:     if y: break else:     if a==b:     something else:     something else bob gailer -- https://mail.python.org

Re: Linux/Windows GUI programming: GUI-fy a CLI using pyInstaller

2018-01-06 Thread Bob Martin
in 788357 20180105 132921 Kevin Walzer wrote: >On 1/1/18 11:45 AM, X. wrote: >> Ulli Horlacher: >>> I have to transfer a python 2.7 CLI programm into one with a (simple) GUI. >>> The program must run on Linux and Windows and must be compilable with >>> pyinstall, because I have to ship a standalon

Re: Fwd: Syntax error

2018-02-03 Thread bob gailer
On 2/3/2018 2:40 PM, Terry Reedy wrote: On 2/3/2018 2:10 PM, Kevin Doney wrote: Hi. *pip3 install --upgrade tensorflow-gpu* When I try the above command I get SyntaxError: invalid syntax Please help. This group helps those who help the group -- by asking questions with sufficient informat

Are the critiques in "All the things I hate about Python" valid?

2018-02-16 Thread boB Stepp
necessary technical knowledge to properly evaluate his claims, I thought I would ask those of you who do. I have neither the knowledge or boB-hours to write a large distributed system code base, but I am curious if Python is truly limited for doing these in the ways he claims. BTW, I am not trying to st

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-16 Thread boB Stepp
ledge. I was led to this article via one of the two weekly python news collation email services that I subscribe to, so I am hoping to learn something from the article and everyone's feedback. What's the old saw? Even a blind squirrel finds a nut once in a while? Thanks! -- boB -- https://mail.python.org/mailman/listinfo/python-list

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-16 Thread boB Stepp
ntial for industrial-grade software? -- boB -- https://mail.python.org/mailman/listinfo/python-list

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-16 Thread boB Stepp
ght be able to point me to a good link. Or kindly summarize yourself the relevant information. Thanks! -- boB -- https://mail.python.org/mailman/listinfo/python-list

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-16 Thread boB Stepp
On Sat, Feb 17, 2018 at 12:54 AM, Chris Angelico wrote: > On Sat, Feb 17, 2018 at 5:25 PM, boB Stepp wrote: >> >> I am curious as to what efforts have been attempted to remove the GIL >> and what tradeoffs resulted and why? Is there a single article >> somewhere tha

Re: How to make Python run as fast (or faster) than Julia

2018-02-23 Thread boB Stepp
these to make Julia look better than the competition? Myself, I would rather be charitable than accusatory about the benchmarkers' intentions. For instance, the authors were aware of numpy and used it for some of the python coding -- the array operations they were targeting IIRC. Instead,

Re: Application window geometry specifier

2021-01-13 Thread boB Stepp
On Wed, Jan 13, 2021 at 7:28 PM Chris Angelico wrote: > I love how "I think" is allowed to trump decades of usability research. Can you recommend a good reference for someone relatively new to GUI programming that is based on such research? Book or web reference would be fine.

Re: IDE tools to debug in Python?

2021-02-05 Thread boB Stepp
u do know that there is a 100% open source version of Microsoft VS Code with absolutely no tracking? It is VSCodium: https://vscodium.com/ Perhaps it is more along the lines of what you are looking for? -- Wishing you only the best, boB Stepp -- https://mail.python.org/mailman/listinfo/python-list

Re: New Python implementation

2021-02-16 Thread boB Stepp
-- Wishing you only the best, boB Stepp -- https://mail.python.org/mailman/listinfo/python-list

Re: If you have Python Cookbook, 3rd ed.

2021-05-20 Thread boB Stepp
copy chapter 1 is "Data Structures and Algorithms". The only thing comprising an introduction is a brief paragraph that starts the chapter and has no attribution. HTH, boB Stepp -- https://mail.python.org/mailman/listinfo/python-list

Re: If you have Python Cookbook, 3rd ed.

2021-05-20 Thread boB Stepp
On Thu, May 20, 2021 at 3:48 PM Terry Reedy wrote: > > On 5/20/2021 1:14 PM, boB Stepp wrote: > > On Thu, May 20, 2021 at 11:43 AM Terry Reedy wrote: > >> > >> can you verify that the Algorithm chapter (near end in 2nd ed.) does > >> *NOT* have an introduct

Re: Turtle module

2021-05-26 Thread boB Stepp
wing what units you are using) and comparing with what is returned you should be able to determine what angular units are currently set. HTH! boB Stepp -- https://mail.python.org/mailman/listinfo/python-list

Re: imaplib: is this really so unwieldy?

2021-05-27 Thread boB Stepp
ink to chapter 16 which discusses email is: https://automatetheboringstuff.com/chapter16/ Hopefully this will prove helpful to the OP. HTH! boB Stepp -- https://mail.python.org/mailman/listinfo/python-list

Re: imaplib: is this really so unwieldy?

2021-05-30 Thread boB Stepp
On Sun, May 30, 2021 at 1:04 AM hw wrote: > > On 5/28/21 2:36 AM, boB Stepp wrote: > > > > Just as SMTP is the protocol for sending email, the Internet Message > > Access Protocol (IMAP) specifies how to communicate with an email > > provider’s server to retr

  1   2   3   4   5   6   7   >