Can I run a python program from within emacs?

2009-11-01 Thread Robinson
I have also just started with both Aquamacs and Python so I ask for your patience as well. When I evaluate the buffer (C-c C-C) I don't see any response or output from my python program. Should another buffer open automatically? Should a terminal window open? thanks for your patience. Rugbei

Re: Can I run a python program from within emacs?

2009-11-01 Thread Robinson
On Nov 1, 2009, at 9:15 AM, Jason Sewall wrote: On Sun, Nov 1, 2009 at 9:20 AM, Robinson wrote: I have also just started with both Aquamacs and Python so I ask for your patience as well. When I evaluate the buffer (C-c C-C) I don't see any response or output from my python program.

Re: Negative array indicies and slice()

2012-10-29 Thread Andrew Robinson
Ok, hopefully this is better. I love my own e-mail editor... I can see that the slice() function can pass in arbitrary arguments. I'm not sure for lists, which is what the range is applied to, why an argument like "a" would be part of a slice. I *really* don't see what the advantage of a slice

Re: Negative array indicies and slice()

2012-10-29 Thread Andrew Robinson
On 10/29/2012 04:32 AM, Chris Angelico wrote: I wonder if what the OP is looking for is not slicing, but something more akin to map. Start with a large object and an iterator that produces keys, and create an iterator/list of their corresponding values. Something like: a=[1,2,3,4,5,6,7,8,9,10]

Re: Negative array indicies and slice()

2012-10-29 Thread Andrew Robinson
On 10/29/2012 04:19 AM, Steven D'Aprano wrote: On Mon, 29 Oct 2012 00:54:29 -0700, Andrew wrote: Slices and iterators have different purposes and therefore have not been made interchangeable. Yes, there are certain similarities between a slice and xrange, but there are also significant differenc

Re: I need help installing pypng in Python 3.3

2012-10-29 Thread Andrew Robinson
On 10/29/2012 05:23 AM, icgwh wrote: Hello all, I am very new to python. I am currently porting a little project of mine from java to python and I need to be able to construct and write png images. I naturally turned myself toward pypng to accomplish this. I don't know if this will help, but:

Re: I need help installing pypng in Python 3.3

2012-10-29 Thread Andrew Robinson
On 10/29/2012 06:39 AM, ic...@tagyourself.com wrote: That's very kind of you but I don't think it would be particularly fitted to my needs. The program I'm trying to code creates an image as an 2D array of "pixels" which is defined by RGBA value. My program needs to access and modifies every co

Re: Negative array indicies and slice()

2012-10-29 Thread Andrew Robinson
On 10/29/2012 06:52 AM, Roy Smith wrote: Show me an example where someone would write a slice with a negative and a positive index (both in the same slice); and have that slice grab a contiguous slice in the *middle* of the list with orientation of lower index to greater index. It's possible in b

Re: Negative array indicies and slice()

2012-10-29 Thread Andrew Robinson
On 10/29/2012 10:09 AM, Ian Kelly wrote: On Oct 29, 2012 7:10 AM, "Andrew Robinson" wrote: I will be porting Python 3.xx to a super low power embedded processor (MSP430), both space and speed are at a premium. Running Python on top of Java would be a *SERIOUS* mistake. .NET won&#

Re: Negative array indicies and slice()

2012-10-29 Thread Andrew Robinson
On 10/29/2012 06:53 AM, Chris Angelico wrote: Can you provide links to these notes? I'm looking at cpython/Include/sliceobject.h that has this comment: /* A slice object containing start, stop, and step data members (the names are from range). After much talk with Guido, it was decided to let

Re: Negative array indicies and slice()

2012-10-29 Thread Andrew Robinson
On 10/29/2012 05:02 PM, Steven D'Aprano wrote: On Mon, 29 Oct 2012 08:42:39 -0700, Andrew Robinson wrote: But, why can't I just overload the existing __getitem__ for lists and not bother writing an entire class? You say that as if writing "an entire class" was a big co

Re: Negative array indicies and slice()

2012-10-29 Thread Andrew Robinson
On 10/29/2012 06:49 PM, Chris Kaynor wrote: Every Python object requires two pieces of data, both of which are pointer-sized (one is a pointer, one is an int the size of a pointer). These are: a pointer to the object's type, and the object's reference count. A tuple actually does not need a hea

Re: Negative array indicies and slice()

2012-10-29 Thread Andrew Robinson
Hi Ian, There are several interesting/thoughtful things you have written. I like the way you consider a problem before knee jerk answering. The copying you mention (or realloc) doesn't re-copy the objects on the list. It merely re-copies the pointer list to those objects. So lets see what it w

Re: Negative array indicies and slice()

2012-10-29 Thread Andrew Robinson
On 10/29/2012 04:01 PM, Ian Kelly wrote: On Mon, Oct 29, 2012 at 9:20 AM, Andrew Robinson wrote: FYI: I was asking for a reason why Python's present implementation is desirable... I wonder, for example: Given an arbitrary list: a=[1,2,3,4,5,6,7,8,9,10,11,12] Why would someone *want*

Re: Negative array indicies and slice()

2012-10-30 Thread Andrew Robinson
On 10/29/2012 10:53 PM, Michael Torrie wrote: On 10/29/2012 01:34 PM, Andrew Robinson wrote: No, I don't think it big and complicated. I do think it has timing implications which are undesirable because of how *much* slices are used. In an embedded target -- I have to optimize; and I will

Re: Negative array indicies and slice()

2012-10-30 Thread Andrew Robinson
On 10/29/2012 11:51 PM, Ian Kelly wrote: On Mon, Oct 29, 2012 at 4:39 PM, Andrew Robinson As above, you're looking at the compiler code, which is why you're finding things like "line" and "column". The tuple struct is defined in tupleobject.h and stores tuple e

Re: Negative array indicies and slice()

2012-10-30 Thread Andrew Robinson
On 10/30/2012 11:02 AM, Ian Kelly wrote: On Tue, Oct 30, 2012 at 10:14 AM, Ethan Furman wrote: File a bug report? Looks like it's already been wontfixed back in 2006: http://bugs.python.org/issue1501180 Thanks, IAN, you've answered the first of my questions and have been a great help. (And y

Re: Negative array indicies and slice()

2012-10-30 Thread Andrew Robinson
On 10/30/2012 01:17 AM, Steven D'Aprano wrote: By the way Andrew, the timestamps on your emails appear to be off, or possibly the time zone. Your posts are allegedly arriving before the posts you reply to, at least according to my news client. :D -- yes, I know about that problem. Every time I r

Re: Negative array indicies and slice()

2012-10-30 Thread Andrew Robinson
On 10/30/2012 04:48 PM, Mark Lawrence wrote: On 30/10/2012 15:47, Andrew Robinson wrote: I would refer you to a book written by Steve Maguire, Writing Solid Code; Chapter 5; Candy machine interfaces. The book that took a right hammering here http://accu.org/index.php?module=bookreviews

RE: Negative array indicies and slice()

2012-10-30 Thread Andrew Robinson
Ian, > Looks like it's already been wontfixed back in 2006: > http://bugs.python.org/issue1501180 Absolutely bloody typical, turned down because of an idiot. Who the hell is Tim Peters anyway? > I don't really disagree with him, anyway. It is a rather obscure bug > -- is it worth increasi

Re: Negative array indicies and slice()

2012-10-31 Thread Andrew Robinson
On 10/30/2012 10:29 PM, Michael Torrie wrote: As this is the case, why this long discussion? If you are arguing for a change in Python to make it compatible with what this fork you are going to create will do, this has already been fairly thoroughly addressed earl on, and reasons why the semant

Re: Negative array indicies and slice()

2012-10-31 Thread Andrew Robinson
On 10/31/2012 02:20 PM, Ian Kelly wrote: On Wed, Oct 31, 2012 at 7:42 AM, Andrew Robinson wrote: Then; I'd note: The non-goofy purpose of slice is to hold three data values; They are either numbers or None. These *normally* encountered values can't create a memory lo

Re: Negative array indicies and slice()

2012-11-01 Thread Andrew Robinson
On 11/01/2012 07:12 AM, Ethan Furman wrote: Andrew Robinson wrote: On 10/31/2012 02:20 PM, Ian Kelly wrote: On Wed, Oct 31, 2012 at 7:42 AM, Andrew Robinson wrote: Then; I'd note: The non-goofy purpose of slice is to hold three data values; They are either numbers or None.

Re: Negative array indicies and slice()

2012-11-01 Thread Andrew Robinson
On 11/01/2012 12:07 PM, Ian Kelly wrote: On Thu, Nov 1, 2012 at 5:32 AM, Andrew Robinson wrote: H was that PEP the active state of Python, when Tim rejected the bug report? Yes. The PEP was accepted and committed in March 2006 for release in Python 2.5. The bug report is from June

Re: Negative array indicies and slice()

2012-11-02 Thread Andrew Robinson
Hi Ian, I apologize for trying your patience with the badly written code example. All objects were meant to be ThirdParty(), the demo was only to show how a slice() filter could have been applied for the reasons PEP357 made index() to exist. eg: because numpy items passed to __getitems__ via

Memory profiling: Python 3.2

2012-11-02 Thread Andrew Robinson
When Python3.2 is running, is there an easy way within Python to capture the *total* amount of heap space the program is actually using (eg:real memory)? And how much of that heap space is allocated to variables ( including re-capturable data not yet GC'd ) ? -- http://mail.python.org/mail

Fwd: Re: Negative array indicies and slice()

2012-11-03 Thread Andrew Robinson
Forwarded to python list: Original Message Subject:Re: Negative array indicies and slice() Date: Sat, 03 Nov 2012 15:32:04 -0700 From: Andrew Robinson Reply-To: andr...@r3dsolutions.com To: Ian Kelly <> On 11/01/2012 05:32 PM, Ian Kelly wrote:

Re: Multi-dimensional list initialization

2012-11-04 Thread Andrew Robinson
On 11/04/2012 10:27 PM, Demian Brecht wrote: So, here I was thinking "oh, this is a nice, easy way to initialize a 4D matrix" (running 2.7.3, non-core libs not allowed): m = [[None] * 4] * 4 The way to get what I was after was: m = [[None] * 4, [None] * 4, [None] * 4, [None * 4]] FYI: The b

Re: Multi-dimensional list initialization

2012-11-04 Thread Andrew Robinson
On 11/04/2012 11:27 PM, Chris Angelico wrote: On Mon, Nov 5, 2012 at 6:07 PM, Chris Rebert wrote: x = None x.a = 42 Traceback (most recent call last): File "", line 1, in AttributeError: 'NoneType' object has no attribute 'a' Python needs a YouGottaBeKiddingMeError for times when you do so

Re: Multi-dimensional list initialization

2012-11-05 Thread Andrew Robinson
On 11/05/2012 06:30 PM, Oscar Benjamin wrote: On 6 November 2012 02:01, Chris Angelico wrote: On Tue, Nov 6, 2012 at 12:32 PM, Oscar Benjamin wrote: I was just thinking to myself that it would be a hard thing to change because the list would need to know how to instantiate copies of all the

Re: Multi-dimensional list initialization

2012-11-06 Thread Andrew Robinson
On 11/05/2012 10:07 PM, Chris Angelico wrote: On Tue, Nov 6, 2012 at 4:51 PM, Andrew Robinson wrote: I really don't think doing a shallow copy of lists would break anyone's program. Well, it's a change, a semantic change. It's almost certainly going to break _something_.

Re: Multi-dimensional list initialization

2012-11-06 Thread Andrew Robinson
On 11/06/2012 06:35 AM, Oscar Benjamin wrote: > In general, people don't use element multiplication (that I have *ever* seen) to make lists where all elements of the outer most list point to the same sub-*list* by reference. The most common use of the multiplication is to fill an array with

Re: Multi-dimensional list initialization

2012-11-06 Thread Andrew Robinson
On 11/06/2012 09:32 AM, Prasad, Ramit wrote: Ian Kelly wrote: On Tue, Nov 6, 2012 at 1:21 AM, Andrew Robinson [snip] See if you can find *any* python program where people desired the multiplication to have the die effect that changing an object in one of the sub lists -- changes all the

Re: Multi-dimensional list initialization

2012-11-06 Thread Andrew Robinson
On 11/06/2012 01:19 AM, Ian Kelly wrote: On Tue, Nov 6, 2012 at 1:21 AM, Andrew Robinson If you nest it another time; [[[None]]]*4, the same would happen; all lists would be independent -- but the objects which aren't lists would be refrenced-- not copied. a=[[["alpha","be

Re: Multi-dimensional list initialization

2012-11-06 Thread Andrew Robinson
On 11/06/2012 01:04 AM, Steven D'Aprano wrote: On Mon, 05 Nov 2012 21:51:24 -0800, Andrew Robinson wrote: The most compact notation in programming really ought to reflect the most *commonly* desired operation. Otherwise, we're really just making people do extra typing for no reas

Re: Multi-dimensional list initialization

2012-11-07 Thread Andrew Robinson
Hi IAN! On 11/06/2012 03:52 PM, Ian Kelly wrote: On Tue, Nov 6, 2012 at 3:41 PM, Andrew Robinson The objection is not nonsense; you've merely misconstrued it. If [[1,2,3]] * 4 is expected to create a mutable matrix of 1s, 2s, and 3s, then one would expect [[{}]] * 4 to create a mutable m

Re: Multi-dimensional list initialization

2012-11-07 Thread Andrew Robinson
On 11/06/2012 05:55 PM, Steven D'Aprano wrote: On Tue, 06 Nov 2012 14:41:24 -0800, Andrew Robinson wrote: Yes. But this isn't going to cost any more time than figuring out whether or not the list multiplication is going to cause quirks, itself. Human psychology *tends* (it&#x

Re: Multi-dimensional list initialization

2012-11-07 Thread Andrew Robinson
On 11/06/2012 10:56 PM, Demian Brecht wrote: My question was *not* based on what I perceive to be intuitive (although most of this thread has now seemed to devolve into that and become more of a philosophical debate), but was based on what I thought may have been inconsistent behaviour (which w

Re: Multi-dimensional list initialization

2012-11-07 Thread Andrew Robinson
On 11/07/2012 05:39 AM, Joshua Landau wrote: On 7 November 2012 11:11, Oscar Benjamin wrote: On Nov 7, 2012 5:41 AM, "Gregory Ewing" wrote: > > If anything is to be done in this area, it would be better > as an extension of list comprehensions, e.g. > > [[None times

Re: Multi-dimensional list initialization

2012-11-07 Thread Andrew Robinson
On 11/07/2012 01:01 PM, Ian Kelly wrote: On Wed, Nov 7, 2012 at 12:51 PM, Andrew Robinson wrote: Interesting, you avoided the main point "lists are copied with list multiplication". It seems that each post is longer than the last. If we each responded to every point made, this th

Re: Multi-dimensional list initialization

2012-11-07 Thread Andrew Robinson
On 11/07/2012 03:39 PM, Ian Kelly wrote: Why? Just to get rid of an FAQ? :-) Here's one of the more interesting uses from my own code: OK, and is this a main use case? (I'm not saying it isn't I'm asking.) Replacing the list multiplication in that function with a list comprehension would b

Re: Multi-dimensional list initialization

2012-11-07 Thread Andrew Robinson
On 11/07/2012 04:00 PM, Steven D'Aprano wrote: Andrew, it appears that your posts are being eaten or rejected by my ISP's news server, because they aren't showing up for me. Possibly a side- effect of your dates being in the distant past? Date has been corrected since two days ago. It will remai

Re: Multi-dimensional list initialization

2012-11-08 Thread Andrew Robinson
On 11/07/2012 11:09 PM, Ian Kelly wrote: On Wed, Nov 7, 2012 at 8:13 PM, Andrew Robinson wrote: OK, and is this a main use case? (I'm not saying it isn't I'm asking.) I have no idea what is a "main" use case. Well, then we can't evaluate if it's worth k

Re: Preventing tread collisions

2012-12-13 Thread Andrew Robinson
On 12/12/2012 12:29 PM, Dave Angel wrote: On 12/12/2012 03:11 PM, Wanderer wrote: I have a program that has a main GUI and a camera. In the main GUI, you can manipulate the images taken by the camera. You can also use the menu to check the camera's settings. Images are taken by the camera in a s

Re: Running a python script under Linux

2012-12-13 Thread Andrew Robinson
On 12/13/2012 06:45 PM, Steven D'Aprano wrote: I understand this is not exactly a Python question, but it may be of interest to other Python programmers, so I'm asking it here instead of a more generic Linux group. I have a Centos system which uses Python 2.4 as the system Python, so I set an al

Re: Running a python script under Linux

2012-12-13 Thread Andrew Robinson
On 12/13/2012 06:45 PM, Steven D'Aprano wrote: What am I doing wrong? By the way, I didn't include command line parameters as part of the function definition, so you might want to add them to insure it acts like a generic alias. Also, (alternately), you could define a generic python shell

Re: where to view open() function's C implementation source code ?

2012-12-18 Thread Andrew Robinson
On 12/18/2012 07:03 AM, Chris Angelico wrote: On Wed, Dec 19, 2012 at 1:28 AM, Roy Smith wrote: In article, iMath wrote: Download the source for the version you're interested in. but which python module is open() in ? I met you half-way, I showed you where the source code is. Now you ne

Vote tallying...

2013-01-18 Thread Andrew Robinson
Hi, I have a problem which may fit in a mysql database, but which I only have python as an alternate tool to solve... so I'd like to hear some opinions... I'm building a experimental content management program on a standard Linux Web server. And I'm needing to keep track of archived votes an

Re: Vote tallying...

2013-01-18 Thread Andrew Robinson
On 01/18/2013 08:47 AM, Stefan Behnel wrote: Andrew Robinson, 18.01.2013 00:59: I have a problem which may fit in a mysql database Everything fits in a MySQL database - not a reason to use it, though. Py2.5 and later ship with sqlite3 and if you go for an external database, why use MySQL if

XML/XHTML/HTML differences, bugs... and howto

2013-01-23 Thread Andrew Robinson
Good day :), I've been exploring XML parsers in python; particularly: xml.etree.cElementTree; and I'm trying to figure out how to do it incrementally, for very large XML files -- although I don't think the problems are restricted to incremental parsing. First problem: I've come across an iss

Re: XML/XHTML/HTML differences, bugs... and howto

2013-01-23 Thread Andrew Robinson
On 01/24/2013 06:42 AM, Stefan Behnel wrote: Andrew Robinson, 23.01.2013 16:22: Good day :), Nope, you should read the manual on this. Here's a tutorial: http://lxml.de/tutorial.html#elements-contain-text I see, so it should be under the "tail" attribute, not the "text&

XML validation / exception.

2013-01-24 Thread Andrew Robinson
A quick question: On xml.etree, When I scan in a handwritten XML file, and there are mismatched tags -- it will throw an exception. and the exception will contain a line number of the closing tag which does not have a mate of the same kind. Is there a way to get the line number of the earlier

Re: Hey, I'm new to python so don't judge.

2017-01-03 Thread Callum Robinson
When i check the code it comes up with invalid syntax and my writing line gets re directed here def is_same(target, number: if target == number: result="win" elif target > number: result="low" else: result="high" return result --

Re: Hey, I'm new to python so don't judge.

2017-01-03 Thread Callum Robinson
On Wednesday, January 4, 2017 at 1:03:18 PM UTC+13, Erik wrote: > On 03/01/17 23:56, Chris Angelico wrote: > > On Wed, Jan 4, 2017 at 10:49 AM, wrote: > >> #think of a number > >> computer_number = number.randint(1,100) > > > > What's wrong is that you aren't showing us the exception you get on >

Re: Hey, I'm new to python so don't judge.

2017-01-03 Thread Callum Robinson
On Wednesday, January 4, 2017 at 1:17:11 PM UTC+13, Chris Angelico wrote: > On Wed, Jan 4, 2017 at 11:03 AM, Erik wrote: > > I doubt it's getting that far (I can see at least one syntax error in the > > code pasted). > > True true. In any case, the point is to copy and paste the error > message.

Re: Hey, I'm new to python so don't judge.

2017-01-03 Thread Callum Robinson
On Wednesday, January 4, 2017 at 1:26:26 PM UTC+13, Erik wrote: > Hi Callum, > > On 04/01/17 00:02, Callum Robinson wrote: > > When i check the code it comes up with invalid syntax and my writing > line gets re directed here > > > > def is_same(target, number: &g

Re: Hey, I'm new to python so don't judge.

2017-01-03 Thread Callum Robinson
On Wednesday, January 4, 2017 at 1:26:26 PM UTC+13, Erik wrote: > Hi Callum, > > On 04/01/17 00:02, Callum Robinson wrote: > > When i check the code it comes up with invalid syntax and my writing > line gets re directed here > > > > def is_same(target, number: &g

Re: Hey, I'm new to python so don't judge.

2017-01-03 Thread Callum Robinson
On Wednesday, January 4, 2017 at 1:45:22 PM UTC+13, Erik wrote: > Hi Callum, > > On 04/01/17 00:30, Callum Robinson wrote: > > I feel like im missing something so blatantly obvious. > > That's because you are ;). I don't want to come across as patronising,

Re: Hey, I'm new to python so don't judge.

2017-01-03 Thread Callum Robinson
On Wednesday, January 4, 2017 at 2:16:08 PM UTC+13, Steve D'Aprano wrote: > On Wed, 4 Jan 2017 12:04 pm, Callum Robinson wrote: > > > Traceback (most recent call last): > > File "D:/Python/random.py", line 6, in > > computer_number = number.randint(

Re: Hey, I'm new to python so don't judge.

2017-01-03 Thread Callum Robinson
On Wednesday, January 4, 2017 at 12:49:28 PM UTC+13, Callum Robinson wrote: > Im doing a new task from my teacher but i can't seem to find what is wrong > with this code. Can anyone help? > > #mynumber.py > # this game uses a home made function > import random

Re: Hey, I'm new to python so don't judge.

2017-01-03 Thread Callum Robinson
On Wednesday, January 4, 2017 at 3:05:48 PM UTC+13, MRAB wrote: > On 2017-01-04 01:37, Callum Robinson wrote: > > On Wednesday, January 4, 2017 at 12:49:28 PM UTC+13, Callum Robinson wrote: > >> Im doing a new task from my teacher but i can't seem to find what is wrong &

Re: Hey, I'm new to python so don't judge.

2017-01-03 Thread Callum Robinson
On Wednesday, January 4, 2017 at 3:35:53 PM UTC+13, Erik wrote: > On 04/01/17 02:24, Callum Robinson wrote: > > On Wednesday, January 4, 2017 at 3:05:48 PM UTC+13, MRAB wrote: > >> What values can 'is_same' return? > >> > >> Which of those values are y

Re: Hey, I'm new to python so don't judge.

2017-01-05 Thread Callum Robinson
On Wednesday, January 4, 2017 at 1:17:11 PM UTC+13, Chris Angelico wrote: > On Wed, Jan 4, 2017 at 11:03 AM, Erik wrote: > > I doubt it's getting that far (I can see at least one syntax error in the > > code pasted). > > True true. In any case, the point is to copy and paste the error > message. C

Re: Hey, I'm new to python so don't judge.

2017-01-05 Thread Callum Robinson
When i check the code it comes up with invalid syntax and my writing line gets re directed here def is_same(target, number: if target == number: result="win" elif target > number: result="low" else: result="high" return result -

Re: Hey, I'm new to python so don't judge.

2017-01-05 Thread Callum Robinson
On Wednesday, January 4, 2017 at 1:26:26 PM UTC+13, Erik wrote: > Hi Callum, > > On 04/01/17 00:02, Callum Robinson wrote: > > When i check the code it comes up with invalid syntax and my writing > line gets re directed here > > > > def is_same(target, number: &g

Re: Hey, I'm new to python so don't judge.

2017-01-06 Thread Callum Robinson
On Wednesday, January 4, 2017 at 1:03:18 PM UTC+13, Erik wrote: > On 03/01/17 23:56, Chris Angelico wrote: > > On Wed, Jan 4, 2017 at 10:49 AM, wrote: > >> #think of a number > >> computer_number = number.randint(1,100) > > > > What's wrong is that you aren't showing us the exception you get on >

Re: Hey, I'm new to python so don't judge.

2017-01-06 Thread Callum Robinson
On Wednesday, January 4, 2017 at 2:16:08 PM UTC+13, Steve D'Aprano wrote: > On Wed, 4 Jan 2017 12:04 pm, Callum Robinson wrote: > > > Traceback (most recent call last): > > File "D:/Python/random.py", line 6, in > > computer_number = number.randint(

Re: Hey, I'm new to python so don't judge.

2017-01-06 Thread Callum Robinson
On Wednesday, January 4, 2017 at 1:26:26 PM UTC+13, Erik wrote: > Hi Callum, > > On 04/01/17 00:02, Callum Robinson wrote: > > When i check the code it comes up with invalid syntax and my writing > line gets re directed here > > > > def is_same(target, number: &g

Re: Hey, I'm new to python so don't judge.

2017-01-06 Thread Callum Robinson
On Wednesday, January 4, 2017 at 12:49:28 PM UTC+13, Callum Robinson wrote: > Im doing a new task from my teacher but i can't seem to find what is wrong with this code. Can anyone help? > > #mynumber.py > # this game uses a home made function > import random &g

Re: Hey, I'm new to python so don't judge.

2017-01-06 Thread Callum Robinson
On Wednesday, January 4, 2017 at 1:45:22 PM UTC+13, Erik wrote: > Hi Callum, > > On 04/01/17 00:30, Callum Robinson wrote: > > I feel like im missing something so blatantly obvious. > > That's because you are ;). I don't want to come across as patronising, > but

Re: Hey, I'm new to python so don't judge.

2017-01-06 Thread Callum Robinson
On Wednesday, January 4, 2017 at 3:05:48 PM UTC+13, MRAB wrote: > On 2017-01-04 01:37, Callum Robinson wrote: > > On Wednesday, January 4, 2017 at 12:49:28 PM UTC+13, Callum Robinson wrote: > >> Im doing a new task from my teacher but i can't seem to find what is wrong wit

Re: Hey, I'm new to python so don't judge.

2017-01-06 Thread Callum Robinson
On Wednesday, January 4, 2017 at 3:35:53 PM UTC+13, Erik wrote: > On 04/01/17 02:24, Callum Robinson wrote: > > On Wednesday, January 4, 2017 at 3:05:48 PM UTC+13, MRAB wrote: > >> What values can 'is_same' return? > >> > >> Which of those values are y

installer question

2005-12-08 Thread Guy Robinson
Target audience is little or no programming experience. I have a win32 only library I need to write an installer for. As part of the installation it must: 1.. find where a program is installed 2.. copy a file to the directory 3.. add the directory to the pythonpath and change a ini file. 4.. add

Re: The Industry choice

2005-01-07 Thread Scott Robinson
hat your code also be (L)GPL'ed. Changes to >the core library must still be released under (L)GPL, but application >code which merely *uses* the library does not. (I've forgotten, now, >exactly how LGPL defines this distinction...) > >Jeff Shannon >Technician/Programmer >Credit International Scott Robinson -- http://mail.python.org/mailman/listinfo/python-list

getting a class attribute using a keyword argument

2005-01-17 Thread Guy Robinson
Hello, I have a list of class instances. I wish to get the appropriate class attribute in each class instance depending on a SINGLE keyword in the calling class. How do I get the calling method to correctly recognise the keyword as a keyword and not a class attribute? See example code below (whi

Re: python and gpl

2005-01-31 Thread Scott Robinson
owed by the author is going to get you into trouble. IANAL, but from what I can remember about earlier licensing issues, any code specific for a GPLed library (especially "import") will get you into to trouble. Having a non-free library with an identical API and issuing exec("

howto load and unload a module

2005-06-24 Thread Guy Robinson
Hello, I have a directory of python scripts that all (should) contain a number of attributes and methods of the same name. I need to import each module, test for these items and unload the module. I have 2 questions. 1.. How do unload an imported module? 2.. how do I test for the existance of

Re: howto load and unload a module

2005-06-24 Thread Guy Robinson
> > Why would you want to? Doing what you describe doesn't require that you > "unload" a module, unless that means something more to you than, say, > merely releasing the memory used by it (which is likely insignificant to > you). > Hi Peter, I have an application with Python embedded. I'm

Re: howto load and unload a module

2005-06-24 Thread Guy Robinson
> BTW, question for the OP: what on earth is the use-case for this? Bulk > checking of scripts written by students? > > Cheers, > John I've embedded python in an application which has a .NET API. So users can write scripts in python that access the .NET API. Because of the way the API works r

Re: python for microcontrollers

2005-08-08 Thread Guy Robinson
How about just helping this project: http://pyastra.sourceforge.net/ I know he's trying to rewrite it to work across multiple uC's (AVR,msp430 etc) HTH, Guy Evil Bastard wrote: > Hi all, > > I'm currently tackling the problem of implementing a python to assembler > compiler for PIC 18Fxxx mic

Re: Big development in the GUI realm

2005-02-09 Thread Scott Robinson
ses "his" GPL, version-whatever. > >Anyway, your safe bet: > >Follow the copyright holder's wishes. > >That's fair. After all, it's free, so they're doing you a damn >big favor. > >C// Scott Robinson -- http://mail.python.org/mailman/listinfo/python-list

Re: pyGoogle is fun and easy to use, and thinks Python is the best programming language

2005-02-24 Thread Andy Robinson
Regrettably, inserting "Visual Basic" into the list produces a different winner. I think you want some very subtle hard coding which limits it to on-space-delimited languages :-( - Andy -- http://mail.python.org/mailman/listinfo/python-list

Re: Tuple index

2005-02-25 Thread Scott Robinson
e you understand how overloading works (I'm pretty sure overloading isn't covered in that book). In short, I think that this book is a good introduction to programming, and it will explain the basics of python, but it doesn't really begin to explain how to program in python. Scott Robinson -- http://mail.python.org/mailman/listinfo/python-list

Python COM API binding job offer

2005-03-02 Thread Guy Robinson
st. [EMAIL PROTECTED] Regards, Guy Robinson -- http://mail.python.org/mailman/listinfo/python-list

creating .NET clients with python

2005-03-03 Thread Guy Robinson
Hello, Can anyone confirm if there is a python library that can allow me to create .NET clients in python. My understanding is both IronPython and python for .NET can't create python .net clients? Regards, Guy -- http://mail.python.org/mailman/listinfo/python-list

Re: creating .NET clients with python

2005-03-03 Thread Guy Robinson
%3D1%26searchnow%3DSearch+this+group%26&_doneTitle=Back+to+Search&&d#445f2052948d93e2 Cheers, --Alan Guy Robinson wrote: Hello, Can anyone confirm if there is a python library that can allow me to create .NET clients in python. My understanding is both IronPython and python for .

ANN: ReportLab Toolkit - Release 1.20

2004-11-30 Thread Andy Robinson
details are here: http://www.reportlab.org/relnotes.html Best Regards, Andy Robinson CEO/Chief Architect ReportLab Europe Ltd tel +44-20-8544-8049 -- http://mail.python.org/mailman/listinfo/python-list

UK Python Conference - 20-23 April 2005 - Call for papers

2004-12-09 Thread Andy Robinson
--- Best Regards Andy Robinson CEO/Chief Architect ReportLab Europe Ltd tel +44-20-8544-8049 -- http://mail.python.org/mailman/listinfo/python-list

Re: GPL and Python modules.

2004-12-16 Thread Scott Robinson
be careful in taking legal advise from Richard Stallman. The GPL merely states that*: 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: After that, all notion of "derived work" falls on the appropriate copyright law of the country in question. I suspect that following Stallman's verdicts won't cause you to violate the GPL, but I would hardly be willing to be certain about going to court over a GPLed module imported into an unfree python program. Scott Robinson * note that I believe that this is fair use. According to the GPL, you can only distribute it unmodified. -- http://mail.python.org/mailman/listinfo/python-list

Re: Socket being garbage collected too early

2004-12-17 Thread Scott Robinson
On 16 Dec 2004 20:38:29 -0500, David Bolen <[EMAIL PROTECTED]> wrote: >Scott Robinson <[EMAIL PROTECTED]> writes: > >> I have been having trouble with the garbage collector and sockets. > >Are you actually getting errors or is this just theoretical? > >>

Re: BASIC vs Python

2004-12-17 Thread Scott Robinson
On Fri, 17 Dec 2004 15:00:54 -0600, Mike Meyer <[EMAIL PROTECTED]> wrote: >"not [quite] more i squared" <[EMAIL PROTECTED]> writes: > >> Adam DePrince wrote: >> Given the hardware constraints of the early 1980s, which language do you think should have been used instead of BASIC? >>> Lisp >

Socket being garbage collected too early

2004-12-16 Thread Scott Robinson
rbage, not to declare something not garbage). Scott Robinson -- http://mail.python.org/mailman/listinfo/python-list

Re: BASIC vs Python

2004-12-18 Thread Scott Robinson
On Fri, 17 Dec 2004 20:41:11 -0600, Mike Meyer <[EMAIL PROTECTED]> wrote: >Scott Robinson <[EMAIL PROTECTED]> writes: > >> Forth seems better than basic, but is *weird* (I tried it for a >> while). I'm not sure going from Forth to C (or Python) would be much

Re: BASIC vs Python

2004-12-18 Thread Scott Robinson
On Fri, 17 Dec 2004 20:41:11 -0600, Mike Meyer <[EMAIL PROTECTED]> wrote: >Scott Robinson <[EMAIL PROTECTED]> writes: > >> Forth seems better than basic, but is *weird* (I tried it for a >> while). I'm not sure going from Forth to C (or Python) would be much

Re: BASIC vs Python

2004-12-21 Thread Scott Robinson
it after it crashed. Forth was still there. It certainly is useful for a hardware independent bios, but I was making the point it would be good for general purpose. I suspect that it would quickly run up against memory limitations and would go no faster than the machine driving the memory m

Re: What's the best GUI toolkit in Python,Tkinter,wxPython,QT,GTK?

2005-03-28 Thread Scott Robinson
honCard seems to like to stick to basics, but also includes a certain ability to get to the rest of wxPython (file/save/message dialogs are pretty easy to include). Note that my only other experience in building GUIs was with visual basic, which seems to have spoiled me. I tried wxPython and Tinker, but could only really get PythonCard to work. Scott Robinson -- http://mail.python.org/mailman/listinfo/python-list

Tutorial at Python-UK, Oxford, 19 May - handful of places left

2005-04-08 Thread Andy Robinson
to attend should directly contact the organisers, Archer Yates Associates, whose details are on the bottom left corner of the page. Best Regards Andy Robinson UK Python Conference program chair -- http://mail.python.org/mailman/listinfo/python-list

Python consulting opportunity

2005-04-25 Thread Gary Robinson
ant. If this sounds like an opportunity you'd be interested in, or if you know of someone who might be a match, please let us know. Thanks, Gary -- Gary Robinson CTO Emergent Music, LLC [EMAIL PROTECTED] 207-942-3463 Company: http://www.goombah.com Blog:http://www.garyrobinson.

Re: OOP

2005-04-28 Thread Scott Robinson
On Thu, 28 Apr 2005 17:58:47 GMT, Charles Krug <[EMAIL PROTECTED]> wrote: >On 28 Apr 2005 10:34:44 -0700, [EMAIL PROTECTED] ><[EMAIL PROTECTED]> wrote: >> Hey yall, >> I'm new to Python and I love it. Now I can get most of the topics >> covered with the Python tutorials I've read but the one thats

install issue

2015-12-07 Thread John Robinson
When I run the installer (python-3.5.0.exe [win32]) I see this: There seems to be "hidden" buttons as clicking in the middle of this dialog box does continue the process. However, when complete, and I start python, I get an error saying its not a valid win32 application. So, I uninstall

  1   2   >