Re: Question about Source Control

2014-03-17 Thread Frank Millman
"Andriy Kornatskyy" wrote in message news:blu0-smtp953c8572b5ca6374830e5091...@phx.gbl... > Frank, > > I would suggest start with an account on https://bitbucket.org. It > supports private repositories so you should be good there. > > From other hand you can setup own infrastructure for SCM, re

Re: Question about Source Control

2014-03-17 Thread Ben Finney
"Frank Millman" writes: > I feel that I have just not grasped the basics yet, so any assistance that > puts me on the right path is appreciated. Here is “Hg Init”, a tutorial for Mercurial http://hginit.com/>. (“source control” is not the most common term for this; what we're talking about is

Re: Question about Source Control

2014-03-17 Thread Frank Millman
"Chris Angelico" wrote in message news:captjjmqhxh2m3-qgbelv_akgajzmeymbudly8_dkpnhrpsu...@mail.gmail.com... > On Tue, Mar 18, 2014 at 4:39 PM, Frank Millman wrote: >> Two quick questions - >> >> 1. At present the source code is kept on one machine (A), but only >> accessed >> from the two oth

Re: Question about Source Control

2014-03-17 Thread Chris Angelico
On Tue, Mar 18, 2014 at 4:39 PM, Frank Millman wrote: > Two quick questions - > > 1. At present the source code is kept on one machine (A), but only accessed > from the two other machines (B and C). > > Does it make sense to create the central repository on A, but *not* install > the SCM on A? Ins

Re: Question about Source Control

2014-03-17 Thread Frank Millman
"Chris Angelico" wrote in message news:CAPTjJmqPca5cnNWu8T5BZhpH665X0=mrf7bjalqvrqvmjzw...@mail.gmail.com... > On Tue, Mar 18, 2014 at 12:06 AM, Frank Millman > wrote: [...] >> >> So where should I install the SCM, and how should I set it up so that I >> can >> access the latest version from

Re: 'complex' function with string argument.

2014-03-17 Thread Chris Angelico
On Tue, Mar 18, 2014 at 3:52 PM, Steven D'Aprano wrote: > The first is a valid identifier, the second is a syntax error. Oh > somebody please tell me it's not a valid C expression! *wink* It's not a valid C expression. ChrisA -- https://mail.python.org/mailman/listinfo/python-list

Re: 'complex' function with string argument.

2014-03-17 Thread Steven D'Aprano
On Mon, 17 Mar 2014 11:18:56 -0500, Mark H Harris wrote: > How should one spell a complex number? Should we use i or j ? Should the > imaginary part be set off somehow? Should literals be parsed > differently (or consistently) with correctly formed strings? Who knows, > beats me. With respect,

Re: 'complex' function with string argument.

2014-03-17 Thread Steven D'Aprano
On Mon, 17 Mar 2014 21:22:18 +0200, Marko Rauhamaa wrote: > Chris Angelico : > >> On Tue, Mar 18, 2014 at 5:15 AM, Marko Rauhamaa >> wrote: >>> Is "-2.0" a literal? >>> >>> What's the outcome of >>> >>>-2.0.__str__() >> >> If you mean (-2.0).__str__(), then it returns '-2.0', but that proves

Re: Venus / GuthVenus for iPhone, Nexus, Droid and Android Jelly Bean

2014-03-17 Thread Brad Guth
On 3/17/2014 3:33 PM, Thrinaxodon wrote: In article <71ab5220-6d5d-46bf-b33a-16aae6c87...@googlegroups.com>, bradg...@gmail.com says... On Wednesday, February 5, 2014 2:59:23 PM UTC-8, Brad Guth wrote: On Saturday, January 11, 2014 3:52:10 PM UTC-8, Brad Guth wrote: NOVA and Discovery Channe

Re: Ordering in the printout of a dictionary

2014-03-17 Thread John Gordon
In Chris Angelico writes: > > Is there a way to force a certain ordering of the printout or else > > somehow manage to get at least a certain stable ordering of the > > printout (i.e. input and output are identical)? > Yes; instead of simply printing it out (which calls repr()), > explicitly i

Re: 'complex' function with string argument.

2014-03-17 Thread Skip Montanaro
On Mon, Mar 17, 2014 at 7:16 PM, Chris Angelico wrote: > On Tue, Mar 18, 2014 at 10:59 AM, Skip Montanaro wrote: >> Perhaps it's worth pointing out that pylint complains about most/many >> infix operations if you don't surround the operator with white space. > > IMO that's excessive. Not every in

Re: Python Docs & Download servers not accessable from Egypt

2014-03-17 Thread Chris Angelico
On Tue, Mar 18, 2014 at 11:42 AM, wrote: > Hello, > > I just want to report a python web sites specific problem I don't know if > this is the right place to report it > > I can't seem to access docs.python.org, mail.python.org, or even > legacy.python.org > from my ISP in Egypt "LinkDotNet" the

Re: Ordering in the printout of a dictionary

2014-03-17 Thread Chris Angelico
On Tue, Mar 18, 2014 at 11:32 AM, Mok-Kong Shen wrote: > Could someone kindly explain a phenomenon in the following where: > > (1) I first typed in a dictionary but got a printout in a reordered > form. > > (2) I then typed in the reordered form but got a printout in the > order that I typed in or

Python Docs & Download servers not accessable from Egypt

2014-03-17 Thread leobutcher5
Hello, I just want to report a python web sites specific problem I don't know if this is the right place to report it I can't seem to access docs.python.org, mail.python.org, or even legacy.python.org from my ISP in Egypt "LinkDotNet" the dynamic IP range I noticed while facing this problem is

Ordering in the printout of a dictionary

2014-03-17 Thread Mok-Kong Shen
Could someone kindly explain a phenomenon in the following where: (1) I first typed in a dictionary but got a printout in a reordered form. (2) I then typed in the reordered form but got a printout in the order that I typed in originally in (1). That is, there is no stable "standard" ordering.

Re: 'complex' function with string argument.

2014-03-17 Thread Chris Angelico
On Tue, Mar 18, 2014 at 10:59 AM, Skip Montanaro wrote: > Perhaps it's worth pointing out that pylint complains about most/many > infix operations if you don't surround the operator with white space. IMO that's excessive. Not every infix operator needs whitespace. ChrisA -- https://mail.python.

Re: Balanced trees

2014-03-17 Thread Joshua Landau
On 17 March 2014 21:16, Daniel Stutzbach wrote: > On Fri, Mar 14, 2014 at 6:13 PM, Joshua Landau wrote: >> >> Now, I understand there are downsides to blist. Particularly, I've >> looked through the "benchmarks" and they seem untruthful. > > I worked hard to make those benchmarks as fair as possi

Re: 'complex' function with string argument.

2014-03-17 Thread Skip Montanaro
On Mon, Mar 17, 2014 at 5:06 PM, Terry Reedy wrote: > Mathematicians genearally write both without spaces. Mathematicians also have a tendency to use single letter variables and often escape into non-ASCII character sets as well. Perhaps it's worth pointing out that pylint complains about most/

Re: Venus / GuthVenus for iPhone, Nexus, Droid and Android Jelly Bean

2014-03-17 Thread Thrinaxodon
In article <71ab5220-6d5d-46bf-b33a-16aae6c87...@googlegroups.com>, bradg...@gmail.com says... > > On Wednesday, February 5, 2014 2:59:23 PM UTC-8, Brad Guth wrote: > > On Saturday, January 11, 2014 3:52:10 PM UTC-8, Brad Guth wrote: > > > > > NOVA and Discovery Channel each missed this one as o

Re: Balanced trees

2014-03-17 Thread Marko Rauhamaa
Joshua Landau : > The thing we really need is for the blist containers to become stdlib > (but not to replace the current list implementation). Very interesting. Downloaded blist but didn't compile it yet. It *could* be the missing link. I would *love* to see some comparative performance results

Re: 'complex' function with string argument.

2014-03-17 Thread Terry Reedy
On 3/17/2014 1:55 PM, Mark Dickinson wrote: Jayanth Koushik gmail.com> writes: "Note: When converting from a string, the string must not contain whitespace around the central + or - operator. For example, complex('1+2j') is fine, but complex('1 + 2j') raises ValueError." Why is this so? See

Re: Installing binwalk on Portable Python

2014-03-17 Thread laguna-mc
Yes, that help. Installation start, but then failed due to "Pre-requisite failure: failed to find libmagic. Check your installation. Please install the python-magic module, or download and install it from source: ftp://ftp.astron.com/pub/file/' " Although libmagic was installed using pip. -

Re: Installing binwalk on Portable Python

2014-03-17 Thread Peter Mawhorter
On Mon, Mar 17, 2014 at 1:58 PM, wrote: > I tried: pip install "E:\Portable Python > 2.7.5.1\binwalk-1.3.0\src\setup.py" > > Error: > > E:\Portable Python 2.7.5.1\App\Scripts\pip run on 03/17/14 22:53:51 > > Exception: > Traceback (most recent call last): > File "E:\Portable Python > 2.7.5.1\A

Re: Installing binwalk on Portable Python

2014-03-17 Thread laguna-mc
I tried: pip install "E:\Portable Python 2.7.5.1\binwalk-1.3.0\src\setup.py" Error: E:\Portable Python 2.7.5.1\App\Scripts\pip run on 03/17/14 22:53:51 Exception: Traceback (most recent call last): File "E:\Portable Python 2.7.5.1\App\lib\site-packages\pip\basecommand.py", line 122, in main st

Re: Installing binwalk on Portable Python

2014-03-17 Thread Peter Mawhorter
On Mon, Mar 17, 2014 at 12:56 PM, wrote: > Portable Python 2.7 for Win32 and installed on USB flash drive. I want > install Binwalk tool, it have a few depencencies, I installed it first > (numpy, matplotlib, libmagic, python-magic) > Then I tried to install binwalk from locally stored source a

Re: Thread._stop() behavior changed in Python 3.4

2014-03-17 Thread Ian Kelly
On Mar 17, 2014 12:53 PM, "Jurko Gospodnetić" wrote: > > Hi. > > > On 17.3.2014. 19:03, Ian Kelly wrote: >> >> So yes, despite the lack of true concurrency, a thread can continue to >> run after its _stop has been called. > > > Actually 'true' or 'false' concurrency does not matter here. > >

Installing binwalk on Portable Python

2014-03-17 Thread laguna-mc
Portable Python 2.7 for Win32 and installed on USB flash drive. I want install Binwalk tool, it have a few depencencies, I installed it first (numpy, matplotlib, libmagic, python-magic) Then I tried to install binwalk from locally stored source archive file, I tried two ways: pip install E:\Por

Re: 'complex' function with string argument.

2014-03-17 Thread Chris Angelico
On Tue, Mar 18, 2014 at 6:22 AM, Marko Rauhamaa wrote: > Chris Angelico : > >> On Tue, Mar 18, 2014 at 5:15 AM, Marko Rauhamaa wrote: >>> Is "-2.0" a literal? >>> >>> What's the outcome of >>> >>>-2.0.__str__() >> >> If you mean (-2.0).__str__(), then it returns '-2.0', but that proves >> not

Re: 'complex' function with string argument.

2014-03-17 Thread Marko Rauhamaa
Chris Angelico : > On Tue, Mar 18, 2014 at 5:15 AM, Marko Rauhamaa wrote: >> Is "-2.0" a literal? >> >> What's the outcome of >> >>-2.0.__str__() > > If you mean (-2.0).__str__(), then it returns '-2.0', but that proves > nothing. The point is, you don't need to "philosophize" about complex

Re: test

2014-03-17 Thread Mark H Harris
On 3/17/14 12:03 PM, Mark Lawrence wrote: Thunderbird and gmane, FWIW on Windows 7. I moved my news reader stuff like comp.lang.python over to my Thunderbird mail client yesterday; works well and is as functional as sea-monkey ever was. The client is nice and has none of the short-comings of g

Re: 'complex' function with string argument.

2014-03-17 Thread Chris Angelico
On Tue, Mar 18, 2014 at 5:15 AM, Marko Rauhamaa wrote: >>> This '3 + 2j' is not a number, its an algebraic sum. >>> >>> This '3+2j' is a complex number. Ok, maybe not, but its closer to what >>> we expect (I'm sorry, but I like i instead of j ) >> >>Hmm. That's a pretty tricky distinction. > > I

Re: Thread._stop() behavior changed in Python 3.4

2014-03-17 Thread Jurko Gospodnetić
Hi. On 17.3.2014. 19:03, Ian Kelly wrote: So yes, despite the lack of true concurrency, a thread can continue to run after its _stop has been called. Actually 'true' or 'false' concurrency does not matter here. CPython supports multiple threads and implements them using underlying nati

Re: 'complex' function with string argument.

2014-03-17 Thread Ian Kelly
On Mon, Mar 17, 2014 at 12:15 PM, Marko Rauhamaa wrote: > Is "-2.0" a literal? > > What's the outcome of > >-2.0.__str__() No. The compiler will try to optimize it into a single constant if it can, but it has to be done in accordance with the order of operations. In that example, the __str_

Re: 'complex' function with string argument.

2014-03-17 Thread Mark H Harris
On 3/17/14 12:03 PM, Chris Angelico wrote: ast.dump(ast.parse("complex( 3 +2j )")) "Module(body=[Expr(value=Call(func=Name(id='complex', ctx=Load()), args=[BinOp(left=Num(n=3), op=Add(), right=Num(n=2j))], keywords=[], starargs=None, kwargs=None))])" The sole argument to complex() is an expr

Re: 'complex' function with string argument.

2014-03-17 Thread Marko Rauhamaa
Chris Angelico : > On Tue, Mar 18, 2014 at 3:18 AM, Mark H Harris wrote: >> Philosophically, I tend to think about it this way. A complex number >> is like any other number. I would not form a PI string like this> ' 3 >> .14 1 5 9265 3 . . .' I would rather see it formed like so, >> '3.1415926535

Re: Thread._stop() behavior changed in Python 3.4

2014-03-17 Thread Chris Angelico
On Tue, Mar 18, 2014 at 5:13 AM, Felix Yan wrote: > On Tuesday, March 18, 2014 05:08:20 Chris Angelico wrote: >> I've posted comments on both the issues you linked to. My guess based >> on a cursory look at paramiko is that it's a test suite watchdog, >> which would be much better implemented with

Re: Thread._stop() behavior changed in Python 3.4

2014-03-17 Thread Felix Yan
On Tuesday, March 18, 2014 05:08:20 Chris Angelico wrote: > I've posted comments on both the issues you linked to. My guess based > on a cursory look at paramiko is that it's a test suite watchdog, > which would be much better implemented with a subprocess; I may be > wrong, though. In any case, if

Re: Thread._stop() behavior changed in Python 3.4

2014-03-17 Thread Chris Angelico
On Tue, Mar 18, 2014 at 4:59 AM, Felix Yan wrote: > For now I just skipped the test suites for paramiko to get the packaging done > (since the test suites themselves are passed without a problem, just the test > script made something wrong). I'll try to follow up the issue for paramiko :) I've po

Re: Thread._stop() behavior changed in Python 3.4

2014-03-17 Thread Ian Kelly
On Mon, Mar 17, 2014 at 11:40 AM, Chris Angelico wrote: > Antoine says that this doesn't even stop the thread > (I can't say; I've never used _stop(), for obvious reasons), so this > code was doubly broken. I was curious about that -- after all, Python's threads aren't truly concurrent, so perhap

Re: Thread._stop() behavior changed in Python 3.4

2014-03-17 Thread Felix Yan
On Monday, March 17, 2014 17:33:09 Antoine Pitrou wrote: > Hi, > > Felix Yan gmail.com> writes: > > A minimized snippet to reproduce: > > > > #!/usr/bin/python > > import threading > > > > def stale(): > > import time > > time.sleep(1000) > > > > t = threading.Thread(target=stale) > >

Re: 'complex' function with string argument.

2014-03-17 Thread Mark Dickinson
Jayanth Koushik gmail.com> writes: > "Note: When converting from a string, the string must not contain whitespace > around the central + or - operator. For example, complex('1+2j') is fine, but > complex('1 + 2j') raises ValueError." > > Why is this so? See http://bugs.python.org/issue9574 for

Re: What does gc.get_objects() return?

2014-03-17 Thread Jurko Gospodnetić
Hi. On 17.3.2014. 18:18, Antoine Pitrou wrote: All in all, though, gc.get_objects() is an expensive function call (it will walk the entire graph of objects tracked by the GC, which can be very large in non-trivial applications), so it's really only useful for debugging (and, I'd add, for low-l

Re: Thread._stop() behavior changed in Python 3.4

2014-03-17 Thread Chris Angelico
On Tue, Mar 18, 2014 at 4:18 AM, Felix Yan wrote: > I noticed a behavior change on Thread._stop() with Python 3.4. > > I know the method is an undocumented "feature" itself, but some projects are > using it, and now they fail. > > I know trying to forcefully stop a thread is not really a good prac

Re: Thread._stop() behavior changed in Python 3.4

2014-03-17 Thread Antoine Pitrou
Hi, Felix Yan gmail.com> writes: > > A minimized snippet to reproduce: > > #!/usr/bin/python > import threading > def stale(): > import time > time.sleep(1000) > t = threading.Thread(target=stale) > t.start() > t._stop() > > This works correctly with Python 3.3, the program exits imme

Re: What does gc.get_objects() return?

2014-03-17 Thread Antoine Pitrou
Chris Angelico gmail.com> writes: > > It's not strictly an implementation detail, beyond that there are > certain optimizations. For instance... > > > For CPython 3.4 I guess strings and other atomic types such as ints are > > not, as well as raw object() instances. Custom class instances on t

Re: [Python-Dev] [RELEASED] Python 3.4.0

2014-03-17 Thread Alioune Dia
yeah , asyncio is a great module, congrat for all jobs you are doing --Ad | Dakar 2014-03-17 18:11 GMT+01:00 Giampaolo Rodola' : > The what's new looks truly amazing, with pathlib and asyncio being my > favourite additions. > Thanks for all the hard work. > > > On Mon, Mar 17, 2014 at 5:57 PM, R

Thread._stop() behavior changed in Python 3.4

2014-03-17 Thread Felix Yan
Hi list, I noticed a behavior change on Thread._stop() with Python 3.4. I know the method is an undocumented "feature" itself, but some projects are using it, and now they fail. A minimized snippet to reproduce: #!/usr/bin/python import threading def stale(): import time time.sleep(100

Re: [Python-Dev] [RELEASED] Python 3.4.0

2014-03-17 Thread Giampaolo Rodola'
The what's new looks truly amazing, with pathlib and asyncio being my favourite additions. Thanks for all the hard work. On Mon, Mar 17, 2014 at 5:57 PM, Ryan Gonzalez wrote: > YES!!! +1 to the authors of the statistics and pathlib modules. > > > On Mon, Mar 17, 2014 at 1:29 AM, Larry Hastings

Re: test

2014-03-17 Thread Mark Lawrence
On 17/03/2014 16:42, Mark H Harris wrote: On 3/16/14 5:07 AM, Chris “Kwpolska” Warrick wrote: Why not use the mailing list instead? It’s a much easier way to access this place. I prefer to 'pull' rather than receive the 'push'. The newsreader idea is better because threading works better, an

Re: 'complex' function with string argument.

2014-03-17 Thread Chris Angelico
On Tue, Mar 18, 2014 at 3:18 AM, Mark H Harris wrote: > You actually answered your own question, as you were asking it. If the doc > says "whatever you do, don't push the purple button," well, leave the purple > button alone. :) (I don't know, push it if you want) https://www.wizards.com/m

Re: [Python-Dev] [RELEASED] Python 3.4.0

2014-03-17 Thread Ryan Gonzalez
YES!!! +1 to the authors of the statistics and pathlib modules. On Mon, Mar 17, 2014 at 1:29 AM, Larry Hastings wrote: > > On behalf of the Python development team, I'm thrilled to announce > the official release of Python 3.4. > > > Python 3.4 includes a range of improvements of the 3.x series

Re: test

2014-03-17 Thread Mark H Harris
On 3/16/14 5:07 AM, Chris “Kwpolska” Warrick wrote: Why not use the mailing list instead? It’s a much easier way to access this place. I prefer to 'pull' rather than receive the 'push'. The newsreader idea is better because threading works better, and because the interface is simpler. I don't

Re: 'complex' function with string argument.

2014-03-17 Thread Mark H Harris
On 3/15/14 11:26 AM, Jayanth Koushik wrote: This is a very interesting philosophical question, one which I am surprised no one has answered; although, I think the reason for that might be entirely obvious. You actually answered your own question, as you were asking it. If the doc says "whate

Re: Correct idiom for determining path when frozen in 3.4

2014-03-17 Thread Zachary Ware
On Mon, Mar 17, 2014 at 10:31 AM, Mark Summerfield wrote: > My code was adapted from this: > http://cx-freeze.readthedocs.org/en/latest/faq.html#using-data-files > > When you freeze a Python program with cx_Freeze, sys.freeze exists; but > otherwise it doesn't. > > I develop some programs which I

Re: Looking for someone who can build a 64-bit version of SpamBayes installer for Windows

2014-03-17 Thread Skip Montanaro
On Mon, Mar 17, 2014 at 10:11 AM, Mark Lawrence wrote: >> https://mail.python.org/mailman/listinfo/python-win32 which is gated to >> gmane.comp.python.windows >> > > Or cgohlke at uci.edu as he maintains this "Unofficial Windows Binaries for > Python Extension Packages" here http://www.lfd.uci.edu

Re: Correct idiom for determining path when frozen in 3.4

2014-03-17 Thread Mark Summerfield
On Monday, 17 March 2014 08:44:23 UTC, Mark Summerfield wrote: > Hi, > > > > What is the correct idiom for getting the path to a top-level module in 3.3 > and 3.4 when the module might be frozen? > > > > At the moment I'm using this: > > > > if getattr(sys, "frozen", False): > >

Re: Looking for someone who can build a 64-bit version of SpamBayes installer for Windows

2014-03-17 Thread Mark Lawrence
On 17/03/2014 14:39, Mark Lawrence wrote: On 17/03/2014 14:08, Skip Montanaro wrote: As more and more Windows users have moved to 64-bit versions of Windows and Outlook, we've had more and more reports of failures. I think all that's necessary (speaking as someone who knows nothing about W

Re:

2014-03-17 Thread Chris Angelico
On Mon, Mar 17, 2014 at 6:06 PM, J Prashanthan wrote: > i am doing my masters currently and im stuck up with my final project. As i > was interested in learning a new language i opted to do my final project in > python. im currently working on building an unit tester for multithreaded > code. Due

Re: Question about Source Control

2014-03-17 Thread Chris Angelico
On Tue, Mar 18, 2014 at 12:06 AM, Frank Millman wrote: > All my source code resides on an old Linux server, which I switch on in the > morning and switch off at night, but otherwise hardly ever look at. It uses > 'samba' to allow sharing with Windows, and 'nfs' to allow sharing with other > Linux

Re: Looking for someone who can build a 64-bit version of SpamBayes installer for Windows

2014-03-17 Thread Mark Lawrence
On 17/03/2014 14:08, Skip Montanaro wrote: As more and more Windows users have moved to 64-bit versions of Windows and Outlook, we've had more and more reports of failures. I think all that's necessary (speaking as someone who knows nothing about Windows) is for someone to build a 64-bit ve

Re: Looking for someone who can build a 64-bit version of SpamBayes installer for Windows

2014-03-17 Thread Skip Montanaro
> As more and > more Windows users have moved to 64-bit versions of Windows and > Outlook, we've had more and more reports of failures. > > I think all that's necessary (speaking as someone who knows nothing > about Windows) is for someone to build a 64-bit version of the > SpamBayes installer

[no subject]

2014-03-17 Thread J Prashanthan
i am doing my masters currently and im stuck up with my final project. As i was interested in learning a new language i opted to do my final project in python. im currently working on building an unit tester for multithreaded code. Due to various reasons i got stuck with my project. basically my la

Re: Question about Source Control

2014-03-17 Thread Andriy Kornatskyy
Frank, I would suggest start with an account on https://bitbucket.org. It supports private repositories so you should be good there. >From other hand you can setup own infrastructure for SCM, read more here: http://mindref.blogspot.com/2013/10/how-to-manage-git-or-mercurial.html Thanks. Andri

Question about Source Control

2014-03-17 Thread Frank Millman
Hi all I know I *should* be using a Source Control Management system, but at present I am not. I tried to set up Mercurial a couple of years ago, but I think I set it up wrongly, as I got myself confused and found it more of a hindrance than a help. Now I am ready to try again, but I want to av

Re: Error when installing matplotlib-1.3. on Windows

2014-03-17 Thread Andrew Williams
Note that I have Portable Python, installed on USB flash drive. When I tried run matplotlib installer, I got error:'Cannot install': "Python version 2.7 required, which was not found in the registry" - Original Message - From: MRAB Sent: 03/17/14 03:55 AM To: python-list@python.org Subj

Re: Correct idiom for determining path when frozen in 3.4

2014-03-17 Thread Oscar Benjamin
On 17 March 2014 08:44, Mark Summerfield wrote: > Hi, > > What is the correct idiom for getting the path to a top-level module in 3.3 > and 3.4 when the module might be frozen? > > At the moment I'm using this: > > if getattr(sys, "frozen", False): > path = os.path.dirname(sys.executa

Re: Correct idiom for determining path when frozen in 3.4

2014-03-17 Thread Ben Finney
Devin Jeanpierre writes: > On Mon, Mar 17, 2014 at 2:02 AM, Ben Finney > wrote: > > Mark Summerfield writes: > > if getattr(sys, "frozen"):# ‘getattr’ will return None by default > > No it won't. > […] > Sure, but sys.executable always exists. My apologies for posting untested code wi

Re: Correct idiom for determining path when frozen in 3.4

2014-03-17 Thread Devin Jeanpierre
On Mon, Mar 17, 2014 at 2:02 AM, Ben Finney wrote: > Mark Summerfield writes: > if getattr(sys, "frozen"):# ‘getattr’ will return None by default No it won't. > Lastly, it's slightly more Pythonic to execute the normal path > unconditionally, and let it raise an exception if there's a p

Re: Correct idiom for determining path when frozen in 3.4

2014-03-17 Thread Ben Finney
Mark Summerfield writes: > What is the correct idiom for getting the path to a top-level module I'm not sure I understand what this concept is. What do you mean by “top-level module”? > in 3.3 and 3.4 when the module might be frozen? > > At the moment I'm using this: > > if getattr(sys, "fr

HOLY SH*T! HUMANS ORIGINATED IN THE DEVONIAN

2014-03-17 Thread ASSODON
=== >BREAKING NEWS === > RICHARD LEAKEY JUST DIED DUE TO HEART FAILURE! > THE REASONS DESCRIBED BY THE MEDICAL TEAM IS THAT HIS WORK WAS DISPROVEN, BY NONE OTHER THAN YOUR OWN BASTARD, THRINAXODON. > THIS CAUSED LEAKEY'S HEART TO EXPLODE! > THRINAXOD

Correct idiom for determining path when frozen in 3.4

2014-03-17 Thread Mark Summerfield
Hi, What is the correct idiom for getting the path to a top-level module in 3.3 and 3.4 when the module might be frozen? At the moment I'm using this: if getattr(sys, "frozen", False): path = os.path.dirname(sys.executable) else: path = os.path.dirname(__file__) Thanks!

Re: pkg_resources.DistributionNotFound: hiredis

2014-03-17 Thread Steven D'Aprano
On Sun, 16 Mar 2014 23:10:29 -0700, jobmattcon wrote: > this is a specific tool related with python > > http://heynemann.github.io/r3/ > > i am trying to do a simple example like the diagram in the web page > describe and then use with sympy to massive generate functions and plot > and print int

asyncio libraries?

2014-03-17 Thread sontek
I'm a little late to the party, but now that Python 3.4 is out and asyncio is ready for use I started reading things like: https://glyph.twistedmatrix.com/2014/02/unyielding.html Which explains why the asyncio approach is the future and all the bullet points in that article make a lot of sense.