mulit-dimensional lists

2009-02-28 Thread Ms FRANCES SIMS
Hi, I;m not sure how I got your address but I could use a friend . Please reply and we can talk. I would like that. Good day, Joe Pyne-- http://mail.python.org/mailman/listinfo/python-list

Re: setting PYTHONPATH to override system wide site-packages

2009-02-28 Thread Carl Banks
On Feb 28, 9:18 pm, per wrote: > On Feb 28, 11:53 pm, per wrote: > > > > > On Feb 28, 11:24 pm, Carl Banks wrote: > > > > On Feb 28, 7:30 pm, per wrote: > > > > > hi all, > > > > > i recently installed a new version of a package using python setup.py > > > > install --prefix=/my/homedir on a sy

Re: What's so wrong about execfile?

2009-02-28 Thread Michele Simionato
On Feb 28, 4:21 am, Sammo wrote: > Given that execfile has been removed in py3k execfile has not been really removed, it is just spelled differently: >>> exec(open(myfile.py).read()) BTW, from the help message >>> help(exec) Help on built-in function exec in module builtins: exec(...) exe

file locking...

2009-02-28 Thread bruce
Hi. Got a bit of a question/issue that I'm trying to resolve. I'm asking this of a few groups so bear with me. I'm considering a situation where I have multiple processes running, and each process is going to access a number of files in a dir. Each process accesses a unique group of files, and th

Re: i have problem with glob.glob() in remotely directory

2009-02-28 Thread Tim Roberts
lameck kassana wrote: > >i did try but still not working.But also i try os.walk() for remote >computer like os.walk('\\192.168.0.45') it also failed> Of course it did, for two different reasons. First, you can't just walk an IP address. You have to specify one of the shares that the machine e

Re: setting PYTHONPATH to override system wide site-packages

2009-02-28 Thread per
On Feb 28, 11:53 pm, per wrote: > On Feb 28, 11:24 pm, Carl Banks wrote: > > > > > On Feb 28, 7:30 pm, per wrote: > > > > hi all, > > > > i recently installed a new version of a package using python setup.py > > > install --prefix=/my/homedir on a system where i don't have root > > > access. the

Re: Creating Zip file like java jar file

2009-02-28 Thread zaheer . agadi
On Mar 1, 1:32 am, "Gabriel Genellina" wrote: > En Sat, 28 Feb 2009 16:51:04 -0200, escribió: > > > > > On Feb 28, 11:33 pm, Lie Ryan wrote: > >> zaheer.ag...@gmail.com wrote: > >> > On Feb 28, 11:15 pm, "Gabriel Genellina" > >> > wrote: > >> >> En Sat, 28 Feb 2009 14:34:15 -0200, > >> escribi

Re: setting PYTHONPATH to override system wide site-packages

2009-02-28 Thread per
On Feb 28, 11:24 pm, Carl Banks wrote: > On Feb 28, 7:30 pm, per wrote: > > > hi all, > > > i recently installed a new version of a package using python setup.py > > install --prefix=/my/homedir on a system where i don't have root > > access. the old package still resides in /usr/lib/python2.5/si

Re: setting PYTHONPATH to override system wide site-packages

2009-02-28 Thread Carl Banks
On Feb 28, 7:30 pm, per wrote: > hi all, > > i recently installed a new version of a package using python setup.py > install --prefix=/my/homedir on a system where i don't have root > access. the old package still resides in /usr/lib/python2.5/site- > packages/ and i cannot erase it. > > i set my

Re: Proposed implementation for an Ordered Dictionary

2009-02-28 Thread Michele Simionato
On Mar 1, 1:43 am, Paul Rubin wrote: > "Colin J. Williams" writes: > > >      # print [mydict[x] for x in sorted(mydict.keys)] Instance object > > is not iterable > > It was a typo.  Use: > >     print [mydict[x] for x in sorted(mydict.keys())] Even better print [m

Re: OTish: convince the team to drop VBScript

2009-02-28 Thread Carl Banks
On Feb 28, 7:10 pm, Shane Geiger wrote: > >> The company does use Python on rare occasions. It all comes down to > >> the prejudices and habits of one of the programmers. His only argument > >> I can't counter -because I don't see the problem- is that "Python > >> modules cause problems for update

setting PYTHONPATH to override system wide site-packages

2009-02-28 Thread per
hi all, i recently installed a new version of a package using python setup.py install --prefix=/my/homedir on a system where i don't have root access. the old package still resides in /usr/lib/python2.5/site- packages/ and i cannot erase it. i set my python path as follows in ~/.cshrc setenv PYT

Re: OTish: convince the team to drop VBScript

2009-02-28 Thread Shane Geiger
The company does use Python on rare occasions. It all comes down to the prejudices and habits of one of the programmers. His only argument I can't counter -because I don't see the problem- is that "Python modules cause problems for updates to customer's installations". This is purely an a

Re: Email Program

2009-02-28 Thread Shane Geiger
J wrote: Is it possible to make a GUI email program in Python that stores emails, composes, ect? Also, could I create my own programming language in Python? What are Pythons limits, or is this just a waste of my time to learn it. Python is "Turing complete," which means it is a general-purpo

Re: why cannot assign to function call

2009-02-28 Thread Tim Roberts
Ethan Furman wrote: > >Specifically, how is a new name (pbr) different, in Python, from a new >name initialized as if by assignment (pbv)? It seems to me than you end >up with the same thing in either case (in Python, at least), making the >distinction non-existent. > >def func(bar): > bar

Re: Email Program

2009-02-28 Thread Lie Ryan
J wrote: > Is it possible to make a GUI email program in Python that stores > emails, composes, ect? Also, could I create my own programming > language in Python? What are Pythons limits, or is this just a waste > of my time to learn it. > -- > http://mail.python.org/mailman/listinfo/python-list >

Re: Email Program

2009-02-28 Thread Christian Heimes
Thomas Raef wrote: > What a great response. It's a correct, straight forward and short answer to the op's question. Christian -- http://mail.python.org/mailman/listinfo/python-list

RE: Email Program

2009-02-28 Thread Thomas Raef
What a great response. > -Original Message- > From: python-list-bounces+traef=ebasedsecurity@python.org > [mailto:python-list-bounces+traef=ebasedsecurity@python.org] On > Behalf Of MRAB > Sent: Saturday, February 28, 2009 8:00 PM > To: python-list@python.org > Subject: Re: Email P

Email Program

2009-02-28 Thread J
Is it possible to make a GUI email program in Python that stores emails, composes, ect? Also, could I create my own programming language in Python? What are Pythons limits, or is this just a waste of my time to learn it. -- http://mail.python.org/mailman/listinfo/python-list

Re: Email Program

2009-02-28 Thread MRAB
J wrote: Is it possible to make a GUI email program in Python that stores emails, composes, ect? Yes. -- http://mail.python.org/mailman/listinfo/python-list

Email Program

2009-02-28 Thread J
Is it possible to make a GUI email program in Python that stores emails, composes, ect? -- http://mail.python.org/mailman/listinfo/python-list

Re: OTish: convince the team to drop VBScript

2009-02-28 Thread Lie Ryan
Christian R. wrote: > The company does use Python on rare occasions. It all comes down to > the prejudices and habits of one of the programmers. His only argument > I can't counter -because I don't see the problem- is that "Python > modules cause problems for updates to customer's installations".

Re: Bug report: ClientForm

2009-02-28 Thread Lie Ryan
MRAB wrote: > Muddy Coder wrote: >> Hi Folks, >> >> When it parses a form, if the VALUE of a field has not space, it works >> very well. For example, if a dropdown list, there many options, such >> as: >> >> >> >> the value foo will be picked up for sure. But, if there is a space: >> >>

Re: Proposed implementation for an Ordered Dictionary

2009-02-28 Thread Paul Rubin
"Colin J. Williams" writes: > # print [mydict[x] for x in sorted(mydict.keys)] Instance object > is not iterable It was a typo. Use: print [mydict[x] for x in sorted(mydict.keys())] -- http://mail.python.org/mailman/listinfo/python-list

Re: Proposed implementation for an Ordered Dictionary

2009-02-28 Thread Colin J. Williams
Steven D'Aprano wrote: Colin J. Williams wrote: Sometimes, it's useful to be able to obtain the data in the sorted sequence. You might consider adding functionality like: def seqItems(self): '''To return the items, sorted by key. ''' return [self[k] for k in self.seqKeys()] Amazingly, the P

Re: Bug report: ClientForm

2009-02-28 Thread Gabriel Genellina
En Sat, 28 Feb 2009 21:01:56 -0200, Muddy Coder escribió: By the way, can somebody helps me on setting parameter of uploading a file. In ClientForm, if I need to upload a text file, I can do it by: form.add_file(..., "text/plain") What about a picture file? What is the counterpart of 'text/

Re: Static Map

2009-02-28 Thread Andrew MacIntyre
KMCB wrote: Hello, I'm interested in creating a static map of a region in the US. This map would be set into a picture format, so I can add it to a document. I would like it to contain some town names and road information. Then I would like to add points, based on LAT and LONG, that can be la

Re: Bug report: ClientForm

2009-02-28 Thread MRAB
Muddy Coder wrote: Hi Folks, As directed, I got ClientForm and played with it. It is cool! However, I also found a bug: When it parses a form, if the VALUE of a field has not space, it works very well. For example, if a dropdown list, there many options, such as: the value foo will be p

Bug report: ClientForm

2009-02-28 Thread Muddy Coder
Hi Folks, As directed, I got ClientForm and played with it. It is cool! However, I also found a bug: When it parses a form, if the VALUE of a field has not space, it works very well. For example, if a dropdown list, there many options, such as: the value foo will be picked up for sure. Bu

Re: How best to test functions which use date.today

2009-02-28 Thread Scott David Daniels
Lie Ryan wrote: Yuan HOng wrote: In my project I have several date related methods which I want tested for correctness. The functions use date.today() in several places. Since this could change every time I run the test, I hope to find someway to fake a date.today. For illustration lets say I ha

Re: Creating Zip file like java jar file

2009-02-28 Thread rdmurray
zaheer.ag...@gmail.com wrote: > On Feb 28, 11:33 pm, Lie Ryan wrote: > > zaheer.ag...@gmail.com wrote: > > > On Feb 28, 11:15 pm, "Gabriel Genellina" > > > wrote: > > >> En Sat, 28 Feb 2009 14:34:15 -0200, escribi= > =F3: > > > > >>> I want to create zip file equivalent to java jar file,I create

Re: How best to test functions which use date.today

2009-02-28 Thread Gabriel Genellina
En Sat, 28 Feb 2009 15:35:47 -0200, Yuan HOng escribió: In my project I have several date related methods which I want tested for correctness. The functions use date.today() in several places. Since this could change every time I run the test, I hope to find someway to fake a date.today. For

Re: How best to test functions which use date.today

2009-02-28 Thread rdmurray
Christian Heimes wrote: > Lie Ryan wrote: > >> But this fails with: > >> > >> TypeError: can't set attributes of built-in/extension type > >> 'datetime.date' > > > > This is because today is an attribute. In python, we can override > > attribute access to become a function call. I don't have pyth

Re: Creating Zip file like java jar file

2009-02-28 Thread Gabriel Genellina
En Sat, 28 Feb 2009 16:51:04 -0200, escribió: On Feb 28, 11:33 pm, Lie Ryan wrote: zaheer.ag...@gmail.com wrote: > On Feb 28, 11:15 pm, "Gabriel Genellina" > wrote: >> En Sat, 28 Feb 2009 14:34:15 -0200, escribió: >>> I want to create zip file equivalent to java jar file,I created a zi

OTish: convince the team to drop VBScript

2009-02-28 Thread rdmurray
"Christian R." wrote: > The company does use Python on rare occasions. It all comes down to > the prejudices and habits of one of the programmers. His only argument > I can't counter -because I don't see the problem- is that "Python > modules cause problems for updates to customer's installations"

TypeErrors

2009-02-28 Thread rdmurray
Sean Novick wrote: > First lookup: > Traceback (most recent call last): >File "F:\CSC113 Module 4 CA\sample database.py", line 72, in >class phonedb: >File "F:\CSC113 Module 4 CA\sample database.py", line 146, in phonedb >for entry i

Re: why cannot assign to function call

2009-02-28 Thread rdmurray
Mark Wooding wrote: > Ethan Furman writes: > > > Mark Wooding wrote: > >> Here's what I think is the defining property of pass-by-value [...]: > >> > >> The callee's parameters are /new variables/, initialized /as if by > >> assignment/ from the values of caller's argument expressions. > >>

Re: c.Win32_OperatingSystem question.

2009-02-28 Thread Tim Golden
bryan rasmussen wrote: Maybe there's a more specific list I should ask this question on but I don't know what it is. I'm using Tim Golden's wmi stuff, and putting my output into an XML document. I have the following bit of code [.. snip ...] At the end of that thhe only text node thaht comes

Static Map

2009-02-28 Thread KMCB
Hello, I'm interested in creating a static map of a region in the US. This map would be set into a picture format, so I can add it to a document. I would like it to contain some town names and road information. Then I would like to add points, based on LAT and LONG, that can be labeled with inf

Re: TypeErrors

2009-02-28 Thread Benjamin Kaplan
On Sat, Feb 28, 2009 at 12:24 PM, Sean Novick wrote: > I'm having issues with a phone-number database. > Here is a code snippet: > def menu(): > > print '''Please make a selection from the following options: > To add an Employee - enter: 1 > > For a complete listing of Em

Re: Data Coding suggestions

2009-02-28 Thread Kurt Smith
On Sat, Feb 28, 2009 at 10:08 AM, steven.oldner wrote: > > Thanks guys.  While shopping today I've thought of a few more columns > for my data so my first item will be building the 3 DB tables and a > way to populate them.  Since this was intended to automate what I do > on a weekly basis, I didn

KeyedList

2009-02-28 Thread pataphor
The ordered dictionary discussion made me think of another data type which seems to be somewhat related, a kind of ordered dictionary where the order of the items is arbitrary. One can insert items in the middle and still have O(1) access (I think). I have provided a very basic implementation, it c

Python alternatives to Text::SimpleTable?

2009-02-28 Thread Ray Van Dolson
So I'm looking for an easy (read: lazy) way to generate output in nice ASCII tables like the Text::SimpleTable[1] module in perl. I've come across two so far in the Python world that look promising[2][3] but I'm wondering if anyone else out there has some recommendations for me. Thanks, Ray [1]

Re: What's so wrong about execfile?

2009-02-28 Thread James Matthews
It is considered one of the big holes in PHP (Remote file include...) However in Python things can be done securely On Sat, Feb 28, 2009 at 7:15 AM, Carl Banks wrote: > On Feb 27, 7:21 pm, Sammo wrote: > > Given that execfile has been removed in py3k, I want to understand > > exactly why. > > >

Re: OTish: convince the team to drop VBScript

2009-02-28 Thread Christian Heimes
Christian R. schrieb: > Hello, > > Brand new to this list, I've not found a quick way to search the > archives, and this is not a technical question. > > I've just been hired at a digital signage company. They use VBScript > for simple-to-medium scripting. I've abandoned it about 8 years ago. I >

Re: ANN: updates to Python-by-example

2009-02-28 Thread James Matthews
Thanks for adding this. I needed to show someone some examples... On Fri, Feb 27, 2009 at 5:35 PM, steven.oldner wrote: > On Feb 27, 8:40 am, pyt...@bdurham.com wrote: > > Rainy, > > > > Great stuff! Thanks for your examples with the community!! > > > > Regards, > > Malcolm > > Let me add my than

Re: Creating Zip file like java jar file

2009-02-28 Thread zaheer . agadi
On Feb 28, 11:33 pm, Lie Ryan wrote: > zaheer.ag...@gmail.com wrote: > > On Feb 28, 11:15 pm, "Gabriel Genellina" > > wrote: > >> En Sat, 28 Feb 2009 14:34:15 -0200, escribió: > > >>> I want to create zip file equivalent to java jar file,I created a zip > >>> file of my sources and added some __

OTish: convince the team to drop VBScript

2009-02-28 Thread Christian R.
Hello, Brand new to this list, I've not found a quick way to search the archives, and this is not a technical question. I've just been hired at a digital signage company. They use VBScript for simple-to-medium scripting. I've abandoned it about 8 years ago. I want to convince the manager and the

Re: How best to test functions which use date.today

2009-02-28 Thread Christian Heimes
Lie Ryan wrote: >> But this fails with: >> >> TypeError: can't set attributes of built-in/extension type >> 'datetime.date' > > This is because today is an attribute. In python, we can override > attribute access to become a function call. I don't have python right > now, but try this: > > del da

Re: Creating Zip file like java jar file

2009-02-28 Thread Lie Ryan
zaheer.ag...@gmail.com wrote: > On Feb 28, 11:15 pm, "Gabriel Genellina" > wrote: >> En Sat, 28 Feb 2009 14:34:15 -0200, escribió: >> >>> I want to create zip file equivalent to java jar file,I created a zip >>> file of my sources and added some __main__.py >>> it says __Main__.py not found in Co

Re: Creating Zip file like java jar file

2009-02-28 Thread zaheer . agadi
On Feb 28, 11:15 pm, "Gabriel Genellina" wrote: > En Sat, 28 Feb 2009 14:34:15 -0200, escribió: > > > I want to create zip file equivalent to java jar file,I created a zip > > file of my sources and added some __main__.py > > it says __Main__.py not found in Copyproject.zip..? > > __main__.py mus

Re: Creating Zip file like java jar file

2009-02-28 Thread Gabriel Genellina
En Sat, 28 Feb 2009 14:34:15 -0200, escribió: I want to create zip file equivalent to java jar file,I created a zip file of my sources and added some __main__.py it says __Main__.py not found in Copyproject.zip..? __main__.py must exist in the root directory. -- Gabriel Genellina -- http://

Re: How best to test functions which use date.today

2009-02-28 Thread Lie Ryan
Yuan HOng wrote: HI, In my project I have several date related methods which I want tested for correctness. The functions use date.today() in several places. Since this could change every time I run the test, I hope to find someway to fake a date.today. For illustration lets say I have a functi

Re: c.Win32_OperatingSystem question.

2009-02-28 Thread bryan rasmussen
oh I noticed the problem with the BuildNumber = et.SubElement(oper.BuildNumber) instead of BuildNumber = str(oper.BuildNumber) and fixed it. No improvement in results however. Best Regards, Bryan Rasmussen On Sat, Feb 28, 2009 at 6:38 PM, bryan rasmussen wrote: > Maybe there's a more specific l

Re: Delete all items in the list

2009-02-28 Thread Terry Reedy
Steven D'Aprano wrote: Big Oh notation is good for estimating asymptotic behaviour, which means it is good for predicting how an algorithm will scale as the size of the input increases. It is useless for predicting how fast that algorithm will run, since the actual speed depends on those constan

c.Win32_OperatingSystem question.

2009-02-28 Thread bryan rasmussen
Maybe there's a more specific list I should ask this question on but I don't know what it is. I'm using Tim Golden's wmi stuff, and putting my output into an XML document. I have the following bit of code root = et.Element("locations") ComputerInfo = et.SubElement(root, "ComputerInfo")

How best to test functions which use date.today

2009-02-28 Thread Yuan HOng
HI, In my project I have several date related methods which I want tested for correctness. The functions use date.today() in several places. Since this could change every time I run the test, I hope to find someway to fake a date.today. For illustration lets say I have a function: from datetime

TypeErrors

2009-02-28 Thread Sean Novick
I'm having issues with a phone-number database. Here is a code snippet:  def menu():         print '''Please make a selection from the following options:     To add an Employee - enter: 1         For a complete listing of Employees - enter: 2     To see the 'test page' an

Creating Zip file like java jar file

2009-02-28 Thread zaheer . agadi
Hi, I want to create zip file equivalent to java jar file,I created a zip file of my sources and added some __main__.py some how I am getting an error saying __main.py does not exist in the zip file Copyproject(main folder) | |_src(folder) | | | |__N

Re: Proposed implementation for an Ordered Dictionary

2009-02-28 Thread Steven D'Aprano
Colin J. Williams wrote: > Sometimes, it's useful to be able to > obtain the data in the sorted sequence. > > You might consider adding functionality > like: > > def seqItems(self): > '''To return the items, sorted > by key. ''' > return [self[k] for k in > self.seqKeys()] Amazingly, the Python

Re: Data Coding suggestions

2009-02-28 Thread steven.oldner
On Feb 27, 2:04 pm, Rick Dooling wrote: > On Feb 27, 6:42 am, "steven.oldner" wrote: > > > Just learning Python and have a project to create a weekly menu and a > > shopping list from the menu.   > > Question:  How should I set up the data?  I'm looking at maybe 70 menu > > items and maybe 1000 i

Re: Delete all items in the list

2009-02-28 Thread Steven D'Aprano
Chris Rebert wrote: > Obviously that equivalence is true, but in this case I'm emphasizing > that it's even worse than that when constant factors are taken into > account. Big-O is nice in the abstract, but in the real-world those > constant factors can matter. > > In pure big-O, it is indeed O(M

Re: Proposed implementation for an Ordered Dictionary

2009-02-28 Thread Colin J. Williams
Raymond Hettinger wrote: [Paul Rubin] Ehh, I guess I'm not surprised at the slowdown and extra complexity from the second dict. Oh well. If the module really turns out to be really used a lot, another (messy) approach would be to write a C extension that uses a doubly linked list some day. T

Re: Queries

2009-02-28 Thread mmcclaf
So basically you are complaining that groups don't pick up post by GMail users? As for the SQL thing, you still don't see how I am linking this to SQL? I have to make in your terms: a textual representation of the statements I'd make in SQL. The statement I made with the bold SELECT, etc, replace

Re: why cannot assign to function call

2009-02-28 Thread Mark Wooding
Ethan Furman writes: > Mark Wooding wrote: >> Here's what I think is the defining property of pass-by-value [...]: >> >> The callee's parameters are /new variables/, initialized /as if by >> assignment/ from the values of caller's argument expressions. >> >> My soundbite definition for pass-b

Re: Proposed implementation for an Ordered Dictionary

2009-02-28 Thread python
>> A sort of premature pessimization, then. QOTW! +1 Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Re: Using xreadlines

2009-02-28 Thread Nick Craig-Wood
bearophileh...@lycos.com wrote: > Brett Hedges: > > My question is how do I go to a previous line in the file? xreadlines has a > > file.next() statement that gives the next line, and I need a statement that > > gives me the previous line.< > > In modern versions of Python you usually don't n

Re: Delete all items in the list

2009-02-28 Thread Clarendon
Thank you very much for all your replies. I actually used the while loop as the data is not large. But I was looking for a simpler, built in command, something like L.remove('a', all) or L.removeall('a'). Python has re.findall function, but why not removeall, so users have to make up long lines of

Re: what does this mean....?

2009-02-28 Thread zaheer . agadi
On Feb 28, 1:50 pm, Ben Finney wrote: > "Gabriel Genellina" writes: > > En Sat, 28 Feb 2009 04:44:28 -0200, escribió: > > > > One question off the topic., > > > Usually it's better to post a separate message. > > More specifically (and I only say this because many people seem not to > observe th

Re: what does this mean....?

2009-02-28 Thread Ben Finney
"Gabriel Genellina" writes: > En Sat, 28 Feb 2009 04:44:28 -0200, escribió: > > > One question off the topic., > > Usually it's better to post a separate message. More specifically (and I only say this because many people seem not to observe the distinction), when starting an entirely new top

Issues using SOAP/WSDL with HTTPS

2009-02-28 Thread Good Z
Hello all, I am new to SOAP/WebServices and getting error when using HTTPS with it. Any help is appreciated. here is what i am doing: import xml import fpconst import SOAPpy from SOAPpy import WSDL wsdlFile = 'https://..com/webService.wsdl' server = WSDL.Proxy(wsdlFile) It seems th

Re: what does this mean....?

2009-02-28 Thread Gabriel Genellina
En Sat, 28 Feb 2009 04:44:28 -0200, escribió: One question off the topic., Usually it's better to post a separate message. How to create a .pyz file. I have python project that has some modules in it , I want to create a zip file so that I can use it as we use java jar file Like I want to d