scattered writes:
> def invert(p):
> return [ j for (i,j) in sorted(zip(p,range(len(p]
return [j for i,j in sorted(enumerate(p), key=itemgetter(1))]
looks a little cleaner to me.
In Haskell or ML, you can use patterns that contain wild
cards that play a role in the pattern
Steven D'Aprano writes:
> filter(func, *seqs) -> [x for x in itertools.chain(*seqs) if func(x)]
> although I suppose functional programming purists might object :)
Maybe you really want
filter(func, chain.from_iterable(seqs))
--
http://mail.python.org/mailman/listinfo/python-list
zildjohn01 writes:
> _temp = expr
> if _temp: return _temp
I'm trying to figure out a context where you'd even want that, and I'm
thinking that maybe it's some version of a repeat-until loop? Python
doesn't have repeat-until and it's been proposed a few times.
--
http://mail.python.org/
Teemu Likonen writes:
> I'm a simple Lisp guy who wonders if it is be possible to add some kind
> of macros to the language...
As a (now somewhat lapsed) long-time lisp programmer I sympathise with
the sentiment, but suspect that it's not going to gain serious traction
in python circles.
--
htt
Chris Angelico writes:
That loop will exit at the first gap in the sequence. If that's what
you want, you could try (untested):
from itertools import takewhile
seq = takewhile(lambda n: ('Keyword%d'%n) in dct, count(1))
lst = map(dct.get, seq)
This does 2 lookups per key, which you co
Chris Angelico writes:
>> sentinel = object()
>> seq = (dct.get('Keyword%d'%i,sentinel) for i in count(1))
>> lst = list(takewhile(lambda x: x != sentinel, seq))
>
> If I understand this code correctly, that's creating generators,
> right? It won't evaluate past the sentinel at all?
Right,
Chris Angelico writes:
> This whole code is inside a loop that we took, in smoke testing, to a
> couple hundred million rows (I think), with the intention of having no
> limit at all. So this might only look at 60-100 headers, but it will
> be doing so in a tight loop.
If you're talking about dat
"Martin v. Löwis" writes:
> On behalf of the Python development team and the Python community, I'm
> happy to announce the release candidate 1 of Python 2.5.6.
>
> This is a source-only release that only includes security fixes.
Thanks Martin, I'm glad these older releases are still getting impo
Markus writes:
> Infoworld awarded it as best Python IDE, testing: Boa Constructor,
> Eric, ActiveState's Komodo, Oracle's NetBeans, Aptana's Pydev,
> PyScripter, SPE, Spyder, and WingWare's Wing IDE.
I saw somebody using Geany recently and it looked pretty impressive.
For Python gui debuggers, w
Matt Chaput writes:
> I'm looking for some code that will take a Snowball program and
> compile it into a Python script. Or, less ideally, a Snowball
> interpreter written in Python.
>
> (http://snowball.tartarus.org/)
>
> Anyone heard of such a thing?
I never saw snowball before, it looks kind o
Irmen de Jong writes:
> I would use:
> test_dct.items() <= base_dct.items()
I think you need an explicit cast:
set(test_dct.items()) <= set(base_dct.items())
--
http://mail.python.org/mailman/listinfo/python-list
Chris Angelico writes:
> results = [function() for function in actions]
results = map(apply, actions)
--
http://mail.python.org/mailman/listinfo/python-list
Raymond Hettinger writes:
> Here's a handy utility function for you guys to play with:
> http://code.activestate.com/recipes/577676/
Cute, but why not use collections.defaultdict for the return dict?
Untested:
d = defaultdict(list)
for key,value in ifilter(bool,imap(mapper, data)):
Gnarlodious writes:
> I have an SQLite query that returns a list of tuples:
> [('0A',), ('1B',), ('2C',), ('3D',),...
> What is the most Pythonic way to loop through the list returning a
> list like this?:
> ['0A', '1B', '2C', '3D',...
Try:
tlist = [('0A',), ('1B',), ('2C',), ('3D',)]
al
Raymond Hettinger writes:
> A number of developers have been working on adding examples and useful
> advice to the docs. To sharpen your skills, here are some pieces of
> recommended reading:
Thanks, those are nice. The logging one looks especially useful. The
module always looked very confusi
erface shortly. That would be awesome because PCP is
developed by real engineers and has a proper architecture and is NOT a
CPU sucking monstrosity of PERL-line-noise + a few hacked-together PHP
frontends.
just my 2cents
Paul
--
http://mail.python.org/mailman/listinfo/python-list
harrismh777 writes:
> lalit wrote:
>> The above function return the
>> return (fib(n-1)+fib(n-2))
>>
>> RuntimeError: maximum recursion depth exceeded in comparison
>> [36355 refs]
>
> There is much debate about this generally, but general wisdom is that
> recursion is to be avoided when possible
Hans Georg Schaathun writes:
> On Sat, 30 Apr 2011 06:43:42 +0100, Paul Rudin
>wrote:
> : Writing recurive code is acceptable and is a nice clear way of
> : expressing things when you have naturally recursive data structures, and
> : can lead to perfectly good compiled co
Hans Georg Schaathun writes:
> On Sat, 30 Apr 2011 12:29:00 +0100, Paul Rudin
>wrote:
> : Clearly it makes a difference in any case where you'd hit the recursion
> : limit.
>
> What kind of problems make you hit the limit?
>
> Other than when you forget the ba
>> > Look at the big two sites for open-source repositories -- github and
>> > bitbucket.
> Note that there are three: Launchpad (backed by Bazaar) is the other
> “big site” for free-software project hosting.
There is also patch-tag.com (using darcs) though it is smaller.
--
http://mail.python.or
"Alex van der Spek" writes:
> refd=dict.fromkeys(csvr.fieldnames,[]) ...
> I do not understand why this appends v to every key k each time.
You have initialized every element of refd to the same list. Try
refd = dict((k,[]) for k in csvr.fieldnames)
instead.
--
http://mail.python.org/mai
Steven D'Aprano writes:
x = "spam"
> what is the value of the variable x? Is it...?
> (1) The string "spam".
Python works about the same way as Lisp or Scheme with regard to this
sort of thing, and those languages have been described with quite a bit
of mathematical formality. So if you wan
Raymond Hettinger writes:
> Here's a 22-line beauty for a classic and amazing algorithm:
> http://bit.ly/bloom_filter
The use of pickle to serialize the keys is a little bit suspicious if
there might be a reason to dump the filter to disk and re-use it in
another run of the program. Pickle repre
Ben Finney writes:
> Please do not solicit for jobs here. Instead, the Python Job Board
> http://www.python.org/community/jobs/> is intended for that purpose.
Wow, there's quite a lot of listings there. There had been only a few
last time I looked. But, most of them seem to involve Django.
--
Roy Smith writes:
> changes = [ ]
> for key in d.iterkeys():
> if is_bad(key):
> changes.append(key)
changes = list(k for k in d if is_bad(k))
is a little bit more direct.
--
http://mail.python.org/mailman/listinfo/python-list
Hans Mulder writes:
> How about:
> changes = filter(is_bad, d)
> Or would that be too compact?
I thought of writing something like that but filter in python 3 creates
an iterator that would have the same issue of walking the dictionary
while the dictionary is mutating.
changes = list(f
for my uses, its handy to let things raise exceptions willy nilly in
the lower level functions, and do the catching in the higher level function.
Paul Probert
--
http://mail.python.org/mailman/listinfo/python-list
John Lee writes:
> In this thread, I'm asking about the views of Python programmers on
> languages other than Python.
I sympathize with what you're looking for but I don't think there's
a really good answer at this time. Things IMO are converging in the
direction of functional languages like H
Antoon Pardon writes:
> Now I found the following in the logs: [Errno 131] Connection reset by peer
> This is a problem I would like to catch earlier
I'd expect that's an IOError thrown by the socket library. You could
just let it go uncaught and see what you get in the crash dump.
--
https://
e
seen seem to have the display and game logic intermingled (at least to
my untrained eye).
Any suggestions? If not, I guess I'll just have to write my own. I'm
sure I could - it's just that I don't want my training to be messed up
because of bugs in my code...
Thanks,
Paul
--
https://mail.python.org/mailman/listinfo/python-list
the default.
* It makes it harder to write cross-platform instructions that
encompass Windows, which doesn't have a "python3" executable.
But both of these are weak arguments and as usual, practicality beats purity.
Paul
--
https://mail.python.org/mailman/listinfo/python-list
On 11 September 2017 at 13:13, Stefan Ram wrote:
> Paul Moore writes:
>>write a series of classes simulating objects
>
> I'd say "write classes for objects".
Yeah, that's just me not being precise in my mail. Sorry.
>>objects moving round on a chess-s
On 11 September 2017 at 14:52, Christopher Reimer
wrote:
>> On Sep 11, 2017, at 3:58 AM, Paul Moore wrote:
>>
>> I'm doing some training for a colleague on Python, and I want to look
>> at a bit of object orientation. For that, I'm thinking of a small
>&
nguages on Windows usually know how to do that).
And I also know that a better option on Windows is to use the "py"
launcher anyway.
I did say it was a weak argument :-)
Paul
--
https://mail.python.org/mailman/listinfo/python-list
eed. But we have a tendency to spiral off into pure theory
far too easily - and then my student doesn't remember what we covered
because it wasn't grounded in anything practical. So I want to have a
practical (and better still, visual) example to keep us focused.
Thanks for the comments,
Paul
--
https://mail.python.org/mailman/listinfo/python-list
Chris Angelico writes:
> students learning Python *today* ... they're learning Python 3.
I'm not so sure of that. I do know a few people currently learning
Python, and they're using Python 2.
>> * static type annotation
Seems like a big win if you ask me.
>> * asyncio with its a-dialect
> A
Steve D'Aprano writes:
> Guido has ruled that Python 4 will not be a major compatibility break
Looking forward to Python 5 then ;-).
--
https://mail.python.org/mailman/listinfo/python-list
27;s much specific here. But thanks for taking
the time to explain your situation, which hopefully will act as a
reminder that not everyone trying to promote Python has a clean slate
to work with.
Paul
--
https://mail.python.org/mailman/listinfo/python-list
bject" philosophy much further than Python does,
but that's where "this code was translated from another language"
shows.
Using map vs comprehensions is mostly a stylistic choice. Python
programmers will typically choose a comprehension, so that style looks
more idiomatic, but t
;s the point in comparing Ruby with years-out-of-date
Python? At this point you're clearly just looking for an argument, so
I'll give up on this thread.
Paul
--
https://mail.python.org/mailman/listinfo/python-list
Chris Angelico writes:
> Why? Unless they're going to be maintaining a Py2 codebase, why should
> they learn the older version with less features?
Are there actually Py3 codebases? I guess there must be, even though
I've never seen one. Every Python codebase of any size that I know of
is Py2.
not having a space after the comma, that's just sinful.
Ha, by including that line I managed to distract everyone from how bad
the *rest* of the code was! My plan worked! Bwahahaha :-)
Paul
--
https://mail.python.org/mailman/listinfo/python-list
Ben Finney writes:
>> I've never seen one.
> who has told you... they are working on a Python 3 code base.
Just because they've told me about it doesn't mean I saw it personally.
The ones I've seen, including new ones, are Python 2.
Some people here use Py3 but I haven't heard (or don't remember
Steve D'Aprano writes:
>> concept integer / integer => integer_result
> That would be C, and C derived languages, perhaps?
Certainly not. Fortran, machine languages, etc. all do that too.
Haskell does the right thing and makes int/int a compile time type
error. Its integer divisi
\xf6'
> in position 8: ordinal not in range(128)
>
> even when the string is manually converted:
> name= unicode(self.name)
>
> Same sort of issue with:
> name= self.name.decode('utf-8')
>
>
> Py3 doesn't like either version.
Y
>Could someone kindly advise how to use "the Python debugger"?
https://docs.python.org/3.6/library/pdb.html - but I would reiterate
the advice that if you're not a programmer, you should get someone who
is to assist you with this, as the debugger will not be easy to use
without programming experience (and fixing the problem even more so).
Paul
--
https://mail.python.org/mailman/listinfo/python-list
With that information, my guess would be that the way the web service
reports errors has changed, and the Python library is failing to
handle errors nicely for you, but the basic functionality still works.
So that's somewhat good news, as you can at least handle anything that
*would* work, even if
non-empty string that is false\n' if not '0';"
a non-empty string that is false
Given this sort of silliness, I'm perfectly OK with the choices Python made :-)
Paul
--
https://mail.python.org/mailman/listinfo/python-list
Ned Deily writes:
> You can find Python 3.7.0a1 and more information here:
> https://www.python.org/downloads/release/python-370a1/
This says:
The next pre-release of Python 3.7 will be 3.6.0a2, currently
scheduled for 2016-10-16.
:)
--
https://mail.python.org/mailman/listinfo/pyth
cal intranet
4. The system admins may not be able or willing to upgrade or
otherwise modify the system Python
Writing code that works only with stdlib modules is basically the only
option in such environments.
Having said that, I don't advocate that everything be in the stdlib
because of this.
staller.
>
> What is the tooling for this? Is there some documentation, maybe a
> mailingslist-diskussion or a but-report?
There's a tool "blurb" (available from PyPI) used for this.
Paul
--
https://mail.python.org/mailman/listinfo/python-list
Steve D'Aprano writes:
> Having to spend a few hours being paid to migrate code using "print x"
> to "print(x)", or even a few months, is not a life-changing experience.
Didn't someone further up the thread mention some company that had spent
1.5 years porting a py2 codebase to py3?
The issue of
ttributeError as e:
>>
>> pass
>
>
>
> try:
> return self.some.attribute.or.another
> except AttributeError:
> return DEFAULT_VALUE
>
> is a perfectly good pattern to use.
getattr(obj, 'attr_name', DEFAULT_VALUE) may also be useful, although
if more than one of the attribute lookups in the chain you show could
fail, then catching the exception is probably simpler.
Paul
--
https://mail.python.org/mailman/listinfo/python-list
mptions explicit.
Ironically, it's often the better coders that find this hard, as they
are the ones who worry about error handling, or configuration options,
rather than just picking a value and moving on).
Paul
--
https://mail.python.org/mailman/listinfo/python-list
"Robert L." writes:
>> Find the sum of the digits in the number 100!
> In Python?
So you have come to plague us here too.
>>> sum(ord(c)-ord('0') for c in str(reduce(lambda a,b: a*b, range(1,101),1)))
648
--
https://mail.python.org/mailman/listinfo/python-list
Ian Kelly writes:
sum(int(c) for c in str(math.factorial(100)))
Doh! Using int(c) didn't occur to me and I didn't know about
math.factorial. Notice also that WJ hasn't yet dared posting his crap
on comp.lang.haskell.
--
https://mail.python.org/mailman/listinfo/python-list
me, but
this feels like the sort of calculation that comes up a lot (basically
any "recipe" based exercise - cooking, manufacturing, etc) and I feel
as if I'm at risk of reinventing the wheel, which I could avoid if I
only knew what the techniques I need are called.
Can a
gredient before product) and that way round doesn't
work. For some reason, when thinking about topological sorts, I tend
to get fixated on one direction and forget they are actually
reversible...
Paul
--
https://mail.python.org/mailman/listinfo/python-list
On 25 September 2017 at 15:20, Paul Moore wrote:
> On 25 September 2017 at 14:23, Ian Kelly wrote:
>> You have a DAG, so you can sort it topologically. Then you can process
>> it in that order so that everything that uses X will be processed
>> before X so that when you
) you just need to call the list constructor:
y1 = list(map(math.sin, math.pi*t))
Although given that you're using numpy, it may be that there's a more
idiomatic numpy way of doing this. I'm not a numpy expert though, so I
can't help on that.
Paul
On 25 September 2017 at 17:
er if you have binary dependencies like pillow.
What you could do is pip install your binary dependencies into a
directory in $TEMP using --target, then add that directory to
sys.path. Probably easier than building a full virtualenv. Bundle pip
with your app if you can't assume your users will
On 26 September 2017 at 23:48, Irmen de Jong wrote:
> On 09/26/2017 10:49 PM, Paul Moore wrote:
>> On 26 September 2017 at 19:47, Irmen de Jong wrote:
>>> Any thoughts on this? Is it a good idea or something horrible? Has
>>> someone attempted something like this befo
building the virtualenv
management in yourself.
(On the other hand "download this file and run it" is a much easier
installation process than "install pipsi, do pipsi install myprogram,
then run the program", so it may not suit your use case...)
Paul
On 27 September 2017 at
good exercise to have a problem that
interests you, and work on coding it - no matter what it is, you'll
learn more about understanding requirements, testing, bug fixing, and
practical programming by working on a project you care about than
you'll ever get reading books) and/or you can loo
that code is *not*
break/continue, but the lack of structure and the fact that the code
isn't properly broken into meaningful subunits.
I'd rather not search for break/continue in such code, sure, but
that's missing the point entirely. "Don't use break/continue in
appall
[email protected] (Stefan Ram) writes:
> I would like to write source code similar to:
> country( 'USA' )
> state( 'Alabama' ) ...
> It seems I can't do this with Python. Is there any workaround?
_= country( 'USA' )
_= state( 'Alabama' )
_= town( 'Abbeville' )
_= town
[email protected] (Stefan Ram) writes:
> I would like to write source code similar to:
> country( 'USA' )
> state( 'Alabama' )
Aside from the workaround that I mentioned, this looks more like data
than code. Maybe you really want to create a nested structure
(dictionaries, JSON, XML or
Chris Angelico writes:
> USA:
> Alabama:
> Abbeville
> Addison
> ...
> and then, as Paul suggested, write a simple parser to read it.
That looks like YAML, which there's already a library for. I'm not
crazy about it but it might be an o
est occurs, i.e. when the entry is generated from the filter.
You say that doesn't happen, so my intuition (and yours) seems to be
wrong. Can you provide a reproducible test case? I'd be inclined to
run that through dis.dis to see what bytecode was produced.
Paul
On 3 October 2017 at
ly as a
consequence of the behaviour of generators and closures.
I'd tend to steer clear of code that relied on that behaviour in
practice, as I think it's likely to be hard to understand/maintain,
but I'm aware that reality's never quite that simple :-)
Paul
--
https://mail.python.org/mailman/listinfo/python-list
at
https://github.com/pypa/python-packaging-user-guide/. Most of us
working on packaging are way too involved in the details to know how
it really feels to a newcomer to be faced with all this stuff, so if
you have any comments (or even better, suggestions as to how we could
improve things) that would be immensely valuable.
Paul
--
https://mail.python.org/mailman/listinfo/python-list
ourself (although I believe it
does discover unittest and doctest tests, so you don't need to change
all your tests over).
There's an example of an autouse fixture in pip's test suite, although
it's massively more complex than what you're describing, so don't be
put
perhaps there's
> peephole optimization for this common case.
There is:
>>> def f():
... while True:
... pass
...
>>> import dis
>>> dis.dis(f)
2 0 SETUP_LOOP 4 (to 6)
3 >>2 JUMP_ABSOLUTE2
4
these things, and Python's choices won't be the best in
all circumstances. All we can really say is that they have turned out
to be pretty useful and popular in many situations...
Paul
--
https://mail.python.org/mailman/listinfo/python-list
> (de)compression? Something along the lines of (say) the pbip2 program
>> but with bindings for python?
>
> pbip2? Never heard of it, and googling comes up with nothing relevant.
>
> Got a link?
It's a typo. pbzip2 - a search found http://compression.ca/pbzip2/ but
the
details and edge cases right of such a pattern is still a surprisingly
tricky problem. So I guess it's a good "learning to program" exercise,
but the "while loop with break part way through" pattern for solving
it is not really what I'd want to see taught to beginning Python
programmers...
Paul
--
https://mail.python.org/mailman/listinfo/python-list
t;", line 1, in
> AttributeError: 'Point' object has no attribute 'z'
>
> I pretty much never bother to do this because (bart to the contrary) it
> isn't useful if you're thinking in Pythonic terms, but it can be done pretty
> easily.
Good point. I'd forgotten that - like you say, it's not common to want
to constrain things to this level in idiomatic Python code.
Paul
--
https://mail.python.org/mailman/listinfo/python-list
he way the import function works, and how names
in Python behave, but I can see someone with a background in other
languages with "real" constants thinking "but foo is a constant, and
importing it stops it being a constant!"
Paul
--
https://mail.python.org/mailman/listinfo/python-list
*is* available for Python 3.6. Either from
https://sourceforge.net/projects/pywin32/files/pywin32/Build%20220/ (a
wininst installer, which is not compatible with pip but which
nevertheless can be installed in your system Python) or from
http://www.lfd.uci.edu/~gohlke/pythonlibs/ which hosts a lot of
about
8-12 hours. Not exactly high availability. But apparently in the
arctic regions they are experimenting with a 24x7 version of the sky
for short periods of the year...
Paul
--
https://mail.python.org/mailman/listinfo/python-list
>> to be stdin on all platforms?
>
> It is guaranteed on POSIX compatible OSs. I think it is also guaranteed
> on Windows, Don't know about VMS or the IBM OSs.
All of these work on Windows, I just tested. Which surprised me, as I
thought things like S_ISFIFO were Unix specific. Today I learned...
(I'd probably still use sys.stdin.fileno() as it's more
self-documenting).
Paul
--
https://mail.python.org/mailman/listinfo/python-list
s long as that's done in a way that provides a good user
experience. Of course, what constitutes a "good UX" is a judgement
call... (Personally I think ls goes too far in how different it is in
the interactive case, for example).
Paul
>
> Since such guesswork often goes wrong, the
ve mode and non-interactive mode, which in turn limits the
> extent of these changes to the defaults. It wants to be small changes
> only. Everything else should be controlled with options, not magic.
Yep. My real beef with ls is multi-column vs single-column.
Paul
--
https://mail.python.org/mailman/listinfo/python-list
On 6 October 2017 at 13:22, Steve D'Aprano wrote:
>> Yep. My real beef with ls is multi-column vs single-column.
>> Paul
>
> You don't think multiple columns in interactive mode is useful? I'm surprised,
> because I find it invaluable.
Interactively, I use ls
ctions or classes. But you're
unlikely to ever care. One example:
>>> f.attr = 1
>>> open.attr = 1
Traceback (most recent call last):
File "", line 1, in
AttributeError: 'builtin_function_or_method' object has no attribute 'attr'
functions define
-E wrote its output to a file, you'd have to read that file,
manage the process of deleting it after use (and handle possible
deletion of it if an error occurred), etc.
Writing to stdout is very often a good design. Not always, but nothing
is ever 100% black and white, but sufficiently often that building an
OS based on the idea (Unix) was pretty successful :-)
Paul
--
https://mail.python.org/mailman/listinfo/python-list
s come from
Unix-based systems. That's not "because Linux is so much better", it's
because someone other than me had a good idea, and I acknowledge the
fact.
Paul
--
https://mail.python.org/mailman/listinfo/python-list
g (and the
inevitable "config manager" tools to manage them). Not that I can
complain about this, as a Windows user, but I do have fond memories of
those simpler times :-) Obligatory xkcd: https://xkcd.com/297/
Paul
--
https://mail.python.org/mailman/listinfo/python-list
by
project and the learning curve for PyQt (any GUI framework, really)
was a bit high for the amount of spare time I had at the time.
Paul
--
https://mail.python.org/mailman/listinfo/python-list
On 9 October 2017 at 17:22, John Black wrote:
> I want sep="" to be the default without having to specify it every time I
> call print. Is that possible?
def myprint(*args, **kw):
print(*args, sep="", **kw)
If you want, assign print=myprint.
Paul
--
https
work on multiple operating
> system platforms.
>
> Can 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???
+1
Thank you for saying this.
Paul
--
https://mail.python.org/mailman/listinfo/python-list
iously fixed.
So I've conceded that you might have a point. Are *you* willing to
concede that you may have missed something when making your
assertions?
Paul
--
https://mail.python.org/mailman/listinfo/python-list
on\Python36\Lib\inspect.py",
line 2262, in _signature_from_callable
skip_bound_arg=skip_bound_arg)
File "C:\Users\me\AppData\Local\Programs\Python\Python36\Lib\inspect.py",
line 2087, in _signature_from_builtin
raise ValueError("no signature found for builtin
{!r}".format(func))
ValueError: no signature found for builtin
>>> try:
... sig = inspect.signature(type)
... except ValueError:
... sig = None
...
>>> print(repr(sig))
None
Paul
--
https://mail.python.org/mailman/listinfo/python-list
never really went anywhere, because it
ended up being more complex than I had time for. I don't recall the
details any more.
Paul
--
https://mail.python.org/mailman/listinfo/python-list
runs fine for me (Windows 10,
Python 3.6, 64-bit, downloaded from python.org).
Maybe check that the file you downloaded is complete, by confirming
the size/checksum matches? Do you have any antivirus software that
could be interfering?
Paul
--
https://mail.python.org/mailman/listinfo/python-list
Agreed. I was being lazy and didn't check precisely which exception
was raised before writing the code. "Making this code production ready
is left as an exercise for the reader" :-)
On 11 October 2017 at 01:59, Steve D'Aprano wrote:
> On Wed, 11 Oct 2017 02:15 am, Paul
nd I see that it's a
Windows message (not one from pip or Python). The most obvious
suggestion from that was "you're running a 64-bit application on a
32-bit Windows". I note from the above:
> Latest install: Python 3.5.4 (v3.5.4:3f56838, Aug 8 2017, 02:17:05) [MSC
h means they'll only be visible to you, or you need to be running
as a system administrator to install them for anyone (which means
running pip from a command prompt that was opened via "run as
administrator")
Paul
On 11 October 2017 at 16:43, Michael Cuddehe wrote:
> Running 64
code that constructs that string. That's where I'd start by
looking. Maybe something isn't zero-terminated that should be? Maybe
your code doesn't set up the character encoding information correctly?
Paul
On 13 October 2017 at 11:15, Thomas Jollans wrote:
> On 2017-10-13 11:07, Vi
On 13 October 2017 at 12:18, Vincent Vande Vyvre
wrote:
> Le 13/10/17 à 12:39, Paul Moore a écrit :
>>
>> As a specific suggestion, I assume the name of the created file is a
>> string object constructed in the C extension code, somehow. The fact
>> that you're get
401 - 500 of 9128 matches
Mail list logo