I'm writing a little script that uses a REST API and I'm having a problem using
urllib in Python 3.
I had the basics working in Python 2.7, but for reasons I'm not clear on I
decided to update to Python 3. (I'm in the early phases, so this isn't
production by any stretch.)
Python version
Can I find where Arcpy.exe to download in order to use for my course work
Thank you.
--
https://mail.python.org/mailman/listinfo/python-list
Hi,
we are working on a small scientific program that helps us in developing
and testing of new numerical methods for a certain type of biochemical
problems. I spare you the math ;-)
We code our new methods in Python and compare them with the existing
methods. Unfortunately, these existing
On Tue, Dec 2, 2014 at 6:45 AM, Chris Cioffi ch...@evenprimes.com wrote:
File /Users/chris/dev/LendingClub/lendingclub.py, line 40, in
_make_api_call
pprint(lcresponse.read())
TypeError: 'module' object is not callable
The relevant code is as follows:
lcrequest =
Cython is nearly always the answer to scientific computing in Python,
including wrapping C++.
Sturla
Michael Kreim mich...@perfect-kreim.de wrote:
Hi,
we are working on a small scientific program that helps us in developing
and testing of new numerical methods for a certain type of
When importing a module from a subpackage, it's sometimes convenient
to refer to it throughout the code with a one-part name rather than
two. I'm going to use 'os.path' for the examples, but my actual
use-case is a custom package where the package name is, in the
application, quite superfluous.
On 3 December 2014 at 22:02, Chris Angelico ros...@gmail.com wrote:
import os.path as path
from os import path
Bah - deleted the list and sent directly to Chris ... time to go to bed.
The advantage of the former is that if you want to use a different name,
it's a smaller change. But the
I'm not sure how you think you're adding a local from C
code. If you're using PyEval_GetLocals(), that only gives
you a dict containing a *copy* of the locals; modifying
that dict doesn't change the locals in the function's frame.
That may have been the design plan, but in Python 2.7.6, I
Chris Angelico wrote:
When importing a module from a subpackage, it's sometimes convenient
to refer to it throughout the code with a one-part name rather than
two. I'm going to use 'os.path' for the examples, but my actual
use-case is a custom package where the package name is, in the
On Wed, Dec 3, 2014 at 10:27 PM, Peter Otten __pete...@web.de wrote:
Don't repeat yourself, so
from os import path
always. On the other hand I have never thought about actual renames, e. g.
from os import path as stdpath
versus
import os.path as stdpath
I think I'd use the latter as
On 2014-12-02 23:05, Dennis Lee Bieber wrote:
foo == 42 or else
Has a PERL stink to it... like: foo == 42 or die
This actually works in Python and I occasionally use in debugging
(much like
--
https://mail.python.org/mailman/listinfo/python-list
On Wed, Dec 3, 2014 at 10:56 PM, Tim Chase
python.l...@tim.thechases.com wrote:
This actually works in Python and I occasionally use in debugging
(much like
finish_sentence() or die
ChrisA
--
https://mail.python.org/mailman/listinfo/python-list
On 2014-12-02 23:05, Dennis Lee Bieber wrote:
foo == 42 or else
Has a PERL stink to it... like: foo == 42 or die
This statement actually works in Python and I occasionally use it
when debugging (in the same fashion as one might do printf()
debugging in C). It raises a NameError and
On Wed, Dec 3, 2014 at 10:59 PM, Tim Chase
python.l...@tim.thechases.com wrote:
On 2014-12-02 23:05, Dennis Lee Bieber wrote:
foo == 42 or else
Has a PERL stink to it... like: foo == 42 or die
This statement actually works in Python and I occasionally use it
when debugging (in the
Kasper Peeters wrote:
That may have been the design plan, but in Python 2.7.6, I definitely
am able to inject locals via PyEval_GetLocals() and have them be visible
both from the C and Python side;
What seems to be happening is that the dict created by
PyEval_GetLocals() is kept around, so you
On 03/12/2014 02:27, Skybuck Flying wrote:
Excuse is: bad programming style.
I don't need snot telling me how to program after 20 years of
programming experience.
This is so far the only thing pissing me off in python.
Now I have to declare global in front of these variables every where I
On 3 December 2014 at 04:32, Skybuck Flying skybuck2...@hotmail.com wrote:
I am still new at python and definetly don't feel comfortable with the
object feature, though I did use it for these variables which are actually
objects.
If you are being serious, please take into consideration that
On 3 December 2014 at 08:29, Michael Kreim mich...@perfect-kreim.de wrote:
What are you using to wrap C++ classes for Python?
Can you recommend swig? Should I give it another try?
Did I misunderstood ctypes?
The PyPy guys would love it if you used CFFI. Cython is also a
wonderful approach.
On 12/02/2014 05:48 PM, sravan kumar wrote:
Can I find where Arcpy.exe to download in order to use for my course work
I don't know the package. But it shouldn't be hard to find.
Go to duckduckgo.com (or google, if that's your preference)
type arcpy in the search box
One of the result
On Tue, 02 Dec 2014 21:41:33 +, John Gordon wrote:
GET shouldn't cause any business data modifications, but I thought it was
allowed for things like logging out of your session.
GET isn't supposed to have observable side-effects. Observable excludes
things like logs and statistics, but
On 03/12/2014 04:32, Skybuck Flying wrote:
Some issues I'd like to address to you:
1. Structured programming requires more programming time.
2. Structured programming implies structure which might be less flexible.
3. Python objects require self keyword to be used everywhere, and
other
On Wednesday, December 3, 2014 10:05:06 AM UTC-8, mm0fmf wrote:
On 03/12/2014 04:32, Skybuck Flying wrote:
Some issues I'd like to address to you:
1. Structured programming requires more programming time.
2. Structured programming implies structure which might be less flexible.
3.
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
On Dec 3, 2014 4:34 AM, Chris Angelico ros...@gmail.com wrote:
On Wed, Dec 3, 2014 at 10:27 PM, Peter Otten __pete...@web.de wrote:
Don't repeat yourself, so
from os import path
always. On the other hand I have never thought about actual renames, e.
g.
from os import path as
On 12/3/2014 6:02 AM, Chris Angelico wrote:
When importing a module from a subpackage, it's sometimes convenient
to refer to it throughout the code with a one-part name rather than
two. I'm going to use 'os.path' for the examples, but my actual
use-case is a custom package where the package name
On Wed, 3 Dec 2014 03:27:45 +0100, Skybuck Flying wrote:
I don't need snot telling me how to program after 20 years of programming
experience.
[snip]
After 20 years of programming, I had a lot to learn about programming.
That was 29 years ago, and I *still* have a lot to learn about
Mark Lawrence wrote in message
news:mailman.16534.1417610132.18130.python-l...@python.org...
On 03/12/2014 02:27, Skybuck Flying wrote:
Excuse is: bad programming style.
I don't need snot telling me how to program after 20 years of
programming experience.
This is so far the only thing
sohcahto...@gmail.com wrote:
On Wednesday, December 3, 2014 10:05:06 AM UTC-8, mm0fmf wrote:
On 03/12/2014 04:32, Skybuck Flying wrote:
Some issues I'd like to address to you:
1. Structured programming requires more programming time.
2. Structured programming implies structure which
On Thu, Dec 4, 2014 at 11:57 AM, Steven D'Aprano
steve+comp.lang.pyt...@pearwood.info wrote:
Someone with 20 years of programming shouldn't have any problems
understanding objects in Python.
Oh if that were only the case. It is amazing how long some people can work
in a profession and still
On Wed, Dec 3, 2014 at 12:29 AM, Michael Kreim mich...@perfect-kreim.de wrote:
Hi,
I did some googleing on extending Python by C++ code but I did not find
something that satisfies me. I gave SWIG a try, but several webpages
disadvised me of using it. Also my small experiments did not work.
On Wed, Dec 3, 2014 at 8:10 PM, Chris Angelico ros...@gmail.com wrote:
On Thu, Dec 4, 2014 at 11:57 AM, Steven D'Aprano
steve+comp.lang.pyt...@pearwood.info wrote:
Someone with 20 years of programming shouldn't have any problems
understanding objects in Python.
Oh if that were only the case.
On 03/12/2014 23:02, Skybuck Flying wrote:
Mark Lawrence wrote in message
news:mailman.16534.1417610132.18130.python-l...@python.org...
On 03/12/2014 02:27, Skybuck Flying wrote:
Excuse is: bad programming style.
I don't need snot telling me how to program after 20 years of
programming
I am using 32-bit Python on a 64-bit Windows.
Edit with IDLE is missing from the context menu. I am working on Windows 7. I
have searched on google a lot and have tried everything said in superuser,
stackoverflow etc. I have even tried re-installing Python. I am now only left
with
On 12/03/2014 08:57 PM, Dennis Lee Bieber wrote:
On Wed, 3 Dec 2014 10:16:18 -0800 (PST), sohcahto...@gmail.com declaimed
the following:
I'm surprised other people haven't picked up on how obvious of a troll this
Skybuck Flying guy is. He claims 20 years programming experience, then
On 12/3/2014 10:16 PM, Aseem Bansal wrote:
I am using 32-bit Python on a 64-bit Windows.
Edit with IDLE is missing from the context menu. I am working on
Windows 7. I have searched on google a lot and have tried everything
said in superuser, stackoverflow etc. I have even tried re-installing
Changes by Waldemar Parzonka waldemar.parzo...@gmail.com:
--
nosy: +Waldemar.Parzonka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22983
___
___
Greg Turner added the comment:
Just added a commit message.
--
Added file: http://bugs.python.org/file37349/fix_types_calculate_meta_v3.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22968
Greg Turner added the comment:
Here are some tests for this... first, some tests that pass right now and
demonstrate, I think, correctness of the second batch of tests.
--
Added file: http://bugs.python.org/file37350/test_virtual_metaclasses.patch
Greg Turner added the comment:
And some analogous tests for types.py, which don't pass without
fix_types_calculate_meta_v3.patch.
--
Added file:
http://bugs.python.org/file37351/test_virtual_metaclasses_in_types_module.patch
___
Python tracker
Greg Turner added the comment:
And some analogous tests for types.py, which don't pass without
fix_types_calculate_meta_v3.patch.
--
Added file:
http://bugs.python.org/file37352/test_virtual_metaclasses_in_types_module.patch
___
Python tracker
New submission from Kali Kaneko:
The SSLv23 row that can be read in the socket creation section in the
documentation for the ssl module looks incorrect:
https://docs.python.org/2.7/library/ssl.html#socket-creation
by my tests (with python 2.7.8) that row should read:
yes no yes yes yes yes
Alex Gaynor added the comment:
I agree this is a bug, but I believe the correct output is:
no yes yes yes yes yes
--
nosy: +alex, christian.heimes, dstufft, giampaolo.rodola, janssen, pitrou
___
Python tracker rep...@bugs.python.org
Antoine Pitrou added the comment:
Alex is right. The current doc was valid for older OpenSSL versions, which sent
a SSLv2 hello with SSLv23.
Reference from the OpenSSL docs:
If the cipher list does not contain any SSLv2 ciphersuites (the default
cipher list does not) or extensions are
New submission from Felipe:
This bug report is the opposite of issue #14718. The interpreter did not raise
an error when it encountered a `yield` expression inside the `finally` part of
a `try/finally` statement.
My system's info: Python 3.4.2 (v3.4.2:ab2c023a9432, Oct 6 2014, 22:15:05)
Changes by Ethan Furman et...@stoneleaf.us:
--
nosy: +ethan.furman, giampaolo.rodola, gvanrossum, haypo, pitrou, yselivanov
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22988
___
Guido van Rossum added the comment:
There is no prohibition in the language against yield in a finally block. It
may not be a good idea, but the behavior you see is all as it should be.
--
___
Python tracker rep...@bugs.python.org
New submission from Paul Hartmann:
HTTPResponse.msg is documented as a http.client.HTTPMessage object containing
the headers of the response [1].
But in fact this is a string containing the status code:
import urllib.request
req=urllib.request.urlopen('http://heise.de')
content =
R. David Murray added the comment:
FIlipe, in case you hadn't noticed, the reason for the error in the other issue
is that the generator was closed when it got garbage collected, and it ignored
the close (executed a yield after the close). Thus the error message there is
accurate and
Changes by R. David Murray rdmur...@bitdance.com:
--
nosy: +r.david.murray
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22989
___
___
Roundup Robot added the comment:
New changeset 7af5d5493497 by Antoine Pitrou in branch '2.7':
Fix #22987: update the compatibility matrix for a SSLv23 client.
https://hg.python.org/cpython/rev/7af5d5493497
New changeset 9f03572690d2 by Antoine Pitrou in branch '3.4':
Fix #22987: update the
Ethan Furman added the comment:
Here's the excerpt from the docs:
Yield expressions are allowed in the try clause of a try ... finally
construct.
If the generator is not resumed before it is finalized (by reaching a zero
reference
count or by being garbage
Changes by Antoine Pitrou pit...@free.fr:
--
resolution: - fixed
stage: - resolved
status: open - closed
versions: +Python 3.4, Python 3.5
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22987
Felipe added the comment:
Thanks for the clarification; sorry I misread issue #14718.
I agree with Ethan's point. Though I would say Yield expressions are allowed
anywhere in try ... except ... finally constructs.
I'd also like to explicitly add a point about the exception-handling machinery
Changes by Guido van Rossum gu...@python.org:
--
nosy: -gvanrossum
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22988
___
___
Python-bugs-list
Changes by Matt Hansen hanse...@me.com:
--
nosy: +Matt.Hansen
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11101
___
___
Python-bugs-list mailing
Jim Jewett added the comment:
I interpreted Issue 15's closure as being about the distinction between
Application/webm vs Video/webm, etc.
As far as I understand it, the python stdlib doesn't actually care what the
major Mime type is, or, frankly, even whether the definition makes sense. We
Demian Brecht added the comment:
After discussion in Rietveld, the patch looks good to me.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21557
___
Chris Rebert added the comment:
WebM's docs use video/webm and never use an application/* type.
See http://www.webmproject.org/docs/container/
They also specify audio/webm for audio-only content, but both use the same
file extension, so associating .webm with video/webm seems quite reasonable
Antoine Pitrou added the comment:
This is a limitation more than a bug. When you seek to the start of the file,
the encoder is reset because Python thinks you are gonna to write there. If you
remove the call to `file.seek(0, io.SEEK_SET)`, things work fine.
@Amaury, whence can only be zero
Mark Ingram added the comment:
It's more than a limitation, because if I call `file.seek(0, io.SEEK_END)` then
the encoder is still reset, and will still write the BOM, even at the end of
the file.
This also means that it's impossible to seek in a text file that you want to
append to. I've
R. David Murray added the comment:
Since Raymond is the person who tends to object most strongly to warning boxes
in the docs, let's get his opinion on this. I'm not sure that the warning box
is necessary, the text may be sufficient. On the other hand, this *is* a
significant insecurity
New submission from Alan:
The Select Python Installations dialog box contains the line Select the
Python locations where distribution_name should be installed. If
distribution_name is anything other than a very short string, the line is
truncated, due to the following factors:
- the line
Terry J. Reedy added the comment:
Antoine Pitrou and Ethan Furman agreed on pydev that this should be applied.
Chris, is the existing patch exactly what you think is needed?
--
nosy: +terry.reedy
stage: - commit review
type: - enhancement
versions: +Python 3.5 -Python 3.4
Terry J. Reedy added the comment:
Does test_mimetypes (assuming it exists), have a test for the mapping, are is
something needed?
--
stage: commit review - patch review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16329
Chris Rebert added the comment:
Yes, the existing patch looks fine.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16329
___
___
Ezio Melotti added the comment:
A while ago there was a discussion about updating the MIME registry on bug fix
releases too, and I seem to remember people agreed it should be done. If this
is indeed the case and the patch is accepted for 3.5, should it also be
backported to 2.7 and 3.4?
New submission from Xavier de Gaye:
This happens on archlinux. Annoying: the terminal becomes unusable unless you
type blindly 'stty sane CTL-J', and the backspace key is still wrong.
This does not happen with gdb 7.6.1.
And this does not happen when running gdb with the 'mi' interpreter. The
New submission from Demian Brecht:
Coming out of a recent thread in python-dev, it was mentioned that adding a git
developer's guide to mercurial may be beneficial to help lower the initial
barrier of entry for prospective contributors
Ezio Melotti added the comment:
I have a few comments about the patch.
About the markup:
1) you can specify the default highlight (bash) once at the top of the file,
and just use :: afterwards instead of .. code-block::;
2) the used for some headers is inconsistent with the other files;
Changes by Ned Deily n...@acm.org:
--
nosy: +dmalcolm
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22991
___
___
Python-bugs-list mailing list
Changes by Josh Rosenberg shadowranger+pyt...@gmail.com:
--
nosy: +josh.r
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20692
___
___
Berker Peksag added the comment:
+The workflow of a developer might look something like this:
a core developer or a contributor? It would be good to split core developer
and contributor workflows.
+# address review comments and merge
+git checkout master
+git merge issueA
+git
Changes by Nikolaus Rath nikol...@rath.org:
--
nosy: +nikratio
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17852
___
___
Python-bugs-list
Nikolaus Rath added the comment:
Serhiy, I believe this still happens in Python 3.4, but it is harder to
reproduce. I couldn't get Armin's script to produce the problem either, but I'm
pretty sure that this is what causes e.g.
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=771452#60.
Greg Turner added the comment:
Fixed a trivial typo in test_virtual_metaclass_in_types_module.patch
--
versions: +Python 3.5
Added file:
http://bugs.python.org/file37356/test_virtual_metaclasses_in_types_module_v2.patch
___
Python tracker
Roundup Robot added the comment:
New changeset 6db65ff985b6 by Terry Jan Reedy in branch '3.4':
Issue #16893: For Idle doc, move index entries, copy no-subprocess section
https://hg.python.org/cpython/rev/6db65ff985b6
New changeset feec1ea55127 by Terry Jan Reedy in branch '2.7':
Issue #16893:
Roundup Robot added the comment:
New changeset 395673aac686 by Terry Jan Reedy in branch '2.7':
Issue #3068: Document the new Configure Extensions dialog and menu entry.
https://hg.python.org/cpython/rev/395673aac686
New changeset b099cc290ae9 by Terry Jan Reedy in branch '3.4':
Issue #3068:
Changes by Terry J. Reedy tjre...@udel.edu:
--
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3068
___
___
Python-bugs-list
New submission from Connor Wolf:
I'm using plistlib to process plist files produced by an iphone app. Somehow,
the application is generating plist files with a absolute date value along the
lines of `-12-30T00:00:00Z`.
This is a valid date, and the apple plist libraries can handle this
Connor Wolf added the comment:
Aaaand there is no markup processing. How do I edit my report?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22993
___
Charles-François Natali added the comment:
Serhiy, I believe this still happens in Python 3.4, but it is harder to
reproduce. I couldn't get Armin's script to produce the problem either, but
I'm pretty sure that this is what causes e.g.
Ned Deily added the comment:
(Currently, it is not possible to edit a particular message in an issue. You
could add a replacement comment to the issue and ask that the older message be
delete.)
This seems to be a problem date. As documented, plistlib converts plist dates
to/from Python
82 matches
Mail list logo