Re: Help with some python homework...

2014-02-02 Thread Rhodri James
price. * So the book costs "price_per_book - (discount * price_per_book)" after applying the discount. * refactoring, that's "(1 - discount) * price_per_book." Ta da! -- Rhodri James *-* Wildebeest Herder to the Masses -- https://mail.python.org/mailman/listinfo/python-list

Using asyncio for serial port

2014-02-08 Thread james . time4tea
uld be very much appreciated! Thanks! James -- https://mail.python.org/mailman/listinfo/python-list

Issue

2015-12-06 Thread James Gilliver
Hi! I have recently installed Python 3.5.0 but cannot open the application! Could you help me resolve this issue? Thanks,James -- https://mail.python.org/mailman/listinfo/python-list

installation error

2016-01-28 Thread JAMES SCALF
Hello, I am having an issue installing Python 3.51, I get an error message stating that there is a dll that is missing: API-MS-WIN-CRT-RUNTIME-l1-1-0.DLL I have tried reinstalling the program but keep getting the same error message. Please advise of fix. Please reply to jr

Re: psss...I want to move from Perl to Python

2016-01-29 Thread James Harris
o into detail as this is not a Perl group but I found Perl horrible to work with. It is slick but also cryptic. James -- https://mail.python.org/mailman/listinfo/python-list

Unable to activate Python once installed, as far I am aware i have full permission. The download is in programs but does not show when i use run in windows start menu, any suggestions would be helpful

2016-01-31 Thread Haydn James
-- https://mail.python.org/mailman/listinfo/python-list

Re: Command Line Inputs from Windows

2015-01-05 Thread James Scholes
lity is no longer available. You'll need to either edit the registry directly or use a third party tool to manage filetypes and their associated actions. -- James Scholes http://twitter.com/JamesScholes -- https://mail.python.org/mailman/listinfo/python-list

pickle and then object changes

2015-01-20 Thread James Smith
Say an object like this exists: class test: a = "" b = "" You pickle it. You change the object definition to have a new field: class test a = "" b = "" c = "" You read the pickled object. Will it load but ignore the new field? That is what I want. -- https://mail.python.org/

can python handle CHIME .spt files?

2015-02-18 Thread James Zimmerman
a way. Thank you very much. James Zimmerman Emeritus Professor of Biochemistry -- https://mail.python.org/mailman/listinfo/python-list

Re: Functions help

2014-02-23 Thread Rhodri James
ime you call it: for i in range(6): print(i*i) for day in ("Mon", "Tue", "Wed", "Thu", "Fri"): do_stuff_for_day(day) -- Rhodri James *-* Wildebeest Herder to the Masses -- https://mail.python.org/mailman/listinfo/python-list

Re: Functions help

2014-02-27 Thread Rhodri James
On Tue, 25 Feb 2014 02:18:43 -, Dennis Lee Bieber wrote: On Mon, 24 Feb 2014 01:01:15 -, "Rhodri James" declaimed the following: The function "range" returns the sequence of numbers 1, 2, 3, 4 and 5 [*], so this has the same effect as if you had typed:

Re: Reference

2014-03-04 Thread Rhodri James
enerators. They are far too cussed for that :-) -- Rhodri James *-* Wildebeest Herder to the Masses -- https://mail.python.org/mailman/listinfo/python-list

Re: Reference

2014-03-04 Thread Rhodri James
o a single ARM instruction, or that splitting a loop into two to avoid a conditional test will let an DSP's optimiser double the speed of a section of code. -- Rhodri James *-* Wildebeest Herder to the Masses -- https://mail.python.org/mailman/listinfo/python-list

Re: ANN: Python Job Board - Call for volunteers

2014-03-05 Thread James Mills
I'd like to volunteer! On Mar 5, 2014 7:13 PM, "M.-A. Lemburg" wrote: > [Please help spread the word by forwarding to other relevant mailing lists, > user groups, etc. world-wide; thanks :-)] > > Dear Python Community, > > for many years, the Python Job board ( > http://legacy.python.org/communi

Re: Balanced trees

2014-03-11 Thread Rhodri James
he extra coding time (longer now that I'm not in practise), but that's a separate matter. -- Rhodri James *-* Wildebeest Herder to the Masses -- https://mail.python.org/mailman/listinfo/python-list

Re: Balanced trees

2014-03-19 Thread Rhodri James
that there's no 16-bit overflow causing something unexpected. -- Rhodri James *-* Wildebeest Herder to the Masses -- https://mail.python.org/mailman/listinfo/python-list

Re: CallBack function in C Libraries.

2014-03-20 Thread Rhodri James
to suggest since it isn't one of the usual problems, but you might find reading https://wiki.python.org/moin/GoogleGroupsPython helpful. It will certainly help with the double-spacing in your quote above. -- Rhodri James *-* Wildebeest Herder to the Masses -- https://mail.python.or

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-03-22 Thread Rhodri James
l in Python; you'll be as happy as the friend of mine I've finally persuaded to stop writing Fortran in Python, I promise! -- Rhodri James *-* Wildebeest Herder to the Masses -- https://mail.python.org/mailman/listinfo/python-list

Re: python installation on windows

2014-03-23 Thread Rhodri James
in the Quick Installation Guide." The "Quick Installation Guide" page has instructions for editing the Apache config files. No mention of running ".\configure" -- why are you doing that? Try just editing the config files as the documentation suggests an

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-03-23 Thread Rhodri James
On Sun, 23 Mar 2014 02:46:28 -, Ian Kelly wrote: On Sat, Mar 22, 2014 at 6:32 PM, Rhodri James wrote: On Sat, 22 Mar 2014 05:26:26 -, Rustom Mody wrote: Well almost... Except that the 'loop' I am talking of is one of def loop(): return [yield (lambda: x) for x

Re: python installation on windows

2014-03-26 Thread Rhodri James
when it got to me, and I nearly didn't bother putting in the effort to make it readable. -- Rhodri James *-* Wildebeest Herder to the Masses -- https://mail.python.org/mailman/listinfo/python-list

Re: Time we switched to unicode? (was Explanation of this Python language feature?)

2014-03-26 Thread Rhodri James
Powers of two and one less than powers of two I use a lot, so 65535 for example is a token. The more digits there are in the number, the harder it is for me to take in in a way that doesn't happen with letters. Even "forty" is better than "40" if you want me to reca

regex line by line over file

2014-03-26 Thread James Smith
I can't get this to work. It runs but there is no output when I try it on a file. #!/usr/bin/python import os import sys import re from datetime import datetime #logDir = '/nfs/projects/equinox/platformTools/RTLG/RTLG_logs'; #os.chdir( logDir ); programName = sys.argv[0] fileName = sys.argv[1]

Re: regex line by line over file

2014-03-26 Thread James Smith
On Wednesday, March 26, 2014 11:23:29 PM UTC-4, James Smith wrote: > I can't get this to work. > > It runs but there is no output when I try it on a file. > > > > > > #!/usr/bin/python > > > > import os > > import sys > > import

Re: regex line by line over file

2014-03-27 Thread James Smith
On Thursday, March 27, 2014 1:32:03 AM UTC-4, Steven D'Aprano wrote: > - are you mistaken about the content of the file? > > I can't help you with the first. But the second: try running this: > > # line2 and pat as defined above > filename = sys.argv[1] > with open(filename) as f: > for line

Re: regex line by line over file

2014-03-27 Thread James Smith
On Thursday, March 27, 2014 9:41:55 AM UTC-4, James Smith wrote: > (134, False, '\' > "SHELF-17:LOG_COLN_IP,SC,03-25,01-18-58,NEND,NA,,,:"Log Collection In > Progress",NONE:170035-6364-1048,:YEAR=2014,MODE=NONE"\\r\\n\'') > &g

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-03-30 Thread Rhodri James
ns. Many of whom even know what a merkin is, and use the term anyway. -- Rhodri James *-* Wildebeest Herder to the Masses -- https://mail.python.org/mailman/listinfo/python-list

Re: Code style query: multiple assignments in if/elif tree

2014-03-31 Thread Rhodri James
ignoring the trouble line-wrapping caused in your post) to take in with only a couple of eye movements along the line. That makes a really quite surprising difference to the comprehensibility of the whole thing. -- Rhodri James *-* Wildebeest Herder to the Masses -- https://mail.python.org

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-03-31 Thread Rhodri James
ise this sound: *plonk* -- Rhodri James *-* Wildebeest Herder to the Masses -- https://mail.python.org/mailman/listinfo/python-list

Re: OFF TOPIC Spanish in the USA [was Re: Explanation of this Python language feature?]

2014-03-31 Thread Rhodri James
half the states feel the need to specify an official language. One might wonder why... -- Rhodri James *-* Wildebeest Herder to the Masses -- https://mail.python.org/mailman/listinfo/python-list

Re: converting strings to hex

2014-04-03 Thread James Harris
>"HAL!!?" > >"I'm sorry, Dave, I just can't do that..." You might find this interesting. http://sundry.wikispaces.com/transcript-2001 James -- https://mail.python.org/mailman/listinfo/python-list

[OFF-TOPIC] How do I find a mentor when no one I work with knows what they are doing?

2014-04-08 Thread James Brewer
ne willing to point me in the right direction and what can I offer in return? Happy Monday! James -- https://mail.python.org/mailman/listinfo/python-list

Re: [OFF-TOPIC] How do I find a mentor when no one I work with knows what they are doing?

2014-04-08 Thread James Brewer
On Tue, Apr 8, 2014 at 7:28 AM, Larry Martell wrote: > -People are on crazy deadlines and have no time to work with you. > > > -People make you feel like an idiot when you ask a question and they > intimidate you so you don't come back and ask more. > Both of these issues exist; mainly on the pa

Re: [OFF-TOPIC] How do I find a mentor when no one I work with knows what they are doing?

2014-04-08 Thread James Brewer
; > projects. I could go into my theories as to why, but it'd make for a >> > long post. >> >> http://michaelochurch.wordpress.com/2012/04/13/java-shop-politics/ >> >> >> >> >> >> -- >> Steven D'Aprano >> http:/

Re: [OFF-TOPIC] How do I find a mentor when no one I work with knows what they are doing?

2014-04-08 Thread James Brewer
On Tue, Apr 8, 2014 at 12:47 PM, Rick Johnson wrote: > > Judging from your childish optimism and bombastic > expectations that the onerous of scholastic achievements lay > solely in the prowess of your teacher, i can only conclude > that you are yet another recent graduate of one of the > "fine uni

Re: [OFF-TOPIC] How do I find a mentor when no one I work with knows what they are doing?

2014-04-09 Thread James Brewer
On Tue, Apr 8, 2014 at 7:19 PM, Chris Angelico wrote: > On Wed, Apr 9, 2014 at 6:19 AM, James Brewer wrote: > > You're an interesting fellow. > > Rick's one of our resident... uhh... characters. Don't take his words to > heart. > > > Also, I didn'

Re: Unpacking U-Boot image file

2014-04-10 Thread Rhodri James
Image Timestamp" I suspect taking this apart may be a little involved. -- Rhodri James *-* Wildebeest Herder to the Masses -- https://mail.python.org/mailman/listinfo/python-list

Re: Teaching python to non-programmers

2014-04-10 Thread Rhodri James
post less likely to be read. Sorry your post was the straw to break the camel's back this week, but it is a complete pain to the rest of us. I have more than once considered getting my reader to automatically discard anything with "@googlegroups.com" in the message ID

Travis CI + Python 3.3 + Django 1.7b1

2014-04-12 Thread James Brewer
import ez_setup` is called. Here is the log from the build: https://s3.amazonaws.com/archive.travis-ci.org/jobs/22824057/log.txt Here is the .travis.yml file associated with the project: https://github.com/WargamesIO/wargames/blob/master/.travis.yml Any ideas? :) Happy Saturday! -- *Jame

Re: Teaching python to non-programmers

2014-04-13 Thread Rhodri James
On Fri, 11 Apr 2014 21:20:05 +0100, wrote: On Thursday, April 10, 2014 3:40:22 PM UTC-7, Rhodri James wrote: It's called irony, and unfortunately Mark is reacting to an all-to-common situation that GoogleGroups foists on unsuspecting posters like yourself. People who say "

Re: Can't figure out 'instance has no attribute' error

2014-05-17 Thread Rhodri James
and replace all your tab characters with four spaces, and stop using tabs. -- Rhodri James *-* Wildebeest Herder to the Masses -- https://mail.python.org/mailman/listinfo/python-list

Re: Problem in writing demands to the xml file

2014-05-19 Thread Rhodri James
u say, "It doesn't seem to work," what do you mean? What are you expecting it to do? What does it actually do? Is there a traceback? -- Rhodri James *-* Wildebeest Herder to the Masses -- https://mail.python.org/mailman/listinfo/python-list

Re: Python box (home-use smart router)

2014-05-28 Thread Rhodri James
se Python for application writing because speed and space constraints are usually quite tight, which generally means coding in C for preference (despite my boss's attempts to force me to use C++). -- Rhodri James *-* Wildebeest Herder to the Masses -- https://mail.python.org/mailman/listinfo/python-list

Re: IDE for python

2014-05-28 Thread Rhodri James
lution screens is that he can tile more 80x40 console windows on them. -- Rhodri James *-* Wildebeest Herder to the Masses -- https://mail.python.org/mailman/listinfo/python-list

Re: IDE for python

2014-05-31 Thread Rhodri James
rep, lgrep, grep-find etc I generally find "M-x grep" sufficient. -- Rhodri James *-* Wildebeest Herder to the Masses -- https://mail.python.org/mailman/listinfo/python-list

Re: Editing tabular data [was: PEP8 79 char max]

2013-07-31 Thread Rhodri James
t would be more foolproof to edit that stuff with a spreadsheet. There's nothing foolproof about using a spreadsheet! -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Beginner question

2013-08-06 Thread Rhodri James
k if goagain appears in a list (or rather a tuple) of strings: if goagain in ('y', 'yes'): print('ok') elif goagain not in ('y', 'yes'): print('goodbye') sys.exit() or better, if goagain in ('y', 'yes', 'ohdeargodyes', 'you get the idea'): print('ok') else: print('goodbye') sys.exit() -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Enum vs OrderedEnum

2013-08-06 Thread Rhodri James
ents as class variables. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Pair of filenos read/write each other?

2013-08-13 Thread Rhodri James
bit on what you're trying to do, exactly. If you give us a bit more context, we might be able to give you better advice. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Python TUI that will work on DOS/Windows and Unix/Linux

2013-08-29 Thread James Harris
keyboard would be essential. Input from a mouse would be nice to have. Especially if you have had a similar requirement in the past but even if not, is there any cross-platform system you would recommend? James -- http://mail.python.org/mailman/listinfo/python-list

Re: Encapsulation unpythonic?

2013-09-02 Thread Rhodri James
s to "constants" persisted. Many's the poor natural scientist who was perplexed to find that 0 suddenly had the value 1! -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Python TUI that will work on DOS/Windows and Unix/Linux

2013-09-04 Thread James Harris
"James Harris" wrote in message news:kvmvpg$g96$1...@dont-email.me... > Am looking for a TUI (textual user interface) mechanism to allow a Python > program to create and update a display in text mode. For example, if a > command prompt was sized 80x25 it would be made u

Re: Python TUI that will work on DOS/Windows and Unix/Linux

2013-09-11 Thread James Harris
th the kind of interface I had in mind. Here are some links for anyone else who is interested. http://www.sigala.it/sergio/tvision/images.html http://www.npcole.com/npyscreen/ http://excess.org/urwid/examples.html http://www.hexedit.com/hex-edit-shots.htm James -- https://mail.python.org/mailman/listinfo/python-list

Re: creating rectangle with qt-designer

2013-09-19 Thread Rhodri James
t Designer manual? Which can be googled for trivially, by the way. -- Rhodri James *-* Wildebeest Herder to the Masses -- https://mail.python.org/mailman/listinfo/python-list

Re: Handling 3 operands in an expression without raising an exception

2013-09-26 Thread James Harris
27;] ) except KeyError: try: city = gi.time_zone_by_addr( os.environ['REMOTE_ADDR'] ) except KeyError: city = "??? " Does that help? James -- https://mail.python.org/mailman/listinfo/python-list

Re: Python variables? [was Re: class implementation]

2013-09-30 Thread Rhodri James
e accurate to say that Python has no constants! :) Or, alternatively, that Python has many constants, such as all those immutable integers cached around the place :-) What it doesn't have is fixed bindings. -- Rhodri James *-* Wildebeest Herder to the Masses -- https://mail.python.org/mailman/listinfo/python-list

Re: How to streamingly read text file and display whenever updated text

2013-10-05 Thread James Harris
wrote in message news:04ee91f9-1cbf-4364-bca3-da25aa4db...@googlegroups.com... > > > #!/usr/bin/python > import time > f = open('/home/martin/Downloads/a.txt') Looks like you are on Unix so you can do this from the shell tail -F /home/martin/Downloads

Re: class implementation

2013-10-08 Thread Rhodri James
t makes it so much easier for the rest of us to understand what you meant when you use terms so loosely! -- Rhodri James *-* Wildebeest Herder to the Masses -- https://mail.python.org/mailman/listinfo/python-list

Re: Python was designed (was Re: Multi-threading in Python vs Java)

2013-10-15 Thread Rhodri James
ly ludicrous statement (and grammatically suspect to boot) that does nothing to bolster my confidence in your philosophising. -- Rhodri James *-* Wildebeest Herder to the Masses -- https://mail.python.org/mailman/listinfo/python-list

Re: Weird problem with UDP and gevent

2013-10-18 Thread James Harris
emote_addr) > > everything works fine. Has anybody seen anything like this? I'm > guessing this is some kind of gevent bug. Those are two different things. You would normally use connect() on a SOCK_STREAM socket. It requires that the remote endpoint, in this case localhost:970

Re: Possibly better loop construct, also labels+goto important and on the fly compiler idea.

2013-10-25 Thread Rhodri James
r Usenet newsgroup. Google groups seems to delight in making the "previous" post a poorly defined concept (by gratuitously breaking reference chains and the like). It's not that the skill isn't universal, it's that the opportunity isn't. -- Rhodri

Re: Parsing multiple lines from text file using regex

2013-10-27 Thread Rhodri James
get delimiter collecting_banner = True banner_lines = [] elif found other stuff: do other stuff elif found delimiter: collecting_banner = False else: banner_lines.append(line) -- Rhodri James *-* Wildebeest Herder to

Installed Python 3 on Mac OS X Yosemite but its still Python 2.7

2015-03-09 Thread James Dekker
I am currently running OS X Yosemite (10.10.2) on my MacBook Pro... By default, Apple ships Python 2.7.6 on Yosemite. Just downloaded and ran this installer for Python 3: python-3.4.3-macosx10.6.pkg When I opened up my Terminal and typed in python, this is what came up: Python 2.7.6 (default, S

Signal SIGINT ignored during socket.accept

2015-09-10 Thread James Harris
. Any ideas? James -- https://mail.python.org/mailman/listinfo/python-list

Re: Signal SIGINT ignored during socket.accept

2015-09-10 Thread James Harris
"Chris Angelico" wrote in message news:mailman.332.1441910212.8327.python-l...@python.org... On Fri, Sep 11, 2015 at 4:24 AM, James Harris wrote: I have a listening socket, self.lsock, which is used in an accept() call as follows endpoint = self.lsock.accept() The problem

Re: Signal SIGINT ignored during socket.accept

2015-09-10 Thread James Harris
"Chris Angelico" wrote in message news:mailman.337.1441913195.8327.python-l...@python.org... On Fri, Sep 11, 2015 at 5:11 AM, James Harris wrote: ... However, on Windows the recognition of Control-C does not happen until after something connects to the socket. ... This

Re: Signal SIGINT ignored during socket.accept

2015-09-11 Thread James Harris
then he wouldn't be using Windows in the first place. ;) LOL. I know that's tongue in cheek but I tend to favour portability over most other things. So running on Windows as well as Unix is, in my book, a Good Thing. James -- https://mail.python.org/mailman/listinfo/python-list

Re: Signal SIGINT ignored during socket.accept

2015-09-11 Thread James Harris
"James Harris" wrote in message news:msv21t$n1m$1...@dont-email.me... "Grant Edwards" wrote in message news:msum6c$hv$1...@reader1.panix.com... ... Waking up twice per second and immediately calling select() again on any hardware/OS built in the past 50 years

Shutting down a cross-platform multithreaded app

2015-09-18 Thread James Harris
better way, though. Any comments on the ideas above? James -- https://mail.python.org/mailman/listinfo/python-list

Re: Shutting down a cross-platform multithreaded app

2015-09-18 Thread James Harris
"Paul Rubin" wrote in message news:87zj0jd1ta@jester.gateway.sonic.net... "James Harris" writes: I have a multithreaded app that I want to be able to shut down easily such as by hitting control-c or sending it a signal. Set the daemon flag on the worker threa

Re: Shutting down a cross-platform multithreaded app

2015-09-19 Thread James Harris
"Chris Angelico" wrote in message news:mailman.8.1442612439.21674.python-l...@python.org... On Sat, Sep 19, 2015 at 3:17 AM, James Harris wrote: Needless to say, on a test Windows machine AF_UNIX is not present. The only cross-platform option, therefore, seems to be to use each s

Re: Shutting down a cross-platform multithreaded app

2015-09-19 Thread James Harris
"Laura Creighton" wrote in message news:mailman.5.1442609448.21674.python-l...@python.org... In a message of Fri, 18 Sep 2015 20:09:19 +0100, "James Harris" writes: Set the daemon flag on the worker threads, so when the main thread exits, the workers also exit. Interes

Re: Shutting down a cross-platform multithreaded app

2015-09-19 Thread James Harris
"Chris Angelico" wrote in message news:mailman.13.1442657702.21674.python-l...@python.org... On Sat, Sep 19, 2015 at 7:49 PM, James Harris wrote: "Chris Angelico" wrote in message news:mailman.8.1442612439.21674.python-l...@python.org... ... If you're usin

Lightwight socket IO wrapper

2015-09-20 Thread James Harris
just a little bit extra. ;-) James -- https://mail.python.org/mailman/listinfo/python-list

Re: Lightwight socket IO wrapper

2015-09-20 Thread James Harris
"Akira Li" <4kir4...@gmail.com> wrote in message news:mailman.37.1442754893.21674.python-l...@python.org... "James Harris" writes: I guess there have been many attempts to make socket IO easier to handle and a good number of those have been in Python. The trou

Re: Lightwight socket IO wrapper

2015-09-22 Thread James Harris
"Dennis Lee Bieber" wrote in message news:mailman.12.1442794762.28679.python-l...@python.org... On Sun, 20 Sep 2015 23:36:30 +0100, "James Harris" declaimed the following: There are a few things and more crop up as time goes on. For example, over TCP it would be helpfu

Re: Lightwight socket IO wrapper

2015-09-22 Thread James Harris
"Akira Li" <4kir4...@gmail.com> wrote in message news:mailman.18.1442804862.28679.python-l...@python.org... "James Harris" writes: ... There are a few things and more crop up as time goes on. For example, over TCP it would be helpful to have a function to receive a s

Re: A little test for you Guys😜

2015-09-22 Thread James Harris
n output > 4 Iterators > > Let's consider this program : > > def program_1(): > yield 1 > yield 2 > yield 3 > > g = program_1() > a = list(g) > b = list(g) > c = g() > > Question : At the end of the program, > > 1. What is the type of g ? > 2. What is the value of a ? > 3. What is the value of b ? > 4. What is the value of c ? Good one. I checked this and only got 1 and 2 right. > 5 Decorators No idea! James -- https://mail.python.org/mailman/listinfo/python-list

Re: Lightwight socket IO wrapper

2015-09-22 Thread James Harris
"Marko Rauhamaa" wrote in message news:8737y6cgp6@elektro.pacujo.net... "James Harris" : I agree with what you say. A zero-length UDP datagram should be possible and not indicate end of input but is that guaranteed and portable? The zero-length payload size should

Re: A little test for you Guys😜

2015-09-22 Thread James Harris
in question 4 could be easily found by trying it. James -- https://mail.python.org/mailman/listinfo/python-list

64bit Python builds on HP-UX ia64 and PA-RISC (Using GCC)

2015-09-23 Thread James Matthews
printgrammar.o Parser/pgenmain.o -lnsl -lrt -ldld -ldl -o Parser/pgen ld: Mismatched Data ABI. Expected None but found EF_IA_64_ABI64 in file Parser/acceler.o Fatal error. collect2: error: ld returned 1 exit status *** Error exit code 1 Stop. *** Error exit code 1 Seems to be a library mismatch? Any help would be appreciated. Regards, James -- https://mail.python.org/mailman/listinfo/python-list

List comprehensions and evaluation of elements therein

2015-09-23 Thread James Harris
analog of the list comprehension? With this latter expansion the values of v0 and v2 could appear in expr4 or expr5. Again, the evaluation order would matter. James -- https://mail.python.org/mailman/listinfo/python-list

Problem with copy.deepcopy and multiprocessing.Queue

2015-10-14 Thread James DeVincentis
I've got a bit of a problem with copy.deepcopy and using multiprocessing.Queue. I have an HTTPAPI that gets exposed to add objects to a multiprocessing.Qeue. Source code here: https://github.com/jmdevince/cifpy3/blob/master/lib/cif/api/handler.py#L283 The trouble is, even using deepcopy, m

Problem with copy.deepcopy and multiprocessing

2015-10-14 Thread James DeVincentis
I've got a bit of a problem with copy.deepcopy and using multiprocessing.Queue. I have an HTTPAPI that gets exposed to add objects to a multiprocessing.Qeue. Source code here: https://github.com/jmdevince/cifpy3/blob/master/lib/cif/api/handler.py#L283 The trouble is, even using deepcopy, m

RE: Problem with copy.deepcopy and multiprocessing.Queue

2015-10-15 Thread James DeVincentis
Anyone have any ideas? I feel like this could be a bug with the garbage collector across multiprocessing. From: James DeVincentis [mailto:ad...@hexhost.net] Sent: Wednesday, October 14, 2015 12:41 PM To: 'python-list@python.org' Subject: Problem with copy.deepcopy and multiproces

Re: Problem with copy.deepcopy and multiprocessing.Queue

2015-10-15 Thread James DeVincentis
to a multiprocess.Queue it fixed the issue. Kind of odd to me. Not sure if anyone wants to look into it. > On Oct 15, 2015, at 5:42 PM, Ian Kelly wrote: > > On Thu, Oct 15, 2015 at 4:02 PM, James DeVincentis wrote: > > > > Anyone have any ideas? I feel like this could be a

Re: Problem with copy.deepcopy and multiprocessing.Queue

2015-10-15 Thread James DeVincentis
I take that back. It’s not entirely fixed. Something else strange is going on here. More debugging needed. > On Oct 15, 2015, at 6:36 PM, James DeVincentis wrote: > > I think I tracked this down and resolved it. > > It appears taking an object from a multiprocess.Queue and

Re: Problem with copy.deepcopy and multiprocessing.Queue

2015-10-15 Thread James DeVincentis
Size: 572 > On Oct 15, 2015, at 5:02 PM, James DeVincentis wrote: > > Anyone have any ideas? I feel like this could be a bug with the garbage > collector across multiprocessing. > > From: James DeVincentis [mailto:ad...@hexhost.net] > Sent: Wednesday, October 14, 2015 1

Re: Problem with copy.deepcopy and multiprocessing.Queue

2015-10-17 Thread James DeVincentis
ing multiprocessing.Queue._feed(). Thoughts from anyone? > On Oct 15, 2015, at 7:37 PM, James DeVincentis wrote: > > Looking into it, I seem to have found a race condition where a > multiprocessing.Queue.get() can get hung waiting for an object even if there > are objects in th

Re: Problem with copy.deepcopy and multiprocessing.Queue

2015-10-18 Thread James DeVincentis
is why is it necessary to call os._exit() ? > On Oct 17, 2015, at 3:19 PM, James DeVincentis wrote: > > So, whatever is causing this is a bit deeper in the multiprocessing.Queue > class. I tried using a non-blocking multiprocessing.Queue.get() by setting > the first parameter to

Re: Problem with copy.deepcopy and multiprocessing.Queue

2015-10-18 Thread James DeVincentis
to exit nicely (not raising a SystemExit), AND flush the buffers, so I’m stuck in a stupid edge case. > On Oct 18, 2015, at 3:33 AM, James DeVincentis wrote: > > Seems I found the cause. os._exit() is used in ForkingMixIn for SocketServer > and it’s child classes. > > Since

Re: Problem with copy.deepcopy and multiprocessing.Queue

2015-10-18 Thread James DeVincentis
I see, looks like I’ll have to use Queue.close() Didn’t think it would be necessary since I was assuming it would be garbage collected. Sigh. Bug, fixed. Thanks everyone! > On Oct 18, 2015, at 3:41 AM, James DeVincentis wrote: > > I get why it needs to be called, but this looks like

Re: Problem with copy.deepcopy and multiprocessing.Queue

2015-10-18 Thread James DeVincentis
015, at 3:19 PM, James DeVincentis wrote: > > So, whatever is causing this is a bit deeper in the multiprocessing.Queue > class. I tried using a non-blocking multiprocessing.Queue.get() by setting > the first parameter to false and then catching the queue.Empty exception. For >

Re: Problem with copy.deepcopy and multiprocessing.Queue

2015-10-18 Thread James DeVincentis
18, 2015, at 10:55 AM, Ian Kelly wrote: > > On Sun, Oct 18, 2015 at 2:46 AM, James DeVincentis <mailto:ad...@hexhost.net>> wrote: > > > > I see, looks like I’ll have to use Queue.close() > > > > Didn’t think it would be necessary since I was assuming it

Reporting and data stats help

2014-07-31 Thread James P
I'm building a report builder for my Django app and could use a little advice. My reports are fairly simple where I accumulate scores of data (easy enough) but then I want to alter the report totals by varying dimensions (date ranges / split dates/weeks/months / owners / other metadata etc.). Si

help with regex

2014-10-07 Thread James Smith
I want the last "1" I can't this to work: >>> pattern=re.compile( "(\d+)$" ) >>> match=pattern.match( "LINE: 235 : Primary Shelf Number (attempt 1): 1") >>> print match.group() -- https://mail.python.org/mailman/listinfo/python-list

Re: Create an index from a webpage [RANT, DNFTT]

2011-09-08 Thread Rhodri James
map Generator (http://www.smart-it-consulting.com/article.htm?node=166&page=128, fourth offering when you google "map a website with Python") looks like a promising start. At least it produces something in XML -- filtering that and turning it into HTML should be fairly straight

Re: optionparse: how to add a line break to the help text

2011-09-10 Thread Rhodri James
fsdf\nsdfsdf s\n\n' Unfortunately the help text is formatted using textwrap, which presumes that the entire text is a single paragraph. To get paragraphs in the help text, you'll need to write an IndentedHelpFormatter subclass that splits the text on "\n\n", textwraps the

Re: How do I automate the removal of all non-ascii characters from my code?

2011-09-12 Thread Rhodri James
ng a character as a smart quote or a non breaking space or an e-umlaut or whatever, but that doesn't make the character legal! -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: stackoverflow and c.l.py

2011-09-14 Thread Rhodri James
On Wed, 14 Sep 2011 14:05:23 +0100, memilanuk wrote: Rick & Xang Li are two examples of what you *don't* see (or at least I don't) @ SO Then you haven't been looking hard enough ;-) -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

<    5   6   7   8   9   10   11   12   13   14   >