Re: [Tutor] were do i put the random number genorator

2007-05-11 Thread Alan Gauld
"Treloar, Nick" <[EMAIL PROTECTED]> wrote > i am tyin to make a number guesing game were do > i put the random genorator it the top of each child > screen def Frankly thats the least of your problems. You need to consider how you are going to pass references to the various widgets around, which,

Re: [Tutor] Web GUI for a network management tool

2007-05-11 Thread Thanos Panousis
The application is running on a server. It does things to the network and logs stuff in a db. My web gui will use the db to visualize the actions of the system, change configuration and so on. I 'm going to need some hardcore graphing functionalities. And for that reason alone, I think jfreechart

Re: [Tutor] .NET web services

2007-05-11 Thread Kent Johnson
shiv k wrote: > Dear All, > I want to implement web services in Python for our project and i want to > use these frm .NET framework. pls tell me how the .Net platform will > interact with my these services. You might be interested in IronPython which is integrated with .NET http://www.codeplex.c

[Tutor] (no subject)

2007-05-11 Thread shiv k
Dear All, I want to implement web services in Python for our project and i want to use these frm .NET framework. pls tell me how the .Net platform will interact with my these services. Shiv _ Palate Teasers: Straight from Master

Re: [Tutor] Web GUI for a network management tool

2007-05-11 Thread Kent Johnson
Thanos Panousis wrote: > I 'm going to need some hardcore graphing functionalities. And for > that reason alone, I think jfreechart is the only thing that provides > free and decent solution, also designed with the web in mind. jfreechart is a Java library so it will not integrate easily into a P

Re: [Tutor] Python fast enough for ad server?

2007-05-11 Thread OkaMthembo
Hi guys, I stumbled upon a tool called Psyco (http://psyco.sourceforge.net/) sounds like what i need. Thanks again, Lloyd On 5/10/07, OkaMthembo <[EMAIL PROTECTED]> wrote: Thanks for all your contributions. i think i will do it all in Python, it seems to me that the advantages far outweigh a

Re: [Tutor] .NET web services

2007-05-11 Thread Mike Hansen
> -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Kent Johnson > Sent: Friday, May 11, 2007 4:18 AM > To: shiv k > Cc: tutor@python.org > Subject: Re: [Tutor] .NET web services > > shiv k wrote: > > Dear All, > > I want to implement web services in

Re: [Tutor] .NET web services

2007-05-11 Thread Andreas Kostyrka
I think he meant to access it from .NET, although the mail is quite unclear. Andreas -- Ursprüngl. Mitteil. -- Betreff:Re: [Tutor] .NET web services Von:"Mike Hansen" <[EMAIL PROTECTED]> Datum: 11.05.2007 13:37 > -Original Message- > From: [EMAIL PROTECTED] > [ma

Re: [Tutor] Truncating a Table

2007-05-11 Thread Andreas Kostyrka
Commit it? Andreas -- Ursprüngl. Mitteil. -- Betreff:[Tutor] Truncating a Table Von:"Leon Keylin" <[EMAIL PROTECTED]> Datum: 11.05.2007 15:39 Why would this not work? import pymssql con = pymssql.connect(host='server name',user='username',password='pwd',database='Database')

Re: [Tutor] Truncating a Table

2007-05-11 Thread Tim Golden
Leon Keylin wrote: > Why would this not work? > > import pymssql > > con = pymssql.connect(host='server > name',user='username',password='pwd',database='Database') > cur = con.cursor() > > > query="TRUNCATE TABLE Consolidatedmsgs;" > cur.execute(query) > print "Table Truncated: %d rows deleted"

Re: [Tutor] Truncating a Table

2007-05-11 Thread Leon Keylin
Thanks Tim for a fast reply. The return gives me 0 Rows Truncated message and when I look at the table, every record is still there. There are no foreign keys on the table and no errors. Andreas asked if I should commit after, should I? I didn't think I needed to but I can try that. On 5/11/0

Re: [Tutor] Truncating a Table

2007-05-11 Thread Leon Keylin
Yep, works if I do it manually, under the same user. On 5/11/07, Tim Golden <[EMAIL PROTECTED]> wrote: Leon Keylin wrote: > Thanks Tim for a fast reply. > > The return gives me 0 Rows Truncated message and when I look at the table, > every record is still there. > There are no foreign keys on t

Re: [Tutor] Truncating a Table

2007-05-11 Thread Andreas Kostyrka
Try commiting it. Actually that might depend upon the dbserver used, but PostgreSQL for example requires commits for everything (including statements like CREATE TABLE). Andreas -- Ursprüngl. Mitteil. -- Betreff:Re: [Tutor] Truncating a Table Von:"Leon Keylin" <[EMAIL PROTECTED]> Da

[Tutor] Truncating a Table

2007-05-11 Thread Leon Keylin
Why would this not work? import pymssql con = pymssql.connect(host='server name',user='username',password='pwd',database='Database') cur = con.cursor() query="TRUNCATE TABLE Consolidatedmsgs;" cur.execute(query) print "Table Truncated: %d rows deleted" % cur.rowcount --- The return I g

Re: [Tutor] Truncating a Table

2007-05-11 Thread Tim Golden
Leon Keylin wrote: > Thanks Tim for a fast reply. > > The return gives me 0 Rows Truncated message and when I look at the table, > every record is still there. > There are no foreign keys on the table and no errors. > > Andreas asked if I should commit after, should I? I didn't think I > needed

Re: [Tutor] Truncating a Table

2007-05-11 Thread Andreas Kostyrka
You either have autocommit enabled or you need to commit all data changes. Can't tell the details as I'm not at my laptop :( Andreas -- Ursprüngl. Mitteil. -- Betreff:Re: [Tutor] Truncating a Table Von:"Leon Keylin" <[EMAIL PROTECTED]> Datum: 11.05.2007 15:55 Thanks Tim for

Re: [Tutor] Truncating a Table

2007-05-11 Thread Tim Golden
Leon Keylin wrote: > Yep, works if I do it manually, under the same user. And on other tables? (Just trying to narrow down). Does this work: import pymssql db = pymssql (...) q = db.cursor () q.execute ("CREATE TABLE #a (i INT)") q.execute ("INSERT INTO #a (i) VALUES (1)") q.execute ("SELECT

Re: [Tutor] Truncating a Table

2007-05-11 Thread Leon Keylin
Same result. I think the problem maybe with the extension module. I am going to look for a different way of running a truncate. Thanks to both of you for some excellent advice! On 5/11/07, Andreas Kostyrka <[EMAIL PROTECTED]> wrote: Try commiting it. Actually that might depend upon the dbserve

Re: [Tutor] Truncating a Table

2007-05-11 Thread Tim Golden
Leon Keylin wrote: > Same result. I think the problem maybe with the > extension module. It could be (try using the more recent pyodbc instead?) but in fact it worked for me, albeit in the toy example I posted. However, there's only so much mileage in working round a module's possible inadequaci

[Tutor] Declaring a Python/C Package and Accessing Python Constants from C API

2007-05-11 Thread Adam Pridgen
Hello everyone, I am trying to create a python package that includes both a native python module and then a python module created using the Python/C API. I have several questions pertaining to this area. First, how do I make the C API module aware of the python module. Specifically, I have dec

Re: [Tutor] Declaring a Python/C Package and Accessing Python Constants from C API

2007-05-11 Thread Adam Pridgen
I guess to follow this question up, I am trying to combine an Extension module and Python module under a single package, and I am not having any luck with it. I know I have an error in my configuration script, but I am not sure where or how.Here is my directory structure: I am trying to setup

[Tutor] newb - Problem reading binary files

2007-05-11 Thread Elizabeth Finn
This is probably a newbie question, and I apologize for the length – but I have consulted several books / sites and haven’t found a good answer. I need to read a file that is in binary format, and then convert some of the values into integer values. These values can range from 1 to 4 bytes.

Re: [Tutor] newb - Problem reading binary files

2007-05-11 Thread Alan Gauld
"Elizabeth Finn" <[EMAIL PROTECTED]> wrote > binary format, and then convert some of the values into > integer values. These values can range from 1 to 4 bytes. See the struct module, and for an exampole the binary file sidebar in the file handling topic of my tutor. But caveat: struct needs

[Tutor] (no subject)

2007-05-11 Thread adam urbas
Hi,I just started python today and I would like a few pointers, if you don't mind. I tried using a tutorial, but was only able to get the correct results for the most basic problems. # Area calculation programprint “Welcome to the Area calculation program”print “–”print# Print out

Re: [Tutor] Why don't I see anything when I run this program?

2007-05-11 Thread Bob Gailer
adam urbas wrote: Hi, I just started python today Great! One request: provide a meaningful subject when you post questions. That helps us track the various threads. and I would like a few pointers, if you don't mind.  I tried using a tutorial, but was only able to get the correct result

Re: [Tutor] how to stop output to terminal

2007-05-11 Thread Luke Paireepinart
shawn bright wrote: > lo there all, > > i have a simple thread that i want to run without piping any output to > the terminal. > like if i do an > > x = os.system("ping -c 1 www.google.com ") > > i don't want it to show all the stuff in the terminal. if you use os.popen or t

Re: [Tutor] how to stop output to terminal

2007-05-11 Thread shawn bright
cool, thanks sk On 5/11/07, Luke Paireepinart <[EMAIL PROTECTED]> wrote: shawn bright wrote: > lo there all, > > i have a simple thread that i want to run without piping any output to > the terminal. > like if i do an > > x = os.system("ping -c 1 www.google.com ") > > i d