Re: [Tutor] R: Tutor Digest, Vol 125, Issue 49

2014-07-17 Thread Dan Janzen
DISCLAIMER* I have deliberately not read any of the other replies to this problem so my answer may be totally redundant! (but here it is anyway...) One of the first issues that had to be addressed is the fact that your "CSV" file is probably not in the format you assume it is. Every l

Re: [Tutor] Help deciding between python and ruby

2009-09-05 Thread Dan King
nd learning it, and what experiences they've had with python in professional contexts. To put my programming knowledge in context, I have experience with php and java; I enjoy php's ease and the syntax of java (everything is apparent from the

[Tutor] FW: Kerberos Validation

2009-08-27 Thread Dan Eicher
sword against the kerberos server. I've found one module python-kerberos, but not a lot (any?) of examples. Does anyone on the list have any experience with kerberos validation that they can share? Thanks, Dan _ Windows Live:

[Tutor] Replacing fields in lines of various lengths

2009-05-04 Thread Dan Liang
(new_tags)# join with TABs return word + TAB + tagging + TAB + decision -End code I appreciate your support! --dan ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Tutor Digest, Vol 63, Issue 8

2009-05-04 Thread Dan Liang
Hello Spir, Alan, and Paul, Thank you for your help. I have been working on the file, but I still have a problem doing what I wanted. As a reminder, I have #!usr/bin/python tags = { 'noun-prop': 'noun_prop null null'.split(), 'case_def_gen': 'case_def gen null'.split(), 'dem_pron_f': 'dem_pron

Re: [Tutor] Iterating over a long list with regular expressions and changing each item?

2009-05-04 Thread Dan Liang
--- Traceback (most recent call last): File "tag.formatter.py", line 36, in ? replaceTagging(source_name, target_name) File "tag.formatter.py", line 28, in replaceTagging new_line = newlyTaggedWord(line) + '\n' File "tag.formatter.py", l

[Tutor] Iterating over a long list with regular expressions and changing each item?

2009-05-03 Thread Dan Liang
null', 'case_def_nom': 'case_defnomnull', 'case_indef_acc': 'case_indefaccnull', 'verb_part': 'verb_partnullnull'} # call the function and get the changed text myString = replace_words(readed, word_dic)

Re: [Tutor] Working with lines from file and printing to another keeping sequential order

2009-04-27 Thread Dan Liang
continue for offset in (1, 2, 3, 4, 5, 6, 7, 8): if i+offset < len(ListLines) and ListLines[i+offset].endswith('no'): countNo+=1 print "countNo", countNo, "\t\t", ListLines[i+offset] Thank you again! --dan On Sun, Apr 26, 2009 at 10:55 AM

Re: [Tutor] Working with lines from file and printing to another keeping sequential order

2009-04-25 Thread Dan Liang
ne does not end in "yes" or "no"? I forgot to mention that I know for sure that the file has ONLY lines that end in either "yes" or "no". Any suggestions are appreciated. Also, I feel that my code is not the best way of solving the problem even if the

[Tutor] Working with lines from file and printing to another keeping sequential order

2009-04-25 Thread Dan Liang
"no" lines could be printed while keeping the order of the original lines would be great. I am new to Python and could not solve the problem. Your help is appreciated. Cheers, --dan ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] Upgrading from Python 2.5 to Python 2.6 - IDLE not working...

2008-11-08 Thread Dan
Tk ImportError: No module named _tkinter [EMAIL PROTECTED]:~> I thought of unistalling and reinstalling (using YaST) the associated Python packages to make them aware of the version change, but the Idle package says it requires Python 2.5.2, nothing more or less, so I didn'

[Tutor] SOAPpy and ZSI

2008-03-26 Thread Dan Thomas-Paquin
g the 500 error or if the transport is. I honestly don't know where to go from here. I wouldn't doubt that the envelope isn't correct for the service but I don't have access to any more info on that. Help much appreciated. Dan "All men dream: but not equally.

[Tutor] script ?

2007-10-29 Thread Dan Freeman
How can I have this script exucute a .exe file instead of beeping the system speaker? __ import os import time z = 2 while z ==2: connected = False while not connected: o=os.popen("netstat -an") for l in o: try:

Re: [Tutor] How to put an event into the Tcl/Tk event queue?

2007-08-27 Thread Dan Knierim
red a second glance; maybe event_generate can do what I need. I'll study it some more. Thanks for the clues - Dan K. "Alan Gauld" <[EMAIL PROTECTED]> wrote: > > I'd like to simulate user input to TkInter applications from > > another Python script, by inserti

Re: [Tutor] Running an exe from Python

2007-02-26 Thread Dan Klose
On 2/26/07, Nagendra Singh <[EMAIL PROTECTED]> wrote: Thanks a lot for all the suggestions. I used the function subprocess.call( 'c:\abc.exe c:\data\file1'), but as before the command window opens and closes very fast a value of 1 is displayed. How do I see the results?? I am sorry if I sound

[Tutor] issuing system commands

2007-01-26 Thread Dan Klose
Hi All, I am trying to break my nasty habit of doing EVERYTHING in perl and for this task I figure python is one of the better options. I would like to do several things: 1. take user input - this will be a password 2. use some sort of function that converts the unser input to * or the typical

Re: [Tutor] How do I fix this Invalid Mode?

2005-12-17 Thread Dan Lowe
if menu_option == 9:    store = open("exch.txt", 'wb') #save    pickle.dump(exch, store)    store.close()    break -dan-- Black holes are where God divided by zero.  -Steven Wright ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] my text adventure

2005-12-03 Thread Dan Lowe
On Dec 3, 2005, at 9:40 PM, david wrote: sorry i forgot a subject line. i have looked at the pickle module and was able to pickle world. but i can't figure how to restore everything.import pickledef save_game(state, filename):    file = open(filename, 'w')    pickle.dump(state, file)    file.cl

Re: [Tutor] python-ldap

2005-11-22 Thread Dan Lowe
y is an entry object. More information here: http://python-ldap.sourceforge.net/doc/python-ldap/ldap-objects.html -dan -- Television is one of the Six Fundamental Forces of the Universe; with the other five being Gravity, Duct Tape, Whining, Remote Control, and the Fo

Re: [Tutor] [OT] triangulation

2005-11-10 Thread Dan Klose
pretty off-topic, but --- > > > > Is it possible to be a programmer and not speak English? Are there any > > languages out there where the reserved words, library functions, etc. > > are in (say) German? I was bored: http://en.wikipedia.org/wiki/Category:Non-English- based

[Tutor] perldoc - confused!

2005-10-21 Thread Dan Klose
there a python version of perldoc? Thanks for any guidance Dan. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] file opening and errors.

2005-10-20 Thread Dan Klose
y help, pointers and suggestions. Dan. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] Expanding _treeList in TreeCtrl

2005-08-19 Thread _ Dan _
Hi to all, list: Well, I wanted to ask for some help on some subject. I have a TreeCtrl with a _treeList variable: _treeList = [ ( 'Parent 1', ['Child 1.1','Child 1.2'] ), ( 'Parent 2', [] ), ( 'Parent 3', [ 'Child 3.1', 'Child 3.2'] ), ( 'Parent 4', ['Child 4'] )

[Tutor] From file2.py append an item to file1.py combobox

2005-08-15 Thread _ Dan _
Hi to all: How can I append some data from file1.py to a combobox on file2.py? I know, if you want to append data to a combobox inside the same script, I would be like follows: # file1.py import wx class Myframe(wx.Frame): def __init__(self, *args, **kwds): ... self.mycombobox = wx.Combo

[Tutor] AppendText as new lines

2005-08-10 Thread _ Dan _
Hi, to all. Well, I have some list results that I must write to a Window. This is what I have tu show: (('Name1',), ('Name2',)) This is my "show function" def Listar_Mostrar(self,event): connect = MySQLdb.connect(host,user,passwd,db) cursor = connect.cursor() c

[Tutor] help

2005-08-09 Thread Dan Deternova
ok. i know python and want to turn all my programs i made when i was learning python into Tkinter programs. i dont know how to make if satments and display the output  like this in python: if cmd == quit: print "press exit to quit"   i have no idea how to do that in Tkinter please help.  

Re: [Tutor] NotebookSizer is no longer needed

2005-08-08 Thread _ Dan _
There is a good chance I got it all wrong... __ Renovamos el Correo Yahoo! Nuevos servicios, más seguridad http://correo.yahoo.es--- Begin Message --- Hi... Well, I'm working on Gui programs with wxglade. On MS Windows I'm getting t

[Tutor] help

2005-08-08 Thread Dan Deternova
explain to me what you did.. thanks in advance. [EMAIL PROTECTED] #program made and maintained by Dan Deternova #start of program from Tkinter import * # tells computer we are using Tkinter modual from tkMessageBox import * def cal

[Tutor] NotebookSizer is no longer needed

2005-08-08 Thread _ Dan _
Hi... Well, I'm working on Gui programs with wxglade. On MS Windows I'm getting the following message: "DeprecationWarning: NotebookSizer is no longer needed" No message on Linux... and, if I remove the notebook sizer, then I cannot put any notebook at all, so I'm kind of lost in here... Anybody kn

[Tutor] Get user input in wxpython

2005-08-06 Thread _ Dan _
Hi: I'm new to python and wxpython, and I'm trying to make a program to send mail. I'm using what follows: class MyFrame1(wx.Frame): def __init__(self, *args, **kwds): ... self.message = wx.TextCtrl(self.panel_1, -1, "") self.button_1 = wx.Button(self.panel_1, -1, "SEND Mail") .

Re: [Tutor] Can't figure out syntax error

2005-06-09 Thread Dan Schellenberg
Phew -- thanks, Ziyad. That did the trick all right. In my frustration to figure out the problem, I just began explicitly type-casting as many variables as I could, and missed the fact that I had done the same to this as well. Thanks again, Dan On 9-Jun-05, at 7:32 PM, ZIYAD A. M. AL-BATLY