I was doing some work with the ldap module and required a ci dict that was case
insensitive but case preserving. It turned out the cidict class they
implemented was
broken with respect to pop, it is inherited and not re implemented to work.
Before
I set about re-inventing the wheel, anyone know o
I have some data I am working with that is not being interpreted as a string
requiring
base64 encoding when sent to the ldif module for output.
The base64 string parsed is ZGV0XDMzMTB3YmJccGc= and the raw string is
det\3310wbb\pg.
I'll admit my understanding of the handling requirements of non a
> Can you give an example of the code you have?
I actually just overrode the regex used by the method in the LDIFWriter class
to be far more broad
about what it interprets as a safe string. I really need to properly handle
reading, manipulating and
writing non ascii data to solve this...
Shame
> I have been doing the same thing and I tried to use java for testing the
> credentials and they are correct. It works perfectly with java.
> I really don´t know what we´re doing wrong.
>
>
> You are accessing a protected operation of the LDAP server
> and it (the server) rejects it due to invali
> I'm not sure what exactly you're asking for.
> Especially "is not being interpreted as a string requiring base64 encoding" is
> written without giving the right context.
>
> So I'm just guessing that this might be the usual misunderstandings with use
> of base64 in LDIF. Read more about when LDI
Hi Michael,
> Processing LDIF is one thing, doing LDAP operations another.
>
> LDIF itself is meant to be ASCII-clean. But each attribute value can carry any
> byte sequence (e.g. attribute 'jpegPhoto'). There's no further processing by
> module LDIF - it simply returns byte sequences.
>
> The a
> Note that all modules in python-ldap up to 2.4.10 including module 'ldif'
> expect raw byte strings to be passed as arguments. It seems to me you're
> passing a Unicode object in the entry dictionary which will fail in case an
> attribute value contains NON-ASCII chars.
Yup, I was.
> python-lda
I have a use where writing an interim file is not convenient and I was hoping to
iterate through maybe 100k lines of output by a process as its generated or
roughly anyways.
Seems to be a common question on ST, and more easily solved in Linux.
Anyone currently doing this with Python 2.7 in windows
> You leave out an awful amount of detail. I have no idea what ST is, so
> I'll have to guess your real problem.
Ugh, sorry guys its been one of those days, the post was rather useless...
I am using Popen to run the exe with communicate() and I have sent stdout to
PIPE
without luck. Just not su
I am trying to invoke a binary that requires dll's in two places all of
which are included in the path env variable in windows. When running
this binary with popen it can not find either, passing env=os.environ
to open made no difference.
Anyone know what might cause this or how to work around thi
I have a set of methods which take args that I decorate twice,
def wrapped(func):
def wrap(*args, **kwargs):
try:
val = func(*args, **kwargs)
# some work
except BaseException as error:
log.exception(error)
return []
return wra
>> If you don't want to do that, you'd need to use introspection of a
>> remarkably hacky sort. If you want that, well, it'll take a mo.
>
> After some effort I'm pretty confident that the hacky way is impossible.
Hah, I fired it in PyCharm's debugger and spent a wack time myself, thanks
for the c
>Well, technically it's
>
>func.func_closure[0].cell_contents.__name__
>
>but of course you cannot know that for the general case.
Hah, I admit I lacked perseverance in looking at this in PyCharms debugger as I
missed
that.
Much appreciated!
jlc
--
http://mail.python.org/mailman/listinfo/python
I have a dict of lists. I need to create a list of 2 tuples, where each tuple
is a key from
the dict with one of the keys list items.
my_dict = {
'key_a': ['val_a', 'val_b'],
'key_b': ['val_c'],
'key_c': []
}
[(k, x) for k, v in my_dict.items() for x in v]
This works, but I need to t
> Yeah, it's remarkably easy too! Try this:
>
> [(k, x) for k, v in my_dict.items() for x in v or [None]]
>
> An empty list counts as false, so the 'or' will then take the second option,
> and iterate over the one-item list with > > None in it.
Right, I overlooked that!
Much appreciated,
jlc
--
I have some queries that utilize instr wrapped by substr but the old
version shipped in 2.7.5 doesn't have instr support.
Has anyone encountered this and utilized other existing functions
within the shipped 3.6.21 sqlite version to accomplish this?
Thanks,
jlc
--
http://mail.python.org/mailman/l
> Has anyone encountered this and utilized other existing functions
> within the shipped 3.6.21 sqlite version to accomplish this?
Sorry guys, forgot about create_function...
--
http://mail.python.org/mailman/listinfo/python-list
Trying to robustly parse a string that will have key/value pairs separated
by three pipes, where each additional key/value (if more than one exists)
will be delineated by four more pipes.
string = 'key_1|||value_1key_2|||value_2'
regex = '((?:(?!\|\|\|).)+)(?:\|\|\|)((?:(?!\|\|\|).)+)(
> Regexes may be overkill here. A simple string split might be better:
Yup, and much more robust as I was looking for.
Thanks everyone!
jlc
--
http://mail.python.org/mailman/listinfo/python-list
I get a list of dicts as output from a source I need to then extract various
dicts
out of. I can easily extract the dict of choice based on it containing a key
with
a certain value using list comp but I was hoping to use dict comp so the output
was not contained within a list.
reduce(lambda x,y:
> {k: v for d in my_list if d['key'] == value for (k, v) in d.items()}
Ugh, had part of that backwards:) Nice!
> However, since you say that all dicts have a unique value for
> z['key'], you should never need to actually merge two dicts, correct?
> In that case, why not just use a plain for loop
>You could put the loop into a helper function, but if you are looping
>through the same my_list more than once why not build a lookup table
>
>my_dict = {d["key"]: d for d in my_list}
>
>and then find the required dict with
>
>my_dict[value]
I suppose, what I failed to clarify was that for each l
I am writing a class to provide a db backed configuration for an application.
In my programs code, I import the class and pass the ODBC params to the
class for its __init__ to instantiate a connection.
I would like to create a function to generically access a table and provide an
iterator. How do
>Have the method yield instead of returning:
Thanks, that was simple, I was hung up on implementing magic methods.
Thanks for the pointers guys!
jlc
--
http://mail.python.org/mailman/listinfo/python-list
> It's probably best if you use separate cursors anyway. Say you have
> two methods with a shared cursor:
>
> def iter_table_a(self):
> self.cursor.execute("SELECT * FROM TABLE_A")
> yield from self.cursor
>
> def iter_table_b(self):
> self.cursor.execute("SELECT *
When you use optional named arguments in a function, how do you deal with with
the incorrect assignment when only some args are supplied?
If I do something like:
def my_func(self, **kwargs):
then handle the test cases with:
if not kwargs.get('some_key'):
raise SyntaxError
or:
> Don't use kwargs for this. List out the arguments in the function
> spec and give the optional ones reasonable defaults.
> I only use kwargs myself when the set of possible arguments is dynamic
> or unknown.
Gotch ya, but when the inputs to some keywords are similar, if the function is
called
I have a dataset that consists of a dict with text descriptions and values that
are integers. If
required, I collect the values into a list and create a numpy array running it
through a simple
routine: data[abs(data - mean(data)) < m * std(data)] where m is the number of
std deviations
to includ
>Assuming your data and the dictionary are keyed by a common set of keys:
>
>for key in descriptions:
> if abs(data[key] - mean(data)) >= m * std(data):
> del data[key]
> del descriptions[key]
Heh, yeah sometimes the obvious is too simple to see. I used a dict comp to
rebuild
> In other words: this approach for detecting outliers is nothing more than
> a very rough, and very bad, heuristic, and should be avoided.
Heh, very true but the results will only be used for conversational purposes.
I am making an assumption that the data is normally distributed and I do expec
Hi,
Slightly different take on an old problem, I have a list of dicts, I need to
build one dict
from this based on two values from each dict in the list. Each of the dicts in
the list have
similar key names, but values of course differ.
[{'a': 'xx', 'b': 'yy', 'c': 'zz'}, {'a': 'dd', 'b': 'ee'
> >>> data = [{'a': 'xx', 'b': 'yy', 'c': 'zz'}, {'a': 'dd', 'b': 'ee', 'c':
> >>> 'ff'}]
> >>> {d["a"]: d["c"] for d in data}
> {'xx': 'zz', 'dd': 'ff'}
Priceless,
That is exactly what I needed, for which I certainly over complicated!
Thanks everyone!
jlc
--
http://mail.python.org/mailman/
I have some code that makes use of the typing module.
This code creates several instances of objects it creates
from a library that has some issues.
For example, I have multiple list comps that iterate properties
of those instance and the type checker fails with:
Expected type 'collections.It
> I couldn't find any information on how to implement logging in a library that
> doesn't know the name of the application that uses it. How is that done?
Hello,
That's not how it works, it is the opposite. You need to know the name of its
logger,
and since you imported it, you do.
Logging is hi
I am trying to track down a slow script startup time. I have executed the
script using `python -m cProfile -o profile /path/script.py` and read through
the results, but the largest culprit only shows various built-ins.
I expected this given the implementation, but I was hoping to get some
finer de
> You might try `py-spy`.
That worked well, I started trying to get more data from the profile
output with the stats module but didn't quite get there.
Thank you everyone,
jlc
--
https://mail.python.org/mailman/listinfo/python-list
I have some code that I am testing on Windows without c extensions which
runs on a RHEL server with c extensions. In a simplified test case as follows:
connection = mysql.connector.connect(...)
cursor = connection.cursor(cursor_class=MySQLCursorDict)
while True:
cursor.execute('SELECT foo,biz
> Perhaps you simplified too much, but changes between the select and the
> update could be lost. I think you need at least three states:
>
> 1 mark rows where baz is null (by setting baz to some value other than NULL
> or 42, 24, say: set baz = 24 where baz is NULL)
> 2 show marked rows (select
> Interesting. Generally, I allocate cursors exactly at the same time as I open
> transactions;
> not sure if this works with the mysql connector, but with psycopg2
> (PostgreSQL), my code looks like this:
>
> with conn, conn.cursor() as cur:
> cur.execute(...)
> ... = cur.fetchall()
>
>
Looks like the shipped implementation doesn't give access to all the discrete
copies
of tls for us in a case where a context manager needs to perform any cleanup.
Does
something exists where I can leverage this feature or do I need to roll my own?
Thanks,
jlc
--
https://mail.python.org/mailman
> Try these links on for size:
>
> https://msdn.microsoft.com/en-us/library/hh242982(v=vs.103).aspx which links
> to
> https://msdn.microsoft.com/en-us/library/hh242983(v=vs.103).aspx near the end.
These two SO threads have a variation of pretty good explanations:
http://stackoverflow.com/questi
>> There is the recent flurry around the new async additions to python
>
> I meant to add: “… which I dont pretend to understand…”
Try these links on for size:
https://msdn.microsoft.com/en-us/library/hh242982(v=vs.103).aspx which links to
https://msdn.microsoft.com/en-us/library/hh242983(v=vs.10
> Thanks Joseph
> Trouble is there is stew of technologies/languages…
> (meta)-stewed with more abstract concepts, eg push vs pull,
> Enumerable-Observable
> duality, continuous vs discrete time
> The last causing its own share of confusion with “functional reactive
> programming” (FRP) meaning s
> One more question: Do you know if (and how much) of these things would work
> in Linux/C# (ie mono)?
Mono, I forgot what that is when .net core debuted:)
Looks like the .net Rx guys have a port,
https://github.com/Reactive-Extensions/Rx.NET/issues/148
A package for .net core is up on nuget.
> So you are saying that nuget-ing .Net core would be a workable pre-requisite
> for
> Rx on mono?
Microsoft open sourced .net a while ago. With that came the movement to
bring .net to other platforms.
https://en.wikipedia.org/wiki/.NET_Framework#.NET_Core
As its currently being heavily develop
> Just downloaded Python 3.6.0 2016-12-23 and PyCharm. Tried to run the "Hello
> World" program and got the following message:
> "Process finished with exit code 1073741515 (0xC135)"
> I am using Windows 8.1 on an HP ENVY Touchsmart Notebook (64-bit OS,
> x64-based processor).
If you track
> And this is coming up a lot. This is something that should already be
> on all supported versions of Windows if Windows updates are done, right?
No, it's not an update. You install the runtime *if* you need it.
> but maybe it's time that the
> Python installer bundles the redistributable inst
> while True:
>for client in clients:
> stats = ThreadStats()
> stats.start()
> p = Process(target=getWhispererLogsDirSize, args=(client,queue,))
> jobs.append(p)
> p.start()
> p.join()
You start one client then join before starting the next...
Start them all an
> Trying to sniff Ethernet packets, I do this:
>
>s = socket.socket(socket.AF_INET, socket.SOCK_RAW, socket.IPPROTO_IP)
>
> but it results in this:
>
> $ sudo python3 sniff_survey.py
> Traceback (most recent call last):
> File "sniff_survey.py", line 118, in
> s = socket
> .NET is a library that can be used from many languages, including Python.
No.
.NET Core (what the OP asked about which is not .NET) is a cross-platform
framework. Obviously Python and .NET differ in runtime semantics with
respect to the original source code, however they are now roughly equiva
> What .NET APIs are anticipated to be released that aren't on the
> official CLI list now:
> https://en.wikipedia.org/wiki/List_of_CLI_languages#Current_Languages,
> and/or, are .NET supported languages expected to expand beyond the CLI
> list?
I think this (and the last point) misinterprets the
> What do you mean by "both platforms"? Python scripts already run on
> three major operating systems (Win/Lin/Mac) and a good number of
> less-popular OSes; a well-written Python script will run in four major
> Pythons (CPython, PyPy, Jython, IronPython) and a number of others;
> and all manner of
> Python still has my heart, but .NET Core tempts me. One great thing of
> coding in C# would be no GIL.
Seriously, check out the benchmarks at https://github.com/aspnet/benchmarks.
I think aside from the obvious, you'll find the Razor engine and the overall
library
to be a pleasure to work with
> C# hardly seems any better than Java to me as far as a language goes.
Which sounds pretty good to me, they are both high performance, mature
and rich languages.
> Being forced into working with classes even when they are not
> appropriate is jarring.
And 100% irrelevant, it doesn't prevent you
I have a class which implements a context manager, its __init__
has a signature and the __enter__ returns an instance of the
class.
Along with several methods which implement functionality on
the instance, I have one method which itself must open a context
manager against a call on an instance att
From: Python-list on
behalf of Rob Gaddi
Sent: Thursday, March 15, 2018 12:47 PM
To: python-list@python.org
Subject: Re: Context manager on method call from class
> from contextlib import contextmanager.
>
> Then you just use the @contextmanager decorator on a function, have it
> set up,
-Original Message-
From: Python-list On Behalf Of joseph
pareti
Sent: Sunday, March 25, 2018 10:15 AM
To: python-list@python.org
Subject: issues when buidling python3.* on centos 7
> The following may give a clue because of inconsistent python versions:
>
> [joepareti54@xxx ~]$ python -V
I have an array of hex chars which designate required characters.
and one happens to be \x5C or "\". What foo is required to build the
pattern to exclude all but:
regex = re.compile('[^{}]+'.format(''.join(c for c in character_class)))
I would use that in a re.sub to collapse and replace all but
-Original Message-
From: Python-list On Behalf Of MRAB
Sent: Friday, April 13, 2018 12:05 PM
To: python-list@python.org
Subject: Re: Python regex pattern from array of hex chars
> Use re.escape:
>
> regex = re.compile('[^{}]+'.format(re.escape(''.join(c for c in
> character_class
Br
From: Python-list on
behalf of Irv Kalb
Sent: Monday, April 16, 2018 10:03 AM
To: python-list@python.org
Subject: Instance variables question
> class PartyAnimal():
> x = 0
>
> def party(self):
> self.x = self.x + 1
> print('So far', self.x)
Your not accessing the
-Original Message-
From: Python-list On Behalf Of Brian
Gibbemeyer
Sent: Tuesday, April 24, 2018 11:01 AM
To: Ethan Furman
Cc: python-list@python.org
Subject: Re: Issue with python365.chm on window 7
> The file at
> https://www.python.org/ftp/python/3.6.4/python364.chm
>
> Loads up into
From: Brian Gibbemeyer
Sent: Tuesday, April 24, 2018 12:36 PM
To: Joseph L. Casale
Cc: python-list@python.org
Subject: RE: Issue with python365.chm on window 7
> I right clicked on the file, no option to unblock.
Sorry, choose properties, then unblock.
--
https://mail.python.org/mail
-Original Message-
From: Python-list On Behalf Of Skip
Montanaro
Sent: Wednesday, August 15, 2018 3:26 PM
To: Python
Subject: lxml namespace as an attribute
> Much of XML makes no sense to me. Namespaces are one thing. If I'm
> parsing a document where namespaces are defined at the top
I need to serialize a deep graph only for the purposes of visualizing it to
observe primitive data types on properties throughout the hierarchy.
In my scenario, I cannot attach a debugger to the process which would
be most useful. Using json is not the easiest as I need to chase endless
custom seri
-Original Message-
From: Python-list On Behalf Of Rhodri
James
Sent: Friday, September 21, 2018 11:39 AM
To: python-list@python.org
Subject: Re: Serializing complex objects
> Depending on what exactly your situation is, you may be able to use the
> pickle module (in the standard library)
I have CDLL function I use to get a pointer, several other functions happily
accept this
pointer which is really a long when passed to ctypes.c_void_p. However, only
one with
same type def in the prototype overflows. Docs suggest c_void_p takes an int
but that
is not what the first call returns,
> I generally avoid c_void_p because its lenient from_param method
> (called to convert arguments) doesn't provide much type safety. If a
> bug causes an incorrect argument to be passed, I prefer getting an
> immediate ctypes.ArgumentError rather than a segfault or data
> corruption. For example, w
I have some code where sys.argv is sliced up and manually fed to discrete
argparse
instances each with a single subparser. The reason the discrete parsers all
having a
single subparser was to make handling the input simpler, the first arg in the
slice
could be left in.
This has become unmaintai
> Not sure if this fits the bill, or makes sense here, but I came cross
> "docopt" which touts itself as a "Command-line interface description
> language". I used it in a project and it seems to be pretty easy to use
> as well as elegant. It stores the arguments & values as a dictionary,
> keyed by
> Or any other libraries that can be recommended?
I'd recommend Spyne, code and docs are good, but more importantly the
lead dev is responsive and very helpful. Can't speak highly enough about him...
http://spyne.io/
hth,
jlc
--
https://mail.python.org/mailman/listinfo/python-list
> -Original Message-
> From: Python-list bounces+jcasale=activenetwerx@python.org> On Behalf Of Simon
> Connah
> Sent: Thursday, March 14, 2019 3:03 AM
> To: Python
> Subject: asyncio Question
>
> Hi,
>
> Hopefully this isn't a stupid question. For the record I am using Python
> 3.7
Hi,
Is it possible to associate combinations of types for a given signature, for
example:
T = TypeVar('T', Foo, Bar, Baz)
S = TypeVar('S', FooState, BarState, BazState)
closure = 'populated dynamically'
def foo(factory: Callable[[List[T], str], None], state: S) -> List[T]:
results = []
I am trying to find explicit documentation on the initialization logic for a
Base class when multiple exist. For the example in the documentation at
https://docs.python.org/3/tutorial/classes.html#multiple-inheritance,
if Base1 and Base2 both themselves inherited from the same base class,
only Base
-Original Message-
From: Barry Scott
Sent: Tuesday, July 16, 2019 11:53 AM
To: Joseph L. Casale
Cc: python-list@python.org
Subject: Re: Class initialization with multiple inheritance
> And here is the MRO for LeftAndRight.
>
> >>> import m
> LeftAndRight.__ini
I am looking to replace a home built solution which allows a program
to derive a series of variable values through configuration or policy.
The existing facility allows dependences so one of the requested variables
can depend on another, they are ordered and computed. It also allows
callbacks so c
I have some json encoded input for nodemailer
(https://nodemailer.com/message/embedded-images)
where the path key is a string value which contains the base64 encoded data
such as:
{
html: 'Embedded image: ',
attachments: [{
filename: 'image.png',
path: 'data:image/png;bas
> Invalid character found in method name [{}POST]. HTTP method names must be
> tokens.
/snip
> I could see in from wireshark dumps it looked like - {}POST
> HTTP/1.1
The error message and your own debugging indicate the error.
Your method *name* is {}POST, you have somehow included two
brac
> Installed on this Slackware-14.2/x86_64 workstation with python-3.9.1 are:
> python-setuptools-22.0.5-x86_64-1
I just ran into this recently, I don't recall the actual source but it was the
version
of setuptools having been so old. Your version is from Jun 3, 2016...
Update it, that was what w
Anyone ever used pexpect with tooling like kadmin and have
insight into how to manage interacting with it?
After setting up debug logging, I was able to adjust the expect
usage to get the input and output logs to at least appear correct
when setting a password for a principal, however even with a
> If you have windows 10 can you use Windows Subsystem for Linux (WSL)
> to install one of the Linux distros and use that?
Interesting idea, sadly I am too far past the deadline on this to go through
the red tape needed to get that in place.
Thanks,
jlc
--
https://mail.python.org/mailman/listi
I've started writing some asyncio code in lieu of using threads and
managing concurrency and primitives manually.
Having spent a lot of time using c#'s async implementation, I am struggling
to see an elegant pattern for implementing cancellation. With the necessity
for the loop (that of which I un
I have a need for a script to hold several tuples with three values, two text
strings and a lambda. I need to index the tuple based on either of the two
strings. Normally a database would be ideal but for a self-contained script
that's a bit much.
Before I re-invent the wheel, are there any built-
> Not entirely sure I understand you, can you post an example?
>
> If what you mean is that you need to locate the function (lambda) when
> you know its corresponding strings, a dict will suit you just fine.
> Either maintain two dicts for the two separate strings (eg if they're
> "name" and "loca
> How about two dictionaries, each containing the same tuples for
> values? If you create a tuple first, then add it to both dicts, you
> won't have any space-wasting duplicates.
Thanks guys.
--
https://mail.python.org/mailman/listinfo/python-list
I sent off a msg to the reportlab list but didn't find an answer, hoping someone
here might have come across this...
I am generating a table to hold text oriented by the specification of the label
it gets printed on. I need to compress the vertical size of the table a little
more but the larger te
I have a script that accepts cmdline arguments and receives input via stdin.
I have a unit test for it that uses Popen to setup an environment, pass the args
and provide the stdin.
Problem is obviously this does nothing for providing coverage. Given the above
specifics, anyone know of a way to wor
> So, back to my original question; what do you mean by "providing
> coverage"?
Hi Roy,
I meant touch every line, such as what https://pypi.python.org/pypi/coverage
measures.
As the script is being invoked with Popen, I lose that luxury and only gain
the assertions tests but that of course doesn'
> As the script is being invoked with Popen, I lose that luxury and only gain
> the assertions tests but that of course doesn't show me untested branches.
Should have read the docs more thoroughly, works quite nice.
jlc
--
https://mail.python.org/mailman/listinfo/python-list
I have an Python3 argparse implementation that is invoked as a method from an
imported
class within a users script __main__.
When argparse is setup in __main__ instead, all the help switches produce help
then exit.
When a help switch is passed based on the above implementation, they are
ignored
I have a caching non data descriptor that stores values in the implementing
class
instances __dict__.
Something like:
class Descriptor:
def __init__(self, func, name=None, doc=None):
self.__name__ = name or func.__name__
self.__module__ = func.__module__
self.__doc__
> You're going to have to subclass list if you want to intercept its
> methods. As I see it, there are two ways you could do that: when it's
> set, or when it's retrieved. I'd be inclined to do it in __set__, but
> either could work. In theory, you could make it practically invisible
> - just check
> But on Windows when I use the official Python 3.3 32-bit binary from
> www.python.org this is not enabled.
For an unobtrusive way [1] to gain this, see apsw. For what it's worth, I prefer
this package over the built in module.
Python 3.3.3 (v3.3.3:c3896275c0f6, Nov 18 2013, 21:19:30) [MSC v.16
I am documenting a few classes with Sphinx that utilize methods decorated
with custom descriptors. These properties return data when called and Sphinx
is content with a :returns: and :rtype: markup in the properties doc string.
They also accept input, but parameter (not really applicable) nor var
I have a module that has one operation that benefits greatly from being
multiprocessed.
Its a console based module and as such I have a stream handler and filter
associated to
the console, obviously the mp based instances need special handling, so I have
been
experimenting with a socket server i
> Maybe check out logstash (http://logstash.net/).
That looks pretty slick, I am constrained to using something provided by the
packaged modules
in this scenario.
I think I have it pretty close except for the fact that the
LogRecordStreamHandler from the cookbook
excepts when the sending proces
I need to return a collection of various types, since python doesn't
have the terse facility of extension methods like C#, subclassing tuple
and adding a method seems like a terse way to accommodate this.
However, if the method returns one element of the collection, how can
one enable introspectio
> If you're not already familiar with collections.namedtuple, have a
> look at it, as it sounds like just naming the fields may be all that
> you need. You can also subclass it further to add methods if desired.
Yeah, all the types in these collections are named tuples... The collection
itself isn
What is the pattern for chaining execution of tasks with ThreadPoolExecutor?
Callbacks is not an adequate facility as each task I have will generate new
output.
Thanks,
jlc
--
https://mail.python.org/mailman/listinfo/python-list
On Thur, Feb 17, 2016 at 9:24 AM, Ian Kelly wrote:
>> What is the pattern for chaining execution of tasks with ThreadPoolExecutor?
>> Callbacks is not an adequate facility as each task I have will generate new
>> output.
>
> Can you specify in more detail what your use case is?
>
> If you don't m
> It's still not clear to me specifically what you're trying to do. It
> would really help if you would describe the problem in more detail.
> Here's what I think you're trying to do:
>
> 1) Submit a task to a ThreadPoolExecutor and get back a future.
>
> 2) When the task is complete, submit anot
1 - 100 of 183 matches
Mail list logo