Re: [Tutor] MSSQL Connection

2007-05-22 Thread János Juhász
Hi Leon, > > Hi John, > > > > Here's the code (I do have permissions to truncate, works manually under > > the same user. > > > > > > import pymssql > > > > con = pymssql.connect > > (host='server',user='user',password='pwd',database='DB_QA') > > cur = con.cursor() > > > > > > query="truncate TA

Re: [Tutor] sending data between classes

2007-05-22 Thread Alan Gauld
"Antonio Diaz" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] oh ok :)but how do i manage to use a variable on one class in another? exclass main () :.def on_rotate_activate(self, widget, *args): window_rotate=edit_rotate()print window_rotate.value..class edit_rota

Re: [Tutor] please help formating

2007-05-22 Thread Andreas Kostyrka
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Why does my "homework-alert" ring with this post? Andreas kumar s wrote: > hi group, > > i have a data obtained from other student(over 100K) > lines that looks like this: > (39577484, 39577692) [['NM_003750']] > (107906, 108011) [['NM_002443']] > (

[Tutor] please help formating

2007-05-22 Thread kumar s
hi group, i have a data obtained from other student(over 100K) lines that looks like this: (39577484, 39577692) [['NM_003750']] (107906, 108011) [['NM_002443']] (113426, 113750) [['NM_138634', 'NM_002443']] (106886, 106991) [['NM_138634', 'NM_002443']] (100708, 100742) [['NM_138634', 'NM_002443']]

Re: [Tutor] Behaviour of dictionaries and others when deleting?

2007-05-22 Thread Bill Campbell
On Mon, May 21, 2007, Kent Johnson wrote: >Bill Campbell wrote: >> Is the behaviour defined if one is processing a dictionary using >> iteritems, and delete items? >> >> for k, v in d.iteritems(): >> if somecondition(k, v): del d[k] >> >> Would this process all the original members of the dic

[Tutor] sending data between classes

2007-05-22 Thread Antonio Diaz
oh ok :)but how do i manage to use a variable on one class in another? exclass main () :.def on_rotate_activate(self, widget, *args): window_rotate=edit_rotate()print window_rotate.value..class edit_rotate(wndBase):def my_response(self, widget, respuesta):if r

Re: [Tutor] Glade + python dialogs

2007-05-22 Thread Alan Gauld
"Antonio Diaz" <[EMAIL PROTECTED]> wrote > hello, i have a problem, i created a main window on Glade. You might get better results asking on the wxPython mailing list. There could well be Glade experts here but its more by luck than good reason, tutor is really aimed at learning Python itself. A

[Tutor] Glade + python dialogs

2007-05-22 Thread Antonio Diaz
hello, i have a problem, i created a main window on Glade. now second i created a dialog window.how do i use the input data on the dialog to affect things on the main window?class edit rotate is the problem. :( oh btw i am using PIL library, sometimes img object doesnt want to change. oh i almos

Re: [Tutor] SMS to Python

2007-05-22 Thread wesley chun
> I would like to be able to send an SMS message from my phone which is then > picked up by a Python script and acted on. I'm fairly proficient in Python > and networking, but don't know much about SMS messaging. Where's the best > place to start? it depends on your application. at my current

Re: [Tutor] Starting with wxPython

2007-05-22 Thread ALAN GAULD
> Could you please give the title and author of that book. Oops, sorry. Its "wxPython in Action", published by Manning. Authors: Noel Rappin, Robin Dunn Dunn is of course the author of wxPython. Alan G ___ Yahoo! Mail is the w

Re: [Tutor] Starting with wxPython

2007-05-22 Thread Alan Gauld
"Alan Gilfoy" <[EMAIL PROTECTED]> wrote > soon, and I plan to use wxPython to do so. What, do you think, is > the > best tutorial out there for wxPython? I'm working through the new wxPython book and highly recommend it. It's one of the best GUI books I've read - and I've read a few in my time

[Tutor] Starting with wxPython

2007-05-22 Thread Alan Gilfoy
I'm not quite there yet, but I want to get into using GUIs in Python soon, and I plan to use wxPython to do so. What, do you think, is the best tutorial out there for wxPython? Also, what happens when you code for some GUI feature and run the script in your IDE, such as IDLE? Will the graphi

Re: [Tutor] SMS to Python

2007-05-22 Thread Andreas Kostyrka
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Well, how do plan to receive the SMS? The range is from special contracts with mobile carriers, over using some webservice, to using a GSM module (a special "mobile" designed not to be mobile *g*), or just some mobile via datacable, ... So what are y

Re: [Tutor] SMS to Python

2007-05-22 Thread Alan Gauld
"Smith, Jeff" <[EMAIL PROTECTED]> wrote FWIW. Here's the BT SDK sample SMS code... from datetime import datetime import sys import btsdk def send_sms(sender, messageText, recipients): server = btsdk.services.Messaging() resp = server.sendMessage(recipients, sender, sender, messageText)

Re: [Tutor] SMS to Python

2007-05-22 Thread Alan Gauld
"Smith, Jeff" <[EMAIL PROTECTED]> wrote i > don't know much about SMS messaging. > Where's the best place to start? There are some web sites that you could acvcess via Python. Or there is BT's Web21C SDK which includes the ability to do SMS and is available in Python: http://sdk.bt.com It's

[Tutor] SMS to Python

2007-05-22 Thread Smith, Jeff
I would like to be able to send an SMS message from my phone which is then picked up by a Python script and acted on. I'm fairly proficient in Python and networking, but don't know much about SMS messaging. Where's the best place to start? Thanks, Jeff _

Re: [Tutor] MSSQL Connection

2007-05-22 Thread johnf
On Tuesday 22 May 2007 06:35, Leon Keylin wrote: > Hi John, > > Here's the code (I do have permissions to truncate, works manually under > the same user. > > > import pymssql > > con = pymssql.connect > (host='server',user='user',password='pwd',database='DB_QA') > cur = con.cursor() > > > query="tr

Re: [Tutor] Rounding to nearest cent

2007-05-22 Thread Brian van den Broek
Jessica Brink said unto the world upon 05/22/2007 09:08 AM: > How would I round to the nearest cent when doing calculations with dollar > amounts? > > -Jess > Hi Jess, The decimal module was introduced in large part to facilitate financial calculations. Have a look at

Re: [Tutor] Tutor Digest, Vol 39, Issue 57

2007-05-22 Thread Leon Keylin
Hi John, Here's the code (I do have permissions to truncate, works manually under the same user. import pymssql con = pymssql.connect (host='server',user='user',password='pwd',database='DB_QA') cur = con.cursor() query="truncate TABLE bbConsolidatedMessageAcks" cur.execute(query) print "Dele

[Tutor] Rounding to nearest cent

2007-05-22 Thread Jessica Brink
How would I round to the nearest cent when doing calculations with dollar amounts? -Jess ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] Python Articles

2007-05-22 Thread Eiwot
Hi all, I found this blog interesting http://pyarticles.blogspot.com .Let's check it out :) _ Create the ultimate e-mail address book. Import your contacts to Windows Live Hotmail. www.windowslive-hotmail.com/learnmore/managemai

Re: [Tutor] creating a buffer object from a file ?

2007-05-22 Thread Alan Gauld
"Iyer" <[EMAIL PROTECTED]> wrote > How do I go about creating a buffer object from > a file containing binary data ? I have a function > that accepts only buffer objects for it's parameters Can you define what you mean by a buffer object? Python uses duck typing so, unless the function has been b