> In my first example, clamdscan should return 1 when the EICAR string is
> found -- process.wait() gets 256 instead. In the second, clamdscan
> returns 2 if an error occurs, such as trying to scan a non-existent
> file, but 512 is returned.
>
> No doubt there is a reason why the exit code is get
On Fri, 13 May 2005, Alberto Troiano wrote:
> Here is an example of what I want to do:
>
> I run over Linux shell the following command:
>
> [EMAIL PROTECTED] root]# fec=cam`date +%Y%m%d%H%M%S`.jpg
> [EMAIL PROTECTED] root]# echo $fec
> cam2005051255702.jpg
> [EMAIL PROTECTED] root]# mv hola.txt
On 13 May 2005 [EMAIL PROTECTED] wrote:
> Your help has made me realise the problem is more complex than I first
> though though...I've included a small sample of an actual file I need to
> process. The structure is the same as in the full versions though; some
> lowercase, some uppercase, then
>
> If I have arguments, the "different stuff" happens beautifully, thank
> you very much. If I don't have arguments I get this:
>
> if sys.argv[1]:
> IndexError: list index out of range]
>
> So I'm doing something wrong. I looked at getopt, but that seemed to be
> doing what I was already doing,
> > Suppose I have several variables, e.g.: a, b, c, d, e, f, g.
> >
> > I would like to be able to see if they're all the same, I don't care
> > what the value is, as long as they're equal. If they're all equal to
> > 0, or to "spam", or to ["cleese", "idle", "gilliam"], as long as
> > they're the
On Thu, 12 May 2005, Bernard Lebel wrote:
> Just a generic question: why one would use apply()?
>
> In Learning Python, on page 357, there is an example of generating an
> instance using apply():
>
> class A:
> def __init__( self, number ):
> self.number = number
>
> a = apply
> Here is what the code I settled on looks like:
>
> ###
> working = email.message_from_file(open(emailfile))
>
> clamav = popen2.Popen3(clamav_cmd,1)
> clamav.tochild.write(working.as_string())
> clamav.tochild.close()
> clamav_result = clamav.fromchild.read().lstrip('stream: ')
> clamav.fromchi
Hi Danie,
The enumerate() function takes a list of elements, and returns a list of
(index, element) pairs. For example:
##
>>> names = ["wilma", "fred", "betty", "barney"]
>>> for p in enumerate(names):
... print p
...
(0, 'wilma')
(1, 'fred')
(2, 'betty')
(3, 'barney')
##
Note th
> Hi Danny
>
> Thanks, it works - I must read the documentation more carefully!
>
> Would you mind if I knok on your door again with futher Python hick-ups?
Hi Danie,
It's probably a better idea to send your questions to Tutor. The reason
is to allow the community to get involved.
Also, I have
On Tue, 17 May 2005, Alberto Troiano wrote:
> I'm working on Python 2.2 over Linux REd Hat 9.0 and here is the code I
> have
[code cut]
> First I'd like to know if this code can be shorter or more efficient (if
> you have the time)
Yes. But let's look at the errors first.
> Second the err
On Tue, 17 May 2005, Alberto Troiano wrote:
> I'm sending the errors MySQLdb gives me when I try to install it. It's
> hola.txt file
> I'm doing python setup.py build and inside hola.txt you can see what it says
> I have installed Linux Red Hat with ALL packages
Hi Alberto,
[Side note: please
On Tue, 17 May 2005, Alberto Troiano wrote:
> Sorry about the question marks (MSN addiction :))
>
> Didn't work and as I suspected it was already installed.
Hi Alberto,
I'm still thinking that the MySQL development packages are either damaged
or mixed up, since the error message says that it c
On Tue, 17 May 2005, Smith, Jeff wrote:
> Is there a more Pythonic way to get the Perl equivalent of
> $#var
> other than
> len(var) - 1
Hi Jeff,
Just out of curiosity, where do you use Perl's $#var? Can you show us the
context of its use? If we see context, it might help us fin
On Tue, 24 May 2005, Kent Johnson wrote:
> D. Hartley wrote:
> > I have a question: what is the "opposite" of hex()? (i.e., like ord
> > and chr). If I have
> >
> > '0x73', how can I get back to 115 or s?
>
> I don't know a really clean way to do this because '0x73' is not a legal
> input value
On Tue, 24 May 2005, D. Hartley wrote:
> I looked at the page for ElementTree that Max sent out, but I can't
> understand what it's even talking about.
Hello Denise,
ElementTree is a third-party module by the Effbot for handling some of the
drudgery that is XML parsing:
http://effbot.org
> Is there a way to create an empty function definition with no lines of
> code in it? In my coding style I will often do this ( in other languages
> ) for RAD just to remind myself that I will need to implement the
> function later.
Hi Nick,
I agree with the others; using the no-op statement '
On Thu, 26 May 2005, William O'Higgins wrote:
> I am running into problems with script evaluation order - specifically,
> the Python interpreter seems to read and execute scripts line by line.
Hi William,
Ah! This happens to me too; one common idiom to avoid definition-order
issues like this
On 26 May 2005 [EMAIL PROTECTED] wrote:
> I have to write a function that will return the index of a line like this:
>
> gvcdgvcgdvagTVTVTVTVTVTHUXHYGSXUHXSU
>
> where it first becomes capital letters. I've had about a hundred
> different ideas of the best way to do this, but always seem to hit
On Thu, 26 May 2005, Mark Kels wrote:
> I want to make a program to lock folders (so the user can only access
> them if he knows the password) under win32, the only problem is that I
> have no idea how to start or what to do. Do you guys have any ideas of
> how to do it?
Hi Mark,
Out of curios
On 26 May 2005 [EMAIL PROTECTED] wrote:
> One of the worst I think was doing loads of real spazzy stuff trying to
> split whole files in to lists of letters and use string methods to find
> the first uppercase one.
Hi Chris,
An approach like this might work. Rather than read the whole thing i
On Sun, 29 May 2005, Jonas Melian wrote:
> which is the difference between os.spawnlp and os.spawnlpe? With an
> example, please. I don't understand it.
Hi Jonas,
The difference is that the one that ends with an 'e' allows us to make the
spawned process use an entirely clean Unix shell environ
On Mon, 30 May 2005, Jonas Melian wrote:
> I'm trying to working with some directories only
>
> import os
> dirName = "/usr/share/fonts/"
> dirBase = ['misc','TTF','Type1','CID','100dpi','75dpi'] # directories to
> skip
>
> for root, dirs, files in os.walk(dirName):
> for end in dirBase:
>
On Mon, 30 May 2005, Chuck Allison wrote:
> Could someone please give me the quick lowdown on creating frozen
> binaries? Thanks.
Hi Chuck,
On Windows, the 'py2exe' program's probably the most straightforward of
the freezers:
http://py2exe.sf.net
That page has a complete toy example
On Mon, 30 May 2005, Andrei wrote:
> . , hotmail.com> writes:
>
> > But, I don't know how to plan a prog. with algorithm.
>
> For small programs there's little value in planning - in fact, you'll
> probably end up wasting time. As far as individual algorithms go, it's
> usually best to go with
> At the end, i found the way of make it:
>
> dirBase = ['misc','TTF','Type1','CID','100dpi','75dpi','encodings', 'util']
>
> for root, dirs, files in os.walk(dirName):
> print dirs # for checking all directories that i have at beginning
> for name in dirs:
> if name in dirBase:
On Wed, 1 Jun 2005, Willi Richert wrote:
> in my code I get in rare occasions an IndexError which is
> incomprehensible to me in that situation, where I do a simple
> comparison:
>
> NeedBrain.py:233: RuntimeWarning: tp_compare didn't return -1 or -2 for
> exception
> self._isNearMarker = self
On Wed, 1 Jun 2005, Jeff Peery wrote:
> Hello, I upgraded python to 2.4 and now my IDLE isn't working. There is
> an error indicating something is wrong with my configuration file for
> the IDLE settings. Any suggestions for how to solve this problem would
> be much appreciated. thanks.
Hi Jeff
On Wed, 1 Jun 2005, Jeff Peery wrote:
> hello, is it possible to add something like the python IDLE into another
> program
Hi Jeff,
Getting IDLE to work within wxPython is technically possible, but probably
a little tricky, since it'll involve getting the GUI event loops to
cooperate.
I belie
On 1 Jun 2005 [EMAIL PROTECTED] wrote:
> I have a load of files I need to process.
[text cut]
> So basically its a table, separated with tabs. What I need to do is make
> a new file where all the entries in the table are those where the values
> in columns 1 and 5 were present as a pair more t
On Wed, 1 Jun 2005, Jeff Peery wrote:
> ok, thanks! that helps. I have an application that reads a data file,
> crunches some numbers, and spits out some graphs. In addition to this I
> would also like users to be able to write small python scripts to
> operate on the data that is available wi
On Thu, 2 Jun 2005, Willi Richert wrote:
> my app is a Pyrobot (http://emergent.brynmawr.edu/~dblank/pyro/)
> simulation which connects to PlayerStage (playerstage.sf.net) to
> simulate three Pioneer robots. These are controlled using NeedBrain.py.
> In parallel to the three NeedBrains there is
On Fri, 3 Jun 2005, venkata subramanian wrote:
> I am a newbie to Python (that's very guessable).
> I simply fail to understand the semantics of the following piece of code.
> #assuming ls=[1,2,3,4]
> >>>ls[1:1]=[5,6]
> #then ls becomes
> >>> ls
> [1, 5, 6, 2, 3, 4]
>
> i would be hap
> (For the gory details on what is allowed on the right hand side of an
^
> assignment, you can take a quick look at the Reference Manual:
Hi Venkata,
Gaaa, I don't know my left from my right. *grin* I meant to say "left"
hand side, since
On Fri, 3 Jun 2005, Gabriel Farrell wrote:
> def sqlNice(valueList):
> count = 1
> y = '('
> for x in valueList:
> x = x.replace("'", "''")
> y = y + "'" + x + "'"
> if count < len(valueList):
> y = y + ', '
> count = count + 1
> y = y
On Fri, 3 Jun 2005, Taylor, Chris wrote:
> How do I execute a python script on my apache server?
>
> *(I am attempting to install google's sitemap generator...
Hi Chris,
This is more of an Apache configuration question, so you may get better
help by asking on an Apache-specific forum. It's no
On Fri, 3 Jun 2005, Alan G wrote:
> > I've been using MySQL up this day, but would like to convert my
> > program to use Postgresql.
>
> I'm curious. Why?
> Is there some advantage to Postgres over MySql?
Hi Alan,
Yes. The 'MySQL Gotchas' page details specifically some of the tricky
areas th
On Fri, 3 Jun 2005, [EMAIL PROTECTED] wrote:
> for item in function1(args):
> object = class()
> if (function2(item)):
> if (condition):
> object.variable = value
> object.function()
> print object # debug
> print object #debug
>
> T
On Fri, 3 Jun 2005, Xiaoxia Xu wrote:
> I tried to use a Python library module random() to generate some noise
> to my data. But the interpreter gave me an error message saying
> NameError: name 'random' is not defined. I thought this error is
> because I don't have the pertinent library includ
On Mon, 6 Jun 2005, Ron Nixon wrote:
> Is there a site like Perl's CPAN for Python? I've seen the stuff at
> ActiveState. Anything else?
Hi Ron,
Yes, there is a system called 'PyPI':
http://www.python.org/pypi
I hope this helps!
___
Tutor mai
> Okay then I run
>
> s = repr( myFunc() )
> print s
>
> Wich returns
>
> 'None'
Hi Bernard,
Ok, what do you expect to see instead of 'None'? I ask this to make sure
I understand the situation better.
Best of wishes?
___
Tutor maillist - Tutor@py
On Tue, 7 Jun 2005, Bernard Lebel wrote:
> The real question is, then, is there a way I can print the code of a
> function as a string? Something like
>
> 'def myFunction: print "hello"'
Hi Bernard,
Ah, ok. You can use 'inspect':
http://www.python.org/doc/lib/inspect-source.html
Fo
On Tue, 7 Jun 2005, The Johnsons wrote:
> how can i get my email address removed, I'm receiving way too many
> emails
Hi Raywood1,
You have a few options. You may want to see if just turning the Tutor
mailing list setting to "Digest Mode" might help. You can do this
through:
http://mail
On Mon, 13 Jun 2005, Willi Richert wrote:
> I used the same Pyro code, but this time with the release versions of
> player and stage. This time python crashed with a segfault:
Hi Willi,
If you see a segfault like this, it's almost definitely a bug in a
third-party module. It is possible that
On Tue, 14 Jun 2005, Pujo Aji wrote:
> I tried this code in emacs.
> for i in range(3):
> time.sleep(1)
> print i
>
> It shows the result but total result not second per second.
Hi Pujo,
In Emacs, you may want to first start up a Python subprocess by using the
keystroke:
C-c !
and t
On Wed, 15 Jun 2005, Pujo Aji wrote:
> Thanks Danny,
>
> Btw, I use xemacs now does it has folding class and method capabilities?
Hi Pujo,
[Note: in replies, please make sure to put tutor@python.org in CC.]
According to:
http://groups.google.ca/group/comp.lang.python/msg/956f1c2d37f93995?
On Wed, 15 Jun 2005, Phillip Hart wrote:
> Thanks for taking the time to read this.
>
> Excuse me if this falls under the boundaries of a "newbie" question, as
> I am a self-taught programmer.
Hi Phillip,
It's a "newbie" question. But that's perfectly ok. *grin*
> While using Tkinter to cr
On Mon, 20 Jun 2005, Shuying Wang wrote:
> Can anyone recommend a library that will let me call perl functions from
> python? I have a python dictionary that I would like to convert to a
> perl hash for some function.
Hi Shuying,
Sure! You may want to look at the PyPerl project:
http://w
On Tue, 21 Jun 2005, Mike Hansen wrote:
> I'm having trouble loading an image into a Postgre database. The code is
> below as well as the traceback in the apache log. Is something up with
> my sqlStatement? Do I need to use something other than %s? How can I
> avoid that type error?
Hi Mike,
> Thankfully, you don't have to change much to fix the formatting bug. The
> only thing you'll need to do is let the SQL cursor do the value formatting
> for you:
>
> ##
> sqlStatement = """INSERT INTO images (image)
> VALUES (%s);
> cur.execute(sqlStatement, (data_obj))
> ##
On Wed, 22 Jun 2005 [EMAIL PROTECTED] wrote:
> What's the average age of a python user? This is my only question about
> programmers themselves.
Hi Catdude,
We actually had a small thread about this a few months back. The subject
line "O.T." from that thread didn't make it particularly eas
On Wed, 22 Jun 2005, Danny Yoo wrote:
>
>
> On Wed, 22 Jun 2005 [EMAIL PROTECTED] wrote:
>
> > What's the average age of a python user? This is my only question about
> > programmers themselves.
>
> The message threading doesn't work perfectly, but j
On Wed, 22 Jun 2005, Shidan wrote:
> Hi I have a list of regular expression patterns like such:
>
> thelist = ['^594694.*','^689.*','^241.*',
>'^241(0[3-9]|1[0145]|2[0-9]|3[0-9]|41|5[1-37]|6[138]|75|8[014579]).*']
> >
> Now I want to iterate thru each of these like:
>
> for pattern in thelis
On Wed, 22 Jun 2005, Mike Hansen wrote:
> Thanks Danny. That did the trick. I think I had thought about putting
> the variables in the execute statement, but I didn't run across any
> examples. I'll need to read the DB API 2.0 docs some more.
Hi Mike,
No problem; it's actually a really common
On Wed, 22 Jun 2005, Ed Singleton wrote:
> Yeah I think curses looks like it will do what I want. It doesn't
> look particularly easy to use (the [y,x] format is going to trip me up
> a lot) but I think I could write myself a simple interface to it that
> would make it simpler for me to use.
H
On Thu, 23 Jun 2005, Phillip Hart wrote:
> I've been using lists within lists for several functions, but have been
> unable, in loop form, to extract data from them or, in loop for, apply data
> to them.
[cut]
Hi Phillip,
Can you try checking for indentation? Your code came out indented all o
> The example code in the python online documentation calls a non-existant
> "div" function, so it was obviously a typing exercise, not actual code
> that anyone ever tested.
Hi Ron,
Ah, ok, I see. Check the bottom of:
http://www.python.org/doc/lib/simple-xmlrpc-servers.html
for a worki
> > has is a documentation bug: the intent is clearly to compare and contrast
> > SimpleXMLRPCServer and CGIXMLRPCRequestHandler, so the code should be
> > using the same example. The fact that it isn't is confusing, and should
> > be fixed. I'll send a bug report now. http://python.org/sf/122
On Sat, 25 Jun 2005, Alberto Troiano wrote:
> My doubt is that I want to be able to allow the user to put how many
> bombs they want and how any spaces (how big is the board) so I will have
> to create buttons dinamically, but in doing this the reference to the
> buttons will be lost How do I kn
On Sat, 25 Jun 2005, Adam Bark wrote:
> Is it possible to put controls into a shaped window in wxPython. I have
> tried putting a button on the demo and it becomes the exact size and
> shape of the window. Also when I tried to bind it to an action it
> wouldn't even start.
Hi Adam,
You might w
On Sat, 25 Jun 2005, Ming Xue wrote:
> I am trying to access oracle9i with cx_Oracle package. One of the column
> is clob and when I tried clob.read() I got non-text output. I know the
> real data is text. Can somebody show me how to convert clob to string in
> python?
Hi Ming,
This seems real
> I would like to see something more like when the file is printed:
>
> AustinJames704-111-1234
> AustinJanet704-111-1234
> etc.
>
> Is this a simple task, or am I jumping into deep water? :)
Hi Don,
Not too bad; I think you'll looking for "String Formatting":
http://www.p
> In your example, it looks like every row is ten characters long. A
^^^
Hi Don,
Gaa, that's why I'm so bad at matrix math. I meant "column", not "row".
Sorry about that.
___
Tutor maillist - Tutor@python.org
-- Forwarded message --
Date: Sun, 26 Jun 2005 14:29:22 -0400
From: Don Parris <[EMAIL PROTECTED]>
To: Danny Yoo <[EMAIL PROTECTED]>
Subject: Re: [Tutor] Alternative File I/O for Tuples
On Sat, 25 Jun 2005 22:52:08 -0700 (PDT)
Danny Yoo <[EMAIL PROTECTED]>
[I am forwarding this to the main Tutor list. Enas, if you're not
subscribed already to the Tutor list, visit:
http://mail.python.org/mailman/listinfo/tutor
Once you're subscribed, you can freely post questions to the Python-tutor
mailing list at the email address 'tutor@python.org'.]
On Mon, 27 Jun 2005, Richard Lyons wrote:
> What is the specific code that allows the IDLE window to be printed to
> notepad (in Windows XP)?
Hi Richard,
The relevant code that does the "Print Window" command lives in the
IOBinding submodule of IDLE, within the print_window() method:
http://c
On Mon, 27 Jun 2005, john taylor wrote:
> i am using win32com to call labview from python over COM. i want to set
> the value of a control element in a VI per SetControlValue(), and the
> control in the VI is an array of cluster, which has the structure
> (integer, integer, string).
>
> >>> aoc
On Mon, 27 Jun 2005, Gooch, John wrote:
> Are there any tutorials on the Python CGI module? I think I found enough
> fragments to get form data, but I need a way for the Python script to
> tell whether it is being run in a web server environment or from the
> command line.
> What I am thinking
On Wed, 29 Jun 2005, Peter Szinek wrote:
> Hello Denise,
>
> How about this:
>
> myjar = cookielib.CookieJar()
> for cookie in myjar:
> print cookie.value
>
> In this case the above code should print a single 'B'.
Yes, whenever the documentation talks about something being "iterable",
the
On Thu, 30 Jun 2005, Joseph Quigley wrote:
> I've been looking a lot for a mod that will automatically find the
> pixels in an image but I can't find one. Do you know of one? imageop and
> imghdr don't have anything like that. Thanks,
Hi Joseph,
You might want to try the Python Imaging Library
> Could I use something like cpickle to store the dictionary once it is
> made so I would not have to make it each time? I have never tried to
> use pickle so I am bit fuzzy on what it can store and what it can't.
> Also would it really buy me anything...it only takes a second or two to
> make t
> > (*)One of the hardest malicious bugs I've seen was by a disgruntled
> > employee who deliberately inserted a bug into the C source of the
> > companies compiler. He then recompiled the compiler (using the working
> > compiler) to produce a faulty compiler. He then removed his bugs in
> > the so
> > Now's not the time in my life to start a comp. sci. degree. So, my
> > questions are:
> >
> > 1) What would be good terms to google for to find an explanation of
> > how the seeming magic doesn't violate all reason?
Hi Michael,
The idea is that we can use _ourselves_ as the initial compiler
On Sat, 2 Jul 2005, Reed L. O'Brien wrote:
> > Does anyone know how to make Python calculate square roots?
> >
> Raise to the 1/2 power.
>
> >>> 4**.5
> 2.0
> >>> 16**.5
> 4.0
> >>> 81**.5
> 9.0
By the way, if you need to take the square roots of negative numbers, then
the 'sqrt' function
> #this function returns the number of lines on record for each log file.
> def line_finder(LogsInDir, flag):
> flag=flag.strip()
> return_next=False
> for line in LogsInDir:
> if return_next:
> return line.strip()
> else:
> if line.strip() == flag:
>
On Sun, 3 Jul 2005, gelsey torres wrote:
> I'm new to Python and computer programming in general. Eventually I got
> sick of just reading my programming books and typing code from them into
> the interpreter, so I decided to write a script that will grab files
> from websites and save them to th
On Fri, 1 Jul 2005, D. Hartley wrote:
> Anyone have a good (*simple*) tutorial on making/sending cookies via
> python? (i.e., not receiving/messing with them).
Hi Denise,
I did find one tutorial here that might help with the receiving side of
things:
http://www.voidspace.org.uk/python/art
-- Forwarded message --
Date: Mon, 04 Jul 2005 12:55:45 -0700
From: nephish <[EMAIL PROTECTED]>
To: Danny Yoo <[EMAIL PROTECTED]>
Subject: update
Hey, i did what you said,
added print lines to debug my line_finder function, and it was finding
everythin ok, just itera
On Tue, 5 Jul 2005, Mike Cheponis wrote:
> Why does Python not have a "case" statement, like C?
Hi Mike,
It's a proposed enhancement:
http://www.python.org/peps/pep-0275.html
That being said, a dispatch-table approach, using a dictionary, works well
in Python because it's not hard to u
-- Forwarded message --
Date: Wed, 6 Jul 2005 00:01:52 -0700 (PDT)
From: Mike Cheponis <[EMAIL PROTECTED]>
To: Danny Yoo <[EMAIL PROTECTED]>
Subject: Re: [Tutor] Case ?
On Tue, 5 Jul 2005, Danny Yoo wrote:
> On Tue, 5 Jul 2005, Mike Cheponis wrote:
>
>>
On Wed, 6 Jul 2005, Michael Huster wrote:
> In python under windows, how can I create and access a file on the
> Desktop? The following do NOT work: fp = open(r'Desktop\myFile','r') fp
> = open(r'\Desktop\myFile','r') fp = open(r'c:\Desktop\myFile','r') fp =
> open(r'c:\Windows\Desktop\myFile','
> > It's a proposed enhancement:
> >
> >http://www.python.org/peps/pep-0275.html
>
> Since this didn't come out in Python 2.4, is it "automatically"
> re-considered for 2.5 ?
Hello!
It's still in the "open" set of peps:
http://www.python.org/peps/
so there's no guarantee that PEP 275
On Wed, 6 Jul 2005, Marcus Goldfish wrote:
> I have a file format that ends in a 4-byte (int32) number. I would like
> to read this value in python on a WinXP machine with something like:
>
> fname = 'somefile'
> f = open(fname, 'rb')
> f.seek(-4,2)
> offset = f.read()
>
> ... but this doesn't
Hi Nathan,
Other folks are pointing out why you're getting certain error messages.
You may also want to consider breaking up the long second-half of the
program into into its own set of functions. I believe that the second
half could look something like this:
##
while menu_choice != 9:
On Thu, 7 Jul 2005, Nathan Pinno wrote:
> Why does invalid syntax popup?
[text cut]
Hi Nathan,
What does the SyntaxError look like? Copy-and-paste that error message
and bring it to the Tutor list. One thing we want to help you do is
recognize what the SyntaxError is really trying to say,
On Thu, 7 Jul 2005, Nathan Pinno wrote:
> Here is another error message:
>
> Traceback (most recent call last):
> File "D:\password.py", line 69, in ?
> main_menu()
> NameError: name 'main_menu' is not defined
Hi Nathan,
The error message is correct: there is no "main_menu()"
> Error Message:
> Traceback (most recent call last):
> File "D:\password.py", line 73, in ?
> add_login_command()
> TypeError: add_login_command() takes exactly 2 arguments (0 given)
>
> How do I fix it so that it runs properly, and any other errors that have
> to be fixed?
our message to the rest of the mailing list now. Good
luck!]
-- Forwarded message --
Date: Fri, 8 Jul 2005 16:08:53 -0600
From: Nathan Pinno <[EMAIL PROTECTED]>
To: Danny Yoo <[EMAIL PROTECTED]>
Subject: Re: [Tutor] Why does invalid syntax pop up?
Here's another:
On Sat, 9 Jul 2005, Nathan Pinno wrote:
> What's the invalid syntax?
>
> Here's the code (Part of my Guess the Numbers game):
>
> if a0 == x0 and a1 == x1 and a2 == x2 and a3 == x3:
> print "Congratulations! Way to go?"
> answer = raw input("Play again: (Y)es or (
On Sat, 9 Jul 2005, Nathan Pinno wrote:
> Also, I just wanted to know because I'm using it in my Giant Computer
> program for the menus, so I don't have to keep re-typing them.
Hi Nathan,
Wait; Nathan, are you using the IDLE Python programming environment to
edit your programs? I just want
On Sun, 10 Jul 2005, Srinivas Iyyer wrote:
> I have a file that looks like this:
>
> //
> AB32456\tTransaction from India
> \t 43 \t 34
> \t 34 \t 65
> \t 12 \t 35
> //
[some lines cut]
> What I have to do:
> //
> AB32456\tTransaction from India
> AB32456\t 43 \t 34
>
> nltk is looking for a module called numarray that is not part of the
> standard Python distribution. Do you have numarray installed? Look for
> C:\Python24\Lib\site-packages\numarray. If you don't have it then
> download numarray from C:\Python24\Lib\site-packages\numarray and
> install it accord
On Tue, 12 Jul 2005, Gooch, John wrote:
> I have a Python script that stores the results of the processing that it
> does in a database, but it has to have an alternate way of storing its
> data in a database-friendly way (XML)in case the database is not
> available ( connected down, data store
On Tue, 12 Jul 2005, Mike Pindzola wrote:
> I have figured many things out. system works, i just forgot to type
> os.system(). I have been looking into the os module and am finding alot
> of useful stuff. I still need to workout the best way to ask a user for
> a root password, show when ty
Hi Dave,
I saw that you're starting to learn Tkinter programming; as I was browsing
through the Beginners Guide on the Python Wiki, I ran into this:
http://wiki.python.org/moin/Intro_to_programming_with_Python_and_Tkinter
Unfortunately, I can't watch it myself because my Linux box doesn't have
t
> Does this make sense so far? Please feel free to ask more questions.
I forgot to mention that you might want to look at:
http://www.python.org/doc/faq/programming.html#how-do-i-create-a-multidimensional-list
since it's relevant to the code that you're writing. Best of wishes to
you!
___
Hi Alberto,
The issue you're seeing is in the intialize() code:
##
def initialize(self):
self.buttonmatrix=[]
self.statematrix=[]
self.bombmatrix=[]
for i in range(self.fil):
aux=[]
for j in range(self.col):
aux.app
On Thu, 14 Jul 2005, Johan Meskens CS3 jmcs3 wrote:
> is there such a place as www.perlmonks.org for python ?
Hi Johan,
Perlmonks is an excellent resource for Perl programmers; I don't believe
that any single Python-oriented place has the same feature set, although I
could be wrong.
There a
> > So the errors are getting raised before Python even knows there is a
> > problem, so it cannot catch them in an except block. From my very
> > limited expoerience of COM programming I'd guess that there is a type
> > mismatch somewhere either in the data you are passing in or in the
> > data y
> I am working on creating a Domain Specific Language that will
> solve partial differential equations. The user will enter a equation in
> pseudo code format.
[Grammar cut]
> It was decided to use Spark for the base for the compiler. To use Spark
> all that is need is to just add a new c
> I have created a class which has many "Nested list" attributes. When I
> create a second instance of the class, the lists are not empty, and
> already contain the same values as were held in the previous
> instantiation. As a C/C++ programmer, this majes no semns to me at all.
> Could someone p
301 - 400 of 2125 matches
Mail list logo