Re: [Tutor] New to pythong

2008-07-07 Thread W W
A quick google search for "Python tutorial" will yeild several results. I recommend "Think Python" - http://greenteapress.com/thinkpython/ HTH, Wayne On Mon, Jul 7, 2008 at 11:40 AM, Jeremiah Stack <[EMAIL PROTECTED]> wrote: > > > Hello everybody: > > I am new to this mailing list, and it said

Re: [Tutor] getting error in uploading a file

2008-07-15 Thread W W
On Tue, Jul 15, 2008 at 10:53 AM, Mayank Agarwal <[EMAIL PROTECTED]> wrote: > Hi, > i am getting error in uploading a file from python script. > > the error is follwing: > > > > 500 Internal Server Error > > Internal Server Error > The server encountered an internal error or > misconfiguration

Re: [Tutor] checking if data files are good, readable, and exist

2008-07-22 Thread W W
On Tue, Jul 22, 2008 at 10:40 AM, Bryan Fodness <[EMAIL PROTECTED]> wrote: > I would like to check to see if the data files are good, readable, and > exist. I have checked to see if they exist, but their is a possibility that > the data file might be binary, and I would like to have a sys.exit fo

Re: [Tutor] urllib2 and php authentication

2008-07-26 Thread W W
On Sat, Jul 26, 2008 at 7:31 PM, Daniele <[EMAIL PROTECTED]> wrote: > Hi, > I'm trying to connect to a site that requires a php login. I used the > urllib2 module in the following way: > It requires a php login, or php handles the login? >>> import urllib2 > >>> user='xxx' > >>> password='yyy' >

Re: [Tutor] (no subject)

2008-07-29 Thread W W
Another thing you might want to check, since you're using Windows: Open up windows explorer, go the "tools" menu, "folder options", then click the "view" tab, and then make sure the option "hide extensions for known filetypes" is unchecked. If it's not, uncheck it, and click OK. Then go and make s

[Tutor] Style help: long strings with formatting

2008-07-29 Thread W W
Hi, I've been dinking around, making a program that will find out how different factors affect what you *really* save on gas, and at the end I have it output some information, but I'm not sure what the right style for formatting is. output = "At an average weekly savings of $%.02f, your monthly

Re: [Tutor] iterating data and populating a dictionary

2008-08-07 Thread W W
On Thu, Aug 7, 2008 at 12:42 AM, Shrutarshi Basu <[EMAIL PROTECTED]>wrote: > If you're just going to be using numbers as dictionary keys, it might > be simpler just to use a list structure. Dictionaries don't preserve > order, so you'd need to write extra code if you ever need to iterate > over it

[Tutor] Fwd: Python and NT Authentication

2008-08-07 Thread W W
(I hate it when I forget to "reply-to all") -- Forwarded message ------ From: W W <[EMAIL PROTECTED]> Date: Thu, Aug 7, 2008 at 11:30 AM Subject: Re: [Tutor] Python and NT Authentication To: Steven L Smith <[EMAIL PROTECTED]> On Thu, Aug 7, 2008 at 9:55 AM,

Re: [Tutor] What has Editor X got that PyWin32 hasn't?

2008-08-13 Thread W W
On Tue, Aug 12, 2008 at 11:17 PM, Dick Moores <[EMAIL PROTECTED]> wrote: > At 05:11 PM 8/12/2008, Alan Gauld wrote: > > I use Pythonwin for most of my short programming tasks > (with occasional forays into other tools like PyCrust and SPE) but for > serious programming I use vim. Why? > > > Alan,

Re: [Tutor] What has Editor X got that PyWin32 hasn't?

2008-08-13 Thread W W
On Wed, Aug 13, 2008 at 7:31 AM, Dick Moores <[EMAIL PROTECTED]> wrote: > > > And read this: http://www.moolenaar.net/habits.html > > > Hey, that looks very useful! Thanks. > > How about the O'Reilly book? > > > I've never read it, but loo

Re: [Tutor] What has Editor X got that PyWin32 hasn't?

2008-08-13 Thread W W
On Wed, Aug 13, 2008 at 9:42 AM, Dick Moores <[EMAIL PROTECTED]> wrote: > > Since downloading vim 7.2 yesterday, I've had some trouble distinguishing > vim and gvim (both were included). Can you help me out? gvim is GUI-vim, I > think. Isn't that what I want to learn? Is gvim a cut-down version of

Re: [Tutor] What has Editor X got that PyWin32 hasn't?

2008-08-13 Thread W W
On Wed, Aug 13, 2008 at 10:09 AM, Dick Moores <[EMAIL PROTECTED]> wrote: > At 07:58 AM 8/13/2008, W W wrote: > >> As far as any keyboard commands that I use, I've not seen any difference >> between vim, vi, and gvim. The main difference is syntax highlighting. >>

Re: [Tutor] What has Editor X got that PyWin32 hasn't?

2008-08-16 Thread W W
On Sat, Aug 16, 2008 at 11:07 AM, Lie Ryan <[EMAIL PROTECTED]> wrote: > > I agree it is very powerful, at its time, when computers are > keyboard-only and terminal-only. But now, most of its power is largely > redundant and is pale compared to modern text-editor that do acknowledge > mouse as a pr

Re: [Tutor] python-ldap installation

2008-08-16 Thread W W
On Sat, Aug 16, 2008 at 1:15 PM, John DeStefano <[EMAIL PROTECTED]>wrote: > > Ultimately, I'd like to automate an installation method as part of a > buildout environment script that could work on multiple platforms, but > I'm not sure that's going to be possible: Windows doesn't use apt-get, > OS X

Re: [Tutor] Reformatting phone number

2008-08-21 Thread W W
On Thu, Aug 21, 2008 at 5:13 AM, Dotan Cohen <[EMAIL PROTECTED]> wrote: > 2008/8/21 OmerT <[EMAIL PROTECTED] <[EMAIL PROTECTED]>>: > > mostly, I google "docs.python" and the term or class I'm looking for. > > Mind, this mainly works for modules or classes which came with the > interpreter. > > > >

Re: [Tutor] Problem with creating a class to access a 2d array

2008-08-22 Thread W W
On Fri, Aug 22, 2008 at 7:46 PM, lawful falafel <[EMAIL PROTECTED]>wrote: > I really like python, but the one thing I really hate is that most of the > tutorials treat it like interactive scripting instead of object oriented > development, which really confuses me. So basically right now I dont ev

[Tutor] Fwd: hi...

2008-08-24 Thread W W
-- Forwarded message -- From: W W <[EMAIL PROTECTED]> Date: Sun, Aug 24, 2008 at 7:17 AM Subject: Re: [Tutor] hi... To: Alberto Perez <[EMAIL PROTECTED]> On Sun, Aug 24, 2008 at 1:31 AM, Alberto Perez <[EMAIL PROTECTED]> wrote: > I have a problem with pyt

Re: [Tutor] fileinput question

2008-08-24 Thread W W
On Sun, Aug 24, 2008 at 8:26 PM, Ezra Taylor <[EMAIL PROTECTED]> wrote: > Hello all: > Can I do the below with input() from fileinput? If > this is not possible, what can I do to create backup files with the > date timestamp as an extension. Thanks for you help all. > > > from ti

[Tutor] Fwd: Including files for security.

2008-08-24 Thread W W
-- Forwarded message -- From: W W <[EMAIL PROTECTED]> Date: Sun, Aug 24, 2008 at 8:40 PM Subject: Re: [Tutor] Including files for security. To: Dotan Cohen <[EMAIL PROTECTED]> On Sun, Aug 24, 2008 at 3:38 PM, Dotan Cohen <[EMAIL PROTECTED]> wrote: > 2008/8/

Re: [Tutor] test

2008-08-25 Thread W W
yup On Mon, Aug 25, 2008 at 11:47 AM, Kirk Bailey <[EMAIL PROTECTED]>wrote: > is my posting getting through? > -- > > > Cheers! > -Kirk D Bailey > > THINK > +-+ > .*.| BOX | > ..*+-+ > *** THINK > ___

[Tutor] Fwd: Why does the Hex builtin function in Python return a string ?

2008-08-25 Thread W W
Forgot to send to list... On Mon, Aug 25, 2008 at 7:45 PM, Py Hex <[EMAIL PROTECTED]> wrote: > When I run this: > > >>> type(hex(12)) > > > I get a string type back, i.e, '0xC' not 0xC > > On the other hand, if I use 0x with data, Python understands it is hex data > and not a string value. > > >

Re: [Tutor] Having trouble with a component of the random module

2008-08-28 Thread W W
On Thu, Aug 28, 2008 at 1:33 AM, Alan Gilfoy <[EMAIL PROTECTED]>wrote: > > The number of items I want from a list is smaller than the population > (number of items) in the list, so it should work. > > In this specific case, I'm asking for one item from a five-item list. Are you sure? change thi

Re: [Tutor] print the hole unicode list

2008-08-28 Thread W W
Well, on my linux box (ubuntu) it had no problem with this: for i in range(0, 65536): uchar=unicode("\u%04X"%i,"unicode-escape") print uchar So my guess is you're missing some character in your set, but I'm not sure. HTH -Wayne On Wed, Aug 27, 2008 at 8:59 PM, Yang <[EMAIL PROTECTED]> w

Re: [Tutor] Responding to Tutor Posts, Reply-To

2008-09-01 Thread W W
On Mon, Sep 1, 2008 at 7:07 PM, Wayne Watson <[EMAIL PROTECTED]>wrote: > When I reply to a response to my post, it seems to go back to the > respondent. I'd like it to just go back to the list. I'm using Seamonkey > (Mozilla). I can do a reply-all but that sends it to the respondent and the > lis

Re: [Tutor] "Analyzing" music with Python

2008-09-05 Thread W W
On Fri, Sep 5, 2008 at 8:34 AM, Timo <[EMAIL PROTECTED]> wrote: > I'm sorry if I don't use correct names etc.. What I want is to analyze a > music file that is playing. Not sure if analyze is the good word for it. I > just want to get info about the song in realtime when it is playing. Info > abou

[Tutor] Fwd: "Analyzing" music with Python

2008-09-05 Thread W W
Forgot to reply to all... -- Forwarded message -- From: W W <[EMAIL PROTECTED]> Date: Fri, Sep 5, 2008 at 11:54 AM Subject: Re: [Tutor] "Analyzing" music with Python To: Timo <[EMAIL PROTECTED]> On Fri, Sep 5, 2008 at 11:26 AM, Timo <[EMAIL PROTECTED]&

Re: [Tutor] Looking at a String as a Struct?

2008-09-11 Thread W W
On Thu, Sep 11, 2008 at 5:58 AM, Wayne Watson <[EMAIL PROTECTED]>wrote: > Is it possible in Python to look at a string as a "struct". I don't think > a struct exists in python. Actually, is there something analogous to a > record. In the case of strings, suppose I have string that is composed of

Re: [Tutor] How Fix Misdirected Posts to Tutor

2008-09-12 Thread W W
On Fri, Sep 12, 2008 at 10:10 AM, Tim Golden <[EMAIL PROTECTED]> wrote: > Wayne Watson wrote: > >> Thanks. That seems to work. However, I thought I had experimented with it >> and found otherwise. Now to remember to do that. It's the only list I have >> that requires Reply All. It's certainly wor

Re: [Tutor] SBC/Yahoo and Spamguard--Stuck in Limbo

2008-09-12 Thread W W
You may be able to create a filter. If you're checking from a different account you should at least be able to create one to forward to that account. -Wayne On Fri, Sep 12, 2008 at 10:08 AM, Wayne Watson <[EMAIL PROTECTED] > wrote: > I see a number of tutor posts are sometimes not getting to me

Re: [Tutor] Creating a chat system Server

2008-09-16 Thread W W
A lot of people referenced me to twisted whenever I asked about sockets/threading. HTH, Wayne On Tue, Sep 16, 2008 at 12:14 PM, Richard Lovely <[EMAIL PROTECTED]>wrote: > Does anyone have any links and or know of any good libraries for > writing chat servers similar to IRC? I'm looking to add c

Re: [Tutor] clearing lines for a 'front end' to a tool

2008-09-17 Thread W W
On Wed, Sep 17, 2008 at 5:20 PM, James <[EMAIL PROTECTED]> wrote: > Kent, > > Thanks for the response. As a personal opinion, do you find it more > appropriate to use something like curses (since it's already built > into the standard Python library), or to use something "third party" > like urwid

Re: [Tutor] Miles Per Gallon Calculator`

2008-09-18 Thread W W
On Thu, Sep 18, 2008 at 5:14 AM, <[EMAIL PROTECTED]> wrote: > When = raw_input ( " please enter a number " ) > = int () is run as part of a python script It should > take in the user stored input and store it as an integer. Am I correct. The > string represented by in memory is now represented

Re: [Tutor] command history in a console

2008-09-18 Thread W W
On Wed, Sep 17, 2008 at 9:14 PM, Hans Dushanthakumar < [EMAIL PROTECTED]> wrote: > G'day everyone. > > I'm experimenting with a custom console application, and trying to add > command history functionality to it. It seems to basically work ok except > for the fact that when I press the Up arrow ke

Re: [Tutor] How to print complex numbers without enclosing parentheses

2008-09-19 Thread W W
On Fri, Sep 19, 2008 at 4:26 AM, Stephen McInerney <[EMAIL PROTECTED]>wrote: > > Why does the complex.__str__() method on complex numbers add the enclosing > parentheses? > It's unwanted, and it also makes them look like a tuple (other than the > trailing comma). > How can I get rid of it, other t

Re: [Tutor] not operator

2008-09-19 Thread W W
On Fri, Sep 19, 2008 at 4:49 AM, Paul McGuire <[EMAIL PROTECTED]> wrote: > because validate, being a transitive verb, tells us we are going to do > something to config, but since 'validate' is not a name that clearly > asserts > a truth or falsity, we aren't exactly sure what validate is going to

Re: [Tutor] Help reproing IDLE bug 3841? esp. on Windows Vista, XP

2008-09-19 Thread W W
Well, I know it doesn't repro with python 2.5 on ubuntu 8.04. -Wayne On Fri, Sep 19, 2008 at 4:49 AM, Stephen McInerney <[EMAIL PROTECTED]>wrote: > Could anyone help reproing this minor IDLE bug? > http://bugs.python.org/issue3841 > I found it on Windows Vista with Python 2.5 / IDLE 1.2.2. > Othe

Re: [Tutor] Where Does the DOS Window Come From?

2008-09-24 Thread W W
On Wed, Sep 24, 2008 at 10:36 AM, Wayne Watson <[EMAIL PROTECTED] > wrote: > I'm looking at a GUI application that I hope to modify in the next few > weeks. When it's executed the expected GUI appears along with a DOS window. > Occasionally, I think, I've seen something put in the DOS window. How

Re: [Tutor] Monitoring HTTP connections?

2008-09-28 Thread W W
On Sun, Sep 28, 2008 at 7:33 PM, xbmuncher <[EMAIL PROTECTED]> wrote: > >>Why not just set up wireshark with a filter for HTTP requests? > Because I want to use the data from the HTTP requests in my python program, > so it needs to be a way I can do it natively within my python program, so I > can

Re: [Tutor] Text Scatter Plots?

2008-09-29 Thread W W
On Mon, Sep 29, 2008 at 10:33 AM, Wayne Watson <[EMAIL PROTECTED] > wrote: > I didn't see any posts with curses in the Subject, but my participation > here 2/2008 to now with a hole in the middle where I turned to other matters > than Python. Is there an archive? > > Before GUIs, crude scatter pl

Re: [Tutor] python: can't open file 'test.py' : [Errno 2] No such file or directory

2008-09-30 Thread W W
On Tue, Sep 30, 2008 at 2:58 PM, Pierre Dagenais <[EMAIL PROTECTED]>wrote: > The file test.py is in I:\Python25\MyCode, > if I enter: > > C:\>Python25\MyCode\python25 test.py at the DOS prompt, everything works > as I would expect. > > However when I enter the same command from any other director

Re: [Tutor] Idle and windows XP firewall

2008-10-01 Thread W W
Why would your firewall be blocking idle? Does idle connect to the internet? On Wed, Oct 1, 2008 at 8:21 AM, David Holland <[EMAIL PROTECTED]>wrote: > The program does not start up. I think it is a firewall issue but I am > having problems changing my firewall to allow idle. > > --- On *Wed, 1/1

Re: [Tutor] How trustworthy are pseudo-random numbers?

2008-10-03 Thread W W
On Fri, Oct 3, 2008 at 12:44 AM, Tim Peters <[EMAIL PROTECTED]> wrote: > [Alec Henriksen] > > How trustworthy is the "randomness" generated by the random module? > > Python uses the Mersenne Twister algorithm for generating > pseudo-random numbers, and that's one of the highest-quality methods > k

Re: [Tutor] assigning values to dictionary

2008-10-03 Thread W W
On Fri, Oct 3, 2008 at 1:02 PM, jeremiah <[EMAIL PROTECTED]>wrote: > i think i figured it out. The result is that I have a dictionary within > a dictionary..i think. > > for example: > > {'mcdonalds': {'hamburger': 'big mac','drink':'coke'}} > > How would I go about itterating through this? > for

Re: [Tutor] bug in exam score conversion program

2008-10-04 Thread W W
On Sat, Oct 4, 2008 at 5:11 AM, David <[EMAIL PROTECTED]> wrote: > Hello!! I can't figure out how to solve that problem... > I also suspect that my code clearly exposes me as a beginner :-) What would > be the pythonic way of solving that exercise? > > # exam score to grade conversion > # Zelle

Re: [Tutor] Delete file before function ends

2008-10-06 Thread W W
What OS are you using, Adrian? On WinXP, this worked fine: import os def files(): os.startfile('myfile.txt') os.remove('myfile.txt') -Wayne ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Using the curses module (or a better solution)

2008-10-07 Thread W W
On Tue, Oct 7, 2008 at 3:27 AM, Alan Gauld <[EMAIL PROTECTED]>wrote: > There are some wrappers around curses to make the learning > curve a little bit less steep. Although, personally I don't think > raw curses is all that hard... :-) > Especially not for such a simple program. Less than 100 line

Re: [Tutor] cx_oracle module problems

2008-10-07 Thread W W
On Tue, Oct 7, 2008 at 4:30 PM, jeremiah <[EMAIL PROTECTED]>wrote: > Got it. Thanks. > > When i try 'python setup.py build' i get the following error. > > $ sudo python setup.py build > Traceback (most recent call last): > File "setup.py", line 72, in >raise DistutilsSetupError, "cannot loc

Re: [Tutor] Batch searches on Googlescholar

2008-10-07 Thread W W
On Tue, Oct 7, 2008 at 5:42 PM, Srinivas Iyyer <[EMAIL PROTECTED]>wrote: > Dear Tutors, > This might ben off track question, but I am asking to seek help from > experts here. > > I have a list of (n = 240) research publications (Biology and medicine). I > have title, journal name and PubMedID. > >

Re: [Tutor] More Pythonesque or a more efficient method

2008-10-07 Thread W W
On Tue, Oct 7, 2008 at 5:58 PM, Emile van Sebille <[EMAIL PROTECTED]> wrote: > Robert Berman wrote: > >> Hi, >> >> The below script which prints anagrams available for any word available >> within a given database. It does work, but it is not very fast. I am >> relatively certain there are more P

Re: [Tutor] Python Working Environment, Checkout, Compare (diff), ...

2008-10-09 Thread W W
Vim also has a diff mode. -Wayne ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Iterating two one dimensional lists to create a multidemsional array

2008-10-11 Thread W W
On Fri, Oct 10, 2008 at 10:59 PM, Kent Johnson <[EMAIL PROTECTED]> wrote: > On Fri, Oct 10, 2008 at 10:45 PM, S Potter <[EMAIL PROTECTED]> wrote: > >> poem ={ ['roses','are red'], >> ['violets','are blue'], >> ['sugar','are sweet'] >> ['so','are you'] } An

Re: [Tutor] Tuple of Tuples

2008-10-11 Thread W W
On Sat, Oct 11, 2008 at 9:53 AM, Wayne Watson <[EMAIL PROTECTED]> wrote: > I would like to create a tuple of tuples. As I read (x,y) pairs I would like > to "add" them to others. In the example below, I seem to be picking up () > each time I augment the tuple t. > === t = () t

Re: [Tutor] Python Basic Help

2008-10-13 Thread W W
What do you know so far? Do you know how to create a list or loop over the values inside a list? Try showing us what you've done so far and where you're stuck, then you'll get plenty of pointers. If you're just doing this on your own and not homework, you're probably starting on something a little

Re: [Tutor] Python Basic Help

2008-10-13 Thread W W
If you hit reply to all, you'll send your response to the list, too. On Mon, Oct 13, 2008 at 2:05 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]>wrote: > > i am getting tons of error messages for the last one!!! i was wondering if > we could use if loop inside another if loop > Yes, you can use loops

[Tutor] Technical aspect of os.path.isfile()

2008-10-14 Thread W W
I suppose this is really more of a technical aspect, dealing with the possibility of a race condition (although in my personal case, the probability is infinitely small). I'm writing a program that uses the ConfigParser module to open a config file, and if that file isn't present, I'd like to crea

Re: [Tutor] How to clear the screen

2008-10-20 Thread W W
On Mon, Oct 20, 2008 at 3:13 AM, Alan Gauld <[EMAIL PROTECTED]>wrote: > "Chris Fuller" <[EMAIL PROTECTED]> wrote > > want to clear the screen, printing the control sequence ESC[2J is all you >> need. >> >> print chr(0x1b) + '[2J' > I don't know if this is the most graceful solution... b

Re: [Tutor] Which exceptions should I be catching?

2008-10-20 Thread W W
On Mon, Oct 20, 2008 at 3:30 PM, Wesley Brooks <[EMAIL PROTECTED]> wrote: > Unfortunately due to the nature of the program the error has normally > happened hours ago and the error message has disappeared from the buffer of > the command prompt. > That's why you should write an error log ;) > >

Re: [Tutor] Which exceptions should I be catching?

2008-10-20 Thread W W
On Mon, Oct 20, 2008 at 4:36 PM, Wesley Brooks <[EMAIL PROTECTED]> wrote: > That's why you should write an error log ;) > > > The error log is a valid point. Is there a way to capture the error > messages that go the the terminal window or command prompt rather than all > my print statements? Can

Re: [Tutor] finding numbers in range of of numbers

2008-10-20 Thread W W
On Mon, Oct 20, 2008 at 5:19 PM, Srinivas Iyyer <[EMAIL PROTECTED]>wrote: > dear group, > a simple question that often challenges me. > > I have > > I have a list of list: > > [[10,45],[14,23],[39,73],[92,135]] > > I want to identify if any of the items in this list are in range of [5,100] > > The

Re: [Tutor] random equation generator

2008-10-23 Thread W W
www.google.com/search?q=pygtk+tutorial www.google.com/search?q=python+random+generator www.google.com/search?q=python+dict If you would like to develop the game, you should first try to develop the game, and then ask when you get stuck. If you can't figure out how to get a user to guess between o

Re: [Tutor] Need help w/ a for loop

2008-10-23 Thread W W
On Wed, Oct 22, 2008 at 11:09 PM, Monte Milanuk <[EMAIL PROTECTED]> wrote: > Hello all, > > New guy here, so go easy on me ;) > Welcome to python and the tutor list! > I'm starting to work my way through Python Programming by Zelle, and have > hit a bit of a wall on one of the programming exerc

Re: [Tutor] Need help w/ a for loop

2008-10-24 Thread W W
On Thu, Oct 23, 2008 at 10:29 PM, Monte Milanuk <[EMAIL PROTECTED]> wrote: > Hello again, and thanks to all of you who extended your help! > Maybe I'm not clever enough, but I didn't see how either example > could be used for doing the addition/subtraction determination. Or rather, > I found a di

Re: [Tutor] Iterate over multiple objects

2008-10-29 Thread W W
On Wed, Oct 29, 2008 at 5:38 AM, A.T.Hofkamp <[EMAIL PROTECTED]> wrote: > > With the zip() function you can merge two sequences into one: > > for x, y in zip(string1, string2): >print x, y > Ah! I *knew* there was a way - I just couldn't remember what it was. Thanks! -Wayne

[Tutor] Iterate over multiple objects

2008-10-29 Thread W W
Hi, I'm trying to compare two strings because I want to find the difference. i.e. string1 = "foobar" string2 = "foobzr" is there a simple way to do this with a for loop? This is the method I tried, but it gives me an error: In [14]: for x, y in bar[0], bar[1]: : print x, y :

Re: [Tutor] python editor / IDE

2008-10-31 Thread W W
Denis, You'll find that most editing is subjective - people use what they're comfortable with. My recommendation to you, since you love notepad++ and are obviously comfortable with it; set it as your default editor and install IPython, then use the %ed magic function to work on your code; or have

Re: [Tutor] mergin two csv files based on a common join

2008-10-31 Thread W W
On Fri, Oct 31, 2008 at 4:04 PM, [EMAIL PROTECTED] < [EMAIL PROTECTED]> wrote: > Hello again, > Thanks for the replies on my previous post, but I have a different > problem now and don't see how to deal with it in a smooth way. I'd probably use a dict with a list as the value: > > "1", "text"

Re: [Tutor] Debugging, other

2008-11-01 Thread W W
On Sat, Nov 1, 2008 at 11:21 AM, Jennifer Miller <[EMAIL PROTECTED]>wrote: > Hello, > > I would like to step through with debugging in PythonWin, I have added > this toolbar, but I cannot click on it as an option. Also, when I > click run, to define the arguments, do I enter them in the format >

[Tutor] Iterate by twos

2008-11-02 Thread W W
is there a better/more pythonic way to do something like this? spam = ['c','c','v','c','v'] for x in xrange(0,5,2): print spam[x], spam[x+1] There are other things I'll be doing with the values, but I want to get them in chunks of two. (I realize that this code will throw errors, it's just a

Re: [Tutor] How to check online status

2008-11-03 Thread W W
On Mon, Nov 3, 2008 at 9:54 AM, Timmie <[EMAIL PROTECTED]> wrote: > Dear fellow Pythonistas, > is it possible to check with Python whether a computer is connected to the > internet or not? Yes. That's the short answer anyway. > I don't not find a module which can do such a thing like 'ping'?

Re: [Tutor] accessing an image with pygame.image.load()

2008-11-04 Thread W W
On Mon, Nov 3, 2008 at 8:37 PM, Jerry Hill <[EMAIL PROTECTED]> wrote: > Beyond what Bob says about being careful of the escape character ('\') > and the need to either double it up in a string literal or use a raw > string, are you sure that path is right? Usually a drive letter is > followed by

Re: [Tutor] using rect.inflate()

2008-11-06 Thread W W
On Wed, Nov 5, 2008 at 8:14 PM, John Fouhy <[EMAIL PROTECTED]> wrote: > 2008/11/6 Christopher Spears <[EMAIL PROTECTED]>: > > I inserted this code snippet into the Spaceship class: > > > > self.rect = self.image.get_rect() > > print self.rect > > self.rect = self.rect.inflate(-50, -50) > > print s

Re: [Tutor] Date validation?

2008-11-06 Thread W W
On Thu, Nov 6, 2008 at 1:27 PM, Eric Dorsey <[EMAIL PROTECTED]> wrote: > Greetings,I have a program where I ask a user to enter a date in format > -MM-DD, and get a string like: '2008-10-25' > > Can anyone tell me how I would verify this is a real date before allowing > it to be passed on to t

Re: [Tutor] Intermediate/advanced concepts

2008-11-07 Thread W W
On Fri, Nov 7, 2008 at 4:12 AM, Eric Abrahamsen <[EMAIL PROTECTED]>wrote: > >> > > Also, are there other concepts that I should focus on? Frankly, I'm a bit >> bored because I've hit this ceiling, and I'm not really sure where to go to >> next. > > If you want to learn all sorts of new and exciti

Re: [Tutor] Question

2008-11-10 Thread W W
On Mon, Nov 10, 2008 at 9:40 AM, Alan Gauld <[EMAIL PROTECTED]>wrote: > What does nano do that vi (or emacs) doesn't? Given that vi is the > "standard" editor on *nix ity would seem the obvious choice. But everyone > seems to be using nano? Why? AFAIK, it's a little smaller/faster than emacs..

Re: [Tutor] Running a script from another folder

2008-11-12 Thread W W
On Wed, Nov 12, 2008 at 10:27 AM, <[EMAIL PROTECTED]> wrote: > Suppose I have a python script in /usr1/myID/bin and I want to run it from > another folder. If I enter > > python ~myID/bin/myscript > > that works. Is there a way to get by with > > python myscript > > or even > > myscript.py > > I'v

Re: [Tutor] experience/opinions with deploying python GUI app to Linux, Win32, and Mac OS X

2008-11-12 Thread W W
On Wed, Nov 12, 2008 at 9:03 PM, greg whittier <[EMAIL PROTECTED]>wrote: > - web app running locally -- no experience with this, but everybody > has a web browser and there are frameworks like django I could use > - curses -- probably not as pretty as mac/windows users would expect > I'd probably

Re: [Tutor] the sense of brackets

2008-11-22 Thread W W
On Sat, Nov 22, 2008 at 9:42 AM, spir <[EMAIL PROTECTED]> wrote: > I have long thought "[]" /simply/ is a list constructor syntax. > What do you think of the following? > > t = "aze" > print t, list(t), [t] > print list(list(t)), list([t]), [list(t)], [[t]] > ==> > aze ['a', 'z', 'e'] ['aze'] > ['

Re: [Tutor] My horrible looking program needs improvement.

2008-11-24 Thread W W
On Mon, Nov 24, 2008 at 10:00 AM, Peter van der Does <[EMAIL PROTECTED] > wrote: > I wrote my 1st Python program and it works as I want it to work but > ,IMHO, it looks horrible. Nothing to be ashamed of, unless you don't mind it looking horrible. The fact that you want a clean program is a good

Re: [Tutor] file locations

2008-11-24 Thread W W
On Mon, Nov 24, 2008 at 1:10 PM, Jeff Peery <[EMAIL PROTECTED]> wrote: > Hello, > I have a wxapp from which I would like to execute another wxapp. the > 'child' wxapp is located in a sub directory of the 'parent' wxapp. The > problem I'm having is that I execute the child app from the parent app a

Re: [Tutor] Open Source database software

2008-11-24 Thread W W
On Mon, Nov 24, 2008 at 6:19 PM, Mike Meisner <[EMAIL PROTECTED]> wrote: > Y'all have been so good with suggestions on my programming problems in > the past, I wonder if anyone could provide a suggestion on a more general > topic. > 5. And, everything either in Python or with APIs that Python ca

Re: [Tutor] Leaving PHP for Python

2008-11-25 Thread W W
On Tue, Nov 25, 2008 at 6:43 AM, Jason DeBord <[EMAIL PROTECTED]> wrote: > > The following for example: > > from mod_python import apache > > def handler(req): > req.write("Hello World!") > return apache.OK > > Frankly, I don't understand what is going on in the above. This is a bit > diff

Re: [Tutor] Tutor Digest, Vol 58, Issue 2

2008-12-01 Thread W W
Try this: for x in xrange(3, 0, -1): : print x : : 3 2 1 HTH, Wayne On Mon, Dec 1, 2008 at 2:20 PM, WM. <[EMAIL PROTECTED]> wrote: > Stooges.py > > i,j,k = 3,3,3 > while i != 1: >print 'Larry, Moe & Curly Joe!' >i -= 1 >while j != 1: >print 'Go Mad!

Re: [Tutor] Tutor Digest, Vol 58, Issue 2

2008-12-01 Thread W W
On Mon, Dec 1, 2008 at 5:24 PM, Alan Gauld <[EMAIL PROTECTED]>wrote: > Since the OP isn't using the loop counter a simpler solution > is simply > > for x in range(3): but the OP was looping from 3 to 1, and that's the easiest way I knew of. -Wayne ___

Re: [Tutor] 'for' loops

2008-12-01 Thread W W
On Mon, Dec 1, 2008 at 6:44 PM, WM. <[EMAIL PROTECTED]> wrote: > I recently asked a question about 'for' loops, expecting them to be similar > to 'for-next' loops. I have looked at several on-line tutors but am still > in the dark about what 'for' loops do. > Does anyone have a plain English abou

Re: [Tutor] importing images and sound

2008-12-02 Thread W W
On Tue, Dec 2, 2008 at 2:02 PM, Steve Willoughby <[EMAIL PROTECTED]> wrote: > > That depends on what GUI toolkit you're using. If you're > going to be doing a lot with sound and images, particularly > video clips, you might want to look at pymedia or pygame Pyglet is another option. -Wayne __

Re: [Tutor] how to run a process forever

2008-12-10 Thread W W
while True: is also a common way to make your program "run forever". Although you still need to create some sleep/wait function or it will eat up your available processes (so I'm told). -HTH, Wayne On Wed, Dec 10, 2008 at 12:28 PM, Steve Willoughby <[EMAIL PROTECTED]>wrote: > On Wed, Dec 10, 200

Re: [Tutor] problems finding position in list and changing it for GO game

2008-12-15 Thread W W
On Mon, Dec 15, 2008 at 10:01 PM, Lee Meredith wrote: > > the MOUSEBUTTONDOWN gives the black0 XandYpositions with the*.append* > how do I reference the address in the list by using XandYpositions > Then replace them or take it out off the list > > This code puts out an error when you hit the let

Re: [Tutor] listen in on other program's tcp connections

2008-12-16 Thread W W
On Tue, Dec 16, 2008 at 12:57 AM, xbmuncher wrote: > On windows XP, I'm running a program that sends TCP connections on port > 5039. I'v ran wireshark to determine this. I want to create a simple program > that listens for these connections and intercepts and then turns the data > transferred int

Re: [Tutor] Having Issues with CMD and the 'python' command

2008-12-16 Thread W W
On Mon, Dec 15, 2008 at 9:56 AM, Benjamin Kaplan wrote: > It's not a question of sensibility. It's a question of purpose. The Zen is > the philosophy of a language that tries to be easy to learn and easy to use. > Python is used by programmers who want to experiment with it, but who > usually know

Re: [Tutor] WinMerge

2008-12-16 Thread W W
Perhaps bold/italics/underline/strikethrough? -Wayne On Tue, Dec 16, 2008 at 12:50 PM, Wayne Watson wrote: > Is there a way to highlight differences between the two files when > printing in b/w? Help suggests there may be some texturing, but all I see is > color choices. > -- > >Way

Re: [Tutor] Repply

2008-12-27 Thread W W
On Sat, Dec 27, 2008 at 3:42 AM, Alan Gauld wrote: > > Its C rather than C++. > The <> in include statements are a variation on the "" which can also be > used. > The differences are subtle and have to do with the search path I think. But > its > been so long since I did serious C/++ I can't recal

Re: [Tutor] Top posters to tutor list for 2008

2009-01-04 Thread W W
I think I find it most interesting that the greatest percent is still under 15% and then it tapers rapidly. I'm curious what % of people posted 5 or less messages... perhaps it will become a personal project somewhere down the road ;) -Wayne On Fri, Jan 2, 2009 at 7:28 AM, Kent Johnson wrote: >

Re: [Tutor] How do we upload multiple files simultaneously?

2009-01-10 Thread W W
On Sat, Jan 10, 2009 at 4:19 PM, Lie Ryan wrote: > On Fri, 09 Jan 2009 21:48:51 -0800, john dow wrote: > > > Dear All, > > > > I a newbie to python... > > > > my problem is to upload more than one file on a single go. I have an > > option open is using some FTP client... > > > > You might be int

Re: [Tutor] Working with IDLE in XP, Set Up for A New Program

2009-01-11 Thread W W
On Sat, Jan 10, 2009 at 8:08 PM, Wayne Watson wrote: > I immediately answered my own question by clicking on a link that took me > to a web site with the pdf; however, it looks like I installed Python 2.6. > It'll be easy to uninstall, but I don't see 2.5 -- yet. > http://www.activestate.com/sto

Re: [Tutor] running & debugging in python interactive shel

2009-01-15 Thread W W
On Wed, Jan 14, 2009 at 8:18 PM, Che M wrote: > > I'd like to add to this question and expand it: can anyone point me to > a good resource on debugging *generally*? > The first result on "Debugger tutorial" on google sent me to this: http://www.cs.princeton.edu/~benjasik/gdb/gdbtut.html Thou

Re: [Tutor] Creating simple windows in XP

2009-01-16 Thread W W
On Thu, Jan 15, 2009 at 5:45 PM, Alan Gauld wrote: > You mean like doing > > import tkMessageBox > tkMessageBox.showinfo("Window Text", "A short message") > > in Tkinter? :-) > > OR > > res = tkMessageBox.askokcancel("Which?", "Ready to stop?") > print res > > At that level Tkinter is pretty easy

Re: [Tutor] Ip address

2009-01-19 Thread W W
On Mon, Jan 19, 2009 at 8:11 AM, Irimia, Suleapa < irimia.sule...@unknownsoftware.ro> wrote: > Hello list, > > I am new to python and i have a question. I managed to build a client which > connect to an website and grab things from there. I run this client on a > linux box, which have multiple ip

Re: [Tutor] Question about pygame/tkinter interaction

2009-01-19 Thread W W
On Mon, Jan 19, 2009 at 12:05 PM, Steve Willoughby wrote: > Is it reasonable to expect that I could use Tkinter for > everything else, but use pygame/pymedia to handle things like > creating a video playback window on the screen, or is pygame > going to want to run the whole GUI event loop and scr

[Tutor] 2.5 vs 3k?

2009-01-19 Thread W W
So, I'm curious about this whole python 3k thing. Is python migrating to 3k only? Will 2.x no longer be "officially" supported? If so/not, what are some of the arguments for migrating to 3k? What makes it "better" than the python we all know and love? Thanks for the info/comments, Wayne -- To b

Re: [Tutor] Possible to search text file for multiple string values at once?

2009-01-23 Thread W W
On Fri, Jan 23, 2009 at 12:38 PM, bob gailer wrote: > Scott Stueben wrote: > >> Hi all, >> >> I understand that python excels at text processing, and wondered if >> there is a way to use python to accomplish a certain task. >> I would love to set up a script to parse a file and show results fro

<    1   2   3   >