Re: [Tutor] References in loops

2005-02-12 Thread Danny Yoo
On Fri, 11 Feb 2005, Matt Dimmic wrote: In Python, one bug that often bites me is this: (example A) aList = [1,2,3] for i in aList: i += 1 print aList -- [1,2,3] This goes against my intuition, which is that aList == [2,3,4], probably because so much in Python is passed by

Re: [Tutor] Idle needles

2005-02-12 Thread Lobster
Danny Yoo wrote: More seriously I can not run Idle and Firefox together Not quite sure what to do other than download the whole web sites? thanks for the info Danny :-) What happens if you try running both of them together? Do either of them fail to start up? Firefox and IDLE should not

[Tutor] Re: Larger program organization

2005-02-12 Thread Javier Ruere
Ryan Davis wrote: I'm starting to make a code-generation suite in python, customized to the way we ASP.NET at my company, and I'm having some trouble finding a good way to organize all the code. I keep writing it, but it feels more and more spaghetti-ish every day. I'm going to look at the

Re: [Tutor] Idle needles

2005-02-12 Thread Lobster
Danny Yoo wrote: On Sat, 12 Feb 2005, Lobster wrote: Idols subprocess didn't make connection Either Idle can't start or personal firewall is blocking the connection = Now I am getting the added message that the socket connection is refused (recently updated to the latest Zone Alarm)

[Tutor] What does this mean

2005-02-12 Thread jrlen balane
what does (*args, **kwargs) mean??? i'm sort of a bit confused... thanks. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] Re: References in loops

2005-02-12 Thread Andrei
Matt Dimmic wrote: In Python, one bug that often bites me is this: (example A) aList = [1,2,3] for i in aList: i += 1 print aList -- [1,2,3] Numbers are immutable, so the element 1 can't change into a 2 inside the list. If 1 was not immutable, e.g. a list you could modify it and then it

Re: [Tutor] Idle needles

2005-02-12 Thread Danny Yoo
On Sat, 12 Feb 2005, Lobster wrote: Idols subprocess didn't make connection Either Idle can't start or personal firewall is blocking the connection = Now I am getting the added message that the socket connection is refused (recently updated to the latest Zone Alarm) Hi Ed, That's

[Tutor] what is wrong with this?

2005-02-12 Thread jrlen balane
this code is for a MDIChildFrame, It has a MDIParentFrame and when I run the MDIPrentFrame, there seems to be no problem, but when I attempt to edit the MDIChildFrame using the designer mode in BOA (i'm using BOA by the way), an error occurs that says: TypeError: wxGrid_CreateGrid() takes at

[Tutor] Re: Data storage, SQL?

2005-02-12 Thread Sandip Bhattacharya
On Fri, 11 Feb 2005 20:09:10 +1300, Liam Clarke wrote: Hi, I'm looking to create a prog that will store disparate bits of info all linked together, i.e. address details for a person, transaction records, specific themes, and the ability to search by certain criteria, so I'm pretty sure I

Re: [Tutor] Idle needles

2005-02-12 Thread Brian van den Broek
Lobster said unto the world upon 2005-02-12 10:34: Danny Yoo wrote: On Sat, 12 Feb 2005, Lobster wrote: SNIP exchange trying to work out apparent conflict between idle and firefox Just to nail this issue down: try turning ZoneAlarm off, just for a moment, and then start up IDLE. (You can

[Tutor] Idle + Firefox solution - hopefully

2005-02-12 Thread Lobster
- closing down IDLE and pressing ctrl alt and del I notice that 3 copies of pythonw are in memory I closed these down and IDLE is working again Hi, for what it's worth, I've never had issues with Firefox and IDLE when running Zone Alarm. (Currently running ZoneAlarm version:5.5.062.004) But

Re: [Tutor] help with refactoring needed -- which approach is more Pythonic?

2005-02-12 Thread Kent Johnson
Brian van den Broek wrote: Kent Johnson said unto the world upon 2005-02-11 11:34: In general I think this is a bad design. I try to avoid telling components about their parents in any kind of containment hierarchy. If the component knows about its parent, then the component can't be reused in

Re: [Tutor] help with refactoring needed -- which approach is morePythonic?

2005-02-12 Thread Alan Gauld
It still seems to me that the actual updating of the article should be a Node method (it is the Node object's article that is being updated, after all). Yes, the owner of the data should update it. Call it node_linkify. The new thought is to create two new methods for the TP_file class: -

Re: [Tutor] Idle needles

2005-02-12 Thread Kent Johnson
Brian van den Broek wrote: But the multiple copies of pythonw seems key, and also the sort of thing that better Python minds than most seem to accept they have to live with too: http://mail.python.org/pipermail/edu-sig/2005-January/004365.html Make sure you read the next message in the thread

[Tutor] Re: References in loops

2005-02-12 Thread Brian Beck
Andrei wrote: Numbers are immutable, so the element 1 can't change into a 2 inside the list. If 1 was not immutable, e.g. a list you could modify it and then it would be updated in the original list too. It doesn't have anything to do with mutability, only the scope of i. Consider a list of

[Tutor] Downloading from http

2005-02-12 Thread Mark Kels
Hi list. How can I download a file from an HTTP server ? I checked the documentation but couldn't find what I need. Thanks! -- 1. The day Microsoft makes something that doesn't suck is probably the day they start making vacuum cleaners. 2. Unix is user friendly - it's just picky about it's

Re: [Tutor] Larger program organization

2005-02-12 Thread Kent Johnson
Ryan Davis wrote: I'm starting to make a code-generation suite in python, customized to the way we ASP.NET at my company, and I'm having some trouble finding a good way to organize all the code. I keep writing it, but it feels more and more spaghetti-ish every day. Organize your code into

Re: [Tutor] Downloading from http

2005-02-12 Thread Mark Kels
On Sat, 12 Feb 2005 09:25:10 -0500, Jacob S. [EMAIL PROTECTED] wrote: urllib or urllib2 or maybe httplib maybe? urlopen( url[, data]) Open the URL url, which can be either a string or a Request object. data should be a string, which specifies additional data to send to the

[Tutor] Idle needles

2005-02-12 Thread Lobster
[EMAIL PROTECTED] wrote: Brian van den Broek wrote: But the multiple copies of pythonw seems key, and also the sort of thing that better Python minds than most seem to accept they have to live with too: http://mail.python.org/pipermail/edu-sig/2005-January/004365.html Make sure you read

Re: ****SPAM(11.2)**** [Tutor] Larger program organization

2005-02-12 Thread Brian van den Broek
Bob Gailer said unto the world upon 2005-02-11 15:34: At 10:39 AM 2/11/2005, Ryan Davis wrote: I'm starting to make a code-generation suite in python, customized to the way we ASP.NET at my company, and I'm having some trouble finding a good way to organize all the code. My take on doing that

Re: [Tutor] Downloading from http

2005-02-12 Thread Kent Johnson
Mark Kels wrote: On Sat, 12 Feb 2005 09:25:10 -0500, Jacob S. [EMAIL PROTECTED] wrote: urllib or urllib2 or maybe httplib maybe? urlopen( url[, data]) I'm sorry, but I didn't understood a thing (maybe its because of my bad english, and mybe its because I'm just dumb :). Anyway, can you give

[Tutor] cross platform gui

2005-02-12 Thread Kim Branson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi all, i'm interested in building a gui for some code we have. I'm after pointers on gui programming, and a recommendation on a cross platform gui library, wxpython? pythoncard, qt? What do people use. Ideally i'd like something that can work on

Re: [Tutor] what is wrong with this?

2005-02-12 Thread jrlen balane
how would i find the stack trace? by the way, this is what the log says: 11:53:16: TypeError: wxGrid_CreateGrid() takes at least 3 arguments (2 given)Traceback(most recent call last): 11:53:16: TypeError: wxGrid_CreateGrid() takes at least 3 arguments (2 given) File

Re: [Tutor] what is wrong with this?

2005-02-12 Thread Liam Clarke
Yup, that's what I was after, the full error message. self.grid1.CreateGrid(100,6) val = gridc.wxGrid_CreateGrid(self, *_args, **_kwargs) try this self.grid1.CreateGrid(self, 100, 6) I'm pretty sure you have to explicitly pass self. Let me know how ya go. Regards, Liam Clarke On Sun,