[Tutor] superscript with easydialogs

2007-08-06 Thread Ben
python itself allow to the superscript. Any suggestions? Thanks in advance. -Ben ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] Hi

2007-03-16 Thread Ben
searching all over internet on pywin tutorials, manuals or documentations, and I find nothing good or concise for either tutorials or documentations about pywin. Is anyone can point me where I can find a good tutorial about pywin for someone like me? I will really appreciate it. Thank you -Ben

[Tutor] threading and gui programming

2007-03-20 Thread Ben
Hi all, I am curious about one thing. I have been doing research on gui programming. One thing that I don't understand is why there are some examples uses threading in the gui examples. Is there any benefits or advantages for using the threading in the gui programming? Thanks. ___

Re: [Tutor] threading and gui programming

2007-03-20 Thread Ben
<[EMAIL PROTECTED]> wrote: Ben wrote: > Hi all, > > I am curious about one thing. I have been doing research on gui > programming. One thing that I don't understand is why there are some > examples uses threading in the gui examples. Is there any benefits or > advantag

[Tutor] pywin DoModal vs CreateWindow

2007-03-21 Thread Ben
Recently my friend ask me for help on pywin32 gui programming. There is one thing that throw us off (Note. Both of us don't have any mfc background and we are newbie in python). When the "DoModal" is called, the gui will stay in loop. It is different when the "CreateWindow" is called. If we run th

Re: [Tutor] threading and gui programming

2007-03-23 Thread Ben
Hi Tony, Thank you very much for your pointer. I think I understand what are you explaining to me. Do you mind give me some code examples? I am still trying to grasp the gui programming overall. And it is really over my head. I really appreciate your help. Thank you -Ben On 3/23/07, Tony

[Tutor] Using Python in Windows

2008-06-25 Thread Ben
bottom of ch. 4. I'm wondering if this is because I'm using Windows. I've tried using Ubuntu, and it doesn't display correctly. Thanks, Ben ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Using Python in Windows

2008-06-28 Thread Ben
Hmm. The instruction on adding something gaspthe library seems to be catered towards Linux. I've done a Google search and glanced at the Tutorial, the Windows FAQ ( http://www.python.org/doc/faq/windows/), ect. I don't see it in the global mod

Re: [Tutor] os.popen doesn't give up

2004-12-02 Thread Ben Vinger
--- Ben Vinger <[EMAIL PROTECTED]> wrote: > --- Bob Gailer <[EMAIL PROTECTED]> wrote: > > Solutions: > > 2 - l = os.popen(r'snmpget -Os -c ' + > SNMPcommunity > > + ' -v2c -r 3 ' + IP + > > ' ' + counter, '

[Tutor] Character creator program

2010-05-12 Thread Ben Millane
Ok first off here is a link to my code http://pastie.org/956909 My problem is, that although I have the program working how I want it to work in general. I still have an issue with the user input section. If my user inputs any of the options from the menu, the program works as it should. But s

Re: [Tutor] Character creator program

2010-05-13 Thread Ben Millane
> > Ok, thank you everyone for the helpful replies. I am currently very new to > both Python and programming (started looking into the whole business about 2 > weeks ago) and I know how awful my coding skills are at the moment. But, > thanks to lists like these, I hope I can improve my skills. I wi

[Tutor] New to programming question

2005-04-12 Thread Ben Markwell
e the problem I have come up with the following: prefixes = 'JKLMNOPQ' suffix = 'ack' xsuffix = 'uack' for letter in prefixes:     n = 0     if prefixes[n] == 'O' or 'Q':     print prefixes[n] + xsuffix     else:     print letter +

how to run a programm after you have typed in the commands (was Re: [Tutor] help (fwd))

2005-04-13 Thread Ben Vinger
ou can now open a command prompt (Windows) or console (linux) in the directory where your program is saved. Then type: python hello.py If you are using Windows and this does not work, it will be because Python is not in your system path. Good luck Ben --- Danny Yoo <[EMAIL

Re: [Tutor] New to programming question (Ben M.) (Joseph Q.)

2005-04-13 Thread Ben Markwell
Thanks for everybodys input. Am learning slowly but surely. Ben On 4/13/05, [EMAIL PROTECTED] <[EMAIL PROTECTED] > wrote:Quoting Joseph Quigley <[EMAIL PROTECTED] >:> prefixes = 'JKLMNOPQ'> suffix = 'ack'>> for letter in prefixes:>  if letter == (&#

[Tutor] Question regarding the len function of a list while using a loop

2005-04-14 Thread Ben Markwell
Could somebody explain to me why the code I used to complete this exercise doesn't work. And how do you send an integer to len? Thanks Ben == As an exercise, write a loop that traverses a list and prints the length of each element. What happens if you se

Re: [Tutor] Question regarding the len function of a list while using a loop

2005-04-14 Thread Ben Markwell
Yes this does make sense.  Thank youOn 4/14/05, Brian van den Broek <[EMAIL PROTECTED]> wrote: Ben Markwell said unto the world upon 2005-04-14 08:14:> Could somebody explain to me why the code I used to complete this exercise > doesn't work.> And how do you send an integer to

Re: [Tutor] (no subject)

2005-05-26 Thread Ben Vinger
Or like this: for x in range (0,256): print ord(chr(x)), ': ', chr(x) (you could just print x, instead of ord(chr(x)), but then you would not be using ord) Ben --- Pujo Aji <[EMAIL PROTECTED]> wrote: > Actually you can do the same way: > > # Convert intA

Re: [Tutor] (no subject). Ord and Chr query

2005-05-27 Thread Ben Vinger
--- John Carmona <[EMAIL PROTECTED]> wrote: > Ben I could not get your script working indentation? ___ Can't remember an address in your address book? Enter the first few letters and Address Aut

Re: [Tutor] replaying

2005-07-18 Thread Ben Vinger
Mailman can be set up to reply to the forum, but people on this list prefer to live with pain! --- geon <[EMAIL PROTECTED]> wrote: > Hi, > > Seems to me as very unuseful thing in this phorum, > when I choose Replay > to any message, the field "to whom or Receiver" is > all the time not > tutor@

Re: [Tutor] Hy, I'm a n00b to Python, have some questions

2005-07-18 Thread Ben Vinger
--- Alex Nedelcu <[EMAIL PROTECTED]> wrote: > 4. What's the hottest web framework right now that > does not require an > application server (meaning that it runs on fastcgi) Take a look at Myghty - it seems pretty good - it is a Python rewrite of Perl::Mason (which Amazon.com is based on). Yo

Re: [Tutor] raw_input into range() function

2007-04-18 Thread Ben Sherman
On 4/18/07, Guba <[EMAIL PROTECTED]> wrote: > Hello, > > I am trying to do the exercises in Michael Dawson's "Absolute Beginner" > book. In chapter four ("for Loops, Strings, and Tuples") one of the > challenges is: "Write a program that counts for the user. Let the user > enter the starting number

Re: [Tutor] scope/namespaces

2007-04-24 Thread Ben Sherman
Am I wrong in my memory? When I was a wee lad prior to 99 for sure), I thought I would initialize my loops with: for (int x=0; x <10; x++) { } I am rapidly veering off topic. On 4/24/07, Alan Gauld <[EMAIL PROTECTED]> wrote: > Correcting my own post! > > "Alan Gauld" <[EMAIL PROTECTED]> wrote

Re: [Tutor] Fixing garbled email addresses

2007-05-01 Thread Ben Sherman
x, discarding the # <> from above, and puts each address into a list. addresses = [re_mail.search(line).group(1) for line in email_list.readlines()] # Now we print them out, comma and newline separated print ",\n".join(addresses) Let me know if you need more detail! Your pal, Ben _

Re: [Tutor] Fixing garbled email addresses

2007-05-01 Thread Ben Sherman
On 5/1/07, Dotan Cohen <[EMAIL PROTECTED]> wrote: [snip] > > List comprehensions are the best thing ever! > > Happy to help, > Ben > With Gmail one must be careful and check that the To and Subject fields contain what you'd expect. Does 'list comprehension&#

Re: [Tutor] Aaagh! Stack arrays!?! calc average

2007-05-01 Thread Ben Sherman
On 5/1/07, John Washakie <[EMAIL PROTECTED]> wrote: Oops, I meant it crashes at line 7.. > > 1) tinit = data[0][0] > 2)for d in data: > 3)if d[0] <= tinit+60: > 4)sum = sum+d > 5)else: > 6)avg = sum/len(sum) > 7)newData = append([newData],

Re: [Tutor] Aaagh! Stack arrays!?! calc average

2007-05-01 Thread Ben Sherman
On 5/1/07, John Washakie <[EMAIL PROTECTED]> wrote: Ug, It still doesn't make sense due to the sum/cnt where cnt is just an int, and sum is a 1-dimensional array! I'm missing something here about working with numpy arrays... You need to add all of the numbers in your list - you can't just

Re: [Tutor] Aaagh! Stack arrays!?! calc average

2007-05-01 Thread Ben Sherman
On 5/1/07, John Washakie <[EMAIL PROTECTED]> wrote: It aint pretty! And if I had just walked away, it probably would've taken half the time in the morning, but here's what I've come up with (any suggestions for improvements, or course are welcome): for d in data: w = len(d)

Re: [Tutor] Learning to Debug?

2007-05-16 Thread Ben Sherman
ry good at it. Does anyone have recommendations for Python-centric books/online tutorials that teach you techniques for good debugging? Hi David, welcome to Python! You should look at the pdb module. A good tutorial is at http://www.ferg.org/papers/debugging_in_python.html Good luck! Ben (accidentall

Re: [Tutor] encryption for files/passwords

2007-05-18 Thread Ben Sherman
On 5/18/07, Rohan Deshpande <[EMAIL PROTECTED]> wrote: Hey all, I am writing a small python script to maintain some passwords and identity info. All the data is in an external file. what is the best way to encrypt/decrypt this file's data using a key? I am new to encryption methods let alone

[Tutor] how long?

2007-07-03 Thread Ben Waldin
How long will it take until I successfully create my own working program that is useful? I have crated the address book ones in the tutors and just want to know how long it takes before I start to create my own thought up programs that will be useful. Thanks Ben

Re: [Tutor] String module; Count

2007-10-17 Thread Ben Sherman
mystr.count("cheese") At least it is in newer versions of python. Let me know if that helped. Cheers, Ben On 10/17/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I am having trouble getting the string.count function to work. I want it to > count the amount of dig

Re: [Tutor] Beat me over the head with it

2007-12-10 Thread Ben Bartrum
import motivation (sorry) > -Original Message- > From: [EMAIL PROTECTED] > Sent: Sat, 8 Dec 2007 22:04:04 -0600 > To: [EMAIL PROTECTED] > Subject: Re: [Tutor] Beat me over the head with it > > Need help with a motivational disorder? ;) > > When you say you want to learn Python, what's t

[Tutor] thread not running

2007-12-10 Thread Ben Bartrum
Hello I have the following, which I use within a CherryPy app. The subprocess bit is just to see if it runs or not. It works on my home PC (Python 2.5.1 on Ubuntu), but not on the live host which has Python 2.4.4 on Debian Etch. def daemon(): while 1: myperiodicfunction

Re: [Tutor] thread not running

2007-12-10 Thread Ben Bartrum
> What's going wrong when running it with 2.4? AfaIcs, all modules are > in 2.4, so it my not have to do anything with the Python version, but > with the underlying system. Any traceback? Perhaps replace the > subprocess part with just a print statement to see what's happening? There are no trace

Re: [Tutor] Program Specification Request

2008-01-16 Thread Ben Bartrum
>Question(s): >Q01: Is this a 'reasonable' first project? Yes. But I'd say do it in 2 phases. First do a command-line version, then do the GUI. >Q02: We can use either MAC or WinXP but which? Or both? It realy doesn't matter >Q03: Is this the appropriate forum? Yes _

Re: [Tutor] What web framework?

2008-01-29 Thread Ben Bartrum
Yes, CherryPy is an excellent, and uniquely straightforward tool for writing a database-driven web application. I'd start looking into things like Django for larger sites where you also want templating, and client-side interactivity through JavaScript etc. In my simple CherryPy apps, I use Pyth

Re: [Tutor] PYTHON????

2005-09-01 Thread Ben Vinger
The Python interpreter already contain the code for multiplication, so you don't need to write it. You can just use it: x = raw_input('give the first number') y = raw_input('give the second number') print x, ' times ', y, ' is', int(x) * int( y) Or in the interactive interpreter you can just:

Re: [Tutor] hey i need some help here

2005-09-11 Thread Ben Vinger
indows XP it is done with Control Panel/System/Advanced/Environment Variables. Edit the PATH environment variable in the System settings to add C:\Python22 or C:\Program Files\Python22 (or wherever you put Python) (taken from http://cars9.uchicago.edu/software/python/) Ben --- Matt Warren <[E

Re: [Tutor] Website monitoring program.

2005-11-21 Thread Ben Vinger
Below is a program I found at http://starship.python.net/crew/neale/ (though it does not seem to be there anymore.) It uses a seperate file for the URLs --- Adisegna <[EMAIL PROTECTED]> wrote: > My question is how to use a loop to go through a > tuple of URLs. Please feel > free to suggest an ea

[Tutor] extra characters in XML

2006-01-11 Thread Ben Vinger
ous code without the if condition, on a console it looks like: < e n d _ t i m e > And if you output that to a text file and open that in a text editor, the text editor shows a square instead of a space in between every character.

Re: [Tutor] extra characters in XML

2006-01-11 Thread Ben Vinger
e large Unicode string. text = infile.read() # Close the file. infile.close() The same function is used to open a file for writing; just use "w" (write) or "a" (append) as the second argument. --- Ben Vinger <[EMAIL PROTECTED]> wrote: > Hello all > > I want

Re: [Tutor] extra characters in XML

2006-01-12 Thread Ben Vinger
Thanks - it was exactly as you said --- Kent Johnson <[EMAIL PROTECTED]> wrote: > Most likely your XML file is 16-bit unicode, not > utf-8. When ascii text > is represented as unicode, every other byte will be > a null byte. That is > the extra character that shows up as a space or box > depen

[Tutor] a class knowing its self

2006-01-18 Thread Ben Vinger
() Why does a work and b not? b returns: <__main__.Skill instance at 0x401e260c> <__main__.Skill instance at 0x401e230c> <__main__.Skill instance at 0x401e23ec> why does b not return the names of the 3 instances of Skill? Thanks Ben ___

Re: [Tutor] a class knowing its self

2006-01-21 Thread Ben Vinger
Yes, you are right, - Shuying Wang's suggestion fixed the immediate problem, but there is still someting wrong with my code - maybe I'll ask about it again later. --- Ewald Ertl <[EMAIL PROTECTED]> wrote: > > > Have a more precisely look at your code. > s.getName() does just return, what you h

[Tutor] passwords in scripts

2006-01-21 Thread Ben Vinger
hide/encrypt these passwords? Or can the scripts be converted to compiled code in order for the passwords to be hidden? Thanks Ben ___ Win a BlackBerry device from O2 with Yahoo!. Enter now. http://www.yahoo.co.uk/black

Re: [Tutor] passwords in scripts

2006-01-23 Thread Ben Vinger
ust keep a copy of the file on a memory stick, edit it there, compile it and replace the current compiled file with the newly compiled file. Not that I know anything about compiling Python programs, I just want to know if this is a possibility Thanks Ben --- Ivan Furone <[EMAIL PROTECTED]>

Re: [Tutor] passwords in scripts

2006-01-23 Thread Ben Vinger
glance whether the backups worked. This can also easily be emailed out, or warnings can be sent. But surely my problem is a very common one. Every web-app must supply a username and password to make a connection to its backend database, for example. Thanks Ben --- Danny Yoo <[EMAIL PROTECT

Re: [Tutor] passwords in scripts

2006-01-24 Thread Ben Vinger
--- Alan Gauld <[EMAIL PROTECTED]> wrote: > command line arguments? > > $ startapp -d mydb -l user/password & > > That way they are > 1) kept secret(especially if you turn shell history > off ;-) and > 2) can be changed every time you restart the server > app and > 3) you can have production a

Re: [Tutor] passwords in scripts

2006-01-24 Thread Ben Vinger
oned it, I will leave the Unix security to whoever in our large organisation's concern it is. I just want to avoid endangering it myself. Thanks Ben --- Danny Yoo <[EMAIL PROTECTED]> wrote: > > > On Tue, 24 Jan 2006, Ivan Furone wrote: > > > I'm not sure I und

Re: [Tutor] mod_python and other web frameworks

2006-01-25 Thread Ben Vinger
--- Intercodes <[EMAIL PROTECTED]> wrote: > List: I am still open to suggestions. Being also keen to write better web apps in Python, I've spent a considerable amount of time reading about this (and it is indeed confusing), I've opted to try out something like Pylons or Turbogears. One thing I w

[Tutor] Trying to enter text from a file to a Dictionary

2006-01-26 Thread Ben Markwell
Being new to programming, I made a text file that contains terms with their definitions that I have come across in my studying. As an exercise, I thought  I would make a glossary using a dictionary so I can look up words, add new words, view all entries, etc.  I want to enter the words and def

[Tutor] Fwd: Trying to enter text from a file to a Dictionary

2006-01-27 Thread Ben Markwell
Hello Danny Thanks for replying to my post. >   I tried :>>   for line in f:Thanks for your reply to my post. >   gloss[line] = f.readline()> This should have worked, but there's one problem.  Whenever we're doingsomething like:for line in f:...there can be some interference bet

Re: [Tutor] Fwd: Trying to enter text from a file to a Dictionary

2006-01-27 Thread Ben Markwell
Hi Ben,Yes, that's the point: Python doesn't know when to stop.  *grin* The way we've rewritten the loop:while True:...is an "infinite" loop that doesn't stop unless something in the loop'sbody does something extraordinary, like "breaking" o

Re: [Tutor] Trying to enter text from a file to a Dictionary

2006-01-27 Thread Ben Markwell
On 1/27/06, Bob Gailer <[EMAIL PROTECTED]> wrote: Bob Gailer wrote:> Alan Gauld wrote:>>> Hi Ben,>>>>>>>>> I want to enter the words and definitions from the  text file into the>>> dict.>>> The way the text file is set up is tha

Re: [Tutor] Trying to enter text from a file to a Dictionary

2006-01-27 Thread Ben Markwell
> I understand f.next(), but [gloss.setdefault(l,f.next()) for l in f]> is beyond me at this point. [expr for l in f] is a "list comprehension". expr is an _expression_ thatmay involve l.result = [expr for l in f] # is equivalent to:result = []for l in f:result.append(expr) "list comprehension"

[Tutor] Trapping a Dr Watson error

2006-02-02 Thread Ben Vinger
particular server. (It even runs fine against the Application log of this server, but bombs out on the System log). Anyways, I want to know if it is possible to trap, handle and survive a Dr Watson error programatically Thanks Ben

Re: [Tutor] python help

2006-02-08 Thread Ben Vinger
tions. Just stick at it Natasha, it is far more interesting when you the programming challenge has to accomplish a real result. Ben --- Natasha Menon <[EMAIL PROTECTED]> wrote: > Hi, > > I have a few doubts in python programming. C if > any of u can help me out. > &g

[Tutor] How can a function know where it was called from

2006-03-02 Thread Ben Vinger
Hello   I want myfunction in the pseudocode below return something different if it was called from indexfunction.   def indexfunction():    blah   def myfunction():   x = 'whatever'   if :  return x   else:  return + x +    

Re: [Tutor] How can a function know where it was called from

2006-03-02 Thread Ben Vinger
Thanks to all who responded.  I ended up using  a sender parameter as suggested by Andre and Alan, as this was very simple to do.   Ben   ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] How to monitor streaming data from the internet via modem?

2006-03-09 Thread Ben Vinger
On 3/8/06, Alan Gauld <[EMAIL PROTECTED]> wrote: Ethereal is one well knownand powerful one, but there are others which may be simpler touse.   Yes, with Ethereal comes a command-line version called tethereal, which I've used within Python on both Windows and Linux.  It worked nicely for trafic a

[Tutor] Build your own web server in three lines of code

2006-03-23 Thread Ben Vinger
The nice-looking, revamped Python web site states that you can do this, but does not go on to say how. Does anyone know? On an OT note, I've recently seen how it can be done in a shell script: http://www.debian-administration.org/articles/371

[Tutor] TypeError: dict objects are unhashable

2006-03-24 Thread Ben Vinger
Hello I want to create a dictionary (from SQL usernames) of the format: accounts = { ('psmit', '123456'): 'psmit', ('rmatt', 'mypass'): 'rmatt', } So I have: accounts = {} UserCursor.execute(sqlstr) rows = UserCursor.fetchall() UserConn.commit()

[Tutor] List slicing and joining

2007-04-11 Thread Ben Sherman
here a better (or more pythony) way? hostname=host_data[0].split(".")[0] domain=".".join(host_data[0].split(".")[1:]) Thanks, Ben ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] please help me!

2007-04-12 Thread Ben Sherman
You On 4/12/07, suryo agung <[EMAIL PROTECTED]> wrote: > pleate tell me how to make > > input number=4 > result > > 1 > 22 > 333 > > > in python > please give me your answer. input_number = 4 for i in range(1,input_number + 1): print str(i) * i If this is homework, please tell your teach

[Tutor] Scanning a file for specific text and copying it to a new file

2010-12-02 Thread Ben Ganzfried
that is at the end...) Thank you very much for any help you can provide. Much appreciated! Ben ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

[Tutor] Meaning of -1 in Python

2010-12-10 Thread Ben Ganzfried
using negative numbers to count a string work? I have read something about this earlier... Also, does the part: b>n mean, in this case: "bad comes after not in the string 's'"? Thank you very much. Sincerely, Ben ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

[Tutor] Tab delimited question

2010-12-13 Thread Ben Ganzfried
y help you have. This is a much simplified example from the script I'm actually writing, but I need to figure out a way to eliminate the noise after the key and the word immediately following it are found. Thank you very much for any help you can provide. Ben ___

[Tutor] AttributeError: 'list' object has no attribute 'find'

2010-12-21 Thread Ben Ganzfried
another method besides the 'find' method that would do the same thing that 'find' does that would work on my variable 'source' as it currently is? Thanks so much, Ben #recursively find each instance of the tag throughout the whole document def findOneTag (tag

[Tutor] Java Virtual Machine Launcher Question

2010-12-26 Thread Ben Ganzfried
when trying to open the .jar file for my converter, I get the following message: "Java Virtual Machine Launcher: Failed to load Main-Class manifest attribute from C:\Users\Ben\AppData\Local\Temp\Rar$DI01.718\isatools_deps.jar" If anyone could help me better understand how to fix this, wh

[Tutor] Odd result from function call

2011-01-07 Thread Ben Ganzfried
ly going on such that only the first digit is being evaluated? That is, the interpreter knows that x is 10 and y is 5-- and yet, for some reason the 5 is being tested against the 1 and since 5 is bigger than 1, it concludes that 5 is greater than 10. thanks! Ben ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

[Tutor] Object/Class Beginner Questions

2011-01-14 Thread Ben Ganzfried
following error: >>> t1 = Time() >>> t1.hours = 3 >>> t1.minutes = 30 >>> t1.seconds = 45 >>> print_time(t1) Traceback (most recent call last): File "", line 1, in print_time(t1) NameError: name 'print_time' is not defined

Re: [Tutor] Object/Class Beginner Questions

2011-01-14 Thread Ben Ganzfried
be called from the command prompt. Although if this isn't quite right or there's more to it, I would still definitely appreciate any advice you have. Thanks again, Ben On Fri, Jan 14, 2011 at 1:53 PM, Ben Ganzfried wrote: > Hey guys, > > I'm using a tutorial geared for

Re: [Tutor] Object/Class Beginner Questions

2011-01-14 Thread Ben Ganzfried
* I meant that*: A method actually can be called from the command prompt, but the syntax is quite different than that used to call a function from the command prompt. On Fri, Jan 14, 2011 at 2:37 PM, Ben Ganzfried wrote: > I actually just figured it out (since the tutorial talks about

[Tutor] OOP question

2011-01-18 Thread Ben Ganzfried
e accessible to all the other methods in the class. This does not seem to be the case. So what is the ideal fix? On the one hand I still need to initialize "odds", right? But if "odds" is within the initialization method, how else can it be accessed by the other methods? Than

[Tutor] Project Idea

2011-01-28 Thread Ben Ganzfried
that you could suggest. Thanks a bunch, Ben ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

[Tutor] Roulette Unit Test Questions

2011-02-05 Thread Ben Ganzfried
Hey, I'm having a lot of confusion getting the unit test working for one of my classes for the Roulette bot I'm working on and would greatly appreciate any advice or help. Here is the description of what I am trying to do: http://homepage.mac.com/s_lott/books/oodesign/build-python/html/roulette/b

[Tutor] Tic-Tac-Toe

2011-02-19 Thread Ben Ganzfried
side the appropriate cells, but clearly the error means that what I'm trying to do is not what is actually happening. My full code is below and I would greatly appreciate any help you can provide. Thanks, Ben _- #Ben Ganzfried #2/18/11 #Tic-Tac-Toe class Player: def

[Tutor] Problem recognizing '{' character?

2011-03-28 Thread Ben Hunter
Hi, I'm completing the Python lessons on YouTube that Google posted. At the end of section 2 of day 2, there is a task to identify files then put them in a zip file in any directory. The code is from the 'solution' folder, so it's not something I wrote. I suspect I have a problem with PATHS or env

Re: [Tutor] Problem recognizing '{' character?

2011-03-29 Thread Ben Hunter
ys.stderr.write(stderrdata). I certainly would have stumbled over that. -BJH On Mon, Mar 28, 2011 at 8:12 PM, Ben Hunter wrote: > Hi, > > I'm completing the Python lessons on YouTube that Google posted. At the end > of section 2 of day 2, there is a task to identify files then put

[Tutor] Data frame packages

2011-03-31 Thread Ben Hunter
Is anybody out there familiar with data frame modules for python that will allow me to read a CSV in a similar way that R does? pydataframe and DataFrame have both befuddled me. One requires a special stripe of R that I don't think is available on windows and the other is either very buggy or I've

Re: [Tutor] Data frame packages

2011-03-31 Thread Ben Hunter
before fillvalue, so I guess that did it. It's a handy way to handle alpha-numeric data. My problem with the csv module was that it interpreted all numbers as strings. Thanks again. On Thu, Mar 31, 2011 at 8:17 AM, James Reynolds wrote: > > > On Thu, Mar 31, 2011 at 11:10 AM, Blo

[Tutor] installing where does my money go

2011-04-07 Thread Ben Teeuwen
local packages. (Needs more details...)" bteeuwen@Ben-3 ~/Sites/wdmmg]$./setup.py from: can't read /var/mail/setuptools from: can't read /var/mail/wdmmg ./setup.py: line 4: syntax error near unexpected token `newline' ./setup.py: line 4: `setup(' Then I added this to setup.py: #!

[Tutor] ImportError: No module named wdmmgext.load

2011-04-11 Thread Ben Teeuwen
irst question. Thanks in advance for the help! Ben import json import os import pkg_resources import wdmmg.model as model from wdmmgext.load import uganda class TestDepartments(object): @classmethod def setup_class(self): model.repo.delete_all() model.Session.r

[Tutor] ImportError: No module named wdmmgext.load

2011-04-15 Thread Ben Teeuwen
de=404, reason=Not Found Maybe both are due to the wdmmgext.load error, so I'll ignore this for now and first try to find answer to my first question. Thanks in advance for the help! Ben import json import os import pkg_resources import wdmmg.model as model from wdmmgext.load import u

Re: [Tutor] running more than one python program at the same time

2012-08-28 Thread Ben Fishbein
I'm on a Mac. Using Lion. I just tried opening the terminal and typing "python." And I'm able to open several terminal windows this way. I think this should be able to run many programs simultaneously. Thanks for your help. -Ben On Tue, Aug 28, 2012 at 6:04 PM,

Re: [Tutor] running more than one python program at the same time

2012-08-28 Thread Ben Fishbein
Stupid question: how do I run a program from the terminal? I've always just gone to the drop down menu and clicked run to do it in idle. On Tue, Aug 28, 2012 at 6:17 PM, Ben Fishbein wrote: > I'm on a Mac. Using Lion. I just tried opening the terminal and typing > "python.&

Re: [Tutor] How (not!) lengthy should functions be?

2015-04-16 Thread Ben Finney
such a principle in mind, and knowing that it's worth spending effort to uphold, will serve you well. -- \ “Outside of a dog, a book is man's best friend. Inside of a | `\dog, it's too dark to read.” —Groucho Marx | _o__)

Re: [Tutor] lists, name semantics

2015-04-17 Thread Ben Finney
cts just aren't engineered for security.” —Brian | `\ Valentine, senior vice-president of Microsoft Windows | _o__)development, 2002 | Ben Finney ___ Tutor maillist - Tutor@python.org To un

Re: [Tutor] lists, name semantics

2015-04-17 Thread Ben Finney
Ben Finney writes: > Bill Allen writes: > > > If I have a list defined as my_list = ['a','b','c'], what is the is > > differnce between refering to it as my_list or my_list[:]? > > ‘my_list’ is a reference to the object you'

Re: [Tutor] sample dictionairies

2015-04-19 Thread Ben Finney
Kranzberg's First Law of Technology | _o__) | Ben Finney ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Life Grid Implementation

2015-04-20 Thread Ben Finney
ts, that is best discussed with your course supervisor, not us. -- \ “Kissing a smoker is like licking an ashtray.” —anonymous | `\ | _o__)

Re: [Tutor] sample dictionairies

2015-04-20 Thread Ben Finney
es for both.” —John Andrew | _o__) Holmes, _Wisdom in Small Doses_ | Ben Finney ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] introspection

2015-04-20 Thread Ben Finney
2015 by Ned Batchelder https://www.youtube.com/watch?v=_AEJHKGk9ns>. -- \ “I must say that I find television very educational. The minute | `\ somebody turns it on, I go to the library and read a book.” | _o__)—Groucho Mar

Re: [Tutor] bin to dec conversion puzzlement

2015-04-20 Thread Ben Finney
nciple is that you must not fool yourself, and you are the | _o__) easiest person to fool.” —Richard P. Feynman, 1964 | Ben Finney ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Pun panic

2015-04-21 Thread Ben Finney
`\leave politics alone, but politics won't leave you alone.” | _o__) —Richard M. Stallman, 2002-07-26 | Ben Finney ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: ht

Re: [Tutor] introspection

2015-04-21 Thread Ben Finney
ject knows nothing about that relationship. -- \“I washed a sock. Then I put it in the dryer. When I took it | `\ out, it was gone.” —Steven Wright | _o__) | Ben Finney ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Pun panic

2015-04-22 Thread Ben Finney
Peter Otten <__pete...@web.de> writes: > Ben Finney wrote: > > > The Pythonic way to pronounce that would be “dunder Pete dunder” > > https://wiki.python.org/moin/DunderAlias>. > > Hm, should I campaign for a peter() builtin? You'll need a working implement

Re: [Tutor] Pun panic

2015-04-22 Thread Ben Finney
Albert-Jan Roskam writes: > - Original Message - > > From: Ben Finney > > You'll need a working implementation first. Put it on BullCodes > > https://bull.codes/> for bonus Python-based free-software > > repository hosting points! > > Is bull.co

Re: [Tutor] Pun panic

2015-04-22 Thread Ben Finney
Alex Kleider writes: > On 2015-04-22 05:40, Ben Finney wrote: > > http://mako.cc/writing/hill-free_tools.html> > > > > Kallithea (which is what powers BullCodes) is free software, meaning > > anyone is free to see how it works and change it and run their own

[Tutor] Please disable “digest mode” before participating (was: Tutor Digest, Vol 134, Issue 86)

2015-04-25 Thread Ben Finney
l-electric house. I forgot and left the | `\ porch light on all day. When I got home the front door wouldn't | _o__)open.” —Steven Wright | Ben Finney ___ Tutor maillist - Tutor@python.org To unsubscrib

  1   2   3   4   >