Re: Creating .exe file in Python

2015-06-15 Thread Laura Creighton
In a message of Mon, 15 Jun 2015 06:42:48 -0700, subhabrata.bane...@gmail.com w >I wrote a script as NLQ3. py > >the code is written as, > >import nltk >import itertools >def nlq3(n): >inp=raw_input("Print Your Query:") >tag=nltk.pos_tag(nltk.wordpunct_tokenize(inp)) >print "The Tag

Re: Creating .exe file in Python

2015-06-15 Thread Laura Creighton
I don't have a windows system, so my knowledge of such things is minimal. But looks like this person had the same problem you have, and got some suggestions on how to fix it. http://stackoverflow.com/questions/12127869/error-msvcp90-dll-no-such-file-or-directory-even-though-microsoft-visual-c Bu

Re: Creating .exe file in Python

2015-06-16 Thread Laura Creighton
In a message of Tue, 16 Jun 2015 06:56:12 -0700, subhabrata.bane...@gmail.com w rites: >ii) In a class how may I include if __name__ == "__main__": with multiple >methods? But I think this is easy question there should be lot of web help. > >If anyone may kindly suggest. > >Regards, >Subhabrata B

Re: Testing random

2015-06-17 Thread Laura Creighton
In a message of Tue, 16 Jun 2015 16:58:26 -0600, Ian Kelly writes: >On Tue, Jun 16, 2015 at 4:30 PM, wrote: >> On Tuesday, June 16, 2015 at 3:01:06 PM UTC-7, Thomas 'PointedEars' Lahn >> wrote: >>> This should give you pause: In real mathematics, events with zero >>> probability can occur. >> >>

Re: Testing random

2015-06-17 Thread Laura Creighton
Stick to dice. Stay away from children. One thing we know of, for sure, is that certain breeding pairs are more likely to produce males, and others are more likely to produce females. We will ignore those born who are of indeterminate sex, for this discussion. In human beings, as well as a who

Re: Testing random

2015-06-17 Thread Laura Creighton
In a message of Wed, 17 Jun 2015 22:47:37 +1000, "Steven D'Aprano" writes: >There are magicians who are capable of forcing coins to land the required >way up, and somebody once built a machine capable of tossing a coin with >the precise equal force and velocity every single time. Dice are rarely >u

Re: Creating .exe file in Python

2015-06-17 Thread Laura Creighton
In a message of Wed, 17 Jun 2015 06:10:45 -0700, subhabrata.bane...@gmail.com w rites: >Dear Group, > >Thank you all. It seems going fine now. I have one additional question if I >run the .exe files created in Non Python Windows environment. Linux has Python >builtin but in Non Python environmen

Re: Problem with PyPI login

2015-06-17 Thread Laura Creighton
In a message of Wed, 17 Jun 2015 06:49:08 -0700, Miki Tebeka writes: >Greetings, > >After confirming email I can't login to PyPI with the password and when trying >to rest I get: user "Cyberint" is unknwon to me. However when trying to >re-register it says the user is already there. > >The forums

Re: Set a flag on the function or a global?

2015-06-17 Thread Laura Creighton
To figure out what I like, I would need to play with edir, and the suite that it comes with. I suspect there is command like: stop_showing_me_all_this_uninteresting_stuff = True in my future, and dunders is only a small part of that. Laura -- https://mail.python.org/mailman/listinfo/python-li

Re: Creating .exe file in Python

2015-06-17 Thread Laura Creighton
In a message of Wed, 17 Jun 2015 07:16:33 -0700, subhabrata.bane...@gmail.com w rites: >On Monday, June 15, 2015 at 5:12:24 PM UTC+5:30, subhabrat...@gmail.com wrote: >> Dear Group, >> >> I am trying to learn how to create .exe file for Python. I tried to work >> around >> http://www.py2exe.org/

Re: Classic OOP in Python

2015-06-17 Thread Laura Creighton
In a message of Wed, 17 Jun 2015 23:39:17 +0300, Marko Rauhamaa writes: >Ned Batchelder : > >> TDD is about writing tests as a way to design the best system, and >> putting testing at the center of your development workflow. It works >> great with Python even without interfaces. > >I wonder how gre

Re: Classic OOP in Python

2015-06-17 Thread Laura Creighton
In a message of Wed, 17 Jun 2015 14:33:43 -0700, sohcahto...@gmail.com writes: >I had a Java class where we had to learn TDD, and that's the way TDD >was taught to us, and I hated it. We watched a video of this guy >explaining TDD with a hat that was red on the front and green on the >back. It i

Re: Classic OOP in Python

2015-06-17 Thread Laura Creighton
In a message of Wed, 17 Jun 2015 14:14:34 -0700, Ned Batchelder writes: >The true TDD acolytes advocate a very idiosyncratic workflow, it's true. >I don't do this, but I also don't consider myself a TDD person. I value >tests a great deal, and put a lot of effort into them, but I don't write >triv

Re: Documenting a function signature (was: Set a flag on the function or a global?)

2015-06-18 Thread Laura Creighton
In a message of Thu, 18 Jun 2015 10:04:46 +1000, Ben Finney writes: >Since the introduction of keyword-only arguments in Python functions, >the question arises of how to communicate this in documentation. I suppose it is way too late to scream "I hate keyword-only arguments"! >The lone asterisk s

Re: Posting gzip'd image file - server says Malformed Upload?

2015-06-18 Thread Laura Creighton
I got to this party late. One way to get the malformed upload message is is you gzip something that already is gzipped, and send that up the pipe. worth checking. Laura -- https://mail.python.org/mailman/listinfo/python-list

Re: Hotspot Locater

2015-06-18 Thread Laura Creighton
yes. wifi https://wifi.readthedocs.org/en/latest/ see this answer, not raspberry pi specific http://stackoverflow.com/questions/20470626/python-script-for-raspberrypi-to-connect-wifi-automatically but is linux specific, what OS do you need? Laura -- https://mail.python.org/mailman/listinfo/p

Re: help in understanding the stackless code

2015-06-18 Thread Laura Creighton
You need to send your message over here. http://www.stackless.com/mailman/listinfo/stackless I think I know the answer, from my work in duplicating stackless for greenlets in pypy. But that's the answer in theory. In practice, you need real stackless users. Laura -- https://mail.python.org/ma

Re: Classic OOP in Python

2015-06-18 Thread Laura Creighton
In a message of Thu, 18 Jun 2015 11:50:28 +0100, Mark Lawrence writes: >Throw in http://clonedigger.sourceforge.net/ as well and you've a really >awesome combination. > >Mark Lawrence > I didn't know about that one. Hey thank you, Mark. Looks great. It needs its own entry in https://wiki.python

Re: Opening PDF Using subprocess.Popen Failing

2015-06-19 Thread Laura Creighton
In a message of Fri, 19 Jun 2015 10:24:56 -0700, Naftali writes: >It actually doesn't fail but it 'cannot open in protected mode' (see here >http://blogs.adobe.com/dmcmahon/2012/07/27/adobe-reader-cannot-open-protected-mode-due-to-a-problem-with-your-system-configuration/) > >I am using subprocess

Re: Working with jython in openSUSE 13.2

2015-06-20 Thread Laura Creighton
In a message of Sat, 20 Jun 2015 12:58:33 +0200, Cecil Westerhof writes: >I installed Jython in openSUSE 13.2. But when calling jython I get: >/usr/bin/build-classpath: error: JAVA_LIBDIR must be set >Error: Could not find or load main class org.python.util.jython > >Does anyone have an ide

Re: Classic OOP in Python

2015-06-21 Thread Laura Creighton
Ah, turns out there was an entry. I updated it. Laura -- https://mail.python.org/mailman/listinfo/python-list

Re: Jython and can't write cache file

2015-06-21 Thread Laura Creighton
In a message of Sun, 21 Jun 2015 09:53:23 +0200, Cecil Westerhof writes: >On openSUSE there is a very old version of Jython installed (2.2.1), >so I installed the latest version (2.7.0). But when starting this I >get: >*sys-package-mgr*: can't write cache file for > '/var/lib/h2/h2-1.3.176/bin

Re: No ‘from __future__ import print_function’ in latest jython

2015-06-21 Thread Laura Creighton
Do you have Jython 2.7 released a few weeks ago? Laura -- https://mail.python.org/mailman/listinfo/python-list

Re: Lawful != Mutable (was Can Python function return multiple data?)

2015-06-21 Thread Laura Creighton
In a message of Sat, 20 Jun 2015 19:50:21 -0700, Rustom Mody writes: >Here is Eric Snow: > >| Keep in mind that by "immutability" I'm talking about *really* >| immutable, perhaps going so far as treating the full memory space >| associated with an object as frozen. For instance, we'd have to >| en

Re: How to check in script if Python or Jython is used

2015-06-21 Thread Laura Creighton
In a message of Sun, 21 Jun 2015 10:12:06 +0200, Cecil Westerhof writes: >I installed Jython and will start playing with it. There probably will >be differences between Python and Jython. Is there a way to determine >if a script is run by Python or Jython? Then different execution paths >could be t

Re: Using Jython for Android development?

2015-06-21 Thread Laura Creighton
In a message of Sun, 21 Jun 2015 10:14:15 +0200, Cecil Westerhof writes: >I have no experience yet with Jython or Android development. But I was >wondering: would it be possible to write applications for Android with >Jython? You normally use Java for it, but I think I would like Jython >more. :-D

Re: No ‘from __future__ import print_function’ in latest jython

2015-06-21 Thread Laura Creighton
In a message of Sun, 21 Jun 2015 12:21:03 +0200, Cecil Westerhof writes: >On Sunday 21 Jun 2015 11:05 CEST, Laura Creighton wrote: > >> Do you have Jython 2.7 released a few weeks ago? > >Yes, but I was dumb enough to start the old version when I did this. >:-( > >

Re: HOPE: A Python just-in-time compiler for astrophysical computations

2015-06-21 Thread Laura Creighton
In a message of Sun, 21 Jun 2015 10:29:32 +0100, BartC writes: >It also puts in a good dig at PyPy by including one benchmark where it >is 6 times as slow as CPython! > >It's not clear why it's particularly useful for astrophysics. > >-- >Bartc It's not that good a dig, as they say that it took

Re: Do I need license to release the Python version of old BASIC games?

2015-06-21 Thread Laura Creighton
In a message of Sun, 21 Jun 2015 12:32:46 -0700, "C.D. Reimer" writes: >Do I need to release my scripts under a license? If so, which one? You should, because if you don't you could pop up some day and assert copyright and sue the hell out of people who use your code, which means that many people

Re: Do I need license to release the Python version of old BASIC games?

2015-06-22 Thread Laura Creighton
In a message of Sun, 21 Jun 2015 22:23:54 -0600, Michael Torrie writes: >>From some brief research, it appears there is some question about the >ability to declare something to be in the public domain, but it is by no >means a sure thing and lots of people feel it's just fine to declare >something

Re: Opening PDF Using subprocess.Popen Failing

2015-06-22 Thread Laura Creighton
I think that your problem is that you have Protected Mode enabled. If you do, you either have to disable that, or write a policy config file. https://www.adobe.com/devnet-docs/acrobatetk/tools/AppSec/protectedmode.html says. From: Policy configuration Protected mode prevents a number of actions

Re: Simplest/Idiomatic way to count files in a directory (using pathlib)

2015-06-23 Thread Laura Creighton
I use len(list(self.path.iterdir())) You get an extra list created in there. Do you care? Laura -- https://mail.python.org/mailman/listinfo/python-list

Re: MGCP Server implementation

2015-06-23 Thread Laura Creighton
In a message of Mon, 22 Jun 2015 20:42:21 -, "Devaki Chokshi (dchokshi)" wr ites: >Hello, > >I have a use case where a SIP voice call will be passing through an MGCP >gateway. > >Is there a python implementation that simulates MGCP gateway/server? > >Thank you >Devaki Chokshi > >-- >https://m

Re: Windows install error

2015-06-25 Thread Laura Creighton
In a message of Thu, 25 Jun 2015 11:58:09 +0100, Mark Lawrence writes: >On 24/06/2015 16:56, Knss Teja via Python-list wrote: >> I WANT TO install 4.3 version ... but the MSI file is giving a DLL error >> .. what should I do :/ >> please use REPLY ALL .. so that I get the mail to my gmail inbox >>

Re: Pure Python Data Mangling or Encrypting

2015-06-27 Thread Laura Creighton
Johannes, if you don't know "Yes, Minister" then you most likely do not know the Politician's Syllogism (which now has its own wikipedia page :) And I _didn't_ do it! Honest!) Something must be done. This is something. Therefore we must do it! :) Unfortunatetely, the Politician's Syllogism is

Re: Pure Python Data Mangling or Encrypting

2015-06-27 Thread Laura Creighton
In a message of Sat, 27 Jun 2015 20:16:47 +1000, Chris Angelico writes: >Okay, Johannes, NOW you're proving that you don't have a clue what >you're talking about. D-K effect doesn't go away... > >ChrisA You need to read the paper again. That was the whole point -- when Kruger and Dunning went an

Re: Pure Python Data Mangling or Encrypting

2015-06-27 Thread Laura Creighton
In a message of Sat, 27 Jun 2015 15:23:07 +0300, Jussi Piitulainen writes: >Laura Creighton writes: > >> Johannes, if you don't know "Yes, Minister" then you most likely do >> not know the Politician's Syllogism (which now has its own wikipedia >

Re: Readline -- cannot bind to both Ctrl-tab and tab at the same time?

2015-06-28 Thread Laura Creighton
I can reproduce this with Python 2.7.9 (default, Mar 1 2015, 12:57:24) on my debian unstable system. On pypy both forms just silently fail to install the binding at all. Since PyPy has its own readline, this is circumstantial evidence that readline is the problem. It's not just you. Laura --

Re: How to debug TypeError: required field "lineno" missing from expr?

2015-06-29 Thread Laura Creighton
In a message of Mon, 29 Jun 2015 02:14:43 +0100, Mark Lawrence writes: >Purely as an exercise I've been converting Grant Jenks' pypatt[1] from >2.7 to 3.4. I've managed to sort out most of the required changes by >checking on what I can see with an AST pretty printer[2]. So it's >rather frustr

Re: Scapy and MGCP

2015-06-29 Thread Laura Creighton
In a message of Mon, 29 Jun 2015 20:06:05 -, "Devaki Chokshi (dchokshi)" wr ites: >Hello, > >As per reply received I have begun to use scapy for MGCP. > >I started off with reading a .pcap file with MGCP packets. > >For example: > >from scapy.all import * >from scapy.utils import * >from sca

Re: Matplotlib X-axis timezone trouble

2015-06-29 Thread Laura Creighton
In a message of 30 Jun 2015 00:56:26 +, Peter Pearson writes: >The following code produces a plot with a line running from (9:30, 0) to >(10:30, 1), not from (8:30, 0) to (9:30, 1) as I desire. > >If I use timezone None instead of pacific, the plot is as desired, but >of course that doesn't sol

Re: Bug in floating point multiplication

2015-07-04 Thread Laura Creighton
In a message of Fri, 03 Jul 2015 00:52:55 +1000, "Steven D'Aprano" writes: >Despite the title, this is not one of the usual "Why can't Python do >maths?" "bug" reports. > >Can anyone reproduce this behaviour? If so, please reply with the version of >Python and your operating system. Printing sys.ve

Re: Searching for a usable X509 implementation

2015-07-04 Thread Laura Creighton
In a message of Fri, 03 Jul 2015 17:11:10 -0700, Dennis Jacobfeuerborn writes: >Hi, >I'm trying to implement certificate functionality in a python app but after >fighting with pyOpenSSL and M2Crypto I'm thinking about writing wrapper >functions for the OpenSSL command line tool instead or switchi

Re: Searching for a usable X509 implementation

2015-07-04 Thread Laura Creighton
In a message of Sun, 05 Jul 2015 02:27:22 +0200, Laura Creighton writes: >In a message of Fri, 03 Jul 2015 17:11:10 -0700, Dennis Jacobfeuerborn writes: >>Hi, >>I'm trying to implement certificate functionality in a python app but after >>fighting with pyOpenSSL and M

Re: Looking up a dictionary _key_ by key?

2015-07-04 Thread Laura Creighton
In a message of Tue, 23 Jun 2015 18:06:45 -0700, Paul Rubin writes: >Chris Angelico writes: >>> Would I have to do an O(n) search to find my key? >> Iterate over it - it's an iterable view in Py3 - and compare. > >I think the question was whether the O(n) search could be avoided, not >how to do it

Re: (side-)effects and ...

2015-07-06 Thread Laura Creighton
> And this is the intention of my post: Maybe there is such > a term, and I just missed to learn it so far? So, > do you know a term for the phenomenon that can be found > in Python but not in mathematics and consists in the state > of the world influencing the value of an expressions? In the

Re: (side-)effects and ...

2015-07-06 Thread Laura Creighton
In a message of 05 Jul 2015 20:29:11 +, Stefan Ram writes: > But why do we not have a common and well-known term for > the counterpart, that something does not modify the state > of the world, but that the state of the world does > influence the value (behaviour) of a call such as > »date

Re: understanding why there is no setup.py uninstall

2015-07-07 Thread Laura Creighton
In a message of Tue, 07 Jul 2015 22:31:04 +0200, c.bu...@posteo.jp writes: >On 2015-07-06 18:34 Ben Finney wrote: >> Part of the better system is that we have the Python Packaging >> Authority http://pypa.io/> which didn't exist when Distutils was >> designed. Read the documents there and I hope y

Re: Idle Not Working.

2015-07-08 Thread Laura Creighton
may get removed. Include them as inlined text in your mail. Laura Creighton -- https://mail.python.org/mailman/listinfo/python-list

Re: Combing Search Engine with REST

2015-07-10 Thread Laura Creighton
In a message of Fri, 10 Jul 2015 04:46:25 -0700, subhabrata.bane...@gmail.com writes: >Dear Group, > >I am trying to make a search engine. I used Whoosh to do it. >I want to add documents to it. This is going fine. >Now, I want to add documents in the index with REST framework. >I could learn Fl

Re: Trouble getting to windows My Documents directory

2015-07-10 Thread Laura Creighton
Maybe HOMEPATH is what windows calls it? http://libertyboy.free.fr/computing/reference/envariables/ (but maybe this is only for windows XP. I don't have a windows system, so I cannot test this.) Laura -- https://mail.python.org/mailman/listinfo/python-list

Re: beginners choice: wx or tk?

2015-07-11 Thread Laura Creighton
In a message of Sat, 11 Jul 2015 09:28:43 -, Ulli Horlacher writes: >I want to start a project with python. >The program must have a (simple) GUI and must run on Linux and Windows. >The last one as standalone executable, created with pyinstaller. > >I have already an implementation in perl/tk :

Re: beginners choice: wx or tk?

2015-07-11 Thread Laura Creighton
In a message of Sat, 11 Jul 2015 13:56:09 +0200, Christian Gollwitzer writes: >Am 11.07.15 um 13:27 schrieb Laura Creighton: >> Also, if you need your app to work with MacOS, be warned that you >> will need an older version of tk than the most recent one. >> This informat

Re: beginners choice: wx or tk?

2015-07-11 Thread Laura Creighton
In a message of Sat, 11 Jul 2015 16:01:05 -, Ulli Horlacher writes: >> I'd also recommend kivy, which has the added advantage that if >> somebody wants to use your app from a cellphone or a tablet, it >> will just work. see: http://kivy.org/#home > >Is it compatible with pyinstall? >My main ta

Re: beginners choice: wx or tk?

2015-07-11 Thread Laura Creighton
In a message of Sat, 11 Jul 2015 19:37:17 +0200, Laura Creighton writes: >Kivy has its own way to make standalone windows executables, which >uses pyinstallers. s/pyinstallers/PyInstaller/ sorry about that. Laura -- https://mail.python.org/mailman/listinfo/python-list

Re: beginners choice: wx or tk?

2015-07-12 Thread Laura Creighton
In a message of Sat, 11 Jul 2015 15:50:05 -0700, Paul Rubin writes: >Ulli Horlacher writes: >> This is not an option for me. My users only accept standalone executables. >> They cannot install any runtime environment or extra libraries. > >Long ago I was involved with a thing like this and used In

Re: Why doesn't input code return 'plants' as in 'Getting Started with Beautiful Soup' text (on page 30) ?

2015-07-12 Thread Laura Creighton
Simon Evans -- what editor are you using to write your Python code with? Laura Creighton -- https://mail.python.org/mailman/listinfo/python-list

Re: Why doesn't input code return 'plants' as in 'Getting Started with Beautiful Soup' text (on page 30) ?

2015-07-12 Thread Laura Creighton
In a message of Sun, 12 Jul 2015 21:09:22 +0100, Mark Lawrence writes: >On 12/07/2015 20:47, Laura Creighton wrote: >> Simon Evans -- what editor are you using to write your Python code with? >> >> Laura Creighton >> > >Editor? His earlier posts clearly

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

2015-07-16 Thread Laura Creighton
I'm ill, so I am not trusting my own reasoning further than I can jump (not too far today) but I don't think you have a problem that is well-suited to a mapping. But it seems like a perfect fit for a tree, to me. Laura -- https://mail.python.org/mailman/listinfo/python-list

Re: Fwd: PROBLEM IN importing PIL

2015-07-16 Thread Laura Creighton
In a message of Fri, 17 Jul 2015 09:18:46 +0530, rahul tiwari writes: >I want to import PIL package but every time this is showing error " no PIL > module find" . > >plz suggest me how i can fix this problem. Get Pillow. Instructions on how to install it here: https://pillow.readthedocs.org/ins

Re: ANN: eGenix PyRun - One file Python Runtime 2.1.0

2015-07-16 Thread Laura Creighton
I think Activestate makes a Python 2.y for Solaris. http://www.activestate.com/activepython I've never used it. Laura In a message of Thu, 16 Jul 2015 18:58:37 -0400, Alex writes: >Do you have Python 2.7 64bit versions available for Solaris (10/11) >x86/SPARC, AIX, and HP-UX IA/RISC? I've had th

Re: Noob in Python. Problem with fairly simple test case

2015-07-17 Thread Laura Creighton
I think kivy is doing a very nice job of python-on-the-mobile. Have you looked? Please do not rant at me, just tell me what you think. Laura -- https://mail.python.org/mailman/listinfo/python-list

Re: Need assistance

2015-07-18 Thread Laura Creighton
You don't have to index them. You can unpack them into a tuple of first, middle, last Laura (who is trying not to do somebody's homework for them, since I'm not the person who needs to learn this). -- https://mail.python.org/mailman/listinfo/python-list

Re: Noob in Python. Problem with fairly simple test case

2015-07-19 Thread Laura Creighton
In a message of Sat, 18 Jul 2015 16:18:57 -0700, Rick Johnson writes: >I'll have to admit you make a good point here. Although the >argument is diminished by observing that Ruby is far more >popular in Asia than Python. Python seems to be mainly a >Scandinavian, European, and American toy. For the

Re: Should non-security 2.7 bugs be fixed?

2015-07-19 Thread Laura Creighton
In a message of Sat, 18 Jul 2015 19:36:33 -0400, Terry Reedy writes: >If the vast majority of Python programmers are focused on 2.7, why are >volunteers to help fix 2.7 bugs so scarce? Because volunteers to fix any bugs are scarce? Because most people really only think of bug fixing when they ha

Re: Should non-security 2.7 bugs be fixed?

2015-07-19 Thread Laura Creighton
In a message of Sun, 19 Jul 2015 23:59:29 +1000, "Steven D'Aprano" writes: >On Sun, 19 Jul 2015 07:27 pm, Laura Creighton wrote: > >> In the tiny corner of industrial automation where I do a lot of work, >> nobody is using 3.0. > >I should hope not, bec

Re: Should non-security 2.7 bugs be fixed?

2015-07-19 Thread Laura Creighton
In a message of Sun, 19 Jul 2015 23:59:29 +1000, "Steven D'Aprano" writes: >Bug for bug compatible back to the 1970s, right? :-) No, till the last posix in 1989 or so. Definitely not to the 1970s as we want v7 c structs and x++ not the v6 ++x version. :) Laura -- https://mail.python.org/mailm

Re: Noob in Python. Problem with fairly simple test case

2015-07-19 Thread Laura Creighton
In a message of Sun, 19 Jul 2015 10:25:35 -0700, Rick Johnson writes: >On Sunday, July 19, 2015 at 4:18:31 AM UTC-5, Laura Creighton wrote: >> And, despite Norway not being part of the EU, Scandinavia >> is still in Europe. > >This is a bit off topic: But i don't con

Re: Should non-security 2.7 bugs be fixed?

2015-07-19 Thread Laura Creighton
In a message of Sun, 19 Jul 2015 09:29:11 -0600, Ian Kelly writes: >I think this is an unrealistic and unattainable goal. Even if you stop >patching your Python 2.7 version altogether, what about the >environment that it runs in? Are you going to stop patching the OS >forever? Are you going to fix

Re: Is there a way to install ALL Python packages?

2015-07-21 Thread Laura Creighton
>pip can load a list of packages. This is used daily to build machines >with Python + a specified list. It would be an interesting project for >someone to make, publish, and update a 'sumo' list of the most useful >packages that can all be loaded together. > >-- >Terry Jan Reedy For a list o

Re: Devanagari int literals [was Re: Should non-security 2.7 bugs be fixed?]

2015-07-21 Thread Laura Creighton
In a message of Mon, 20 Jul 2015 20:30:48 -0700, Rustom Mody writes: >BTW my boys have just mailed me their latest: > 九.九九 > >9.99 > >Can some unicode/Chinese literate person inform me whether >that ideograph is equiv

Re: Can I copy/paste Python code?

2015-07-21 Thread Laura Creighton
In a message of Mon, 20 Jul 2015 19:49:56 -0700, ryguy7272 writes: >I'm trying to copy some Python code from a PDF book that I'm reading. I want >to test out the code, and I can copy it, but when I paste it into the Shell, >everything is all screwed up because of the indentation. Every time I pa

Re: Can I copy/paste Python code?

2015-07-21 Thread Laura Creighton
In a message of Wed, 22 Jul 2015 00:48:06 +1000, Chris Angelico writes: >Actually, maybe don't use PDF at all. I keep having to help my Mum >deal with stupid problems with PDF documents she gets, and I'm never >sure whether the fault is with the PDF creation software, the human >operating said soft

Re: Can I copy/paste Python code?

2015-07-22 Thread Laura Creighton
In a message of Wed, 22 Jul 2015 10:45:29 +1000, "Steven D'Aprano" writes: >On Wed, 22 Jul 2015 03:25 am, Laura Creighton wrote: > >> Lots of the problems are with the free reader, adobe acrobat. It is >> designed so that the user is kept very much in a straight-

Re: Integers with leading zeroes

2015-07-22 Thread Laura Creighton
The biggest use I have for decimal numbers that begin with 0 is in credit card numbers, account numbers and the like where the first check you do is 'does this thing have the correct number of digits'. So far, all the examples I've been able to find in my code -- which does this sort of stuff a lot

Re: Is there a way to install ALL Python packages?

2015-07-22 Thread Laura Creighton
In a message of Tue, 21 Jul 2015 19:58:31 -0700, ryguy7272 writes: >Thanks for the tip. I just downloaded and installed Anaconda. I just >successfully ran my first Python script. So, so happy now. Thanks again!! Congratulations! Keep on going! :) Laura -- https://mail.python.org/mailman/li

Re: Integers with leading zeroes

2015-07-22 Thread Laura Creighton
I wonder if bitcoin miners and other cryptological users need the leading 0s. Laura -- https://mail.python.org/mailman/listinfo/python-list

Re: Integers with leading zeroes

2015-07-22 Thread Laura Creighton
In a message of Wed, 22 Jul 2015 12:10:55 +0300, Marko Rauhamaa writes: >My native Finnish luckily has distinct words for the two things: "luku" >(a quantity) and "numero" (a digit, numeral or label): > > luonnollinen luku (natural number) > kokonaisluku (integer) > rationaaliluku(ra

Re: Encoding of Python 2 string literals

2015-07-22 Thread Laura Creighton
In a message of Wed, 22 Jul 2015 22:39:56 +1000, Chris Angelico writes: >On Wed, Jul 22, 2015 at 8:17 PM, anatoly techtonik wrote: >> Is there a way to know encoding of string (bytes) literal >> defined in source file? For example, given that source: >> >> # -*- coding: utf-8 -*- >> from l

Re: Can I copy/paste Python code?

2015-07-22 Thread Laura Creighton
In a message of Wed, 22 Jul 2015 13:54:22 -, Grant Edwards writes: >On 2015-07-22, Laura Creighton wrote: > >> She's absolutely stuck with the font choices somebody >> else made for everybody, > >Once again, that is the whole _point_ of PDF. > >> and th

Re: Can I copy/paste Python code?

2015-07-22 Thread Laura Creighton
In a message of Wed, 22 Jul 2015 14:53:42 -, Grant Edwards writes: >On 2015-07-22, Laura Creighton wrote: > >>>The entire purpose of PDF is to prevent people from changing the >>>format and appearance of documents. > >> My problem isn't that I don&#

Re: OT Re: Math-embarrassment results in CS [was: Should non-security 2.7 bugs be fixed?]

2015-07-22 Thread Laura Creighton
One way to look at this is to see that arithmetic is _behaviour_. Like all behaviours, it is subject to reification: see: https://en.wikipedia.org/wiki/Reification and especially as it is done in the German language, reification has this nasty habit of turning behaviours (i.e. things that are most

Re: OT Re: Math-embarrassment results in CS [was: Should non-security 2.7 bugs be fixed?]

2015-07-22 Thread Laura Creighton
>| God is a verb! >>From http://hilgart.org/enformy/dma-god.htm > >On Wednesday, July 22, 2015 at 10:48:38 PM UTC+5:30, Laura Creighton wrote: >> One way to look at this is to see that arithmetic is _behaviour_. >> Like all behaviours, it is subject to reification: >>

Re: Optimizing if statement check over a numpy value

2015-07-23 Thread Laura Creighton
Take a look at the sorted collection recipe: http://code.activestate.com/recipes/577197-sortedcollection/ You want myList to be a sorted List. You want lookups to be fast. See if that improves things enough for you. It may be possible to have better speedups if instead of myList you write myTre

Re: unexpected output while using list(and nested dictionary)

2015-07-23 Thread Laura Creighton
In a message of Thu, 23 Jul 2015 09:04:38 -0500, max scalf writes: >I am sorry for doing what i did (asking question in Stackoverflow and >pasting the link here). I will keep this in mind for the future. I am >very much new to this list, so was not sure. > >Do you guys have any suggestion as to w

Re: unexpected output while using list(and nested dictionary)

2015-07-23 Thread Laura Creighton
In a message of Fri, 24 Jul 2015 00:57:42 +1000, "Steven D'Aprano" writes: >On Fri, 24 Jul 2015 12:04 am, max scalf wrote: >Another alternative is to save your code in a .py file, then attach it to >the email as an attachment. Even the most obnoxious email program doesn't >mangle attachments, at le

Re: Stripping sRGB profile from PNGs in python

2015-07-23 Thread Laura Creighton
To scale images, you should get Pillow, which can construct new images based on old ones for arbitrary size. see: http://pillow.readthedocs.org/en/latest/reference/Image.html Pillow is a fork of PIL. PIL isn't being maintained, Pillow is. Note that reading this is a good idea: http://united-code

Re: OT Re: Math-embarrassment results in CS [was: Should non-security 2.7 bugs be fixed?]

2015-07-23 Thread Laura Creighton
In a message of Fri, 24 Jul 2015 00:29:28 +0300, Marko Rauhamaa writes: >Chris Angelico : > >> Fortunately, we don't need to completely understand it. New Horizons >> reached Pluto right on time after a decade of flight that involved >> taking a left turn at Jupiter... we can predict exactly what a

Re: OT Re: Math-embarrassment results in CS [was: Should non-security 2.7 bugs be fixed?]

2015-07-23 Thread Laura Creighton
In a message of Thu, 23 Jul 2015 23:01:51 +0100, MRAB writes: >And an Apple engineer would suggest buying a new car that runs only on >its manufacturer's brand of fuel. :-) Before you do that, read this: http://teslaclubsweden.se/test-drive-of-a-petrol-car/ (ps, if you can read Swedish, the Swedi

Re: Fwd: ImportError: No module named site

2015-07-23 Thread Laura Creighton
In a message of Fri, 24 Jul 2015 09:37:35 +0800, "chenc...@inhand.com.cn" write s: >hi: >I'm Needing to get python 2.7.10 to cross compile correctly for an ARM >embedded device. When I execute python using shell, it comes out this >error:ImportError: No module named site.I have setted environment

Re: Object Pool design pattern

2015-07-23 Thread Laura Creighton
In a message of Thu, 23 Jul 2015 23:09:38 +0200, Abder-Rahman Ali writes: >Hello, > >How can we implement the Object Pool design pattern in Python, especially >when the pool consists of array data types? > >Thanks. Is your problem 'I don't know how to implement the Object Pool Design pattern at al

Re: register cleanup handler

2015-07-24 Thread Laura Creighton
In a message of Fri, 24 Jul 2015 10:57:30 -0400, Neal Becker writes: >I know we have try/finally, but I don't think that helps here, because >code_executed_unconditionally couldn't be inside the try. Or am I missing >something obvious? I think so. Either that or I am badly misunderstanding you.

Re: How may I learn Python Web Frameworks

2015-07-24 Thread Laura Creighton
web2py http://www.web2py.com/ has extensive tutorials, videos, and a book. Laura -- https://mail.python.org/mailman/listinfo/python-list

Re: Which GUI?

2015-07-24 Thread Laura Creighton
You may be interested in bokeh. http://bokeh.pydata.org/en/latest/ It's a python interactive visualisation library. Laura -- https://mail.python.org/mailman/listinfo/python-list

Re: scalar vs array and program control

2015-07-25 Thread Laura Creighton
You have a bit of a problem, in that "functional" and "object-oriented" are two different styles of programming. You really cannot make your code 'more functional' and 'more object-oriented' at the same time -- more in one style implies less in the other. I think you may have got the mistaken ide

Re: scalar vs array and program control

2015-07-25 Thread Laura Creighton
And because I was rushed and posted without revision I left out something important. >So this is, quite likely, the pattern that you are looking for: > >try: > all_your_code_which_is_happy_with_non_scalars >except WhateverErrorPythonGivesYouWhenYouTryThisWithScalars: > whatever_you_wan

Re: Python Questions - July 25, 2015

2015-07-25 Thread Laura Creighton
x27;t a bad place to look for people but The scientific Python mailing list may get be a better place. http://www.scipy.org/scipylib/mailing-lists.html Anaconda also has a google group https://groups.google.com/a/continuum.io/forum/#!forum/anaconda And, of course, the various visualisers have their own mailing lists and forums which may be of use. Hope this helps, come back with any more questions Laura Creighton -- https://mail.python.org/mailman/listinfo/python-list

Re: scalar vs array and program control

2015-07-25 Thread Laura Creighton
In a message of Sat, 25 Jul 2015 14:57:14 +0200, "Thomas 'PointedEars' Lahn" wr ites: >Laura Creighton wrote: > >> […] You really cannot make your code 'more functional' and 'more object- >> oriented' at the same time -- more in one sty

Re: Python Questions - July 25, 2015

2015-07-25 Thread Laura Creighton
>Another question: > > With my Perl programs, when I want to run the programs on a new >computer or even from a flash drive, basically all I do is copy an entire >existing Perl program directory to the new computer or flash drive. And >that works. However, to make certain that it will wo

Gmail eats Python

2015-07-25 Thread Laura Creighton
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_do_when_this_happens Ow! Gmail is understanding the >>> I stuck

<    1   2   3   4   5   6   7   >