Re: [Tutor] How to reference a wx.grid.Grid outside the methodinwhich it was created?

2008-08-11 Thread Timothy Grant
On Mon, Aug 11, 2008 at 10:40 PM, Lauren Snyder <[EMAIL PROTECTED]> wrote: > Will do! > > Thanks again, > Lauren :-) Let me just add a plug for the wx-python mailing list. it's a good place to learn if you're using wxpython. -- Stand Fast, tjg. [Timothy Grant] ___

[Tutor] hello.py: line 1: print: command not found

2008-08-11 Thread steve
Hi In order to execute python script by fedora terminal ; insert #! /bin/env python as the first line in the script. Python scripts end with a file extension of .py, as indicated above. It is also possible in Unix to automatically launch the Python interpreter without explicitly invoking it by

[Tutor] ecommerce.py

2008-08-11 Thread Christopher Spears
I am working on problem 13-11 from Core Python Programming (2nd Edition). For the problem, I am supposed to create the foundations of an e-commerce engine for a B2C business-to-consumer) retailer. I need to create a class that represents the customer called User, a class for items in inventory

Re: [Tutor] How to reference a wx.grid.Grid outside the methodinwhich it was created?

2008-08-11 Thread Lauren Snyder
Will do! Thanks again, Lauren :-) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Alan Gauld Sent: Monday, August 11, 2008 4:27 PM To: tutor@python.org Subject: Re: [Tutor] How to reference a wx.grid.Grid outside the methodinwhich it was created? <[EMAI

Re: [Tutor] Download file via HTTP GET with progress monitoring & custom headers?

2008-08-11 Thread Kent Johnson
On Mon, Aug 11, 2008 at 6:47 PM, xbmuncher <[EMAIL PROTECTED]> wrote: > Thanks Kent! > Here's what I got, works pretty well. :) Looks OK to me except this is not needed: > del fp > del tfp The variables will go out of scope when the function exits anyway. Kent __

Re: [Tutor] something is fundamentally wrong...

2008-08-11 Thread Ricardo Aráoz
Joshua Nikkel wrote: ah that was it. I had a variable named len earlier. On a restart it was fine. Thanks! Besides that you have a HUGE error!!! Your spelling! It should be : >>> s = 'supercalifragilisticoexpialidoso' :P On Sun, Aug 10, 2008 at 2:04 PM, Robert Berman <[EMAIL PROTE

Re: [Tutor] How to reference a wx.grid.Grid outside the method inwhich it was created?

2008-08-11 Thread Alan Gauld
<[EMAIL PROTECTED]> wrote Currently I am receving this error message: "NameError: global name 'myGrid' is not defined." It's an error against this statement in method #2: myGrid.SetCellValue(i, 0, myValue) As a general rule when posting to the list include the full error trace not just a su

Re: [Tutor] Download file via HTTP GET with progress monitoring & custom headers?

2008-08-11 Thread xbmuncher
Thanks Kent! Here's what I got, works pretty well. :) import urllib2 #functions def reportDownloadProgress(blocknum, bs, size): percent = int(blocknum*bs*100/size) print str(blocknum*bs ) + '/' + str(size) + 'downloaded| ' + str(percent) + '%' def httpDownload(url, filename, headers=None

Re: [Tutor] Problems with Gauge Bar.

2008-08-11 Thread Olrik Lenstra
> Including the list - please use ReplyAll. > Sorry. Pressed the wrong button. > > > Its the file that you want to scan - assuming there is a file. >> It could be a list or anything else - I don't actually know from >> your code what onScan is supposed to do! :-) > > > > Well, My code is suppose

Re: [Tutor] Problems with Gauge Bar.

2008-08-11 Thread Olrik Lenstra
> Including the list - please use ReplyAll. > Sorry. Pressed the wrong button. > > > Its the file that you want to scan - assuming there is a file. >> It could be a list or anything else - I don't actually know from >> your code what onScan is supposed to do! :-) > > > > Well, My code is suppose

Re: [Tutor] Problems with Gauge Bar.

2008-08-11 Thread Olrik Lenstra
> Including the list - please use ReplyAll. > Sorry. Pressed the wrong button. > > > Its the file that you want to scan - assuming there is a file. >> It could be a list or anything else - I don't actually know from >> your code what onScan is supposed to do! :-) > > > > Well, My code is suppose

Re: [Tutor] How to reference a wx.grid.Grid outside the method inwhich it was created?

2008-08-11 Thread lauren
It worked like a charm! Thank you so much!! Lauren > If method1 and method2 are both methods of the same class, just save > myGrid as an attribute of the class rather than having it as a local > variable in method1. I.e. > > def method1(self): > self.myGrid = ... > > def method2(self): > se

Re: [Tutor] How to reference a wx.grid.Grid outside the method inwhich it was created?

2008-08-11 Thread Kent Johnson
On Mon, Aug 11, 2008 at 12:26 PM, <[EMAIL PROTECTED]> wrote: > I have created a wx.grid.Grid attached to a panel which is attached to a > frame within one method (Method #1). Inside this method I also created a > combobox. > > When an item is selected in the combobox another method is called (i.e.

[Tutor] How to reference a wx.grid.Grid outside the method inwhich it was created?

2008-08-11 Thread lauren
I have created a wx.grid.Grid attached to a panel which is attached to a frame within one method (Method #1). Inside this method I also created a combobox. When an item is selected in the combobox another method is called (i.e. When the event is called the method is run…) Inside this method I want

Re: [Tutor] Accessing LDAP

2008-08-11 Thread Alan Gauld
"Steven L Smith" <[EMAIL PROTECTED]> wrote <% import active_directory for person in active_directory.search ("objectCategory='Person'"): Response.Write(person.displayName) %> Results in... Python ActiveX Scripting Engine error '80020009' Do you have the right access rights? Just a guess.

Re: [Tutor] Accessing LDAP

2008-08-11 Thread Steven L Smith
Hmmm... well, that worked, and the previous code snippet worked in interactive mode too... maybe there's something wrong with the user that IIS is running under? How would I give it the proper permissions? - Original Message - From: "Rudy Schockaert" <[EMAIL PROTECTED]> To: "Steven L

Re: [Tutor] Problems with Gauge Bar.

2008-08-11 Thread ALAN GAULD
Including the list - please use ReplyAll. Its the file that you want to scan - assuming there is a file. It could be a list or anything else - I don't actually know from your code what onScan is supposed to do! :-) > Well, My code is supposed to do a lot. My actual onScan looks like this: d

Re: [Tutor] Accessing LDAP

2008-08-11 Thread Rudy Schockaert
Ok, then you best stick to Tim's module. Are you running your script from a workstation or server in the forest? What I always try first in interactive mode is the following: import active_directory ad = active_directory.AD() print ad That should already show you if you can connect to AD or no

Re: [Tutor] Accessing LDAP

2008-08-11 Thread vishwajeet singh
I am not able to reproduce the problem as it works pretty fine at my end. On Mon, Aug 11, 2008 at 6:51 PM, Steven L Smith <[EMAIL PROTECTED]>wrote: > <% > import active_directory > for person in active_directory.search ("objectCategory='Person'"): >Response.Write(person.displayName) > %>

Re: [Tutor] Accessing LDAP

2008-08-11 Thread Steven L Smith
<% import active_directory for person in active_directory.search ("objectCategory='Person'"): Response.Write(person.displayName) %> Results in... Python ActiveX Scripting Engine error '80020009' Traceback (most recent call last): File "

Re: [Tutor] Accessing LDAP

2008-08-11 Thread vishwajeet singh
I have used it and it works pretty well for me.Can you show the code snippet you are trying to execute?? On Mon, Aug 11, 2008 at 6:43 PM, Steven L Smith <[EMAIL PROTECTED]>wrote: > It is indeed an active directory server, but the sysadmin tells me that it > is configured to respond to normal ldap

Re: [Tutor] Accessing LDAP

2008-08-11 Thread Steven L Smith
It is indeed an active directory server, but the sysadmin tells me that it is configured to respond to normal ldap queries as well. I tried Tim's module, and it's giving me an "operations error" when I try to use his code snippet to list users... - Original Message - From: "Rudy Schock

Re: [Tutor] Accessing LDAP

2008-08-11 Thread Rudy Schockaert
If by LDAP server you mean Active Directory, then Tim's active_directory module is certainly the way to go. If you want a more generic LDAP approach, you could give python-ldapa try. On Mon, Aug 11, 2008 at 2:17 PM, vishwajeet singh <[EMAIL PROTEC

Re: [Tutor] Accessing LDAP

2008-08-11 Thread vishwajeet singh
I think this can be of some help to you http://tgolden.sc.sabren.com/python/active_directory.html On Mon, Aug 11, 2008 at 5:44 PM, Steven L Smith <[EMAIL PROTECTED]>wrote: > Any ideas how I can pull a list of domain users from an LDAP server and use > it programmatically in a Python web applicat

[Tutor] Accessing LDAP

2008-08-11 Thread Steven L Smith
Any ideas how I can pull a list of domain users from an LDAP server and use it programmatically in a Python web application? Thanks! ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] requests/responses from urllib2

2008-08-11 Thread Kent Johnson
On Mon, Aug 11, 2008 at 2:52 AM, Eric Abrahamsen <[EMAIL PROTECTED]> wrote: The python docs say that urllib2 requires the > socket library to work, so I assume it's a socket of some sort, but I don't > really understand how that socket is addressed, from the point of view of > the third-party serve

Re: [Tutor] requests/responses from urllib2

2008-08-11 Thread Alan Gauld
"Eric Abrahamsen" <[EMAIL PROTECTED]> wrote that traffic go in and out of my server machine? The python docs say that urllib2 requires the socket library to work, so I assume it's a socket of some sort, but I don't really understand how that socket is addressed, from the point of view of the