Re: [Tutor] python challenges

2005-05-05 Thread Alan Gauld
> Anyone have a gentle hint, or pointer to another 'beginner' tutorial > to regular expressions? You can try the regex page in my tutorial - under advanced topics. Its not as in-depth as the how-to but it should get you to the point where the how-to makes sense... Alan G Author of the Learn to P

Re: [Tutor] XML to Python

2005-05-05 Thread Kent Johnson
Smith, Jeff wrote: > I'm able to use the built in XML parser to effect "normal" XML parsing usage > but frequently, I'm not doing anything to complicated and would simply like to translate the XML file into a more "Pythonic" structure. What's the best way to do this? Something from the standard

[Tutor] XML to Python

2005-05-05 Thread Smith, Jeff
I'm able to use the built in XML parser to effect "normal" XML parsing usage but frequently, I'm not doing anything to complicated and would simply like to translate the XML file into a more "Pythonic" structure. What's the best way to do this? Something from the standard libraries would be pr

[Tutor] Class and Scope Question

2005-05-05 Thread Tim Johnson
The following test script is kind of got me baffled: #!/usr/local/bin/python class Eval: def __getitem__(self,key): return eval(key) ##def test(): ## i = 100 ## b = ["My", "name", "is", "Tim"] ## test = "this is number %(str(i))s for a test %(' '.join(b))s" ## s = test % Eval() ##

Re: [Tutor] python challenges

2005-05-05 Thread jfouhy
Quoting Max Noel <[EMAIL PROTECTED]>: > (Also, note that however simple they may seem, one can never > completely master regular expressions. There are entire books > dedicated to the things, and when properly used, they're the most > powerful text processing tool available for any language. In

Re: [Tutor] python challenges

2005-05-05 Thread D. Hartley
It took a little bit of playing to limit it so that it got ONLY 3 cap letters on either side, but I just got the riddle and just about jumped out of my chair when it worked. Progress is possible! ha ha! On 5/5/05, Max Noel <[EMAIL PROTECTED]> wrote: > > On May 6, 2005, at 01:33, D. Hartley wrote

Re: [Tutor] python challenges

2005-05-05 Thread Max Noel
On May 6, 2005, at 01:33, D. Hartley wrote: > They do seem to be useful! But with all those special characters, it > certainly doesnt make for an easy read. I think I'm making some > progress - I got it to make me a list of all the > {uppercaseuppercaseuppercaselowercaseuppercaseuppercaseupperca

Re: [Tutor] python challenges

2005-05-05 Thread D. Hartley
They do seem to be useful! But with all those special characters, it certainly doesnt make for an easy read. I think I'm making some progress - I got it to make me a list of all the {uppercaseuppercaseuppercaselowercaseuppercaseuppercaseuppercase} chunks (477 of them?!?!) - turns out the first tim

Re: [Tutor] python challenges

2005-05-05 Thread jfouhy
Quoting "D. Hartley" <[EMAIL PROTECTED]>: > I do have one question, however. I'm on riddle 3 ("re"), and got sent > to the howto about regular expressions by the hint. But it did not > seem (at least to me) very user-friendly: or perhaps I'm just not > applying it to the problem correctly. I can s

Re: [Tutor] python challenges

2005-05-05 Thread Max Noel
On May 6, 2005, at 01:10, D. Hartley wrote: > Anyone have a gentle hint, or pointer to another 'beginner' tutorial > to regular expressions? > > Thanks! I dont want to get stuck here in the riddles! > > ~Denise I learned most of what I know about regular expressions while I was learning P

[Tutor] python challenges

2005-05-05 Thread D. Hartley
I seem to have lost the original link, but thanks to whoever posted the url for the python challenges. I've been working through them and they've made for a fun afternoon :) I even came up with a really elegant solution for #2 that I was really proud of - being new to python, very often I find pro

Re: [Tutor] help

2005-05-05 Thread Danny Yoo
On Wed, 4 May 2005 [EMAIL PROTECTED] wrote: > i need help with my wmconnect service. it keeps on losing connection > once logged on-line every 5 or 10 minutes. i have to continuosly keep > trying to make a connetion. Hello Keisha, I hope you don't mind me asking, but how is this related to P

Re: [Tutor] database applications with Python - where to start

2005-05-05 Thread Alan Gauld
Well I'm currently working on a database programmers guide for my tutorial and I'm happy to send you what I've done so far - but its only half complete. However any feedback would be good. (It assumes the use of SQLite as the actual database) Alan G. PS It'll probably be another month at least bef

[Tutor] Fwd: Fwd: Python riddles

2005-05-05 Thread D. Hartley
ha ha. ok. I figured out the riddle (the computational part), i just had calculated it myself and wondered where python came in. if I had remembered to bring my brain with me this morning, I suppose I would have thought that I could write a python script to do the math problem for me instead of a n

Re: [Tutor] Fwd: Python riddles

2005-05-05 Thread Max Noel
On May 5, 2005, at 19:39, D. Hartley wrote: > Ok, now, I'm sure this sounds like a very dumb question. But I > clicked on riddle 1, and I don't know how this thing works - "about" > didnt give a lot of extra info. Am I trying to duplicate something on > my screen that looks like the picture on

[Tutor] Fwd: Python riddles

2005-05-05 Thread D. Hartley
Ok, now, I'm sure this sounds like a very dumb question. But I clicked on riddle 1, and I don't know how this thing works - "about" didnt give a lot of extra info. Am I trying to duplicate something on my screen that looks like the picture on the monitor? If someone would give me the (probably ob

[Tutor] help

2005-05-05 Thread Bxny1971
i need help with my wmconnect service.  it keeps on losing connection once logged on-line every 5 or 10 minutes.  i have to continuosly keep trying to make a connetion. could you please help . thanks keisha ___ Tutor maillist - Tutor@python.org http

[Tutor] running a compiled module from another module

2005-05-05 Thread the New me
I need to compile what it amounts to a subroutine in the old way of looking at it. it's a module that accepts input from another module. need to run: mod-A that initializes input and output files. mod-B that acts on data from input gives output Matr mod-C module that gets (Matr) as input and ge

Re: [Tutor] Dictionary Inserts...

2005-05-05 Thread Allen John Schmidt, Jr.
Arrgh! How could I be so stupid! :) Thanks for the help! I know many things about python, but I can't believe that I didn't know that! Thanx again! ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Dictionary Inserts...

2005-05-05 Thread Max Noel
On May 5, 2005, at 16:37, Allen John Schmidt, Jr. wrote: > Ok, I have had enough. I have looked all through the python docs and I > cannot find it. How do you insert an entry into a dictionary? > The way you think it's done: >>> a = {'foo': 1, 'bar': 2} >>> a {'foo': 1, 'bar': 2} >>> a[

Re: [Tutor] Dictionary Inserts...

2005-05-05 Thread André Roberge
Allen John Schmidt, Jr. wrote: > Ok, I have had enough. I have looked all through the python docs and I > cannot find it. How do you insert an entry into a dictionary? > > Thanx! > >>> my_dict = {} >>> my_dict['new_entry'] = ['simple', 'as', 1, 2, 3] >>> my_dict {'new_entry': ['simple', 'as'

Re: [Tutor] Dictionary Inserts...

2005-05-05 Thread Eric Culpepper
Here's some quick examples: >>> dictMe = {} >>> dictMe['SomeKey'] = 'SomeValue' >>> dictMe {'SomeKey': 'SomeValue'} >>> dictMe[1] = 100 >>> dictMe {1: 100, 'SomeKey': 'SomeValue'} >>> type(dictMe) Section 5.5 of the Python tutorial covers dictionaries a little more in depth. http://docs.python.o

[Tutor] Dictionary Inserts...

2005-05-05 Thread Allen John Schmidt, Jr.
Ok, I have had enough. I have looked all through the python docs and I cannot find it. How do you insert an entry into a dictionary? Thanx! ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] database applications with Python - where to start

2005-05-05 Thread William O'Higgins
On Thu, May 05, 2005 at 02:03:30PM +0100, Barnaby Scott wrote: >Hi, this is one of those difficult questions about where to start! > >I want to create a book-keeping/accounting application for my own use >1. because I can't find any that suits me, and >2. because I want to improve and extend my kno

Re: [Tutor] Python riddles

2005-05-05 Thread Max Noel
On May 5, 2005, at 00:53, [EMAIL PROTECTED] wrote: > As seen on python-announce (via Dr Dobbs): > > http://www.pythonchallenge.com/ > > Good fun! > Very interesting indeed! I'm stuck on number 7, though -- looks like it requires the use of PIL, which I've never used before. -- Max maxnoe

[Tutor] database applications with Python - where to start

2005-05-05 Thread Barnaby Scott
Hi, this is one of those difficult questions about where to start! I want to create a book-keeping/accounting application for my own use 1. because I can't find any that suits me, and 2. because I want to improve and extend my knowledge of Python. Clearly this is going to be a database applicatio