Re: Fwd: PYTHON BUG. deleting elements of list.

2020-09-09 Thread Nicholas Cole
On Wed, Sep 9, 2020 at 8:52 AM Chris Angelico wrote: [snip] > And if you absolutely have to mutate in place: > > items[:] = [i for i in items if i not in "bcd"] How does that work to mutate in place? -- https://mail.python.org/mailman/listinfo/python-list

List comprehension strangeness

2019-07-22 Thread Nicholas Cole
similar? Best wishes, Nicholas -- https://mail.python.org/mailman/listinfo/python-list

Re: Guido van Rossum resigns as Python leader

2018-07-13 Thread Nicholas Cole
On Fri, 13 Jul 2018 at 10:31, Jim Oberholtzer wrote: > Nicholas: > > I am relatively new to Python, and my system of choice, IBM i on POWER, > now supports Python directly. The open source movement is so strong that I > think Python will be just fine. I've been a syst

Re: Guido van Rossum resigns as Python leader

2018-07-13 Thread Nicholas Cole
On Fri, 13 Jul 2018 at 10:04, Chris Angelico wrote: > On Fri, Jul 13, 2018 at 11:54 PM, Nicholas Cole > wrote: > > Is it irrational to wonder whether projects should be looking to migrate > to > > new languages? This kind of announcement makes me worry for the futur

Re: Guido van Rossum resigns as Python leader

2018-07-13 Thread Nicholas Cole
downside of being the visible face of a popular language while having > a publicly visible email address. > > Oh people are awful. I hope (though don’t expect) he will change his mind. Is it irrational to wonder whether projects should be looking to migrate to new languages? This kind o

Re: Import statements and multiprocessing

2018-01-31 Thread Nicholas Cole
On Tue, Jan 30, 2018 at 7:26 PM, Terry Reedy wrote: > On 1/30/2018 10:54 AM, Nicholas Cole wrote: > >> I have a strange problem on python 3.6.1 > > [involving multiprocessing] Interestingly it seems to have been a very subtle circular import problem that was showing up only

Re: Import statements and multiprocessing

2018-01-30 Thread Nicholas Cole
On Tue, Jan 30, 2018 at 4:33 PM, Nicholas Cole wrote: > On Tue, Jan 30, 2018 at 4:23 PM, Steven D'Aprano > wrote: >> On Tue, 30 Jan 2018 15:54:30 +, Nicholas Cole wrote: > >> I would say you're probably misinterpreting the nature of the problem. >> I

Re: Import statements and multiprocessing

2018-01-30 Thread Nicholas Cole
On Tue, Jan 30, 2018 at 4:23 PM, Steven D'Aprano wrote: > On Tue, 30 Jan 2018 15:54:30 +, Nicholas Cole wrote: > I would say you're probably misinterpreting the nature of the problem. > Import * isn't a directive that can be ignored. > > Can you show us a

Import statements and multiprocessing

2018-01-30 Thread Nicholas Cole
It is as if in the worker processes created by Pool.map() the from . import * directive is being completely ignored. With the explicit import statements everything works as expected. What could be going wrong? Best wishes, Nicholas -- https://mail.python.org/mailman/listinfo/python-list

Re: venv issues

2015-11-03 Thread Nicholas Cole
On Tue, Nov 3, 2015 at 1:59 PM, Chris Angelico wrote: > On Tue, Nov 3, 2015 at 9:32 PM, Nicholas Cole wrote: >> Logging in as a different user and creating a venv works perfectly, so >> it's clearly a config issue somewhere, but I've tried removing >> ~/.bash

Re: venv issues

2015-11-03 Thread Nicholas Cole
On Tue, Nov 3, 2015 at 12:27 PM, Wolfgang Maier wrote: > On 03.11.2015 11:32, Nicholas Cole wrote: >> >> I'm using python3.5 (installed from binaries) on the latest OS X. >> >> I have a curious issue with virtual environments on this machine (but >> not on m

venv issues

2015-11-03 Thread Nicholas Cole
27;, '/private/tmp/testenv/lib/python3.5/site-packages'] I'm sure I'm overlooking something obvious, but can anyone suggest what? Nicholas -- https://mail.python.org/mailman/listinfo/python-list

Re: Did the 3.4.4 docs get published early?

2015-06-11 Thread Nicholas Chammas
menu allows. Nick On Wed, Jun 10, 2015 at 2:25 PM Nicholas Chammas wrote: > Also, just replacing the version number in the URL works for the python 3 > series (use 3.X even for python 3.0), even farther back than the drop down > menu allows. > > This does not help in this case: >

Re: Did the 3.4.4 docs get published early?

2015-06-10 Thread Nicholas Chammas
(like the one I linked to) are introduced in maintenance versions, it’s probably hard to separate them out into separate branches. Nick ​ On Wed, Jun 10, 2015 at 10:11 AM Nicholas Chammas < nicholas.cham...@gmail.com> wrote: > For example, here is a "New in version 3.4.4"

Did the 3.4.4 docs get published early?

2015-06-10 Thread Nicholas Chammas
For example, here is a "New in version 3.4.4" method: https://docs.python.org/3/library/asyncio-task.html#asyncio.ensure_future However, the latest release appears to be 3.4.3: https://www.python.org/downloads/ Is this normal, or did the 3.4.4 docs somehow get published early by mistake? Nick

Re: Python is DOOMED! Again!

2015-01-24 Thread Nicholas Cole
On Sat, Jan 24, 2015 at 5:51 AM, Steven D'Aprano wrote: > and Ruby has an experimental one: > > http://blog.codeclimate.com/blog/2014/05/06/gradual-type-checking-for-ruby/ Interesting. Ruby has avoided the magic comment, and the typing is done in annotations rather than in the function signatu

Python is DOOMED! Again!

2015-01-22 Thread Nicholas Cole
On Thursday, 22 January 2015, Chris Angelico > wrote: > On Thu, Jan 22, 2015 at 7:10 PM, Mario Figueiredo > wrote: > > Possibly one common use case will be Unions. And that factory syntax is > > really awful and long when you look at a function definition with as > > little as 3 arguments. The on

Re: Python is DOOMED! Again!

2015-01-22 Thread Nicholas Cole
On Thu, Jan 22, 2015 at 8:10 AM, Mario Figueiredo wrote: > In article <54c0a571$0$13002$c3e8da3$54964...@news.astraweb.com>, > steve+comp.lang.pyt...@pearwood.info says... >> >> The point isn't that there are no other alternative interpretations >> possible, or that annotations are the only syntax

Re: Python is DOOMED! Again!

2015-01-21 Thread Nicholas Cole
On Thu, Jan 22, 2015 at 5:56 AM, Chris Angelico wrote: > On Thu, Jan 22, 2015 at 4:50 PM, Nicholas Cole > wrote: >> I would have preferred Python to mimic: >> >> Define function add taking price1, the price2, print_error equals true. >> Price1 is a float. Price2 is

Re: Python is DOOMED! Again!

2015-01-21 Thread Nicholas Cole
ce1, the price2, print_error equals true. Price1 is a float. Price2 is a float. The function returns a float. But now this is sounding a little like something from Larry Wall, and so I had better stop! I wasn't trying to re-litigate the decisions that have been taken, just to understa

Re: Trees

2015-01-20 Thread Nicholas Cole
On Mon, Jan 19, 2015 at 11:52 PM, Devin Jeanpierre wrote: > On Mon, Jan 19, 2015 at 3:08 PM, Steven D'Aprano > wrote: >> Zachary Gilmartin wrote: >> >>> Why aren't there trees in the python standard library? >> >> Possibly because they aren't needed? Under what circumstances would you use >> a tr

Re: XML Patch

2014-10-27 Thread Nicholas Cole
On Mon, Oct 27, 2014 at 7:28 AM, Stefan Behnel wrote: > Hi, > > please keep this on-list. Sorry about that. Wrong button! [snip] >> Yes - I want to store a series of XML diffs/patches and be able to >> generate documents by applying them. > > Could you be a little more specific? There are lots

XML Patch

2014-10-26 Thread Nicholas Cole
ral projects on Pypi that can generate some form of xml diff, but I can't seem to see anything that can also do the patching side of things. Does anyone have any recommendations? Best wishes, Nicholas -- https://mail.python.org/mailman/listinfo/python-list

Sample sqlite databases for use in python

2014-10-26 Thread Nicholas Cannon
Hello I am making a data management program and although i can make my own databases I would like a couple sample ones to check out. Of course I searched on google for sample db's and I downloaded some but they are not working and I keep getting: File is not a database or en

Re: Syntax Highlighting in a tkinter Text widget

2014-10-07 Thread Nicholas Cannon
Sweet thanks for the help many I am defiantly going to use these. -- https://mail.python.org/mailman/listinfo/python-list

Syntax Highlighting in a tkinter Text widget

2014-10-06 Thread Nicholas Cannon
Hey guys Im working on an open source text editor(https://github.com/nicodasiko/Text-Config-2) and I would like to add syntax highlighting(mainly for python code). I have built the editor in python and the text input is a Text tkinter widget. I know how to add tags and highlight things but Im

Re: How to not enable a user to close the root tkinter window

2014-09-22 Thread Nicholas Cannon
The git hub has not actually been updated yet I am working on somethine else then committing the update. How would I stop the threads though. I'am using the Thread from threading function. -- https://mail.python.org/mailman/listinfo/python-list

Re: Love to get some feedback on my first python app!!!

2014-09-22 Thread Nicholas Cannon
Also I have just been coding for about and hour and a half and added a lot more code to it but it is not fully finished yet so it is not on github yet. -- https://mail.python.org/mailman/listinfo/python-list

Re: Love to get some feedback on my first python app!!!

2014-09-22 Thread Nicholas Cannon
Ok I'm confused. Do I need to do better comments? I know the text is not that great but that is my next obstacle I am going to tackle. I mostly need to know where I am going wrong such as what is expectable readable code and what is not and how to fix this. This is good feedback thanks to all of

How to not enable a user to close the root tkinter window

2014-09-22 Thread Nicholas Cannon
I have a project I am working on(https://github.com/nicodasiko/Article-Grab) which grabs info from the internet then displays it on the screen. It is a multithreaded program so as the function that retrieves the data from the internet there is also another function running in parallel which upda

Re: Love to get some feedback on my first python app!!!

2014-09-21 Thread Nicholas Cannon
On Saturday, September 20, 2014 9:17:27 PM UTC+8, Nicholas Cannon wrote: > I have created my first python program and I have learnt a lot about python > from this group and wanted some feedback. I am still improving it and trying > to tackle some performance and GUI stuff so keep that i

Re: Love to get some feedback on my first python app!!!

2014-09-20 Thread Nicholas Cannon
I have just committed a new main.py file on github. I added alot more comments and slimmed down the getinfo() function. -- https://mail.python.org/mailman/listinfo/python-list

Re: Love to get some feedback on my first python app!!!

2014-09-20 Thread Nicholas Cannon
On Saturday, September 20, 2014 9:17:27 PM UTC+8, Nicholas Cannon wrote: > I have created my first python program and I have learnt a lot about python > from this group and wanted some feedback. I am still improving it and trying > to tackle some performance and GUI stuff so keep that i

Love to get some feedback on my first python app!!!

2014-09-20 Thread Nicholas Cannon
I have created my first python program and I have learnt a lot about python from this group and wanted some feedback. I am still improving it and trying to tackle some performance and GUI stuff so keep that in mind. I don't think it is the best program but is a good product of 3 months of python

Re: python script monitor

2014-09-16 Thread Nicholas Cannon
Nah I mean like there is performance issues. It delivers result that I want just mot very conveinetly fast. -- https://mail.python.org/mailman/listinfo/python-list

python script monitor

2014-09-15 Thread Nicholas Cannon
I have made an app that is not fully stable and I would like to monitor the performance of the app and try and improve the speed of it. I tried to use the activity monitor on the mac but what I want I'm to see how much ram, cup and other stats on what resources that app is using. Is there any ap

Raspberry pi, python and robotics

2014-08-30 Thread Nicholas Cannon
I really enjoy engineering at school and we make like fighting robots and stuff(simple stuff of course) and i really enjoy it. I have got a raspberry pi and a decent understanding of python and i want to do make stuff like RC cars and drones and stuff. Also I like electronics. Is there any good

Best place to start of learning the raspberry pi

2014-08-24 Thread Nicholas Cannon
Hey I bought a raspberry pi, a bread board and all this electronics stuff and i really enjoy programming stuff in python and i have had a decent of practise with python. I really wont to get into making things with electronics(i have had a lot of practise with soldering as well) and then program

Tkinter frame reset

2014-08-08 Thread Nicholas Cannon
Ok so I am working on a little project and I cant seem to solve something with it. I have a label and then a clear button and I want all the numbers in the label to clear when I push the button. This button is on a separate frame to the buttons. I would like to clear the frame and then set all t

Re: Tkinter menu crash

2014-08-05 Thread Nicholas Cannon
I am confused. When I did menu bar.add_cascade why don't I do filemenu.add_cascade. Is it because I am adding a cascade to the main menubar? -- https://mail.python.org/mailman/listinfo/python-list

Re: Tkinter menu crash

2014-08-05 Thread Nicholas Cannon
Ok so I am on 2.7.8. > What x.y.z version of Python. How did you run it, exactly? > Adding filemenu as a submenu of filemenu leads to infinite loop regress. > > On 3.4.1 with tcl/tk 8.6, this does not crash, but it might on an > > earlier version of Python and tcl/tk. > Since menubar is left e

Tkinter menu crash

2014-08-05 Thread Nicholas Cannon
Ok so the first part of the program(until the start of the menu) worked fine. It ran and did what I wanted it to do. I wanted to then implement a new menu(for practise) and then it crashes. Don't know why but it just crashes. (also tips on the code will be appreciated and I gave just started Tki

Re: Tkinter grid autosize help

2014-08-02 Thread Nicholas Cannon
On Saturday, August 2, 2014 10:38:28 PM UTC+8, Nicholas Cannon wrote: > So i have a basic calculator program and i have a label that i want to go > across the top to show the numbers and stuff like on a normal calculator. The > only way i can make the buttons look neat and then wh

Re: Tkinter grid autosize help

2014-08-02 Thread Nicholas Cannon
On Saturday, August 2, 2014 10:38:28 PM UTC+8, Nicholas Cannon wrote: > So i have a basic calculator program and i have a label that i want to go > across the top to show the numbers and stuff like on a normal calculator. The > only way i can make the buttons look neat and then wh

Tkinter grid autosize help

2014-08-02 Thread Nicholas Cannon
So i have a basic calculator program and i have a label that i want to go across the top to show the numbers and stuff like on a normal calculator. The only way i can make the buttons look neat and then when i keep pressing one the label gets larger and then half the buttons move out of the scre

Re: Python and IDEs [was Re: Python 3 is killing Python]

2014-08-01 Thread Nicholas Cole
On Fri, Aug 1, 2014 at 12:22 PM, Chris Angelico wrote: > On Fri, Aug 1, 2014 at 9:10 PM, Wolfgang Keller wrote: >> Thankfully, all actually user-friendly operating systems (MacOS, >> TOS, RiscOS, probably AmigaOS, MacOS X) spare(d) their users the >> bottomless cesspit of "package management" and

Re: Best place to find sample data

2014-07-26 Thread Nicholas Cannon
Oh the above is quoted here just the bottom line in added in -- https://mail.python.org/mailman/listinfo/python-list

Re: Best place to find sample data

2014-07-26 Thread Nicholas Cannon
On Saturday, July 26, 2014 9:41:11 PM UTC+8, Nicholas Cannon wrote: Also I am having troubles with Numpy and its loadtxt function: > > > > ValueError: cannot set an array element with a sequence I found out why this has occurred because the csv file i was using didnt have a consi

Best place to find sample data

2014-07-26 Thread Nicholas Cannon
Hey I need some sample data to test out and do stuff with. Also I am having strange errors with idle when i load a .txt file read it and then print it, idle crashes well kind of freezes. Not sure what is wrong here. Also I am having troubles with Numpy and its loadtxt function: ValueError: cann

I want to do something with data

2014-07-23 Thread Nicholas Cannon
Hey i am interested in using data in my programs. I know every program uses data but i want to do like large data processing and pick results out of a data like querying database. I dont really know what this is called though. Is it data analytics? im not sure but I would like to do this stuff.

Re: Html Parsing stuff

2014-07-21 Thread Nicholas Cannon
dont worry it has been solved -- https://mail.python.org/mailman/listinfo/python-list

Html Parsing stuff

2014-07-21 Thread Nicholas Cannon
Ok i get the basics of this and i have been doing some successful parsings and using regular expressions to find html tags. I have tried to find an img tag and write that image to a file. I have had no success. It says it has successfully wrote the image to the file with a try... except statemen

I am stuck on OOP

2014-07-18 Thread Nicholas Cannon
Just quickly i am quite stuck on OOP and i really need like a good video and i cant find any. If anyone knows any please link it i really need it because i know OOP is important. -- https://mail.python.org/mailman/listinfo/python-list

Re: I need an idea for practise!

2014-07-17 Thread Nicholas Cannon
When I say i suck at finding good creative ideas I dont mean like I can think of anything its more like i cant think of anything that is within my scope of skill. These ideas are great guys thanks. Also the gui tool kit i used for the apps is tkinter because i am reading a book about python and

Re: Mac python py2app problem

2014-07-17 Thread Nicholas Cannon
On Wednesday, July 16, 2014 9:56:56 AM UTC+8, Nicholas Cannon wrote: > Hey i have made an app and i have made a .msi for windows with py2exe and i > have also exported it with py2app on mac. No problems here they all work > fine. I then put the .msi on sourceforge and it works great b

I need an idea for practise!

2014-07-17 Thread Nicholas Cannon
Ok I would say I am almost a intermediate python programer. I have made 2 programs(with GUI). And basically they are quite boring(a text editor and calculator). I love programming but i am lost of ideas i actually suck at finding good creative ideas. Now i am not looking to use these ideas make

Mac python py2app problem

2014-07-15 Thread Nicholas Cannon
Hey i have made an app and i have made a .msi for windows with py2exe and i have also exported it with py2app on mac. No problems here they all work fine. I then put the .msi on sourceforge and it works great but when i put the .app on there and download it it says something like i can open this

Standard library Help

2014-07-11 Thread Nicholas Cannon
Hey i would like to know alot more about the standard library and all of its functions and so on and i know it is huge and i would basically like to learn only the useful stuff that i could use and all of those features. i have been looking around and i cant really find anything so i wondering i

Re: How to distribute python console program

2014-06-22 Thread Nicholas Cole
On Sun, Jun 22, 2014 at 3:51 AM, Nicholas Cannon wrote: > I have a simple program that is ran in the console with 2 modules and i was > wondering how i could like export it so i could give it to someone to use as > like a utlitie in the console? I'm assuming that the 'someon

How to distribute python console program

2014-06-21 Thread Nicholas Cannon
I have a simple program that is ran in the console with 2 modules and i was wondering how i could like export it so i could give it to someone to use as like a utlitie in the console? -- https://mail.python.org/mailman/listinfo/python-list

Re: how to check if a value is a floating point or not

2014-06-19 Thread Nicholas Cannon
Guys i am only a beginner at python most of the stuff you are saying i need to do i dont understand. -- https://mail.python.org/mailman/listinfo/python-list

Re: how to check if a value is a floating point or not

2014-06-18 Thread Nicholas Cannon
On Thursday, June 19, 2014 1:53:31 PM UTC+8, Nicholas Cannon wrote: > I am making a calculator and i need it to support floating point values but i > am using the function isnumeric to check if the user has entered an int > value. I need the same for floating point types so i could imp

Re: OT: This Swift thing

2014-06-03 Thread Nicholas Cole
Swift may yet be good for PyObjC (the python bridge to the various Apple libraries); it is possible that there is some kind of translation table that PyObjC can make use of to make its own method names less ugly. Of course, I wish they had picked Python rather than inventing their own language. B

Re: why indentation should be part of the syntax

2014-03-02 Thread Nicholas Cole
On Sun, Mar 2, 2014 at 2:38 PM, Roy Smith wrote: > In article , > Stefan Behnel wrote: > >> Haven't seen any mention of it on this list yet, but since it's such an >> obvious flaw in quite a number of programming languages, here's a good >> article on the recent security bug in iOS, which was du

Python (?) webserver for WSGI

2014-02-09 Thread Nicholas Cole
On Sunday, 9 February 2014, Asaf Las > wrote: > On Sunday, February 9, 2014 11:05:58 PM UTC+2, Nicholas wrote: > > Dear List, > > > > > > > > What is the latest "best-practice" for deploying a python wsgi > > application into production? > &g

Python (?) webserver for WSGI

2014-02-09 Thread Nicholas Cole
Dear List, What is the latest "best-practice" for deploying a python wsgi application into production? For development, I've been using CherryPyWSGIServer which has been working very well (and the code is small enough to actually ship with my application). But I would like some way of deploying

Re: __init__ is the initialiser

2014-02-03 Thread Nicholas Cole
On Monday, 3 February 2014, Chris Angelico wrote: > On Tue, Feb 4, 2014 at 12:50 AM, Nicholas Cole > > > wrote: > >> There have been occasional times I've wanted an "explicit destruction" > >> feature. Rather than the facetious exception I listed

Re: __init__ is the initialiser

2014-02-03 Thread Nicholas Cole
On Mon, Feb 3, 2014 at 12:07 AM, Chris Angelico wrote: > On Mon, Feb 3, 2014 at 10:40 AM, Roy Smith wrote: >> I'm reasonably sure you posted this as humor, but there is some truth in >> what you said. In the crypto/security domain, you often want to keep a >> key or cleartext around only for the

Re: Self healthcheck

2014-01-22 Thread Nicholas Cole
On Wednesday, 22 January 2014, Asaf Las wrote: > On Wednesday, January 22, 2014 5:08:25 AM UTC+2, Chris Angelico wrote: > > I assume you're talking about pure Python code, running under CPython. > > (If you're writing an extension module, say in C, there are completely > > different ways to detec

Re: Python program distribution - a source of constant friction

2014-01-16 Thread Nicholas Cole
On Tue, Jan 7, 2014 at 12:09 AM, Nicholas Cole wrote: [SNIP] > Even so, things like that are harder to create than they > could be, or less prominently documented than one might have expected. > > Case in point: I have an application a friend/colleague of mine would like > to lo

Re: Python program distribution - a source of constant friction

2014-01-06 Thread Nicholas Cole
On Monday, 6 January 2014, Chris Angelico wrote: > On Tue, Jan 7, 2014 at 10:39 AM, Nicholas Cole > > > wrote: > > But what about the end-user? The end-user who just wants a blob (he > doesn't > > care about what language it is in - he just wants to solve the pro

Python program distribution - a source of constant friction

2014-01-06 Thread Nicholas Cole
t if so they need much better documentation, somewhere that it is really easy to find it. IMHO, anyway. Nicholas -- https://mail.python.org/mailman/listinfo/python-list

Re: "More About Unicode in Python 2 and 3"

2014-01-06 Thread Nicholas Cole
f you want the new features, you need to make a move, and it is probably time to write all new code in Python 3. If there's a dependency holding you back, then there will be a Python 2 interpreter around to run your code. That all seems pretty reasonable and straightforward to me. Nicholas -- https://mail.python.org/mailman/listinfo/python-list

Packaging a private project

2013-12-16 Thread Nicholas Cole
Dear List, What is the best way to distribute a private, pure python, Python 3 project that needs several modules (some available on pypi but some private and used by several separate projects) in order to run? I'd like to include everything that my project needs to run in a single package. The

Re: PEP 450 Adding a statistics module to Python

2013-08-11 Thread Nicholas Cole
On Sun, Aug 11, 2013 at 12:50 PM, Skip Montanaro wrote: > > See the Rationale of PEP 450 for more reasons why “install NumPy” is not > > a feasible solution for many use cases, and why having ‘statistics’ as a > > pure-Python, standard-library package is desirable. > > I read that before posting

Re: Suggestion: PEP for popping slices from lists

2013-08-08 Thread Nicholas Cole
On Thu, Aug 8, 2013 at 2:32 PM, Neatu Ovidiu wrote: > On Thursday, August 8, 2013 4:08:13 PM UTC+3, Nicholas wrote: > > On Thu, Aug 8, 2013 at 12:50 PM, Neatu Ovidiu wrote: > > > > > > > > > > On Thursday, August 8, 2013 2:44:05 PM UTC+3, Neatu Ovidiu

Re: Suggestion: PEP for popping slices from lists

2013-08-08 Thread Nicholas Cole
On Thu, Aug 8, 2013 at 12:50 PM, Neatu Ovidiu wrote: > On Thursday, August 8, 2013 2:44:05 PM UTC+3, Neatu Ovidiu wrote: > > On Thursday, August 8, 2013 2:12:53 PM UTC+3, Nicholas wrote: > > > > > On Thu, Aug 8, 2013 at 11:38 A

Re: Suggestion: PEP for popping slices from lists

2013-08-08 Thread Nicholas Cole
On Thu, Aug 8, 2013 at 11:38 AM, Neatu Ovidiu wrote: > > > > But what's your use case? > > > > Does it occur often enough that you cannot afford a two-liner like > I think uses cases are plenty. > > The possible cases I can think of would be better served with list comprehensions (what you seem t

Re: PEP8 revised: max line lengths

2013-08-03 Thread Nicholas Cole
On Friday, 2 August 2013, Chris “Kwpolska” Warrick wrote: [snip] > > So, what are you feasting for? Nothing? I have long since ceased to be amazed at the number of people who would like their personal and arbitrary preferences, and the rationalisations that go with them, to be validated and en

Re: Switch statement

2013-03-10 Thread Nicholas Cole
On Sun, Mar 10, 2013 at 8:42 PM, Mitya Sirenef wrote: > On 03/10/2013 10:16 AM, Joseph L. Casale wrote: > >> I have a switch statement composed using a dict: >> > > > > > > switch = { > > 'a': func_a, > > 'b': func_b, > > 'c': func_c > > } > > switch.get(var, default)() > > > > > > As a result of

Re: I have issues installing pycrypto (and thus fabric) with pip

2013-01-29 Thread Nicholas Kolatsis
Thanks. I've gotten everything working now. For anyone else who comes along, 'sudo apt-get install python-dev' did the job. > > Note that Fabric is useful for much, MUCH more than this. > I look forward to finding out :) > > Off-topic: why is your virtualenv/project name so weird? > Noted.

I have issues installing pycrypto (and thus fabric) with pip

2013-01-28 Thread Nicholas Kolatsis
I'm not sure this is the right place for this but I'm don't know where else to put this. I want to give fabric a try (as recommended here: http://www.jeffknupp.com/blog/2012/10/24/starting-a-django-14-project-the-right-way/). Installing fabric results in two dependencies (paramiko and pycrypto)

Re: PyWart: Module access syntax

2013-01-12 Thread Nicholas Cole
On Fri, Jan 11, 2013 at 6:01 AM, Rick Johnson wrote: > > Python's module/package access uses dot notation. > > mod1.mod2.mod3.modN > > Like many warts of the language, this wart is not so apparent when first > learning the language. The dot seems innocently sufficient, however, in > truth it is

Re: Tarfile and usernames

2012-12-30 Thread Nicholas Cole
On Sun, Dec 30, 2012 at 8:07 PM, Albert Hopkins wrote: > > > On Sun, Dec 30, 2012, at 01:57 PM, Nicholas Cole wrote: > > Dear List, > > I'm hoping to use the tarfile module in the standard library to move some > files between computers. > > I can't see do

Tarfile and usernames

2012-12-30 Thread Nicholas Cole
would like the archives to be extracted so that the files are all owned by the extracting user. Essentially, I do *not* with to preserve the owner and groups specified in the archives. What is the right way to achieve this? Best wishes, Nicholas -- http://mail.python.org/mailman/listinfo/python-list

Re: sys.path in python3.3

2012-08-27 Thread Nicholas Cole
On Mon, Aug 27, 2012 at 10:05 AM, Ned Deily wrote: > In article <503b3247$0$6877$e4fe5...@news2.news.xs4all.nl>, > Hans Mulder wrote: >> On 26/08/12 20:47:34, Nicholas Cole wrote: >> It has been changed to >> >> ~/Library/Python/$py_version_short/lib/python/

Re: sys.path in python3.3

2012-08-27 Thread Nicholas Cole
On Mon, Aug 27, 2012 at 12:18 AM, Ned Deily wrote: > In article > , > Nicholas Cole wrote: >> It certainly does exist. Distutils will happily put packages into it, >> but import won't find them. > > That's odd! It works for me on 10.8 and it worked for

Re: sys.path in python3.3

2012-08-26 Thread Nicholas Cole
On Sun, Aug 26, 2012 at 10:23 PM, Ned Deily wrote: > In article > , > Nicholas Cole wrote: > >> On Sun, Aug 26, 2012 at 8:21 PM, Ned Deily wrote: >> > In article >> > , >> > Nicholas Cole wrote: >> >> In all previous versions of pytho

Re: sys.path in python3.3

2012-08-26 Thread Nicholas Cole
On Sun, Aug 26, 2012 at 8:21 PM, Ned Deily wrote: > In article > , > Nicholas Cole wrote: >> In all previous versions of python, I've been able to install packages >> into the path: >> >> ~/Library/Python/$py_version_short/site-packages >> >> bu

sys.path in python3.3

2012-08-26 Thread Nicholas Cole
moved? Is there a recommended way to get it back, or is this a gentle way of pushing us all to use virtualenv rather than installing user-specific packages? Best wishes, Nicholas -- http://mail.python.org/mailman/listinfo/python-list

Re: from future import pass_function

2012-07-25 Thread Nicholas Cole
f it were a built-in function, you would be able to override it, and then there would be chaos. Best, Nicholas -- http://mail.python.org/mailman/listinfo/python-list

Re: Maintaining Multiple Copies of Python (Linux)

2012-05-30 Thread Nicholas Fitzkee
On Wednesday, May 30, 2012 7:55:33 PM UTC-5, Ben Finney wrote: > The consensus solution for this is ‘virtualenv’ > http://pypi.python.org/pypi/virtualenv>. > > It is so popular as a solution for the kinds of problems you describe > that its functionality will come into core Python, as discussed i

Re: 'string_escape' in python 3

2012-04-07 Thread Nicholas Cole
On Sat, Apr 7, 2012 at 12:10 AM, Ian Kelly wrote: import codecs codecs.getdecoder('unicode_escape')(s)[0] > 'Hello: this is a test' > > Cheers, > Ian Thanks, Ian. I had assumed that if a unicode string didn't have a .decode method, then I couldn't use a decoder on it, so it hadn't occu

'string_escape' in python 3

2012-04-06 Thread Nicholas Cole
In Python 2 given the following raw string: >>> s = r"Hello\x3a this is a test" the escaping could be removed by use of the following: >>> s.decode('string_escape') In Python 3, however, the only way I can see to achieve the same result is to convert into a byte stream and then back: >>> bytes

Re: Dialog boxes in curses

2011-08-13 Thread Nicholas Cole
ave dialog boxes (a message with Yes/No/Cancel options, >> possibly with keyboard accels) in python + curses. >> >> Does anyone have a pointer to docs about this? >> >> Thanks! Or have a look at code.google.com/p/npyscreen Nicholas -- http://mail.python.org/mailman/listinfo/python-list

Re: What is the best book to learn Python from Perl and C++ background

2011-03-06 Thread Nicholas Devenish
On 04/03/2011 17:49, Ignoramus20691 wrote: I bought a "Hello World!" book for my 9 year old son. The book teached "programming for kids" and it does it in Python. I do not know any Python, but I am very comfortable with C++ and perl. I wrote a little over 100k lines of perl. I want to learn Pyt

Re: Fun with 'str' and 'bytes'

2011-03-06 Thread Nicholas Devenish
On 04/03/2011 16:40, nn wrote: As far as I know, that is pretty much it. Also see: http://bugs.python.org/issue3982 That is a depressing bug report, and really comes across as people who don't use networking commenting on the requirements of people who write networking code. It's good to s

Re: OT: Code Examples

2011-03-01 Thread Nicholas Devenish
On 01/03/2011 09:24, Richard Dobson wrote: But - I am ~still~ caught out by the semantic significance of indenting. Looks OK enough on paper, but doing it interactively is another matter. I still don't fully understand this argument. With Python, I am still doing indentation almost exactly the

Re: Problems of Symbol Congestion in Computer Languages

2011-02-19 Thread Nicholas Devenish
On 18/02/2011 10:26, Steven D'Aprano wrote: Agreed. I'd like Python to support proper mathematical symbols like ∞ for float('inf'), ≠ for not-equal, ≤ for greater-than-or-equal, and ≥ for less-than-or-equal. This would be joyful! At least with the subset of operations that already exist/exis

Re: Problems of Symbol Congestion in Computer Languages

2011-02-19 Thread Nicholas Devenish
On 19/02/2011 07:41, Westley Martínez wrote: Simply remove 'dvorak-' to get qwerty. It allows you to use the right Alt key as AltGr. For example: AltGr+' i = í AltGr+c = ç AltGr+s = ß I don't work on Windows or Mac enough to have figured out how to do on those platforms, but I'm sure there's a s

  1   2   >