Re: Can json.dumps create multiple lines

2016-12-01 Thread Zachary Ware
On Thu, Dec 1, 2016 at 10:30 AM, Cecil Westerhof wrote: > I would prefer when it would generate: > '[ > "An array", > "with several strings", > "as a demo" > ]' > > Is this possible, or do I have to code this myself? https://docs.python.org/3/library/json.html?highlight=in

Re: Asyncio -- delayed calculation

2016-11-28 Thread Zachary Ware
On Mon, Nov 28, 2016 at 6:48 AM, Steve D'Aprano wrote: > What am I doing wrong? Give yourself a bit more to debug with, since you're going to want to do something with the result your expensive calculation anyway: import asyncio class Counter: def __init__(self, i): self.count = 10

Re: Windows switch between python 2 and 3

2016-10-27 Thread Zachary Ware
On Thu, Oct 27, 2016 at 10:11 AM, Daiyue Weng wrote: > Hi, I installed Python 2.7 and Python 3.5 64 bit versions on Win 10. Under > > C:\Python35 > > C:\Python27 > > Both have been set in environment variable Path. > > When I type python in cmd, it only gives me python 2.7, I am wondering how > to

Re: System-wide module path

2016-10-24 Thread Zachary Ware
On Mon, Oct 24, 2016 at 6:49 PM, Rob Gaddi wrote: > On a Linux (Ubuntu) system, with no concerns for Python < 3.4, how do I > a) Add a directory to the system-wide (rather than per-user) module > path? This is the trickier part. There are a couple of ways to do it, but which is better is a mat

Re: Pip error on installing Python 3.5

2016-10-11 Thread Zachary Ware
On Tue, Oct 11, 2016 at 7:07 PM, Steve D'Aprano wrote: > I've just installed Python 3.5 from the source tarball and received an > unexpected error related to pip. On Linux, as a regular user (except for > the last line): > > > wget https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tgz > tar xvf

Re: Copying a compiled Python from one system to another

2016-10-01 Thread Zachary Ware
On Oct 1, 2016 06:25, "Steve D'Aprano" wrote: > > Long story short: I have no working systems capable of compiling the latest > Python 3.6, and no time to upgrade my usual machines to something which > will work. Since you're working on a pure-Python module (statistics), I'd recommend updating to

Re: collect2: ld returned 1 exit status when building from source

2016-09-10 Thread Zachary Ware
On Sep 10, 2016 09:56, "Steve D'Aprano" wrote: > > I'm trying to build from source using: > > ./configure --with-pydebug && make -s -j2 > > > At first the output is okay, then I get a whole heap of similar errors: > > Python/dtrace_stubs.o: In function `PyDTrace_LINE': > /home/steve/python/python-

Re: Why can't I define a variable like "miles_driven" with an underscore in Python 3.4.3 ?

2016-08-10 Thread Zachary Ware
On Wed, Aug 10, 2016 at 12:39 PM, Cai Gengyang wrote: > I managed to get this piece of code to work : > print("This program calculates mpg.") > This program calculates mpg. milesdriven = input("Enter miles driven:") > Enter miles driven: 50 milesdriven = float(milesdriven) gall

Re: Running Python from the source repo

2016-08-09 Thread Zachary Ware
On Tue, Aug 9, 2016 at 2:55 AM, Terry Reedy wrote: > This works great. Might there be any way to collect together > the warning messages? There were perhaps 100 for the changes in > the last few weeks. (People on non-windows seems to routinely write code > that msc does not like.) Glad it work

Re: Running Python from the source repo

2016-08-08 Thread Zachary Ware
On Mon, Aug 8, 2016 at 2:25 PM, Terry Reedy wrote: > Last January, I wrote a batch file to build all three versions with the > 'optional' extensions. I started rebuilding more often after this. > > 36\pcbuild\build.bat -e -d > 35\pcbuild\build.bat -e -d > 27\pcbuild\build.bat -e -d > > Thanks for

Re: Running Python from the source repo

2016-08-08 Thread Zachary Ware
On Sun, Aug 7, 2016 at 9:11 PM, Steven D'Aprano wrote: > I have cloned the Python source repo, and build CPython, as described here: > > https://docs.python.org/devguide/ > > > Now a little bit later, I want to update the repo, so I run: > > hg fetch According to the hg docs [1], you should proba

Re: Tcl/Tk for Python 3.6.0a3 on Os X 10.9.5

2016-08-04 Thread Zachary Ware
On Thu, Aug 4, 2016 at 8:25 PM, Lawrence D’Oliveiro wrote: > On Tuesday, August 2, 2016 at 8:21:57 PM UTC+12, Valeria Munoz wrote: >> >> I have downloaded Python 3.6.0a3 on a Mac 10.9.5 and realized that I also >> need to download an Active Tcl for it. > > Python should already come with Tk >

Re: "for/while ... break(by any means) ... else" make sense?

2016-06-29 Thread Zachary Ware
On Wed, Jun 29, 2016 at 11:12 PM, Steven D'Aprano wrote: > On Thu, 30 Jun 2016 11:28 am, Chris Angelico wrote: > >> On Thu, Jun 30, 2016 at 10:27 AM, Steven D'Aprano >> wrote: >>> Following os.abort(), the interpreter exits in the hardest, quickest >>> manner possible. >> >> os.kill(os.getpid(),

Re: Meta decorator with parameters, defined in explicit functions

2016-06-27 Thread Zachary Ware
On Tue, Jun 28, 2016 at 12:02 AM, Ben Finney wrote: > Howdy all, > > I want an explicit replacement for a common decorator idiom. > > There is a clever one-line decorator that has been copy-pasted without > explanation in many code bases for many years:: > > decorator_with_args = lambda decora

Re: __all__ attribute: bug and proposal

2016-06-27 Thread Zachary Ware
On Mon, Jun 27, 2016 at 7:32 PM, Chris Angelico wrote: > If you're primarily worried about classes and functions, here's a neat > trick you can use: > > __all__ = [] > def all(thing): > __all__.append(thing.__name__) > return thing Barry Warsaw has written a nice decorator called 'public'

Re: Question on compiling on linux

2016-06-26 Thread Zachary Ware
On Saturday, June 25, 2016, Steven Truppe wrote: > > i hope this email works like you expected! Not quite, but closer. You've quoted me properly, but you added your reply above the quote, so-called "top-posting". A: Because you have to read things in reverse order. Q: Why? A: Top-posting. Q: Wh

Re: Question on compiling on linux

2016-06-24 Thread Zachary Ware
On Fri, Jun 24, 2016 at 2:28 PM, Steven Truppe wrote: > That gives me many .so files but no python*.so* file :( Where are you finding these many .so files? There should be libpython3.5m.so in the root of the source tree (alongside `python`). By the way, I'm not sure how you're accessing the lis

Re: Question on compiling on linux

2016-06-24 Thread Zachary Ware
On Fri, Jun 24, 2016 at 1:35 PM, Steven Truppe wrote: > So back to my first question now that you saw everything worked fine, but > there is no python.so file, did i miss something when using ./configure ? Try `./configure --enable-shared`. -- Zach -- https://mail.python.org/mailman/listinfo/p

Re: [tkinter] widget size adjustment

2016-06-22 Thread Zachary Ware
On Wed, Jun 22, 2016 at 4:05 PM, Christian Gollwitzer wrote: > BTW, the Tkinter wrapper is a bit clumsy for this option. In the original > Tk, the sticky option is just a string. You can still pass that and do > > sticky='nsew' > > instead of the clumsy > > sticky=Tkinter.N+Tkinter

Re: Setting up Python WinXP

2016-06-22 Thread Zachary Ware
Hi Michael, On Wed, Jun 22, 2016 at 11:41 AM, Michael Smolen <8smo...@tds.net> wrote: > Folks: > I can't wait to start programming with Python. Welcome to Python! > However, I am having difficulty installing on my XP operating system. This unsolicited advice is rather beside the point, but I wo

Re: best text editor for programming Python on a Mac

2016-06-17 Thread Zachary Ware
On Jun 17, 2016 6:56 PM, "Chris via Python-list" wrote: > > I have been trying to write a simple Hello World script on my Mac at work with TextEdit. TextEdit is not just a simple text editor, it defaults to rich text mode. You can either attempt to get TextEdit out of rich text mode and into plai

Re: Format a timedelta object

2016-05-27 Thread Zachary Ware
On Fri, May 27, 2016 at 11:21 AM, Steven D'Aprano wrote: > On Thu, 26 May 2016 03:28 pm, Zachary Ware wrote: >> On Thu, May 26, 2016 at 12:16 AM, Steven D'Aprano >> wrote: >>> I have a timedelta object, and I want to display it in a nice >>> human-rea

Re: Format a timedelta object

2016-05-25 Thread Zachary Ware
On Thu, May 26, 2016 at 12:16 AM, Steven D'Aprano wrote: > I have a timedelta object, and I want to display it in a nice human-readable > format like 03:45:17 for "three hours, forty five minutes, 17 seconds". > > Is there a standard way to do this? >>> timedelta(100) datetime.timedelta(100

Re: for / while else doesn't make sense

2016-05-20 Thread Zachary Ware
On Fri, May 20, 2016 at 3:09 AM, Erik wrote: > On 20/05/16 00:51, Gregory Ewing wrote: >> >> It's not so bad with "else" because you need to look back >> to find out what condition the "else" refers to anyway. > > > With my tongue only slightly in my cheek, if it was desirable to > "fix"/clarify t

Re: How to create development Python environment on Linux.

2016-05-17 Thread Zachary Ware
On Mon, May 16, 2016 at 4:28 PM, wrote: > Thanks Zach, that's a big help. The only reason I want to get a Python 2.7 > environment working first is because I'll be working on third party code and > that's the platform it uses. For any new projects I would use Python 3. Fair enough :) > After

Re: How to create development Python environment on Linux.

2016-05-16 Thread Zachary Ware
On Mon, May 16, 2016 at 6:22 AM, wrote: > I have a Linux system (Mint 17.3 based in Ubuntu 14.04) on which I wish to do > some Python development. The system has Python 2.7.6 installed already (there > is a Python 3 installation too but I won't be needing to use that to start > with). Not wha

Re: Slight problems with python in Windows

2016-05-06 Thread Zachary Ware
Hi Peter, On Fri, May 6, 2016 at 6:22 AM, Peter Toye wrote: > I'm trying to install Python under Windows 7 so that I can use git-review and > have found a few niggling issues. > > 1) Apparently (according to the git-review pages) pip has a problem with > directories with spaces in their names.

Re: Python(x,y) 64 bit

2016-04-27 Thread Zachary Ware
Hi Pierre, On Wed, Apr 27, 2016 at 6:23 AM, Pierre wrote: > Hello, > > I installed Python(x,y) 64 bit version and ran it using a library that > requires Python 64 bit. > I got an error which indicated that I am using Python 32 bit. > > So, is the python used by Python(x,y) 64 bit, using Python 6

Re: How are you supposed to define subclasses in C?

2016-04-21 Thread Zachary Ware
On Thu, Apr 21, 2016 at 11:35 AM, Random832 wrote: > I was trying to write a proof of concept on including descriptors (e.g. > a "sys.recursionlimit" instead of set/get methods) in the sys module, > and couldn't figure out how to "properly" define a type using > PyType_FromSpecWithBases. Everythin

Re: Launcher for 64 bits doesnt work

2016-04-04 Thread Zachary Ware
Hi Gustaf, On Mon, Apr 4, 2016 at 9:38 PM, Gustaf Nilsson wrote: > Hi! > > The only 3.5.1 versio that works for me is the 32 bits version, will it be > a problem to use the 32 bits version for 64 bits computer? >From your mention of a 'launcher' I'm assuming you're on Windows. It's perfectly fin

Re: Slice equivalent to dict.get

2016-03-31 Thread Zachary Ware
On Thu, Mar 31, 2016 at 12:51 PM, Terry Reedy wrote: > On 3/31/2016 11:24 AM, Peter Otten wrote: >> try...except to the rescue: >> > def get(seq, index, default=None): >> >> ... try: return seq[index] >> ... except IndexError: return default > > > Replace IndexError with (IndexError, K

Re: Pyscripter Issues

2016-03-31 Thread Zachary Ware
On Thursday, March 31, 2016, Simon Martin wrote: > > Hi > > I have been having issues trying to run python 3.5.1 and pyscripter 2.6. > Giving the error message that it cannot initialize python. > > I have tried to re-install multiple versions of both python and pyscripter to > no avail. Any advi

Re: Adding run_in_executor task to already existing loop.

2016-03-25 Thread Zachary Ware
On Fri, Mar 25, 2016 at 3:56 PM, Marko Rauhamaa wrote: > Ray Cote : > >> I’m trying to perform an synchronous task while using asyncio. > > You seem to want to do something you shouldn't be doing. Asyncio does > not tolerate synchronous/blocking calls. You will need to move those in > separate thr

Re: Adding run_in_executor task to already existing loop.

2016-03-25 Thread Zachary Ware
On Fri, Mar 25, 2016 at 3:24 PM, Ray Cote wrote: > Hello: > > I’m trying to perform an synchronous task while using asyncio. > I understand the solution is to use run_in_executor. > I’m not clear on how to add this into an already running event loop. > > I’ve found lots of examples showing how to

Re: Problem With Embedded Icon and Python 3.4

2016-03-24 Thread Zachary Ware
On Fri, Mar 25, 2016 at 12:10 AM, Wildman via Python-list wrote: > I have a program that I have been trying to rewrite so it will > run on Python 2.7 and 3.4. It has been a pain to say the least. > Thank $DIETY for aliases. Anyway, I got it all working except > for one thing. The program has an

Re: Python

2016-03-24 Thread Zachary Ware
On Thu, Mar 24, 2016 at 11:21 AM, Niyoo *Unkown* wrote: > The reason I uninstalled Python was because it was 32 bit not 64 bit and I > couldn't find the 64 bit version. Have a look at this page: https://www.python.org/downloads/windows/ The 64 bit versions are the "x86_64" ones. -- Zach -- ht

Re: AIX build and (potentially missing modules

2016-03-19 Thread Zachary Ware
On Thu, Mar 17, 2016 at 6:02 PM, Michael Felt wrote: > I have been packaging python for AIX - and wanting minimal dependancies I > have been ignoring the final messages from make. > > Personally, I do not see any real harm in the missing *audio "bits", but how > terrible are the other missing "bit

Re: snmpset

2016-02-05 Thread Zachary Ware
On Fri, Feb 5, 2016 at 11:14 AM, Joel Goldstick wrote: > On Fri, Feb 5, 2016 at 12:12 PM, Joel Goldstick > wrote: >> That page 404s for me. >> > > Pardon me, looks like sourceforge is down Ah, I guess caching fooled me when I rechecked. -- Zach -- https://mail.python.org/mailman/listinfo/pyth

Re: snmpset

2016-02-05 Thread Zachary Ware
On Fri, Feb 5, 2016 at 11:12 AM, Joel Goldstick wrote: > On Fri, Feb 5, 2016 at 11:10 AM, Zachary Ware > wrote: >> I have had success with pysnmp (http://pysnmp.sourceforge.net/). It > > That page 404s for me Hmm, it works for me (just tried again). Even Gmail's automat

Re: snmpset

2016-02-05 Thread Zachary Ware
On Fri, Feb 5, 2016 at 9:16 AM, Matt wrote: > How do I do the equivalent of this in Python? > > snmpset -v 2c -c $community $ip .1.3.1.1.4.1.1.1.1.1.1.1.0 s test > > and > > snmpset -v 2c -c $community $ip .1.3.1.1.4.1.1.1.1.1.1.1.0 i 123 > > and > > snmpbulkget -v2c -c $community -m ALL $ip .1.3.

Re: Python Calculator

2016-02-01 Thread Zachary Ware
Hi Ryan, On Mon, Feb 1, 2016 at 1:30 PM, Ryan Young wrote: > I am new to Python but have known Java for a few years now. With python, so > far, so good! I created a simple calculator to calculate the total cost of > a meal. My variables were tip tax total and order. I am confused about how > to p

Re: Installing on linux - missing devel packages

2016-01-21 Thread Zachary Ware
On Thu, Jan 21, 2016 at 1:18 AM, Frank Millman wrote: > Hi all > > Fedora 22 comes standard with Python 3.4.2. I want to install 3.5.1. > > It is easy enough to download the source and run ./configure;make;make > altinstall. But then I find that I cannot import gzip because zlib-devel is > missing

Re: ignoring or replacing white lines in a diff

2016-01-14 Thread Zachary Ware
On Thu, Jan 14, 2016 at 2:22 PM, Adriaan Renting wrote: > Any suggestions? Instead of trying to make diff behave through subprocess, have a look at Python's difflib: https://docs.python.org/3/library/difflib.html In particular, I think `difflib.ndiff(first_list_of_strings, second_list_of_strings

Re: We will be moving to GitHub

2016-01-01 Thread Zachary Ware
On Fri, Jan 1, 2016 at 2:03 PM, wrote: > Is there a summary document that discusses the options examined and why > others did not meet the requirements? I am -NOT- trying to dredge up > arguments about the choice. I am guessing that there have been some. Easiest would be to look through the arch

Re: We will be moving to GitHub

2016-01-01 Thread Zachary Ware
On Jan 1, 2016 2:35 PM, "Paul Rubin" wrote: > > Zachary Ware writes: > > ... the canonical CPython repository will be moving to GitHub in the > > near future. Note that we will *not* be using the GitHub issue > > tracker or wiki, just the hosting and re

Re: We will be moving to GitHub

2016-01-01 Thread Zachary Ware
On Jan 1, 2016 1:47 PM, "Chris Angelico" wrote: > > On Sat, Jan 2, 2016 at 6:39 AM, Mark Lawrence wrote: > > Please see > > https://mail.python.org/pipermail/core-workflow/2016-January/000345.html > > > > This should encourage developers at all levels to help out, such that the > > list of open i

Re: Problem Running tkinter gui Code

2015-12-27 Thread Zachary Ware
On Sat, Dec 26, 2015 at 10:59 PM, brian.moreira wrote: > I trying to run a simple code that opens a Tkinter window with text in it, on > my windows 8 machine using Python 3.4.3 Hi Brian, Details are important, and there are several missing from your question that make any advice just guesswork

Re: object() can't have attributes

2015-12-23 Thread Zachary Ware
On Dec 23, 2015 7:00 AM, "Chris Angelico" wrote: > On Wed, Dec 23, 2015 at 11:46 PM, Neal Becker wrote: > > Sometimes I want to collect attributes on an object. Usually I would make > > an empty class for this. But it seems unnecessarily verbose to do this. So > > I thought, why not just use a

Re: v3.5.1 - msi download

2015-12-21 Thread Zachary Ware
On Mon, Dec 21, 2015 at 6:49 AM, Mark Lawrence wrote: > On 19/12/2015 17:45, Renato Emanuel Dysangco wrote: >> >> hello >> >> is an **.msi* version of your *Python 3.5.1 (32 bit)* in the pipeline >> soon? >> >> thanks for your time >> > > msi files are not being made available for 3.5. Correction

Re: Should stdlib files contain 'narrow non breaking space' U+202F?

2015-12-18 Thread Zachary Ware
On Fri, Dec 18, 2015 at 1:43 AM, Chris Angelico wrote: > On Fri, Dec 18, 2015 at 6:12 PM, Serhiy Storchaka wrote: >> Agreed. Please open an issue. >> >> Using non-ASCII apostrophes and like in docstrings may be considered a bug. > > http://bugs.python.org/issue25899 > > Also noticed this. Is this

Re: python 351x64

2015-12-11 Thread Zachary Ware
On Fri, Dec 11, 2015 at 11:53 AM, Jay Hamm wrote: > It is an issue that borks your install. That seems like your issue which > involves notepad++. You might want to talk with them about it or more likely > since they've not fixed it in a while - develop a work around or at least a > message tha

Re: python 351x64

2015-12-11 Thread Zachary Ware
On Fri, Dec 11, 2015 at 10:30 AM, Jay Hamm wrote: > Hi > > I was trying to use your windows version of python 3.5.1 x64. > > It has a conflict with a notepad++ plugin NppFTP giving > api-ms-win-crt-runtime-I1-1-0.dll error on start up. > > This seems pretty well documented on the web. The work ar

Re: tkinter

2015-12-09 Thread Zachary Ware
On Dec 9, 2015 3:36 AM, "Chris Harwood" wrote: > > Hi, > > Python » 3.5.0 Documentation » The Python Standard Library » 25. Graphical User Interfaces with Tk » states that "You can check that tkinter is properly installed on your system by running python -m tkinter from the command line; this shou

Re: Problem in pip

2015-12-04 Thread Zachary Ware
On Fri, Dec 4, 2015 at 12:02 PM, Ali Zarkesh wrote: > My pip can't download or upgrade anything > I use python 3.5 (win 32) and my pip version is 7.1.2. > The error message is this: > > Exception: > Traceback (most recent call last): > ... > PermissionError: [Errno 13] Permission denied: 'c:\progr

Re: Frozen apps (py2exe, cx_freeze) built with Python 3.5

2015-12-04 Thread Zachary Ware
On Fri, Dec 4, 2015 at 10:37 AM, Ian Kelly wrote: > On Fri, Dec 4, 2015 at 10:21 AM, d...@forestfield.co.uk > wrote: >> Python 3.5 will not run under Windows XP, but what about applications >> created using py2exe or cx_freeze under Windows 7, 8 or 10, is there any >> knowledge of whether they

Re: Question about code writing '% i, callback'

2015-11-30 Thread Zachary Ware
On Mon, Nov 30, 2015 at 10:53 AM, Zachary Ware wrote: > On Mon, Nov 30, 2015 at 10:44 AM, fl wrote: >> The content inside parenthesis in last line is strange to me. >> >> "button %s" % i, callback > > https://docs.python.org/library/stdtypes.html#printf-s

Re: Question about code writing '% i, callback'

2015-11-30 Thread Zachary Ware
On Mon, Nov 30, 2015 at 10:44 AM, fl wrote: > The content inside parenthesis in last line is strange to me. > > "button %s" % i, callback https://docs.python.org/library/stdtypes.html#printf-style-string-formatting -- Zach -- https://mail.python.org/mailman/listinfo/python-list

Re: Help needed with compiling python

2015-11-26 Thread Zachary Ware
On Thu, Nov 26, 2015 at 3:39 PM, Cecil Westerhof wrote: > On Thursday 26 Nov 2015 12:07 CET, Dave Farrance wrote: >> zypper in -f >> >> So you'll want to try package names like "python" and "python2.7". > > Sadly that also only installs only libraries and no applications. Try "python-base". (Se

Re: Help needed with compiling python

2015-11-25 Thread Zachary Ware
On Wed, Nov 25, 2015 at 3:52 PM, Cecil Westerhof wrote: > My system python was all-ready damaged: that is why I wanted to build > myself. Then you should try to repair the system Python install via the system package manager. It's not worth the hassle to try to replace it; it almost certainly wo

Re: Help needed with compiling python

2015-11-25 Thread Zachary Ware
On Wed, Nov 25, 2015 at 2:23 PM, Cecil Westerhof wrote: > I wanted to install python myself. I started with 2.7.10. If that > works I also will install 3.5.0. > > I did: > ./configure --prefix=/usr > make > make altinstall > > I have: > /usr/bin/python2.7 > > But when I execute thi

Re: Futex hang when running event loop on a separated thread

2015-11-25 Thread Zachary Ware
On Wed, Nov 25, 2015 at 8:10 AM, Marc Aymerich wrote: > problem solved ! > Just found out that threads should be started by fuse.init() in order > to run when fuse is backgrounded. Glad you found it; I would not have, not being a pyfuse user :) -- Zach -- https://mail.python.org/mailman/listin

Re: Futex hang when running event loop on a separated thread

2015-11-24 Thread Zachary Ware
On Tue, Nov 24, 2015 at 12:37 PM, Marc Aymerich wrote: > still it appears to work only if the main thread is in the foreground > (as of calling Thread() with deamon=True), I don't get why it behaves > differently :( maybe it is waiting for other stuff, but no idea how to > confirm this with strace

Re: Futex hang when running event loop on a separated thread

2015-11-24 Thread Zachary Ware
On Tue, Nov 24, 2015 at 9:46 AM, Marc Aymerich wrote: > if __name__ == '__main__': > loop_container = {} > handler = threading.Thread(target=run_loop, args=(loop_container, )) > handler.start() > try: > time.sleep(1) > finally: > loop_container['loop'].stop(

Re: Trouble installing Python 3.5.0

2015-11-17 Thread Zachary Ware
On Tue, Nov 17, 2015 at 8:51 AM, Nagy László Zsolt wrote: > I think Vista and XP was supported up to Python 3.4. The newest Python > 3.5 does not support Vista or XP. Vista is still supported in Python 3.5, but it requires the Universal CRT update, which requires the latest Service Pack for Vista

Re: Running latest 32-bit Python on 64-bit system

2015-11-16 Thread Zachary Ware
On Fri, Nov 13, 2015 at 4:52 AM, Christian Ullrich wrote: > Hello, > > I have a problem with using the (otherwise nice) Python launcher. How can I > get it to run the highest 32-bit Python on my 64-bit system? This is on > Windows, but I think it applies to other OSes as well. > > My application r

Re: What function is 'u0, j = random(), 0'?

2015-11-14 Thread Zachary Ware
Hi, On Sat, Nov 14, 2015 at 8:23 PM, fl wrote: > Hi, > > When I read the below code, I cannot make the last line (with ##) out. > > > > def res(weights): > n = len(weights) > indices = [] > C = [0.] + [sum(weights[:i+1]) for i in range(n)] > u0, j = random(), 0 ## > > > If I run

Re: What meaning is of '#!python'?

2015-11-14 Thread Zachary Ware
On Sat, Nov 14, 2015 at 7:58 PM, Chris Angelico wrote: > On Sun, Nov 15, 2015 at 12:54 PM, fl wrote: >> I see an example Python code has such a line at the file beginning: >> >> #!python >> >> >> Is there some meaning about it? > > It probably didn't look exactly like that. Please, when you're as

Re: List comprehension with if-else

2015-10-28 Thread Zachary Ware
On Wed, Oct 28, 2015 at 11:25 AM, Larry Martell wrote: > I'm trying to do a list comprehension with an if and that requires an > else, but in the else case I do not want anything added to the list. > > For example, if I do this: > > white_list = [l.control_hub.serial_number if l.wblist == wblist_e

Re: Building a python extension on Windows

2015-10-27 Thread Zachary Ware
On Mon, Oct 26, 2015 at 11:17 PM, Ken Brooks wrote: > I checked out a copy of svn.python.org/projects/stackless/trunk Sorry I don't have the time at the moment for a more complete answer, but I will point out that that is not the right repository for anything anymore. For one thing, it's very ou

Re: unsupported operand type(s) python v2.7

2015-10-20 Thread Zachary Ware
On Oct 20, 2015 4:15 AM, "ngangsia akumbo" wrote: > def n(): > return 3 * 2 > > def g(): > return 3+ 6 > > def ng(): > return n()+g() > > print ng() Much better :) -- Zach (On a phone) -- https://mail.python.org/mailman/listinfo/python-list

Re: Installed 3.5.0 successfully on Windows 10, but where is DDLs, Doc, Lib, etc?

2015-10-14 Thread Zachary Ware
On Wed, Oct 14, 2015 at 2:05 PM, John S. James wrote: > I installed 3.5.0 today and it's working fine -- either from the command > prompt, or running a .py script. > > But the Python 3.4 that was previously installed on the computer had a > Python34 folder, which contained DDLs, Doc, include, Li

Re: request

2015-10-13 Thread Zachary Ware
On Tue, Oct 13, 2015 at 5:45 AM, Uday Pethakamsetty wrote: > Hi > > I am working on python 2.x for long time. > > I thought of testing python 3.5 for possible usage. > > The problem is that when I installed python 3.5, all the pip installs are > directing to python 3.5, instead of my native python

Re: Errors installing xmiparser with Python 3.4 and windows - any help?

2015-10-09 Thread Zachary Ware
On Fri, Oct 9, 2015 at 12:47 PM, Laura Creighton wrote: > In a message of Fri, 09 Oct 2015 10:24:34 -0700, Gary Hanyzewski writes: >>I am trying to install xmiparser-1.5.dev-r124826 into python 3.4.0 on a >>windows machine. >>When I try and install (either with pip or setup.py install) I get a nu

Re: Linux Mint installation of Python 3.5

2015-09-29 Thread Zachary Ware
On Tue, Sep 29, 2015 at 10:00 PM, Mario Figueiredo wrote: > On 09/30/2015 03:44 AM, Chris Angelico wrote: >> >> The easiest way to install something from source is to use 'make >> altinstall' for the final step. That should install you a 'python3.5' >> binary without touching the 'python3' binary.

Re: Installing pywin32.

2015-09-28 Thread Zachary Ware
On Mon, Sep 28, 2015 at 10:15 AM, Mark Lawrence wrote: > On 28/09/2015 14:42, Abhiram R wrote: >> On Mon, Sep 28, 2015 at 1:56 AM, wrote: >>> I will give the team viewer ID of my machine so can you please >>> install the pywin32 module to me. Not going to happen, sorry. >> It's best if you ins

Re: Failed to upgrade pip in fresh 2.7 install

2015-09-26 Thread Zachary Ware
On Sat, Sep 26, 2015 at 1:13 PM, wrote: > After a fresh install of Python 2.7 32-bit and 64-bit, upgrading pip > using pip fails. Am I doing this incorrectly? Any suggestions? This is a limitation of Windows: you can't replace the executable that you're currently running. To work around this, d

Re: Re: Installing pywin32.

2015-09-24 Thread Zachary Ware
Two notes about local etiquette: 1) Please reply to the list rather than to me directly. I only include your address in the cc: in case you aren't subscribed (which you should be, unless you're reading via the newsgroup), since I don't recognize you as a regular poster. I'll soon stop doing so.

Re: Installing pywin32.

2015-09-24 Thread Zachary Ware
On Thu, Sep 24, 2015 at 8:58 AM, wrote: > Hi Sir/Madam > > > When I try to run my python program where I am using the pywin32 module I am > getting the error as win32api module not found so how to install this module > please let me know ASP. Have you already installed or tried to install pywin3

Re: Hello

2015-09-21 Thread Zachary Ware
On Thu, Sep 17, 2015 at 10:10 AM, moon khondkar wrote: > Hello I have problem with python installation.I downloaded python 3.5 but I > cannot use it on my computer.I can not open the idle. I get something like > saying "users\local settings\Application > data\programs\python\python35-32\pythonw

Re: problem building python 3.5 extensions for windows

2015-09-21 Thread Zachary Ware
On Mon, Sep 21, 2015 at 7:55 AM, Robin Becker wrote: > I have installed VS2015; this is the full version and was a great deal of > trouble to install. First time out it started whining and I had to 'repair' > it. > > Anyhow after the 'repair' it said all was OK and no complaints. > > However, when

Re: how to build windows extensions for python 3.5

2015-09-15 Thread Zachary Ware
On Tue, Sep 15, 2015 at 8:32 AM, Robin Becker wrote: > However, I try to link bits of various libraries statically into the > reportlab extensions eg freetype.lib. Does anyone know if I will need > separate versions of those for VS2015? Currently I build with distutils for > Python 27, 33 & 34. Cu

Re: how to build windows extensions for python 3.5

2015-09-14 Thread Zachary Ware
On Mon, Sep 14, 2015 at 10:52 AM, Robin Becker wrote: > I understand there have been changes to the way that extensions are supposed > to be built for windows. Is there any user documentation regarding these > changes? Last time I looked the appropriate Visual Studio hadn't been > release so I gue

Re: Issue 19904

2015-08-27 Thread Zachary Ware
On Thu, Aug 27, 2015 at 2:02 PM, CFK wrote: > Does anyone know where issue 19904 (http://bugs.python.org/issue19904) is > at? I don't see it as being in python 3.5, but I was wondering if I just > missed it. I could use support for __uint128_t so that I can interface with > external C code via c

Re: Installing Python 2.7.5-1 on AIX 6.1

2015-08-26 Thread Zachary Ware
Hi Mark, On Wed, Aug 26, 2015 at 9:03 AM, Manarski, Mark wrote: > I have downloaded the “python-2.7.5-1.aix6.1.ppc.rpm” package from the IBM > Linux ToolBox site. > > When I try to install the python rpm package, it fails because it’s looking > for (7) dependencies listed below. The dependencies

Re: Bug!

2015-08-21 Thread Zachary Ware
On Fri, Aug 21, 2015 at 5:42 PM, hamilton wrote: > On 8/21/2015 1:41 PM, Chris Angelico wrote: >> >> Python 3.5 does not support Windows XP. > > > Is there a simple explanation for this ? > > Or is it just is. We don't see the need to be burdened by supporting versions of Windows that are no long

Re: Every character of a string becomes a binding

2015-08-21 Thread Zachary Ware
On Fri, Aug 21, 2015 at 11:39 AM, Cecil Westerhof wrote: > I have the following with sqlite3: > urls = c.execute('SELECT URL FROM LINKS WHERE URL = ?', url).fetchall() > > But this gives: > Traceback (most recent call last): > File "./createDB.py", line 52, in > urls = c.execute('SELECT URL

Re: Installation Successful, but pythonw and idle doesn't function

2015-08-06 Thread Zachary Ware
On Aug 6, 2015 3:55 AM, "Terry Reedy" wrote: > Actually, people do a service by installing and testing pre-release software. They just need to realize that this is what they are doing ;-). Indeed. However, I was assuming (possibly rashly, and if that's the case, my apologies to Rick) that Rick i

Re: Installation Successful, but pythonw and idle doesn't function

2015-08-05 Thread Zachary Ware
Hi Rick, On Wed, Aug 5, 2015 at 11:12 AM, Rick Smith wrote: > I was able to install various versions of Python (3.5.0b4 32bit being the > most recent) multiple times (uninstalling in between) and they worked > ("python --version" at the command line worked). > > However pythonw.exe did not and do

Re: Python launcher problem

2015-07-30 Thread Zachary Ware
On Jul 30, 2015 2:05 AM, "ElChino" wrote: > > If I in a cmd-shell (actually it is 4NT), do: > c:>py -3 -V & python3 -V > > I get: > Requested Python version (3) not installed << ! from py -3 -V > Python 3.5.0b2 << ! from the 2nd cmd. > > What nonsense is this? I DO HAVE Python3 in my %PAT

Re: Usage of P(C)ython Logo for Coffee Mug

2015-07-29 Thread Zachary Ware
On Wed, Jul 29, 2015 at 2:01 PM, Terry Reedy wrote: > On 7/29/2015 11:55 AM, Laura Creighton wrote: >> We have SVG versions here: >> https://www.python.org/community/logos/ > > See Guidelines for Use near the bottom, which as an *ask first* link if in > doubt. Given that your coffee cup would be

Re: Gmail eats Python

2015-07-25 Thread Zachary Ware
On Jul 25, 2015 2:45 PM, "Marko Rauhamaa" wrote: > (It's another question what place text/html has on this forum in the > first place.) If the gmail app on my phone had the option, I'd only send the plain text. As is, I'm just glad it does send a plain text version :) -- Zach (On a phone) -- ht

Re: Gmail eats Python

2015-07-25 Thread Zachary Ware
On Jul 25, 2015 11:35 AM, "Laura Creighton" wrote: > > Gmail eats Python. > > We just saw this mail back from Sebastian Luque which says in part: > > >>> try: all_your_code_which_is_happy_with_non_scalars except > >>> WhateverErrorPythonGivesYouWhenYouTryThisWithScalars: > >>> whatever_you_want_to

Re: 42**1000000 is CPU time free

2015-07-24 Thread Zachary Ware
On Fri, Jul 24, 2015 at 3:54 PM, candide wrote: > Of course, computing 42**100 is not free: > So please, explain the following: > > (focus on the CPU TIME!!) In your second example, the peephole optimizer gets hold of it and does the calculation at compile time: Python 3.4.3 (v3.4.3:9b73f1c

Re: Should non-security 2.7 bugs be fixed?

2015-07-18 Thread Zachary Ware
On Sat, Jul 18, 2015 at 9:13 PM, Terry Reedy wrote: > I understand the general problem quite well. But feeling that one would > have to do a 2.7 backport after writing, editing, or reviewing a 3.x patch > can discourage doing a review in the first place. I am at that point now > with respect to I

Re: Mapping, with sequence as key, wildcard and subsequence matching

2015-07-15 Thread Zachary Ware
On Thu, Jul 16, 2015 at 1:31 AM, Ben Finney wrote: > Fine by me. What is the mapping API that needs to be implemented though? Have a look at collections.MutableMapping. -- Zach -- https://mail.python.org/mailman/listinfo/python-list

Re: CRLF problems in CPython sources

2015-06-22 Thread Zachary Ware
On Monday, June 22, 2015, Rustom Mody wrote: > Trying to setup CPython repo I found some CRLF messes: > > 1. Some file-types that are inconsistently LF or CRLF >Lib/test/decimaltestdata > > 2. Some files that are plain dirty (both LF and CRLF) >Lib/venv/scripts/nt/Activate.ps1 > > Is this

Re: Python 3.5.0b2 - permission error after pip upgrade

2015-06-11 Thread Zachary Ware
On Thu, Jun 11, 2015 at 2:15 PM, Chris Angelico wrote: > On Fri, Jun 12, 2015 at 4:57 AM, Andreas Balogh wrote: >> I've installed a fresh copy of Python 3.5.0b2 and - as recommended - >> upgraded pip. I don't >> understand the reason for the permission errors as I am owner and have full >> cont

Re: Did the 3.4.4 docs get published early?

2015-06-10 Thread Zachary Ware
On Jun 10, 2015 9:41 AM, "Mark Lawrence" wrote: > > On 10/06/2015 15:11, Nicholas Chammas wrote: >> >> For example, here is a "New in version 3.4.4" method: >> >> https://docs.python.org/3/library/asyncio-task.html#asyncio.ensure_future >> >> However, the latest release appears to be 3.4.3: >> >>

Re: enhancement request: make py3 read/write py2 pickle format

2015-06-09 Thread Zachary Ware
On Tue, Jun 9, 2015 at 1:08 PM, Neal Becker wrote: > One of the most annoying problems with py2/3 interoperability is that the > pickle formats are not compatible. There must be many who, like myself, > often use pickle format for data storage. > > It certainly would be a big help if py3 could re

Re: Is it a newsgroup or a list?

2015-06-07 Thread Zachary Ware
On Sunday, June 7, 2015, wrote: > On Sun, Jun 7, 2015, at 05:06, Luca Menegotto wrote: > > Il 07/06/2015 10:22, Cecil Westerhof ha scritto: > > > That only times the function. I explicitly mentioned I want both the > > > needed time AND the output. > > > > > > Sadly the quality of the answers

  1   2   3   >