PEP 249 Compliant error handling

2017-10-17 Thread Israel Brewster
ld decide on a case-by-case basis what the proper action is, but since this a module that has to work in any situation, it's a bit more complicated. --- Israel Brewster Systems Analyst II Rav

Re: PEP 249 Compliant error handling

2017-10-17 Thread Israel Brewster
> On Oct 17, 2017, at 10:35 AM, MRAB wrote: > > On 2017-10-17 18:26, Israel Brewster wrote: >> I have written and maintain a PEP 249 compliant (hopefully) DB API for the >> 4D database, and I've run into a situation where corrupted string data from >> the

Re: PEP 249 Compliant error handling

2017-10-18 Thread Israel Brewster
g specifications in the PEP 249, and would think that would be more end-user configured rather than module level. ------- Israel Brewster Systems Analyst II Ravn Alaska 5245 Airport Industrial Rd Fairban

Re: PEP 249 Compliant error handling

2017-10-18 Thread Israel Brewster
On Oct 17, 2017, at 12:02 PM, MRAB wrote: > > On 2017-10-17 20:25, Israel Brewster wrote: >> >>> On Oct 17, 2017, at 10:35 AM, MRAB >> <mailto:pyt...@mrabarnett.plus.com>> wrote: >>> >>> On 2017-10-17 18:26, Israel Brewster wrote: >>&

Efficient counting of results

2017-10-19 Thread Israel Brewster
cy numerical analysis tools for python like pandas and numpy - could something like that help? Might there be a way to simply set up a table with "rules" for the columns and rows, and drop my records into the table, having them automatically counted into the proper bins or something? Or am

Re: Efficient counting of results

2017-10-19 Thread Israel Brewster
> On Oct 19, 2017, at 9:40 AM, Israel Brewster wrote: > > I am working on developing a report that groups data into a two-dimensional > array based on date and time. More specifically, date is grouped into > categories: > > day, week-to-date, month-to-date, and year-t

Re: Efficient counting of results

2017-10-19 Thread Israel Brewster
> On Oct 19, 2017, at 10:02 AM, Stefan Ram wrote: > > Israel Brewster writes: >> t10 = {'daily': 0, 'WTD': 0, 'MTD': 0, 'YTD': 0,} >> increment the appropriate bin counts using a bunch of if statements. > > I can't re

Re: Efficient counting of results

2017-10-20 Thread Israel Brewster
ces say). > > > I hope that's even vaguely helpful. In a sense, in that it supports my initial approach. As Stefan Ram pointed out, there is nothing wrong with the solution I have: simply using if statements around the calculated lateness of t1 a

Save non-pickleable variable?

2017-10-20 Thread Israel Brewster
file, but obviously I wouldn't expect anyone here to know anything about that - I'm just asking about the python side :-) --- Israel Brewster Systems Analyst II Ravn Alaska 5245 Airport Industrial Rd Fairbanks, AK 99709 (907) 450-7293 -

Re: Save non-pickleable variable?

2017-10-20 Thread Israel Brewster
On Oct 20, 2017, at 11:09 AM, Stefan Ram wrote: > > Israel Brewster writes: >> Given that, is there any way I can write out the "raw" binary >> data to a file > > If you can call into the Java SE library, you can try > > docs.oracle.com/javase/9/

Thread safety issue (I think) with defaultdict

2017-10-31 Thread Israel Brewster
ld happen at any time # Client will call this function immediately after connecting, as well as in response to various user actions. def getac(): for record in aclist: last_points[]=record_timestamp #DEBUGGING print("At get AC:", len(last_points)) --

Re: Thread safety issue (I think) with defaultdict

2017-11-01 Thread Israel Brewster
by the main thread. How can I *properly* share a dictionary like object between two threads, with both threads seeing the updates made by the other? --- Israel Brewster Systems Analyst II Ravn Alaska 5245 Airport Industrial Rd Fairbanks, AK 99709 (907

Re: Thread safety issue (I think) with defaultdict

2017-11-01 Thread Israel Brewster
On Nov 1, 2017, at 9:04 AM, Israel Brewster wrote: > > Let me rephrase the question, see if I can simplify it. I need to be able to > access a defaultdict from two different threads - one thread that responds to > user requests which will populate the dictionary in respon

Re: Thread safety issue (I think) with defaultdict

2017-11-01 Thread Israel Brewster
On Nov 1, 2017, at 9:58 AM, Ian Kelly wrote: > > On Tue, Oct 31, 2017 at 11:38 AM, Israel Brewster > wrote: >> A question that has arisen before (for example, here: >> https://mail.python.org/pipermail/python-list/2010-January/565497.html >> <https://mail.py

Re: Thread safety issue (I think) with defaultdict

2017-11-02 Thread Israel Brewster
> On Nov 1, 2017, at 4:53 PM, Steve D'Aprano wrote: > > On Thu, 2 Nov 2017 05:53 am, Israel Brewster wrote: > > [...] >> So the end result is that the thread that "updates" the dictionary, and the >> thread that initially *populates* the dicti

Share unpickleable object across processes

2017-11-02 Thread Israel Brewster
something like store a void pointer to the object, then cast it to the correct object type, but that's not an option in python. So how can I get around this issue? --- Israel Brewster Systems Analyst II Ravn Alaska 5245 Airport Industrial Rd Fair

Re: Share unpickleable object across processes

2017-11-02 Thread Israel Brewster
On Nov 2, 2017, at 12:30 PM, Chris Angelico wrote: > > On Fri, Nov 3, 2017 at 5:54 AM, Israel Brewster wrote: >> I have a Flask/UWSGI web app that serves up web socket connections. When a >> web socket connection is created, I want to store a reference to said web >> s

Re: Share unpickleable object across processes

2017-11-02 Thread Israel Brewster
On Nov 2, 2017, at 11:15 AM, Stefan Ram wrote: > > Israel Brewster writes: >> the data structure that stores the socket connections needs >> to be shared across all said processes. > > IIRC that's the difference between threads and > processes: threads shar

Re: Share unpickleable object across processes

2017-11-02 Thread Israel Brewster
On Nov 2, 2017, at 12:36 PM, Chris Angelico wrote: > > On Fri, Nov 3, 2017 at 7:35 AM, Israel Brewster <mailto:isr...@ravnalaska.net>> wrote: >> On Nov 2, 2017, at 12:30 PM, Chris Angelico wrote: >>> >>> On Fri, Nov 3, 2017 at 5:54 AM, Israel Brewster

Re: Thread safety issue (I think) with defaultdict

2017-11-03 Thread Israel Brewster
--- Israel Brewster Systems Analyst II Ravn Alaska 5245 Airport Industrial Rd Fairbanks, AK 99709 (907) 450-7293 --- > On Nov 3, 2017, at 7:11 AM, Rhodri James wrote: > > On 03/11/17 14:

String matching based on sound?

2018-01-29 Thread Israel Brewster
I am working on a python program that, at one step, takes an input (string), and matches it to songs/artists in a users library. I'm having some difficulty, however, figuring out how to match when the input/library contains numbers/special characters. For example, take the group "All-4-One". In

Packaging uwsgi flask app for non-programmers?

2018-02-06 Thread Israel Brewster
. Also, I do need to leave a config file accessible for the end user to be able to edit. Is there a way to use pyinstaller in this scenario, or perhaps some other option that might work better to package things up? --- Israel Brewster Systems Analyst I

Re: Packaging uwsgi flask app for non-programmers?

2018-02-07 Thread Israel Brewster
On Feb 6, 2018, at 12:12 PM, Israel Brewster wrote: > > I have been working on writing an Alexa skill which, as part of it, requires > a local web server on the end users machine - the Alexa skill sends commands > to this server, which runs them on the local machine. I wrot

Re: Packaging uwsgi flask app for non-programmers?

2018-02-07 Thread Israel Brewster
> On Feb 6, 2018, at 8:24 PM, Dennis Lee Bieber wrote: > > On Tue, 6 Feb 2018 12:12:26 -0900, Israel Brewster > declaimed the following: > >> I have been working on writing an Alexa skill which, as part of it, requires >> a local web server on the end users mach

Re: Packaging uwsgi flask app for non-programmers?

2018-02-13 Thread Israel Brewster
> > On Feb 6, 2018, at 12:12 PM, Israel Brewster wrote: > > I have been working on writing an Alexa skill which, as part of it, requires > a local web server on the end users machine - the Alexa skill sends commands > to this server, which runs them on the local machine.

Re: Packaging uwsgi flask app for non-programmers?

2018-02-13 Thread Israel Brewster
> On Feb 13, 2018, at 10:02 AM, Dan Stromberg wrote: > > On Tue, Feb 13, 2018 at 9:28 AM, Israel Brewster > wrote: >> As such, I'm considering three possible solutions: >> >> 1) Make some sort of installer package that includes the python3 installer >

Filtering XArray Datasets?

2022-06-06 Thread Israel Brewster
issues? Some way to do an in-place filtering? --- Israel Brewster Software Engineer Alaska Volcano Observatory Geophysical Institute - UAF 2156 Koyukuk Drive Fairbanks AK 99775-7320 Work: 907-474-5172 cell: 907-328-9145 -- https://mail.python.org/mailman/listinfo/python-list

Shapely Polygon creating empty polygon

2022-01-04 Thread Israel Brewster
>>print(shapely.__version__) >>>from shapely.geometry import Polygon >>>print(Polygon.from_bounds(*bounds)) Output: 1.8.0 POLYGON EMPTY In fact, *any* attempt to create a polygon gives the same result: >>> test = Polygon(((1, 1), (2, 1), (2, 2))) >>&

Re: Shapely Polygon creating empty polygon

2022-01-05 Thread Israel Brewster
apely.geometry import Polygon >>> bounds = [-164.29635821669632, 54.64251856269729, -163.7631779798799, >>> 54.845450778742546] >>> print(Polygon.from_bounds(*bounds)) POLYGON EMPTY …So apparently I have to make sure to import shapely *before* I import anything from osge

Testing POST in cherrypy

2016-10-04 Thread Israel Brewster
ody of the request, but in what format? Do I just url lib.urlencode() a dictionary and pass that as the body, or is there some other method I should use? Thanks! ------- Israel Brewster Systems Analyst II Ravn Alaska 5245 Airport Industrial Rd Fairbanks, AK

Error handling in context managers

2017-01-16 Thread Israel Brewster
if I was able to get a connection, but it's a thought. Options? --- Israel Brewster Systems Analyst II Ravn Alaska 5245 Airport Industrial Rd Fairbanks, AK 99709 (907) 450-7293 --- -- https://mail.python.org/mailman/listinfo/python-list

Re: Error handling in context managers

2017-01-17 Thread Israel Brewster
On Jan 16, 2017, at 1:27 PM, Terry Reedy wrote: > > On 1/16/2017 1:06 PM, Israel Brewster wrote: >> I generally use context managers for my SQL database connections, so I can >> just write code like: >> >> with psql_cursor() as cursor: >> >> >&

Re: Error handling in context managers

2017-01-17 Thread Israel Brewster
On Jan 16, 2017, at 8:01 PM, Gregory Ewing wrote: > > Israel Brewster wrote: >> The problem is that, from time to time, I can't get a connection, the result >> being that cursor is None, > > That's your problem right there -- you want a better-behaved &g

Re: Error handling in context managers

2017-01-17 Thread Israel Brewster
On Jan 16, 2017, at 11:34 PM, Peter Otten <__pete...@web.de> wrote: > > Gregory Ewing wrote: > >> Israel Brewster wrote: >>> The problem is that, from time to time, I can't get a connection, the >>> result being that cursor is None, >> >&

AssertionError without traceback?

2019-01-14 Thread Israel Brewster
t may not be a big issue, but it has locked up once since the move (no errors in the log, just not responding on the socket), so I am a bit concerned. --- Israel Brewster Systems Analyst II 5245 Airport Industrial Rd Fairbanks, AK 99709 (907) 450

Re: AssertionError without traceback?

2019-01-17 Thread Israel Brewster
--- Israel Brewster Systems Analyst II 5245 Airport Industrial Rd Fairbanks, AK 99709 (907) 450-7293 --- [cid:bfa5c323-b100-481d-96b1-fc256ef2eb39@flyravn.com] [cid:8c891973-9e67-47b3-aa14-5f58b9b93607

Re: AssertionError without traceback?

2019-01-17 Thread Israel Brewster
> On Jan 14, 2019, at 10:40 PM, dieter wrote: > > Israel Brewster writes: >> I have a flask application deployed on CentOS 7 using Python 3.6.7 and uwsgi >> 2.0.17.1, proxied behind nginx. uwsgi is configured to listed on a socket in >> /tmp. The app uses gevent and

Multiprocessing performance question

2019-02-18 Thread Israel Brewster
thon3, the map function doesn’t actually produce a result until needed, but that’s why I wrapped everything in calls to list(), at least for testing. --- Israel Brewster Software Engineer Alaska Volcano Observatory Geophysical Institute - UAF 2156 Koyukuk Drive Fairbanks AK 99775-7320 Work: 90

Re: Multiprocessing performance question

2019-02-18 Thread Israel Brewster
> On Feb 18, 2019, at 6:37 PM, Ben Finney wrote: > > I don't have anything to add regarding your experiments with > multiprocessing, but: > > Israel Brewster writes: > >> Which creates and populates an 800x1000 “grid” (represented as a flat >> list at

Re: Multiprocessing performance question

2019-02-21 Thread Israel Brewster
generating the entire grid up-front, I generate the boxes as needed to calculate the overlap with the data grid. This brought the processing time down to around 40 seconds, so a definite improvement there. --- Israel Brewster Software Engineer Alaska Volcano Observatory Geophysical Institute - UAF

uWISGI with Qt for Python

2019-03-13 Thread Israel Brewster
ance matters. Also I had some glitches with it when using a lasso selector (plot going black). Still, with some work, it may be an option. --- Israel Brewster Software Engineer Alaska Volcano Observatory Geophysical Institute - UAF 2156 Koyukuk Drive Fairbanks AK 99775-7320 Work: 907-474-5172

Re: uWISGI with Qt for Python

2019-03-13 Thread Israel Brewster
Never mind this request. I realized that for what I am doing, the web server was unnecessary. I could just load local HTML files directly into the QWebEngineView with no need of an intermediate server. Thanks anyway, and sorry for the noise! --- Israel Brewster Software Engineer Alaska Volcano

Multiprocessing and memory management

2019-07-03 Thread Israel Brewster
possible. 3) Other approaches? --- Israel Brewster Software Engineer Alaska Volcano Observatory Geophysical Institute - UAF 2156 Koyukuk Drive Fairbanks AK 99775-7320 Work: 907-474-5172 cell: 907-328-9145 -- https://mail.python.org/mailman/listinfo/python-list

Proper way to pass Queue to process when using multiprocessing.imap()?

2019-09-03 Thread Israel Brewster
exception? --- Israel Brewster Software Engineer Alaska Volcano Observatory Geophysical Institute - UAF 2156 Koyukuk Drive Fairbanks AK 99775-7320 Work: 907-474-5172 cell: 907-328-9145 -- https://mail.python.org/mailman/listinfo/python-list

Re: Proper way to pass Queue to process when using multiprocessing.imap()?

2019-09-03 Thread Israel Brewster
> > On Sep 3, 2019, at 10:49 AM, Peter Otten <__pete...@web.de> wrote: > > Israel Brewster wrote: > >> When using pool.imap to apply a function over a list of values, what is >> the proper way to pass additional arguments to the function, specifically >>

Re: Proper way to pass Queue to process when using multiprocessing.imap()?

2019-09-03 Thread Israel Brewster
> > On Sep 3, 2019, at 9:27 AM, Rob Gaddi > wrote: > > On 9/3/19 10:17 AM, Israel Brewster wrote: >> When using pool.imap to apply a function over a list of values, what is the >> proper way to pass additional arguments to the function, specifically in my >>

Re: Proper way to pass Queue to process when using multiprocessing.imap()?

2019-09-04 Thread Israel Brewster
> > On Sep 3, 2019, at 11:09 AM, Israel Brewster wrote: > >> >> On Sep 3, 2019, at 10:49 AM, Peter Otten <__pete...@web.de> wrote: >> >> Israel Brewster wrote: >> >>> When using pool.imap to apply a function over a list of values, what

Make warning an exception?

2019-12-06 Thread Israel Brewster
the obvious options, with no luck so far. --- Israel Brewster Software Engineer Alaska Volcano Observatory Geophysical Institute - UAF 2156 Koyukuk Drive Fairbanks AK 99775-7320 Work: 907-474-5172 cell: 907-328-9145 -- https://mail.python.org/mailman/listinfo/python-list

Multiprocessing, join(), and crashed processes

2020-02-05 Thread Israel Brewster
process is still actually running, and if so goes back and calls join again? Or is there a better option to say “wait until this process is done, however long that may be, unless it crashes”? --- Israel Brewster Software Engineer Alaska Volcano Observatory Geophysical Institute - UAF 2156 Koyukuk

Multiprocessing queue sharing and python3.8

2020-04-06 Thread Israel Brewster
al is incorrect (at least starting with 3.8), what is the proper method of getting multiprocessing queues to child processes? --- Israel Brewster Software Engineer Alaska Volcano Observatory Geophysical Institute - UAF 2156 Koyukuk Drive Fairbanks AK 99775-7320 Work: 907-474-5172 cell: 907-328-9145 -- https://mail.python.org/mailman/listinfo/python-list

Re: Multiprocessing queue sharing and python3.8

2020-04-06 Thread Israel Brewster
erage it to do multiprocessing using spawn rather than fork in the future. Looks straight-forward enough. Thanks again! --- Israel Brewster Software Engineer Alaska Volcano Observatory Geophysical Institute - UAF 2156 Koyukuk Drive Fairbanks AK 99775-7320 Work: 907-474-5172 cell: 907-328-9

Re: Multiprocessing queue sharing and python3.8

2020-04-06 Thread Israel Brewster
mum working example that illustrated the behavioral differences I was seeing :-) Thanks for the pointer! --- Israel Brewster Software Engineer Alaska Volcano Observatory Geophysical Institute - UAF 2156 Koyukuk Drive Fairbanks AK 99775-7320 Work: 907-474-5172 cell: 907-328-9145 > > When you

Re: Python concurrent.futures.ProcessPoolExecutor

2020-12-16 Thread Israel Brewster
Thanks for your time and help! Assuming the code above is indented exactly as you run it, you have an indentation error. That is, the finish and print() are not indented to be part of the if __name__… call. As such, they run on import. When you launch a new process, it imports the module, whi

Handling transactions in Python DBI module

2016-02-10 Thread Israel Brewster
I modules, like psycopg2, ensure that ROLLBACK is called if the user never explicitly calls close()? Thanks for any assistance that can be provided. ------- Israel Brewster Systems Analyst II Ravn Alaska 5245 Airport Industrial Rd Fairbanks, AK 99709

Re: Handling transactions in Python DBI module

2016-02-11 Thread Israel Brewster
On Feb 10, 2016, at 8:14 PM, Chris Angelico wrote: > > On Thu, Feb 11, 2016 at 4:06 PM, Frank Millman wrote: >> A connection has 2 possible states - 'in transaction', or 'not in >> transaction'. When you create the connection it starts off as 'not'. >> >> When you call cur.execute(), it checks

Re: Handling transactions in Python DBI module

2016-02-11 Thread Israel Brewster
On Feb 10, 2016, at 8:06 PM, Frank Millman wrote: > > "Israel Brewster" wrote in message > news:92d3c964-0323-46ee-b770-b89e7e7e6...@ravnalaska.net... > >> I am working on implementing a Python DB API module, and am hoping I can get >> some help with fig

CFFI distribution questions

2014-11-25 Thread Israel Brewster
So I have a python module that I have written which uses CFFI to link against a C library I have compiled. Specifically, it is a Database driver for the 4th dimension database, using an open-source C library distributed by the 4D company. I have tested the module and C code on a couple of different

Cherrypy - prevent browser "prefetch"?

2014-12-01 Thread Israel Brewster
I don't know if this is a cherrypy specific question (although it will be implemented in cherrypy for sure), or more of a general http protocol question, but when using cherrypy to serve a web app, is there anyway to prevent browser prefetch? I'm running to a problem, specifically from Safari on th

Re: Cherrypy - prevent browser "prefetch"?

2014-12-01 Thread Israel Brewster
On Dec 1, 2014, at 12:50 PM, Ned Batchelder wrote: > On 12/1/14 4:26 PM, Tim Chase wrote: >> On 2014-12-01 11:28, Israel Brewster wrote: >>> I don't know if this is a cherrypy specific question (although it >>> will be implemented in cherrypy for sure), or mor

Re: Cherrypy - prevent browser "prefetch"?

2014-12-01 Thread Israel Brewster
those URLS in my CherryPy app is the way to go. Thanks! > > So I can see at least two cases in which you might want to sniff the > "are you just previewing, or do you actually want the page" > information. Perhaps there are more. > > -tkc > > > >

Re: Cherrypy - prevent browser "prefetch"?

2014-12-02 Thread Israel Brewster
> On Dec 2, 2014, at 4:33 AM, random...@fastmail.us wrote: > > On Mon, Dec 1, 2014, at 15:28, Israel Brewster wrote: >> For example, I have a URL on my Cherrypy app that updates some local >> caches. It is accessed at http:///admin/updatecaches So if I >> start ty

Re: Cherrypy - prevent browser "prefetch"?

2014-12-03 Thread Israel Brewster
Ah, I see. That makes sense. Thanks. --- Israel Brewster Systems Analyst II Ravn Alaska 5245 Airport Industrial Rd Fairbanks, AK 99709 (907) 450-7293 --- BEGIN:VCARD VERSION:3.0 N:Brewster;Israel;;; FN:Israel

Track down SIGABRT

2015-01-12 Thread Israel Brewster
I have a long-running python/CherryPy Web App server process that I am running on Mac OS X 10.8.5. Python 2.7.2 running in 32-bit mode (for now, I have the code in place to change over to 64 bit, but need to schedule the downtime to do it). On the 6th of this month, during normal operation from wha

Re: Track down SIGABRT

2015-01-13 Thread Israel Brewster
g crash in the first place :-) > -- > https://mail.python.org/mailman/listinfo/python-list --- Israel Brewster Systems Analyst II Ravn Alaska 5245 Airport Industrial Rd Fairbanks, AK 99709 (907) 450-7293 --- -- https://mail.python.org/mailman/listinfo/python-list

Re: Track down SIGABRT

2015-01-13 Thread Israel Brewster
On Jan 13, 2015, at 6:27 AM, William Ray Wing wrote: > >> On Jan 9, 2015, at 12:40 PM, Israel Brewster wrote: >> >> I have a long-running python/CherryPy Web App server process that I am >> running on Mac OS X 10.8.5. Python 2.7.2 running in 32-bit mode (for now, I

Re: Track down SIGABRT

2015-01-13 Thread Israel Brewster
On Jan 13, 2015, at 8:26 AM, Skip Montanaro wrote: > Assuming you have gdb available, you should be able to attach to the > running process, then set a breakpoint in relevant functions (like > exit() or abort()). Once there, you can pick through the C stack > manually (kind of tedious) or use the

Best way to do background calculations?

2015-10-25 Thread Israel Brewster
tl;dr: I've been using the multiprocessing module to run some calculations in the background of my CherryPy web app, but apparently this process sometimes gets stuck, causing problems with open sockets piling up and blocking the app. Is there a better way?The (rather wordy) details:I have a moderat

Re: Best way to do background calculations?

2015-10-26 Thread Israel Brewster
On Oct 25, 2015, at 4:05 PM, MRAB wrote: > > On 2015-10-23 17:35, Israel Brewster wrote: >> tl;dr: I've been using the multiprocessing module to run some >> calculations in the background of my CherryPy web app, but apparently >> this process sometimes gets stuc

Re: Best way to do background calculations?

2015-10-26 Thread Israel Brewster
On Oct 25, 2015, at 3:40 PM, Dennis Lee Bieber wrote: > > On Fri, 23 Oct 2015 08:35:06 -0800, Israel Brewster > declaimed the following: > >> tl;dr: I've been using the multiprocessing module to run some calculations >> in the background of my CherryPy web app

Re: Best way to do background calculations?

2015-10-26 Thread Israel Brewster
On Oct 25, 2015, at 6:48 PM, Chris Angelico wrote: > > On Sat, Oct 24, 2015 at 3:35 AM, Israel Brewster > wrote: >> >> Ideally, this recalculation process would happen in the background. There is >> no need for the user to wait around while the system crunches numbe

CherryPy cpstats and ws4py

2015-11-03 Thread Israel Brewster
ck' Disable tools.cpstats.on, and the sockets start working again. Is there some way I can fix this so I can use sockets as well as gather stats from my application? Thanks. --- Israel Brewster Systems Analyst II Ravn Alaska 5245 Airport Industrial R

Re: CherryPy cpstats and ws4py

2015-11-04 Thread Israel Brewster
any feedback that can be provided. --- Israel Brewster Systems Analyst II Ravn Alaska 5245 Airport Industrial Rd Fairbanks, AK 99709 (907) 450-7293 --- > On Nov 3, 2015, at 8:05 AM, Israel Brewster wr

Designing DBI compliant SQL parameters for module

2015-11-23 Thread Israel Brewster
s into the qmark style markers that the underlying library provides, but before I go and re-invent the wheel, is there already code that does this which I can simply use, or modify? ------- Israel Brewster Systems Analyst II Ravn Alaska 5245 Airport Industri

Bi-directional sub-process communication

2015-11-23 Thread Israel Brewster
at the risk of potentially causing the thread to hang if no message is posted)? And is my concern justified, or just paranoid? Thanks for any information that can be provided! --- Israel Brewster Systems Analyst II Ra

Re: Bi-directional sub-process communication

2015-11-23 Thread Israel Brewster
On Nov 23, 2015, at 11:51 AM, Ian Kelly wrote: > > On Mon, Nov 23, 2015 at 12:55 PM, Ian Kelly wrote: >> On Mon, Nov 23, 2015 at 10:54 AM, Israel Brewster >> wrote: >>> Concern: Since the master process is multi-threaded, it seems likely enough >>> that

Re: Bi-directional sub-process communication

2015-11-23 Thread Israel Brewster
On Nov 23, 2015, at 12:45 PM, Cameron Simpson wrote: > > On 23Nov2015 12:22, Israel Brewster wrote: >> On Nov 23, 2015, at 11:51 AM, Ian Kelly wrote: >>> Concurrency, ugh. > > I'm a big concurrency fan myself. > >>> It's probably better just

Re: Bi-directional sub-process communication

2015-11-23 Thread Israel Brewster
On Nov 23, 2015, at 1:43 PM, Chris Kaynor wrote: > > On Mon, Nov 23, 2015 at 2:18 PM, Israel Brewster > wrote: > >> Of course, that last step could be interesting - implementing the block in >> such a way as to not tie up the processor, while still getting the da

Re: Bi-directional sub-process communication

2015-11-23 Thread Israel Brewster
On Nov 23, 2015, at 3:05 PM, Dennis Lee Bieber wrote: > > On Mon, 23 Nov 2015 08:54:38 -0900, Israel Brewster > declaimed the following: > >> Concern: Since the master process is multi-threaded, it seems likely enough >> that multiple threads on the master side would m

Proper way to run CherryPy app as a daemon?

2017-03-28 Thread Israel Brewster
y of doing this? Thanks! ------- Israel Brewster Systems Analyst II Ravn Alaska 5245 Airport Industrial Rd Fairbanks, AK 99709 (907) 450-7293 --- -- https://mail.python.org/mailman/listinfo/python-list

CherryPy Session object creation logic

2017-06-02 Thread Israel Brewster
therefore, one DB connection - for a given session, and then simply hold on to that object until that session expired. But perhaps not? ------- Israel Brewster Systems Analyst II Ravn Alaska 5245 Airport Industrial Rd Fairbanks, AK 99709

Psycopg2 pool clarification

2017-06-02 Thread Israel Brewster
ing a context manager. I could get *some* limited benefit by raising the minconn value, but then I risk having connections that are *never* used, yet still taking resources on the DB server. Ideally, it would open as many connections as are needed, and then leave them open for future requests, perhaps

Re: Psycopg2 pool clarification

2017-06-08 Thread Israel Brewster
--- Israel Brewster Systems Analyst II Ravn Alaska 5245 Airport Industrial Rd Fairbanks, AK 99709 (907) 450-7293 --- > On Jun 7, 2017, at 10:31 PM, dieter wrote: > > israel writes: >> O