Re: .py to .html generation

2015-09-03 Thread Laura Creighton
In a message of Wed, 02 Sep 2015 22:04:03 -0700, uday3prak...@gmail.com writes: >Hi friends! > >Can some one help me with the best module and/or its tutorial, to generate >html reports for python scripts? > >I tried pyreport and sphc; but, i am getting errors. >-- >https://mail.python.org/mailma

Re: .py to .html generation

2015-09-03 Thread Laura Creighton
In a message of Thu, 03 Sep 2015 09:22:27 +0200, Laura Creighton writes: >There is also a report generator implemented as an extension to sphinx. >https://github.com/AndreasHeger/CGATReport >Interfaces nicely with ipython. Makes it easy to stick matplotlib >graphs into your report. I forgot about

Re: Reading \n unescaped from a file

2015-09-03 Thread Friedrich Rentsch
On 09/02/2015 04:03 AM, Rob Hills wrote: Hi, I am developing code (Python 3.4) that transforms text data from one format to another. As part of the process, I had a set of hard-coded str.replace(...) functions that I used to clean up the incoming text into the desired output format, something

Re: Reading \n unescaped from a file

2015-09-03 Thread Peter Otten
Friedrich Rentsch wrote: > > > On 09/02/2015 04:03 AM, Rob Hills wrote: >> Hi, >> >> I am developing code (Python 3.4) that transforms text data from one >> format to another. >> >> As part of the process, I had a set of hard-coded str.replace(...) >> functions that I used to clean up the incomi

Strange location for a comma

2015-09-03 Thread ast
Hello, At the end of the last line of the following program, there is a comma, I dont understand why ? Thx from cx_Freeze import setup, Executable # On appelle la fonction setup setup( name = "salut", version = "0.1", description = "Ce programme vous dit bonjour", executables = [

Re: Strange location for a comma

2015-09-03 Thread ast
"ast" a écrit dans le message de news:55e83afb$0$3157$426a7...@news.free.fr... Hello, At the end of the last line of the following program, there is a comma, I dont understand why ? Thx from cx_Freeze import setup, Executable # On appelle la fonction setup setup( name = "salut", vers

sending push notifications

2015-09-03 Thread Larry Martell
I'm looking for people's experiences with the different ways to send push notifications to mobile devices. I have an app that will be running on Amazon, so I can use their SNS API or I can do it myself. >From googling there appear to be a few different packages but PyAPNs and python-gcm seem to be

Re: Strange location for a comma

2015-09-03 Thread Laura Creighton
In a message of Thu, 03 Sep 2015 14:20:06 +0200, "ast" writes: >Hello, > >At the end of the last line of the following program, >there is a comma, I dont understand why ? > >Thx > > >from cx_Freeze import setup, Executable > ># On appelle la fonction setup >setup( >name = "salut", >version

Re: Strange location for a comma

2015-09-03 Thread Peter Otten
ast wrote: > > "ast" a écrit dans le message de > news:55e83afb$0$3157$426a7...@news.free.fr... >> Hello, >> At the end of the last line of the following program, >> there is a comma, I dont understand why ? >> >> Thx >> >> >> from cx_Freeze import setup, Executable >> >> # On appelle la fonctio

Re: Strange location for a comma

2015-09-03 Thread MRAB
On 2015-09-03 13:28, ast wrote: "ast" a écrit dans le message de news:55e83afb$0$3157$426a7...@news.free.fr... Hello, At the end of the last line of the following program, there is a comma, I dont understand why ? Thx from cx_Freeze import setup, Executable # On appelle la fonction setup

Fwd: Strange location for a comma

2015-09-03 Thread Vladimir Ignatov
>> >> # On appelle la fonction setup >> setup( >>name = "salut", >>version = "0.1", >>description = "Ce programme vous dit bonjour", >>executables = [Executable("salut.py")],# <--- HERE >> ) >> >> > > Ok its understood, it's a 1 element only tuple > > example: > A = 5, >>>

Re: sending push notifications

2015-09-03 Thread Laura Creighton
In a message of Thu, 03 Sep 2015 08:30:35 -0400, Larry Martell writes: >I'm looking for people's experiences with the different ways to send >push notifications to mobile devices. I have an app that will be >running on Amazon, so I can use their SNS API or I can do it myself. >>From googling there

Re: Strange location for a comma

2015-09-03 Thread Laura Creighton
No, I am wrong. You are in the middle of a fuction definition. You are correct, that is a wierd place for a comma, though I can see doing that if you anticipate adding more arguments to the function in the near future. Laura -- https://mail.python.org/mailman/listinfo/python-list

Re: Strange location for a comma

2015-09-03 Thread ast
"ast" a écrit dans le message de news:55e83afb$0$3157$426a7...@news.free.fr... Hello, At the end of the last line of the following program, there is a comma, I dont understand why ? Thx from cx_Freeze import setup, Executable # On appelle la fonction setup setup( name = "salut", vers

Re: Python handles globals badly.

2015-09-03 Thread tdev
Reflecting the answers I want to add following first: I should have better started a new thread. But now it is here, I want just clarify something before I move on (later) with repsonding. I think this has lead to some confusing. There are now two main topics in this thread. First topic:

Re: Reading \n unescaped from a file

2015-09-03 Thread Friedrich Rentsch
On 09/03/2015 11:24 AM, Peter Otten wrote: Friedrich Rentsch wrote: On 09/02/2015 04:03 AM, Rob Hills wrote: Hi, I am developing code (Python 3.4) that transforms text data from one format to another. As part of the process, I had a set of hard-coded str.replace(...) functions that I used

Re: Python handles globals badly.

2015-09-03 Thread Chris Angelico
On Thu, Sep 3, 2015 at 11:22 PM, wrote: > Sample "Good": > module A >_x = 0 > >def y(): > _x=1 > > > why - this I have tried and try to explain in my and your posts > in the hope a PEP will arise which frees me and hopefully > a lot other developers getting forced to u

Re: Reading \n unescaped from a file

2015-09-03 Thread Peter Otten
Friedrich Rentsch wrote: > On 09/03/2015 11:24 AM, Peter Otten wrote: >> Friedrich Rentsch wrote: > I appreciate your identifying two mistakes. I am curious to know what > they are. Sorry for not being explicit. >>> substitutes = [self.table [item] for item in hits if item >>> in

Porting Python Application to a new linux machine

2015-09-03 Thread Heli Nix
Dear all, I have my python scripts that use several python libraries such as h5py, pyside, numpy In Windows I have an installer that will install python locally on user machine and so my program gets access to this local python and runs successfully. How can I do this in Linux ? ( I wan

continue vs. pass in this IO reading and writing

2015-09-03 Thread kbtyo
Good Morning: I am experimenting with many exception handling and utilizing continue vs pass. After pouring over a lot of material on SO and other forums I am still unclear as to the difference when setting variables and applying functions within multiple "for" loops. Specifically, I understa

Re: Strange location for a comma

2015-09-03 Thread Tim Chase
On 2015-09-03 14:48, Peter Otten wrote: > The only reason I see to add an extra comma are smaller and easier > to read diffs when you make a change: While that's the primary reason I do it, it's also helpful if you have a bunch of named keyword arguments and want sort/rearrange them (usually for c

Re: Python handles globals badly.

2015-09-03 Thread tdev
Before responding (later) I have to add something additional first: About the OO comments (Note again for this 2nd main topic of this thread: the term "globals" - it is meant only as the vars of a module outside functions and not sharing vars throughout the app th

Re: continue vs. pass in this IO reading and writing

2015-09-03 Thread Chris Angelico
On Fri, Sep 4, 2015 at 1:05 AM, kbtyo wrote: > However, I am uncertain as to how this executes in a context like this: > > import glob > import csv > from collections import OrderedDict > > interesting_files = glob.glob("*.csv") > > header_saved = False > with open('merged_output_mod.csv','w') as

Re: Porting Python Application to a new linux machine

2015-09-03 Thread Joel Goldstick
On Thu, Sep 3, 2015 at 10:32 AM, Heli Nix wrote: > Dear all, > > I have my python scripts that use several python libraries such as h5py, > pyside, numpy > > In Windows I have an installer that will install python locally on user > machine and so my program gets access to this local python a

Re: Porting Python Application to a new linux machine

2015-09-03 Thread Luca Menegotto
Il 03/09/2015 16:32, Heli Nix ha scritto: How can I do this in Linux ? As far as I know, in general a Linux distro comes with Python already installed. All you have to do is check if the installed version matches your needs. Tipically, you'll find Python 2.7; however, I know there are distro

Re: Porting Python Application to a new linux machine

2015-09-03 Thread Chris Angelico
On Fri, Sep 4, 2015 at 1:31 AM, Luca Menegotto wrote: > Il 03/09/2015 16:32, Heli Nix ha scritto: > >> How can I do this in Linux ? > > > As far as I know, in general a Linux distro comes with Python already > installed. > All you have to do is check if the installed version matches your needs. >

Re: continue vs. pass in this IO reading and writing

2015-09-03 Thread kbtyo
On Thursday, September 3, 2015 at 11:27:58 AM UTC-4, Chris Angelico wrote: > On Fri, Sep 4, 2015 at 1:05 AM, kbtyo wrote: > > However, I am uncertain as to how this executes in a context like this: > > > > import glob > > import csv > > from collections import OrderedDict > > > > interesting_files

Re: continue vs. pass in this IO reading and writing

2015-09-03 Thread kbtyo
On Thursday, September 3, 2015 at 11:27:58 AM UTC-4, Chris Angelico wrote: > On Fri, Sep 4, 2015 at 1:05 AM, kbtyo wrote: > > However, I am uncertain as to how this executes in a context like this: > > > > import glob > > import csv > > from collections import OrderedDict > > > > interesting_files

Re: continue vs. pass in this IO reading and writing

2015-09-03 Thread Chris Angelico
On Fri, Sep 4, 2015 at 1:38 AM, kbtyo wrote: > Thank you for the elaboration. So, what I hear you saying is that (citing, > "In this case, there's no further body, so it's going to be the same as > "pass" (which > means "do nothing")") that the else block is not entered. For exma Seems like a c

Re: Python handles globals badly.

2015-09-03 Thread Michael Torrie
On 09/03/2015 07:22 AM, t...@freenet.de wrote: > First topic: > "sharing globals between modules" > Where globals is meant as vars used throughout the app. > > This is the topic why Skybuck starts the thread. The answer to this is simple and elegant. Use a third module to store globals. Each mod

Re: sending push notifications

2015-09-03 Thread Larry Martell
On Thu, Sep 3, 2015 at 8:54 AM, Laura Creighton wrote: > In a message of Thu, 03 Sep 2015 08:30:35 -0400, Larry Martell writes: >>I'm looking for people's experiences with the different ways to send >>push notifications to mobile devices. I have an app that will be >>running on Amazon, so I can us

Re: Strange location for a comma

2015-09-03 Thread Nick Sarbicki
Tim, Doesn't work for the first column in SQL, but we tend to put the comma and a space before the column name. It makes it easier to move things around and (debateably) more readable. It is also very obvious when you have missed a comma this way. - Nick On Thu, 3 Sep 2015 16:14 Tim Chase wrote

Re: Porting Python Application to a new linux machine

2015-09-03 Thread Chris Angelico
On Fri, Sep 4, 2015 at 1:53 AM, Nick Sarbicki wrote: > Is 3.x the default on ubuntu now? My 14.10 is still 2.7. Although it does > have python3 installed. I'm not sure. I think I read somewhere that the newest Ubuntus would ship with python3 preinstalled, but python2 not (though of course it'd be

Re: Porting Python Application to a new linux machine

2015-09-03 Thread Nick Sarbicki
Is 3.x the default on ubuntu now? My 14.10 is still 2.7. Although it does have python3 installed. On Thu, 3 Sep 2015 16:40 Chris Angelico wrote: > On Fri, Sep 4, 2015 at 1:31 AM, Luca Menegotto > wrote: > > Il 03/09/2015 16:32, Heli Nix ha scritto: > > > >> How can I do this in Linux ? > > > >

Re: continue vs. pass in this IO reading and writing

2015-09-03 Thread kbtyo
On Thursday, September 3, 2015 at 11:52:16 AM UTC-4, Chris Angelico wrote: > On Fri, Sep 4, 2015 at 1:38 AM, kbtyo wrote: > > Thank you for the elaboration. So, what I hear you saying is that (citing, > > "In this case, there's no further body, so it's going to be the same as > > "pass" (which >

Re: continue vs. pass in this IO reading and writing

2015-09-03 Thread Terry Reedy
On 9/3/2015 11:05 AM, kbtyo wrote: I am experimenting with many exception handling and utilizing continue vs pass. 'pass' is a do-nothing place holder. 'continue' and 'break' are jump statements [snip] However, I am uncertain as to how this executes in a context like this: import glob i

Re: continue vs. pass in this IO reading and writing

2015-09-03 Thread Chris Angelico
On Fri, Sep 4, 2015 at 1:57 AM, kbtyo wrote: > I have used CSV and collections. For some reason when I apply this algorithm, > all of my files are not added (the output is ridiculously small considering > how much goes in - think KB output vs MB input): > > from glob import iglob > import csv >

Re: Reading \n unescaped from a file

2015-09-03 Thread Rob Hills
Hi Friedrich, On 03/09/15 16:40, Friedrich Rentsch wrote: > > On 09/02/2015 04:03 AM, Rob Hills wrote: >> Hi, >> >> I am developing code (Python 3.4) that transforms text data from one >> format to another. >> >> As part of the process, I had a set of hard-coded str.replace(...) >> functions that

Re: Python handles globals badly.

2015-09-03 Thread Ian Kelly
On Thu, Sep 3, 2015 at 7:22 AM, wrote: > I think this has lead to some confusing. I don't think so. > First topic: > "sharing globals between modules" > Where globals is meant as vars used throughout the app. > > This is the topic why Skybuck starts the thread. > And yes I agree globals can be

How do I real a SSL certs serial number using Python?

2015-09-03 Thread Anthony Papillion
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 I'm writing a simple tool that needs to read the serial number of a remote SSL certificate. I've poked around Google for a bit but can't find anything that fits the bill. Is this possible in Python? If so, would someone point me in the general

Re: Reading \n unescaped from a file

2015-09-03 Thread Rob Hills
Hi Chris, On 03/09/15 06:10, Chris Angelico wrote: > On Wed, Sep 2, 2015 at 12:03 PM, Rob Hills > wrote: >> My mapping file contents look like this: >> >> \r = \\n >> “ = " > Oh, lovely. Code page 1252 when you're expecting UTF-8. Sadly, you're > likely to have to cope with a whole pile of oth

Re: Strange location for a comma

2015-09-03 Thread Martin Komoň
In this case those are not tuples but rather arguments in a function call. The extra comma does not change the evaluation, my guess is that it is there for easier adding/removing arguments without having to care about trailing commas. Martin On 03/09/15 14:28, ast wrote: > > "ast" a écrit dans

Re: Porting Python Application to a new linux machine

2015-09-03 Thread Luca Menegotto
Il 03/09/2015 17:53, Nick Sarbicki ha scritto: Is 3.x the default on ubuntu now? My 14.10 is still 2.7. Although it does have python3 installed. I've checked my Ubuntu 15.04, and the default is 2.7.9. There is also Python3 (3.4.3), but sorry, I can't remember if I've manually installed it or n

Re: Porting Python Application to a new linux machine

2015-09-03 Thread Brett Kugler
On Thu, Sep 3, 2015 at 10:39 AM, Chris Angelico wrote: > On Fri, Sep 4, 2015 at 1:31 AM, Luca Menegotto > wrote: > > Il 03/09/2015 16:32, Heli Nix ha scritto: > > > >> How can I do this in Linux ? > > > > > > As far as I know, in general a Linux distro comes with Python already > > installed. >

Re: Reading \n unescaped from a file

2015-09-03 Thread Rob Hills
Hi, On 03/09/15 06:31, MRAB wrote: > On 2015-09-02 03:03, Rob Hills wrote: >> I am developing code (Python 3.4) that transforms text data from one >> format to another. >> >> As part of the process, I had a set of hard-coded str.replace(...) >> functions that I used to clean up the incoming text i

Re: continue vs. pass in this IO reading and writing

2015-09-03 Thread kbtyo
On Thursday, September 3, 2015 at 12:12:04 PM UTC-4, Chris Angelico wrote: > On Fri, Sep 4, 2015 at 1:57 AM, kbtyo wrote: > > I have used CSV and collections. For some reason when I apply this > > algorithm, all of my files are not added (the output is ridiculously small > > considering how much

Re: Python handles globals badly.

2015-09-03 Thread Michael Torrie
On 09/03/2015 10:15 AM, Ian Kelly wrote: > The only person whom I see talking about this in this thread is you > disclaiming that you're not talking about it. (And I guess Skybuck is > talking about it, but I don't see those.) I have a vague memory of Skybuck talking about globals over a year ago.

Re: continue vs. pass in this IO reading and writing

2015-09-03 Thread Luca Menegotto
Il 03/09/2015 17:05, kbtyo ha scritto: I am experimenting with many exception handling and utilizing > continue vs pass. After pouring over a lot of material on SO > and other forums I am still unclear as to the difference when > setting variables and applying functions within multiple "for" >

Re: Porting Python Application to a new linux machine

2015-09-03 Thread Chris Angelico
On Fri, Sep 4, 2015 at 2:23 AM, Luca Menegotto wrote: > Il 03/09/2015 17:53, Nick Sarbicki ha scritto: >> >> Is 3.x the default on ubuntu now? My 14.10 is still 2.7. Although it >> does have python3 installed. > > > I've checked my Ubuntu 15.04, and the default is 2.7.9. > There is also Python3 (3

XML Binding

2015-09-03 Thread Palpandi
Hi All, Is there any module available in python standard library for XML binding? If not, any other suggestions. Which is good for parsing large file? 1. XML binding 2. Creating our own classes Thanks, Palpandi -- https://mail.python.org/mailman/listinfo/python-list

Re: Porting Python Application to a new linux machine

2015-09-03 Thread Luca Menegotto
Il 03/09/2015 18:49, Chris Angelico ha scritto: If you mean that typing "python" runs 2.7, then that's PEP 394 at work. For compatibility reasons, 'python' doesn't ever run Python 3. Please forgive me, Il make it clearer. I'm pretty shure that Ubuntu 15.04 comes with Python 2.7. I don't rememb

Re: Porting Python Application to a new linux machine

2015-09-03 Thread Chris Angelico
On Fri, Sep 4, 2015 at 3:29 AM, Luca Menegotto wrote: > Il 03/09/2015 18:49, Chris Angelico ha scritto: > >> If you mean that typing "python" runs 2.7, then that's PEP 394 at >> work. For compatibility reasons, 'python' doesn't ever run Python 3. > > > Please forgive me, Il make it clearer. > I'm

Re: Porting Python Application to a new linux machine

2015-09-03 Thread Nick Sarbicki
I run ubuntu everywhere at home and python3 has come preinstalled since at least ubuntu 12.10. This article kind of covers it: https://wiki.ubuntu.com/Python Looks like they're suggesting that it's not been fully transitioned although definitely moving that way. On Thu, 3 Sep 2015 18:34 Chris An

Re: Python handles globals badly.

2015-09-03 Thread MRAB
On 2015-09-03 17:43, Michael Torrie wrote: On 09/03/2015 10:15 AM, Ian Kelly wrote: The only person whom I see talking about this in this thread is you disclaiming that you're not talking about it. (And I guess Skybuck is talking about it, but I don't see those.) I have a vague memory of Skybu

Re: Python handles globals badly.

2015-09-03 Thread tdev
Now I want reflecting the latest answers: I have the position of a high-level view (cause of lack of Python knowledge internals and compiler stuff, but also cause I think a language should be as far as possible user-friendly without knowing too much internals, and yes clearly cause of knowin

Re: Python handles globals badly.

2015-09-03 Thread Ian Kelly
On Thu, Sep 3, 2015 at 1:05 PM, wrote: > If this would be under the developer responsibility than this > is simply achieved by giving well-written var names. So, adopt a rule whereby you prefix all your global variable names with "global" or "g_"? How is this superior to just declaring t

Re: Python handles globals badly.

2015-09-03 Thread Ian Kelly
On Thu, Sep 3, 2015 at 1:47 PM, Ian Kelly wrote: > On Thu, Sep 3, 2015 at 1:05 PM, wrote: > >> But then I ask you from high-level point of view >> (if my high level view is correct at all): >> Would you remove this keyword if it would be technically possible >> or is good for you from high level

Re: XML Binding

2015-09-03 Thread Burak Arslan
Hello, On 09/03/15 19:54, Palpandi wrote: > Hi All, > > Is there any module available in python standard library for XML binding? If > not, any other suggestions. lxml is the right xml library to use. You can use lxml's objectify or Spyne. Here are some examples: http://stackoverflow.com/quest

Re: Reading \n unescaped from a file

2015-09-03 Thread Friedrich Rentsch
On 09/03/2015 06:12 PM, Rob Hills wrote: Hi Friedrich, On 03/09/15 16:40, Friedrich Rentsch wrote: On 09/02/2015 04:03 AM, Rob Hills wrote: Hi, I am developing code (Python 3.4) that transforms text data from one format to another. As part of the process, I had a set of hard-coded str.repl

Re: How do I real a SSL certs serial number using Python?

2015-09-03 Thread Laura Creighton
Is this a good enough point? https://pyopenssl.readthedocs.org/en/stable/api/crypto.html?highlight=serial%20number#OpenSSL.crypto.X509.get_serial_number Write back if you need more help. Laura -- https://mail.python.org/mailman/listinfo/python-list

Re: Python handles globals badly.

2015-09-03 Thread Mark Lawrence
On 03/09/2015 20:47, Ian Kelly wrote: On Thu, Sep 3, 2015 at 1:05 PM, wrote: Or does anyone really name a global var xxx and a function var xxx? I am sure no one at all will do it. I dont want read such a code. Intentionally, it's probably rare. But if I'm adding a new variable, I

Need Help w. PIP!

2015-09-03 Thread Steve Burrus
Well I hjave certainly noted more than once that pip is cont ained in Python 3.4. But I am having the most extreme problems with simply typing "pip" into my command prompt and then getting back the normal information on pip! I have repeatedly downloaded [to my Desktop] that get-pip.py file then

Re: Porting Python Application to a new linux machine

2015-09-03 Thread Laura Creighton
In a message of Thu, 03 Sep 2015 07:32:55 -0700, Heli Nix writes: >Dear all, > >I have my python scripts that use several python libraries such as h5py, >pyside, numpy > >In Windows I have an installer that will install python locally on user >machine and so my program gets access to this l

Re: Python handles globals badly.

2015-09-03 Thread Ian Kelly
On Thu, Sep 3, 2015 at 4:13 PM, Mark Lawrence wrote: > On 03/09/2015 20:47, Ian Kelly wrote: >> >> On Thu, Sep 3, 2015 at 1:05 PM, wrote: >>> >>> Or does anyone really name a global var xxx and a function var xxx? >>> I am sure no one at all will do it. I dont want read such a code. >>

Re: Strange location for a comma

2015-09-03 Thread Sven R. Kunze
On 03.09.2015 14:20, ast wrote: Hello, At the end of the last line of the following program, there is a comma, I dont understand why ? Thx from cx_Freeze import setup, Executable # On appelle la fonction setup setup( name = "salut", version = "0.1", description = "Ce programme vous d

Re: Python handles globals badly.

2015-09-03 Thread Sven R. Kunze
On 03.09.2015 00:25, t...@freenet.de wrote: It is the good idea of Python about modules which are singletons and therefore have already its state (so in some way they are already somehow like classes - except the bad annoying thing with the "global" statement). So, what you really want is a bet

Re: packing unpacking depends on order.

2015-09-03 Thread Sven R. Kunze
On 03.09.2015 03:17, random...@fastmail.us wrote: The question is what does "assign it to the left side at once" even *mean* in the presence of subscripts? Build up a list of object-subscript pairs (evaluating all the subscripts, including if any may have side effects) before executing any __set

Re: Need Help w. PIP!

2015-09-03 Thread Mark Lawrence
On 03/09/2015 23:20, Steve Burrus wrote: Well I hjave certainly noted more than once that pip is cont ained in Python 3.4. But I am having the most extreme problems with simply typing "pip" into my command prompt and then getting back the normal information on pip! I have repeatedly downloaded

Re: Python handles globals badly.

2015-09-03 Thread Michael Torrie
On 09/03/2015 01:05 PM, t...@freenet.de wrote: > And a compiler can surely recognize if a defined var xxx outside is > not a var yyy inside a function. At issue here is the idea of Python namespaces and how Python uses them in a consistent way with your code. The consistency is that binding of a

Re: Python handles globals badly.

2015-09-03 Thread Mark Lawrence
On 04/09/2015 01:06, Michael Torrie wrote: On 09/03/2015 01:05 PM, t...@freenet.de wrote: [The same e.g. with switch statement: add it] Switch is a nice-to-have thing, but definitely not essential. A PEP here (probably already has been several) would at least be read anyway. However, there ar

Re: Need Help w. PIP!

2015-09-03 Thread Steve Burrus
On Thursday, September 3, 2015 at 7:06:27 PM UTC-5, Mark Lawrence wrote: > On 03/09/2015 23:20, Steve Burrus wrote: > > Well I hjave certainly noted more than once that pip is cont ained in > > Python 3.4. But I am having the most extreme problems with simply typing > > "pip" into my command prom

Re: Need Help w. PIP!

2015-09-03 Thread MRAB
On 2015-09-04 02:04, Steve Burrus wrote: On Thursday, September 3, 2015 at 7:06:27 PM UTC-5, Mark Lawrence wrote: On 03/09/2015 23:20, Steve Burrus wrote: > Well I hjave certainly noted more than once that pip is cont ained in Python 3.4. But I am having the most extreme problems with simply ty

Re: Need Help w. PIP!

2015-09-03 Thread Chris Angelico
On Fri, Sep 4, 2015 at 11:04 AM, Steve Burrus wrote: > I have tried the 'python get-pip.py' command over amnd over again in my > command prompt and the 'python easy-install.py" command a little less. I > swear I have set ALL of the env. variables correctly! My OS is Windows 10 > Beta Preview Bu

No request in module urllib ?

2015-09-03 Thread Vincent Vande Vyvre
Hi, Python 3.2.3 (default, Jun 18 2015, 21:46:42) [GCC 4.6.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import urllib >>> urllib.request.urlopen('http://example.org') Traceback (most recent call last): File "", line 1, in AttributeError: 'module' obje

Re: No request in module urllib ?

2015-09-03 Thread Chris Angelico
On Fri, Sep 4, 2015 at 11:56 AM, Vincent Vande Vyvre wrote: > Python 3.2.3 (default, Jun 18 2015, 21:46:42) > [GCC 4.6.3] on linux2 > Type "help", "copyright", "credits" or "license" for more information. import urllib urllib.request.urlopen('http://example.org') > Traceback (most recent

Re: packing unpacking depends on order.

2015-09-03 Thread Chris Angelico
On Fri, Sep 4, 2015 at 9:25 AM, Sven R. Kunze wrote: > Both sides may have side-effects, but at least independently from each > other. That's at least how I feel about it. You can't do that, though. Every piece of Python code can cause arbitrary code to execute, and unless you run them in separat

Re: Python handles globals badly.

2015-09-03 Thread Steven D'Aprano
On Fri, 4 Sep 2015 02:43 am, Michael Torrie wrote: > Sadly Skybuck probably ditched Python a long time ago "Sadly"? -- Steven -- https://mail.python.org/mailman/listinfo/python-list

Re: No request in module urllib ?

2015-09-03 Thread Vincent Vande Vyvre
Le 04/09/2015 04:08, Chris Angelico a écrit : On Fri, Sep 4, 2015 at 11:56 AM, Vincent Vande Vyvre wrote: Python 3.2.3 (default, Jun 18 2015, 21:46:42) [GCC 4.6.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. import urllib urllib.request.urlopen('http://exam

Re: Python handles globals badly.

2015-09-03 Thread Steven D'Aprano
On Fri, 4 Sep 2015 05:05 am, t...@freenet.de wrote: > Or does anyone really name a global var xxx and a function var xxx? > I am sure no one at all will do it. I dont want read such a code. You should reflect on the purpose of namespaces and local variables. Some programming languages do not di

Re: No request in module urllib ?

2015-09-03 Thread Chris Angelico
On Fri, Sep 4, 2015 at 12:17 PM, Vincent Vande Vyvre wrote: >> import urllib.request >> urllib.request.urlopen('http://example.org') >> > > Thanks, that works with 3.4.0. No with 3.2.3 Hmm, not sure why it wouldn't. According to the docs [1] it should be available. But I don't have a 3.2 anywhere

Re: Python handles globals badly.

2015-09-03 Thread Steven D'Aprano
On Fri, 4 Sep 2015 05:05 am, t...@freenet.de wrote: > Would you remove this keyword if it would be technically possible Absolutely not. I do not believe that it is technically possible, but even if it were, I would still argue that the Zen of Python applies: Explicit is better than implicit. L

Re: No request in module urllib ?

2015-09-03 Thread MRAB
On 2015-09-04 03:17, Vincent Vande Vyvre wrote: Le 04/09/2015 04:08, Chris Angelico a écrit : On Fri, Sep 4, 2015 at 11:56 AM, Vincent Vande Vyvre wrote: Python 3.2.3 (default, Jun 18 2015, 21:46:42) [GCC 4.6.3] on linux2 Type "help", "copyright", "credits" or "license" for more information.

Re: No request in module urllib ?

2015-09-03 Thread Vincent Vande Vyvre
Le 04/09/2015 04:30, Chris Angelico a écrit : On Fri, Sep 4, 2015 at 12:17 PM, Vincent Vande Vyvre wrote: import urllib.request urllib.request.urlopen('http://example.org') Thanks, that works with 3.4.0. No with 3.2.3 Hmm, not sure why it wouldn't. According to the docs [1] it should be avai

Re: Need Help w. PIP!

2015-09-03 Thread Mark Lawrence
On 04/09/2015 02:55, Chris Angelico wrote: On Fri, Sep 4, 2015 at 11:04 AM, Steve Burrus wrote: I have tried the 'python get-pip.py' command over amnd over again in my command prompt and the 'python easy-install.py" command a little less. I swear I have set ALL of the env. variables correctly

Re: Need Help w. PIP!

2015-09-03 Thread Chris Angelico
On Fri, Sep 4, 2015 at 1:04 PM, Mark Lawrence wrote: > On 04/09/2015 02:55, Chris Angelico wrote: >> >> On Fri, Sep 4, 2015 at 11:04 AM, Steve Burrus >> wrote: >>> >>> I have tried the 'python get-pip.py' command over amnd over again in my >>> command prompt and the 'python easy-install.py" comma

Re: Need Help w. PIP!

2015-09-03 Thread Steve Burrus
On Thursday, September 3, 2015 at 8:55:52 PM UTC-5, Chris Angelico wrote: > On Fri, Sep 4, 2015 at 11:04 AM, Steve Burrus wrote: > > I have tried the 'python get-pip.py' command over amnd over again in my > > command prompt and the 'python easy-install.py" command a little less. I > > swear I ha

Re: Need Help w. PIP!

2015-09-03 Thread Mark Lawrence
On 04/09/2015 02:04, Steve Burrus wrote: On Thursday, September 3, 2015 at 7:06:27 PM UTC-5, Mark Lawrence wrote: On 03/09/2015 23:20, Steve Burrus wrote: Well I hjave certainly noted more than once that pip is cont ained in Python 3.4. But I am having the most extreme problems with simply typ

Re: Need Help w. PIP!

2015-09-03 Thread Chris Angelico
On Fri, Sep 4, 2015 at 1:07 PM, Steve Burrus wrote: > On Thursday, September 3, 2015 at 8:55:52 PM UTC-5, Chris Angelico wrote: >> On Fri, Sep 4, 2015 at 11:04 AM, Steve Burrus >> wrote: >> > I have tried the 'python get-pip.py' command over amnd over again in my >> > command prompt and the 'py

Re: No request in module urllib ?

2015-09-03 Thread Mark Lawrence
On 04/09/2015 03:30, Chris Angelico wrote: On Fri, Sep 4, 2015 at 12:17 PM, Vincent Vande Vyvre wrote: import urllib.request urllib.request.urlopen('http://example.org') Thanks, that works with 3.4.0. No with 3.2.3 Hmm, not sure why it wouldn't. According to the docs [1] it should be avail

Re: Need Help w. PIP!

2015-09-03 Thread Mark Lawrence
On 04/09/2015 04:08, Chris Angelico wrote: On Fri, Sep 4, 2015 at 1:04 PM, Mark Lawrence wrote: On 04/09/2015 02:55, Chris Angelico wrote: On Fri, Sep 4, 2015 at 11:04 AM, Steve Burrus wrote: I have tried the 'python get-pip.py' command over amnd over again in my command prompt and the 'py

Re: Need Help w. PIP!

2015-09-03 Thread Chris Angelico
On Fri, Sep 4, 2015 at 1:27 PM, Mark Lawrence wrote: > python3 just doesn't exist on Windows, it's always python.exe or > pythonw.exe. Not that I'd recommend using them in this day and age, py.exe > or pyw.exe and specify your version via the command line or a shebang line > in your script is cer

Re: packing unpacking depends on order.

2015-09-03 Thread random832
On Thu, Sep 3, 2015, at 19:25, Sven R. Kunze wrote: > You mentioned side-effects. That is true. Right now, however, the > side-effects even fire back to the RHS of the assignment. That is really > weird. To me, and as it seems to some other folks here, the RHS should > be at least independent

Re: XML Binding

2015-09-03 Thread Palpandi
Thanks Burak. lmxl is good. But it is not supported with python 2.5. Any other option? -- https://mail.python.org/mailman/listinfo/python-list

Re: XML Binding

2015-09-03 Thread Chris Angelico
On Fri, Sep 4, 2015 at 3:21 PM, Palpandi wrote: > Thanks Burak. > > lmxl is good. But it is not supported with python 2.5. Any other option? The latest version isn't. But PyPI has an older version which is: https://pypi.python.org/pypi/lxml/3.3.6 You should be able to install that into a Python

Re: Porting Python Application to a new linux machine

2015-09-03 Thread Christian Gollwitzer
Am 03.09.15 um 16:32 schrieb Heli Nix: I have my python scripts that use several python libraries such as h5py, pyside, numpy In Windows I have an installer that will install python locally on user machine and so my program gets access to this local python and runs successfully. How can I d

Re: Need Help w. PIP!

2015-09-03 Thread ast
"Steve Burrus" a écrit dans le message de news:f0876c48-010e-4bf0-b687-dceefba97...@googlegroups.com... Well I hjave certainly noted more than once that pip is cont ained in Python 3.4. But I am having the most extreme problems with simply typing "pip" into my command prompt and then getting b

Re: Need Help w. PIP!

2015-09-03 Thread ast
"ast" a écrit dans le message de news:55e9372e$0$3019$426a3...@news.free.fr... "Steve Burrus" a écrit dans le message de news:f0876c48-010e-4bf0-b687-dceefba97...@googlegroups.com... Well I hjave certainly noted more than once that pip is cont ained in Python 3.4. But I am having the most

Re: Need Help w. PIP!

2015-09-03 Thread Nick Sarbicki
> Just typing 'pip' as you do does't work because pip.exe is located in Python\Scripts directory which in not included on variable %PATH% Is that new for win10? Just "pip" works fine on my win7 install. Although maybe I had to extend the path and forgot... - Nick On Fri, 4 Sep 2015 07:26 ast w

Re: XML Binding

2015-09-03 Thread Laura Creighton
In a message of Thu, 03 Sep 2015 22:21:29 -0700, Palpandi writes: >Thanks Burak. > >lmxl is good. But it is not supported with python 2.5. Any other option? >-- >https://mail.python.org/mailman/listinfo/python-list check and see what python you have. If 2.6 or more recent, use lxml If you have 2

Re: XML Binding

2015-09-03 Thread Laura Creighton
In a message of Fri, 04 Sep 2015 08:46:33 +0200, Laura Creighton writes: >In a message of Thu, 03 Sep 2015 22:21:29 -0700, Palpandi writes: >>Thanks Burak. >> >>lmxl is good. But it is not supported with python 2.5. Any other option? >>-- >>https://mail.python.org/mailman/listinfo/python-list > >c

  1   2   >