[Tutor] make an .exe

2005-03-04 Thread David Holland
Noel Thanks for that info, I did do a search for that but I could not find anything useful Message: 3Date: Fri, 4 Mar 2005 10:11:51 +From: Max Noel <[EMAIL PROTECTED]>Subject: Re: [Tutor] Make a .exeTo: David Holland <[EMAIL PROTECTED]>Cc: tutor@python.orgMessage-ID: <[

[Tutor] Clear the text in an entry widget

2005-03-13 Thread David Holland
I have written a simple test your maths program. There is just one question, how do you clear the text in a tkinter widget ? The only way that I could do it was to create a function to create the entry widget and then have it re-created. Is there a better way. This is the way I did :- def cr

Re: [Tutor] Clear the text in an entry widget

2005-03-13 Thread David Holland
Thanks John, That works, the problem was that I had written self.answer_ent.grid.delete(0.0, END) However when I replaced the 0.0 with a 0, it worked fine. At least I found a work around but your idea is much more elegant. David --- John Fouhy <[EMAIL PROTECTED]> wrote: > David Holl

[Tutor] Livewires

2005-03-23 Thread David Holland
If you have any questions on Livewires (do you mean the Scripture Union pygame wrapper ?). We will try to help.Send instant messages to your online friends http://uk.messenger.yahoo.com ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailma

[Tutor] Using python to write games

2005-03-26 Thread David Holland
Is there any material anyone knows about how to use pure python without pygame to write games ? The reason for asking, is that although pygame is good it has the disadvantage of that your users must have pygame. It is also harder to create a stand alone .exe with python ? Send instant messages t

[Tutor] csv module not raising exception properly

2005-04-07 Thread David Rock
s anyone know why this try block doesn't catch the exception? The version of Python I am using is 2.3.3 Thanks. -- David Rock [EMAIL PROTECTED] pgprCjzYhfyU7.pgp Description: PGP signature ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] csv module not raising exception properly

2005-04-07 Thread David Rock
* Kent Johnson <[EMAIL PROTECTED]> [2005-04-07 15:28]: > David Rock wrote: > >I am trying to catch an exception from the csv module but it doesn't > >seem to be generating a proper exception because I don't seem to be able > >to catch it. Here is what I

Re: [Tutor] csv module not raising exception properly [SOLVED]

2005-04-07 Thread David Rock
* David Rock <[EMAIL PROTECTED]> [2005-04-07 15:00]: > * Kent Johnson <[EMAIL PROTECTED]> [2005-04-07 15:28]: > > David Rock wrote: > > >I am trying to catch an exception from the csv module but it doesn't > > >seem to be generating a proper exception b

[Tutor] How to obfuscate a database password.

2005-04-19 Thread David Driver
Is there a convention for obfuscating database passwords? I think that in the end there will be a script that boot-straps to zipped modules but I don't think that that is secure enough. I was thinking about asking the database lists but I think that this is more of a general question. -- ***

Re: [Tutor] How to obfuscate a database password.

2005-04-20 Thread David Driver
So I could do the folowing: Create a DB logon for each user that has permissions to just about everything. Have them log on each time. This would require an application that they could manage their passwords. I already needed an application for managing permissions within the applic

[Tutor] Building application namespaces.

2005-04-22 Thread David Driver
I have generally used python for tasks that are scripty and not appish. I have found that I don't know the language very well even though I have been scripting with it for about two years. To remedy this I am in the process of laying out a mock up for an accounting system (GL, AR, AP). This is the

Re: [Tutor] Building application namespaces.

2005-04-23 Thread David Driver
In the root script I import Common. Inside of Common's __init__.py I import the basic domain modules. Is this correct? >If I understand the setup correctly it should work. How are you importing Common? If you say >import Common >you should be able to refer to Common.sobjs. If you say >from Common

[Tutor] Name spaces again

2005-04-24 Thread David Driver
I have read the essay at and I am still having problems understanding what I need to do. Here is the structure that I am looking at: Root folder StartHere.py Common folder __init__.py sobj.py

[Tutor] Debian install problems.

2005-05-11 Thread David Driver
I don't know is this is the proper place to post this but I need some help. I am running Damn Small Linux at the moment. I enabled apt-get and adjusted the list file to use the testing branch so I could install python2.4. The apt-get went fine, I think. I didn't get and errors. When I went to inst

Re: [Tutor] Debian install problems.

2005-05-11 Thread David Driver
Thank you John and Ziyad. That is exactly what I needed to know. Thanks for the Debian resources. I didn't know that there was a list for python on Debian. On 5/11/05, John Purser <[EMAIL PROTECTED]> wrote: > David, > > If you don't get an answer here on tutor.python.o

Re: [Tutor] keylogger

2005-06-09 Thread David Holland
You might want to write a keylogger because you have Children living in your house and you might want to protect them or yourself from their stupidity. (Ie downloading music illegally or giving out their address in a chat room, ideally the logger would sit there and send you an email if someone e

[Tutor] who called the class method?

2005-06-21 Thread David Driver
Is there a way to test if a class method was called from an instance? What I am trying to do is if a method is called from the class return a commanding proxy with an mock or stub type object as the proxied object. If it is called from the instance I want to return a proxy for the instance. Does

Re: [Tutor] who called the class method?

2005-06-21 Thread David Driver
Ketn You are correct. What I will do is an instance method that calls the class method with an optional parameter. I don't know what I was thinking, I was just messing around with nested classes for the first time and kind of forgot how to program. On 6/21/05, David Driver <[EMAIL P

Re: [Tutor] who called the class method?

2005-06-21 Thread David Driver
You are right to be confused because I was as well. I was shooting for: > OR do you mean you will have an actual class method > (ie static in C++/Java speak) and want to know if the > activating message was sent to the class object or to > an instance of the class? The easiest solution was to do

[Tutor] Dict operation question.

2005-07-07 Thread David Driver
I have a function def updateit(self,**mydict): which is intended to update a dictionary self.somedict. If there are keys in mydict that are not in self.somedict I want them returned in a new dict. here is what i am doing now: errdict = dict([(a,b) for a,b in mydict.items() if not a in self.so

Re: [Tutor] Dict operation question.

2005-07-08 Thread David Driver
ast a novice's understanding. Thanks for the suggestions! I do appreciate the input. the python community is probably the best on the Internet. On 7/7/05, David Driver <[EMAIL PROTECTED]> wrote: > I have a function > ... ___ Tu

[Tutor] domain logic and avoiding setters and setters.

2005-07-11 Thread David Driver
So I have been trying to figure out how to get around doing getters and setters and still have an oo way to inherit and apply business rules. This is what I have some up with so far. Is there any better way? class RuleViolationError(Exception): def __init__(self, msg): self.msg = msg

Re: [Tutor] getopt matching incorrect options

2005-07-11 Thread David Rock
opt http://docs.python.org/lib/module-getopt.html Long options on the command line can be recognized so long as they provide a prefix of the option name that matches exactly one of the accepted options. For example, if long_options is ['foo', 'frob'], the

Re: [Tutor] domain logic and avoiding setters and setters.

2005-07-12 Thread David Driver
I appreciate your input. You are correct. I read a bunch of LoD stuff Northeastern website. It codified a bunch of things that I had been working through. But what you are not seeing (I must be terrible at this, always hard to tell how much code to post) is this chunk of code represents an idea ab

[Tutor] Decorators, I am confused.

2005-07-14 Thread David Driver
What I would like to do is something like this: class testObj(object): _rules = list() def evalRules(self): for r in _rules: r() def rule(func): if not func in func.__class__._rules: func.__class__._rules.append(func) print testis._ru

[Tutor] cPickle.load()

2005-07-16 Thread David Jimenez
d(pickle_file) print i pickle_file.close() This is what I keep on getting: Pickling lists. Unpickling lists. Traceback (most recent call last): File "/Users/davidjimenez/Documents/trypickle", line 20, in -toplevel- i=cPickle.load(pickle_file) EOFError Th

[Tutor] cPickle.load()

2005-07-18 Thread David Jimenez
d(pickle_file) print i pickle_file.close() This is what I keep on getting: Pickling lists. Unpickling lists. Traceback (most recent call last): File "/Users/davidjimenez/Documents/trypickle", line 20, in -toplevel- i=cPickle.load(pickle_file) EOFError Tha

[Tutor] Select rows and columns in excel

2005-07-27 Thread David Holland
  David Holland Yahoo! Messenger NEW - crystal clear PC to PC calling worldwide with voicemail ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Select rows and columns in excel

2005-07-28 Thread David Holland
Danny and John,   Thanks for the pointers.  As I am leaving the project where I need to do this tomorrow, I don't think I will have time to do this, but thanks for the help anyway.   DavidDanny Yoo <[EMAIL PROTECTED]> wrote: On Wed, 27 Jul 2005, David Holland wrote:> I know how to

[Tutor] dictionary question

2005-07-28 Thread David Driver
The following code: print str(dict(a=1,b=2,c=-1)) print str(dict(a=1,c=-1,b=2)) print str(dict(c=-1,a=1,b=2)) print str(dict(b=2,a=1,c=-1)) print str(dict(b=2,c=-1,a=1)) print print str(dict(a=1,b=2,c=23)) print str(dict(a=1,c=23,b=2)) print str(dict(c=23,a=1,b=2)) print str(dict(b=2,a=1,c=23)) pr

[Tutor] Extract information from an HTML table

2005-08-03 Thread David Holland
how to do this ?I suppose I could remove every second and , any better ideas ?   Thanks in advance   David To help you stay safe and secure online, we've developed the all new Yahoo! Security Centre.___ Tutor maillist - Tutor@python.org

Re: [Tutor] Extract information from an HTML table

2005-08-04 Thread David Holland
Danny,   Thanks for that I will give a go and see how it works.   David Yahoo! Messenger NEW - crystal clear PC to PC calling worldwide with voicemail ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] Getting web pages and formatting text

2005-08-04 Thread David Holland
objectid=ny where ny=1,2,3,4 etc up to 20 for example 2)  Is it possible to use python to put text into a table I don't mean an sql table I mean a text table.   When/if I get this to work I will show the results of my effort.   Thanks in advance   David   How much free photo storage do yo

Re: [Tutor] Getting web pages and formatting text

2005-08-05 Thread David Holland
Alan, Kent,   Thanks for that I will have a look and hopefully come back with a complete script next week.   DavidAlan G <[EMAIL PROTECTED]> wrote: > Two questions :-> 1) Is it possible to download to your hard drive using python > various web pages ie if the pages have the structure> http://addres

[Tutor] Get information from a web page

2005-08-08 Thread David Holland
rieve this webpage :- http://xxx.co.uk (the root page) not the page I wanted to retrieve, any ideas about to get the right page ? Thanks inadvance   David Yahoo! Messenger NEW - crystal clear PC to PC calling worldwide with voicemail ___ Tutor

Re: [Tutor] Tutor Digest, Vol 18, Issue 41

2005-08-08 Thread David Holland
Looking at the slashdot url works fine, I think the problem is because I am trying to download a page with an address of the form url.php?node=5924&pagetree=&fromid=&objectid=25586 And I only download url not url.phpetc. Is there anyway that that can be done ?   David Message: 8Date

Re: [Tutor] Design Question

2007-06-02 Thread David Hamilton
ing to see that new style is vastly improved. I'll keep working on that. Thanks again, David Brian van den Broek wrote: > [EMAIL PROTECTED] said unto the world upon 06/01/2007 10:46 AM: >> I think I may have sent an incomplete version of this question a >> moment ago (sorry).

Re: [Tutor] Engarde program was: i++

2007-06-06 Thread David Heiser
or.. def is_yes(question): while True: try: s = raw_input(question).lower()[0] if s == 'y': return True elif s == 'n': return False except: pass ## This traps the condition where a user

Re: [Tutor] Engarde program was: i++

2007-06-07 Thread David Heiser
What if the user enters "maybe". -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Alan Gauld Sent: Thursday, June 07, 2007 1:45 AM To: tutor@python.org Subject: Re: [Tutor] Engarde program was: i++ "David Heiser" <[EMAIL PROT

Re: [Tutor] Engarde program was: i++

2007-06-07 Thread David Heiser
Very nice trick. Thanks. P.S. You can still use: s = raw_input(question).lower()[:1] if s == ...: -Original Message- From: Danny Yoo [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 06, 2007 5:53 PM To: David Heiser Cc: tutor@python.org Subject: Re: [Tutor] Engarde

[Tutor] Correct use of range function..

2007-06-10 Thread David Hamilton
I just finished doing an exercise in a tutorial on the range function and while I got it to work, my answer seems ugly. I'm wondering if I'm missing something in the way I'm using the range function. The tutorial ask me to print a string backwards. My solution works, but it it just doesn't "feel

Re: [Tutor] "#!/usr/bin/env python" vs "#!/usr/local/bin/python"

2007-06-14 Thread David Duncan
using the "env" command, you have the option to input many different settings preferences before calling the python of your choice. The statement above, is a very simple choice of the python based upon the current environment, but it could be augmented very easily. I suggest that

Re: [Tutor] iterating over a sequence question..

2007-06-17 Thread David Heiser
I love this [Tutor] list. There are always new tricks that change the way I write code. And it makes me like Python more every day. I keep a script file with "notes" on the things I learn here and I refer to these notes frequently. Here are the notes I made for this thread: """ iterate/map/modu

Re: [Tutor] Hi,every one

2007-06-22 Thread David Heiser
I seldom hear anyone mention "The Quick Python Book" by Daryl Harms and Kenneth McDonald (Manning). It was the book I found most useful when I started programming Python. I still keep it nearby and refer to it occasionally as a familiar memory refresher, even though I have been writing Python cod

Re: [Tutor] Removing a file from a tar

2007-06-27 Thread David Rock
s is not supported yet, you would probably have to reopen the tarfile, write it to a new one file-by-file, excluding the ones you don't want. Messy :-( -- David Rock [EMAIL PROTECTED] ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Iterating through two lists at the same time withmanipulation..

2007-06-28 Thread David Heiser
A dictionary would work well here. Read each element of the lists into the dictionary using the integer as the key with a list of strings as the values. {1: ['A', 'AA'], 2: ['B'], 3: ['C', 'CC'], 4: ['D', 'DD']} Then output the contents in the required format. This may take more lines of code t

Re: [Tutor] Help with plugins

2007-07-03 Thread David Rock
are trying to accomplish. Can you supply an example of an "extensible application" and also a longer description of what you mean when you say "plugin." Perhaps some links to what you have looked at so far would also help to clarify? -- David Rock [EMAIL PROTECTED]

Re: [Tutor] Bundle help!

2007-07-09 Thread David Perlman
I think what you want to do is start from the beginning with two separate lists, sort each one however you want, and then either join them with zip() or simply reference them as (list1[n], list2[n]). I believe there's also a way to use zip() to separate your list of tuples into separate list

Re: [Tutor] Bundle help!

2007-07-09 Thread David Perlman
Maybe this reference will help: http://xahlee.org/perl-python/sort_list.html Just the first part of the discussion there. On Jul 9, 2007, at 9:54 AM, Sara Johnson wrote: > Sorry to be so confusing. Just realized a dumb mistake I made. It > doesn't need to be resorted alphabetically and numeri

Re: [Tutor] odd

2007-07-18 Thread David Rock
is the expected behaviour, per the documentation: http://docs.python.org/lib/built-in-funcs.html#l2h-58 -- David Rock [EMAIL PROTECTED] ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Regex Ordering

2007-07-23 Thread David Perlman
Then maybe you could write a regex that matches every regex that does not match itself. ha! sorry, couldn't resist. On Jul 23, 2007, at 11:29 AM, Bill Campbell wrote: > On Mon, Jul 23, 2007, James Hartley wrote: >> On 7/23/07, Shidan <[EMAIL PROTECTED]> wrote: >>> I'm looking for a Python mod

Re: [Tutor] Shelve del not reducing file size

2007-07-27 Thread Barton David
too stupid. But I'm just getting really disenchanted. Sorry. -Original Message- From: Kent Johnson [mailto:[EMAIL PROTECTED] Sent: 27 July 2007 13:07 To: Barton David Cc: tutor@python.org Subject: Re: [Tutor] Shelve del not reducing file size Barton David wrote: > *sigh* I'm really

Re: [Tutor] Shelve del not reducing file size

2007-07-27 Thread Barton David
27;friendliness' it once seemed to aspired to. -Original Message- From: Kent Johnson [mailto:[EMAIL PROTECTED] Sent: 27 July 2007 14:11 To: Barton David Cc: tutor@python.org Subject: Re: [Tutor] Shelve del not reducing file size If it's any solace, there is a small minority of Pyth

Re: [Tutor] Shelve del not reducing file size

2007-07-27 Thread Barton David
Eric Brunson wrote: > It seems like new programmers today expect to be spoonfed their > information like they were in grammar school. They don't know what it > is to hack a Makefile to get a package to compile or break out an RFC to > understand a protocol. If you don't understand something a

Re: [Tutor] Shelve del not reducing file size

2007-07-27 Thread Barton David
*sigh* I'm really going off Python. OK, thanks Andreas. This message has been checked for viruses but the contents of an attachment may still contain software viruses, which could damage your computer system: you are advised to perform your own checks. Email communications with the University o

[Tutor] Shelve del not reducing file size

2007-07-27 Thread Barton David
Hi, I've hit a snag with Python's shelve module. By way of example... _ from shelve import DbfilenameShelf as StoreFile import os sf=StoreFile("mytest.db",writeback=False) # but same problem if writeback=True for i in range(1): sf[str(i)]="TESTOBJECT" sf.sync() print len(sf) sf.cl

Re: [Tutor] Shelve del not reducing file size

2007-07-27 Thread Barton David
Andreas Kostyrka wrote: > Additionally, the language core is very very thought out, with glacial > enhancements. "Fixing" the standard library OTOH would involve renaming > and removing names, which would make huge collections of programs break. > Not a good thing :( Yes agreed. My comments there

Re: [Tutor] Running Python on Gentoo

2007-07-27 Thread David Rock
n" in the kernel? This would potentially be something that could happen with ANY lniux system, not just gentoo. FWIW, I am having the same problem (even though I never actually tried on this system before) :-) -- David Rock [EMAIL PROTECTED] ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Running Python on Gentoo

2007-07-27 Thread David Rock
that off. I did want it more secure :-) -- David Rock [EMAIL PROTECTED] ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Shelve del not reducing file size

2007-07-27 Thread Barton David
Eric Brunson wrote: > You seem like a smart guy that's having a bad day, so I'm cutting you > slack. Thanks Eric. Yes I did indeed have a bad day (and it got much much worse), and this is most definitely a case of a bad workman blaming his tools. I apologise to all concerned for voicing my frustr

[Tutor] Installation of Django on Mac Tiger

2007-08-10 Thread David Handel
ango on my MacBook Pro but I think that I have simply failed to get Python to see the Django module. Thanks, David Handel ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Installation of Django on Mac Tiger

2007-08-11 Thread David Handel
Thanks Kent. It worked. What a simple fix when you know what you are doing. There are so many people out there complaining that they spent days setting up Django on Mac Tiger. Hopefully newbies will find this post when they're feeling "terminal". Cheers, David On 8/10/07, Kent

[Tutor] Python Book Recommendations

2007-08-14 Thread David Handel
e subjects from many sources and to be able to cut and paste code right into your IDE and run it. Even a few months of immersion reading is worth it to get up and running. David Handel ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] or synxtax in if statement

2007-08-31 Thread David Bear
I think I want to be lazy and express this if a == b | a = c (if a equal b or a equals c) using if a == b | c it seems to work.. but I'm not sure if it is correct -- and I haven't seen any documentation on using this type of syntax. -- -- David Bear College of Public Programs

[Tutor] Condensing Some Massive Code

2007-09-02 Thread David Millar
Hello. I'm working on a text adventure game right now, and I seem to be kind of stuck. There's a huge chunk of code called moreaction() that pulls scripted events for certain locations. It's ever-changing so I'm not looking for specifics, but can anyone suggest good ways to clean up or condense the

[Tutor] unicode encoding hell

2007-09-05 Thread David Bear
31: ordinal not in range(128) Clearly, I completely do not understand how unicode is working here. Can anyone enlighten me? -- David Bear College of Public Programs at Arizona State University ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] getting iteration level

2007-09-06 Thread David Bear
object I can ask? -- David Bear College of Public Programs at Arizona State University ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] making math problems mmmm fun

2007-09-11 Thread David Perlman
Also keep in mind that if you want your code to work, your grammar and punctuation in code has to be absolutely flawless. Writing English well is excellent practice for writing code well; writing English poorly is excellent practice for writing code poorly. You get what you pay for. If you

Re: [Tutor] automate daily tasks

2007-09-11 Thread David Perlman
As far as making something run automatically at various times, if you're certain that you want to do it in a Mac-only way, Apple's recommended method for timing jobs is described here: http://developer.apple.com/macosx/launchd.html "Getting started with launchd" otherwise use cron or at, as Tom

Re: [Tutor] vi and python

2007-09-14 Thread David Millar
Hi Bhaaluu and LadyNikon, I'm not exactly sure what you mean by Python support, but since I do most of my coding in plain text editors anyway I have had no trouble using vi/vim to edit/code. It's extremely useful for when my laptop is on battery mode - I have a terminal profile setup to be mostly

[Tutor] (no subject)

2007-09-20 Thread david lazaro
hi, im relatively new to this, im on chapter 2 of the python book and its asking me to print version 2.0 of "Game over" by using keyboard art, but when i draw out "over" is comes up half cut off, any reasons why that would happen?

[Tutor] (no subject)

2007-09-20 Thread david lazaro
er in half. _ Capture your memories in an online journal! http://www.reallivemoms.com?ocid=TXT_TAGHM&loc=us# David Lazaro # Game Over Version 2.0 # Demonstrates the use of quotes in strings print "Program 

[Tutor] File Writing Permission?

2007-10-07 Thread David Millar
]) mapchanges.append([6,2,treemap]) picklelist = [choins, inventory, book, mapchanges, event, cdata] pickle.dump(picklelist,infile) # Delete the saved maps because they will just get in the way later del mapchanges[len(mapchanges)-1] del mapchanges[len(mapch

Re: [Tutor] File Writing Permission?

2007-10-07 Thread David Millar
Thanks - it still took a bit more tweaking because of how I wrote a few things, but the saving works fine now. I've been having trouble with finding a version of the curses library for Windows that I can get working, so I just used os.path.expanduser no matter the system. :/ Dave On 10/7/07, clax

Re: [Tutor] upgrading Python

2007-10-13 Thread David Millar
Hi there, I'm not familiar with Mandrake, but I use Ubuntu Linux and my package manager does updates for me. It looks like Madrake has a package manager called urpmi according to Wikipedia - have you tried using that to install a new RPM package for Python 2.5.1 or simply trying to have it automat

Re: [Tutor] File upload from python shell

2007-10-14 Thread David Clymer
On Sun, 2007-10-14 at 01:42 +0100, Paulino wrote: > Hello! > > > How can I upload a file from python? > > If it is a form to fill with values it's simple: > > > urlopen("http://site.com/action?key1=value1;key2=value2";) and I get the > form filled. > > > What about uploading a file programm

Re: [Tutor] underlying C/C++ object has been deleted

2007-10-27 Thread David Boddie
C++ side, it will be deleted. This means that you are left with a reference to a deleted object (self.textBrowser) and the signal-slot connection you made in init() will have been broken. The solution to this is to set up the QTextBrowser using Qt Designer. Just drag it into the central area of the m

Re: [Tutor] PyQt segfault

2007-11-30 Thread David Boddie
= QString(string) [Off topic, but PyQt-related: You need to explicitly copy value types with PyQt because the semantics of copying objects with Python are different to those for copying Qt's value classes in C++. In Python, you just bind an object to a name,

Re: [Tutor] PyQt segfault

2007-12-02 Thread David Boddie
o/pyqt If you're reluctant to join another mailing list just to ask one question then I can ask it on your behalf. Let me know if would prefer that. David ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] Python Challenge 2

2007-12-21 Thread David Holland
I did this and got this string :- "i hope you didnt translate it by hand. thats what computers are for. doing it in by hand is inefficient and that's why this text is so long. using string.maketrans() is recommended. now apply on the url" Is that the answer because it does not solve the problem

[Tutor] appending to a list

2008-01-30 Thread David Bear
I've never seen example code. any pointers? -- -- David Bear College of Public Programs at Arizona State University ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] Using urllib to retrieve info

2005-08-08 Thread David Holland
Kent, Sorry I should have put my code. This is what I wrote import urllib import urllib2 f = urllib.urlopen("http://support.mywork.co.uk/index.php?node=2371&pagetree=&fromid=20397&objectid=21897";).read() newfile = open("newfile.html",'w') newfile.write(f) newfile.close() print 'finished' It runs

Re: [Tutor] Using urllib to retrieve info

2005-08-09 Thread David Holland
Alan, Sorry of course that is the problem. These pages are password protected Is it possible to download password protected pages (I know the password but I don't how to get the program to use it). David --- Alan G <[EMAIL PROTECTED]> wrote: > > It runs fine but the file

Re: [Tutor] Using urllib to retrieve info

2005-08-09 Thread David Holland
I had a look at urllib2 and I found this example :- import urllib2 # Create an OpenerDirector with support for Basic HTTP Authentication... auth_handler = urllib2.HTTPBasicAuthHandler() auth_handler.add_password('realm', 'host', 'username', 'password') opener = urllib2.build_opener(auth_handler) #

[Tutor] python and xml

2005-08-13 Thread David Holland
What is a good way of using xml and python ? I tried to install PyXML but I get this as an error message :- python setup.py Traceback (most recent call last): File "setup.py", line 127, in ? config_h_vars = parse_config_h(open(config_h)) IOError: [Errno 2] No such file or directory: '/usr/inc

[Tutor] Python and xml

2005-08-13 Thread David Holland
I forgot to say that I am using knoppix 3.9 ___ How much free photo storage do you get? Store your holiday snaps for FREE with Yahoo! Photos http://uk.photos.yahoo.com ___ Tutor

[Tutor] Listbox help

2005-08-31 Thread David Holland
to create a listbox. Thanks in advance. David ___ To help you stay safe and secure online, we've developed the all new Yahoo! Security Centre. http://uk.security.yahoo.com __

Re: [Tutor] input/output redirection

2005-09-08 Thread David Rock
processing. It also give me the flexibility of using it as a pipe OR assigning a wordlist of files to the script instead. http://www.python.org/doc/2.4.1/lib/module-fileinput.html import fileinput for line in fileinput.input(): process(line) -- David Rock [EMAIL P

Re: [Tutor] (no subject)

2005-09-13 Thread David Rock
ere that would undoubtedly perform much better than a PythonOS ever could. That doesn't mean it wouldn't be cool, though. :-) -- David Rock [EMAIL PROTECTED] pgpbDnlqYILFN.pgp Description: PGP signature ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] Focus in tkinter

2005-09-14 Thread David Holland
I want to make the mouse focus in a GUI move to the correct button/text entry widget. Does anyone know how to do this ? Thanks in advance David ___ Yahoo! Messenger - NEW crystal clear PC to PC

Re: [Tutor] Tutor Digest, Vol 19, Issue 66

2005-09-26 Thread David Holland
--- [EMAIL PROTECTED] wrote: > Send Tutor mailing list submissions to > tutor@python.org > > To subscribe or unsubscribe via the World Wide Web, > visit > http://mail.python.org/mailman/listinfo/tutor > or, via email, send a message with subject or body > 'help' to > [EMAIL PRO

[Tutor] Beautiful soup

2005-10-04 Thread David Holland
ython24\lib\urllib2.py", line 1135, in open_local_file stats = os.stat(localfile) OSError: [Errno 2] No such file or directory: '\\C:\\Python24\\FRE_word_list.htm Any idea how to solve it ? The file is on my PC. I am using Python 2.4 on Win XP. Thanks in advance. David

[Tutor] Python books: buying advice needed

2005-10-18 Thread David Stotijn
eally, the book I'm looking for has some "best practice" guidelines and alot of example code. Do you have any tips? Thanks in advance! David ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] python books

2005-10-19 Thread David Holland
The best book I found was python programming for the absolute beginner by Michael Dawson. I would strongly recommend it. The only annoying thing is that he uses a games wrapper called livewires, which he modifies from the original but keeps the same name, which does not seem very clever to me. So

[Tutor] python books

2005-10-19 Thread David Holland
The best book I found was python programming for the absolute beginner by Michael Dawson. I would strongly recommend it. The only annoying thing is that he uses a games wrapper called livewires, which he modifies from the original but keeps the same name, which does not seem very clever to me. So

[Tutor] running a program

2005-11-27 Thread David Jimenez
Hello everybody,I have a very simple question: how can I run a script that uses module Tkinter without using IDLE? Thank you,David Yahoo! Music Unlimited - Access over 1 million songs. Try it free.___ Tutor maillist - Tutor@python.org http

[Tutor] Currency conversion

2005-12-12 Thread David Holland
Apologies if anyone has said this and I missed it, but wouldn't it be better to change :- "def rupees_from_dollars(d_doll): return 43*(d_doll) etc to" :- "def conversiond_doll, x): return x*(d_doll) " And in the main for eg dollars to dollar_amount = conversionsion(doll, dollarexchange ra

[Tutor] Books

2005-12-21 Thread David Holland
I would recommend python programming for the absolute beginner. ___ Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail http://uk.messenger.yahoo.com ___

[Tutor] (no subject)

2006-01-12 Thread David Christian
Thanks in advance for any help!How do you create a script in python...sorry to be so remedial...first script.   With my best regards always, David Christian BEGIN:VCARD VERSION:2.1 N:Christian;David FN:David Christian ([EMAIL PROTECTED]) TITLE:CRNA TEL;HOME;VOICE:9015262444 TEL;CELL;VOICE

[Tutor] Copy files

2006-01-30 Thread David Holland
I wrote a small program that compares files test1 and test2 to test3. If the files are different  then it  copies either test1 to test3 or the reverse.The problem is that the although the shutil.copy2 in thefunction change_files  works without error it does not copy.  Can anyone see what is

<    1   2   3   4   5   6   7   8   9   10   >