Re: [Tutor] python dictionaries

2007-01-05 Thread Carroll, Barry
> -Original Message- > Message: 7 > Date: Fri, 05 Jan 2007 15:43:56 -0800 > From: "Raven Of Night Raven Of Night" <[EMAIL PROTECTED]> > Subject: [Tutor] python dictionaries > To: tutor@python.org > Message-ID: <[EMAIL PROTECTED]> > Content-Type: text/plain; format=flowed > > Hi, there was

Re: [Tutor] Python gui for file input

2007-01-05 Thread Alan Gauld
Apologies for the wird formatting, looks like the news reader got confused by Pythons chevrons and thought it was a thread! Hopefully spacing will fix it... "Alan Gauld" <[EMAIL PROTECTED]> wrote >>> import Tkinter as tk >>> import tkFileDialog as fd >>> t = tk.Tk() >>> t.withdraw() # hi

Re: [Tutor] python dictionaries

2007-01-05 Thread Alan Gauld
"Raven Of Night Raven Of Night" <[EMAIL PROTECTED]> wrote > I don't understand, dictionarys only allow two elements so how can > you > include several generations in the dictinoary... Grandfather -> Father -> Son can be expressed as two pairs: Grandfather -> Father Father -> Son Now you can

Re: [Tutor] python dictionaries

2007-01-05 Thread Adam Bark
On 05/01/07, Raven Of Night Raven Of Night <[EMAIL PROTECTED]> wrote: Hi, there was this two step program I was working on but i can only complete the first step. - - Write a Who's Your Daddy? program that lets the user enter the name of the male and produces the name of his father. Allow the u

[Tutor] python dictionaries

2007-01-05 Thread Raven Of Night Raven Of Night
Hi, there was this two step program I was working on but i can only complete the first step. - - Write a Who's Your Daddy? program that lets the user enter the name of the male and produces the name of his father. Allow the user to add, replace, and delete father son pairs. The program should a

Re: [Tutor] need help with sending email

2007-01-05 Thread shawn bright
this is really cool. working too, we have one provider now that it does not work with, but i think its them this time. thanks for your help on this shawn On 1/5/07, Christopher Arndt <[EMAIL PROTECTED]> wrote: shawn bright schrieb: > lo there all. > > i am in a tight spot because i need to sen

Re: [Tutor] Tutor Digest, Vol 35, Issue 18

2007-01-05 Thread Tony Cappellini
Message: 7 Date: Fri, 5 Jan 2007 08:04:23 -0800 (PST) From: Mike Ellis <[EMAIL PROTECTED]> Subject: [Tutor] Python gui for file input To: tutor@python.org Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset="iso-8859-1" Hi all, I am looking to create a simple gui interface to a sma

Re: [Tutor] Python gui for file input

2007-01-05 Thread Alan Gauld
"Mike Ellis" <[EMAIL PROTECTED]> wrote in > I am looking to create a simple gui interface to a small script. > The script requires the user to input a directory. You don't need to write an interface just use the standard one. Of course if you want to display the result/output in a GUI then you n

Re: [Tutor] python web dev

2007-01-05 Thread wesley chun
> has anybody run a python web app under lighttpd? i currently use this at work (on linux/centOS)... we're using FastCGI with ligHTTPD via the WSGI-compliant fcgi.py module which can be found all over, but the main source comes in the FLUP pkg found at http://www.saddi.com/software/flup/ good luc

Re: [Tutor] need help with sending email

2007-01-05 Thread Christopher Arndt
shawn bright schrieb: > lo there all. > > i am in a tight spot because i need to send an email that it mime > encoded plain-text ( not html or anything ) > > anyone know of a good tutorial or recipe out there ? Simplified example from http://www.python.org/doc/current/lib/node162.html: # Import

Re: [Tutor] python web dev

2007-01-05 Thread Christopher Arndt
OkaMthembo schrieb:> i think id feel more confortable with a framework thatd provide a basic > MVC architecture and leave me to roll my own SQL etc, not one that will > generate half a project for me. With TurboGears you're not bound to SQLObject or SQLAlchemy. You can roll your own database acces

Re: [Tutor] need help with sending email

2007-01-05 Thread Kent Johnson
shawn bright wrote: > right, thanks, Mike. > i can send an email fine. Some of the providers we are trying to reach > will reject anything that is not content type: text-plain > > thats what i need to know how to add. The first example on this page seems to do what you want: http://docs.python.o

Re: [Tutor] Load DLL / library and run a thread from it

2007-01-05 Thread Kent Johnson
Jorgen Bodde wrote: > Hi Guys, > > I want to make a C++ DLL that spawns a thread, and wrap this with > Python so that a thread still runs inside the DLL, but I can access > methods to communicate with it, and preferrably receive callbacks from > it. > > I searched the net for examples explaining

Re: [Tutor] need help with sending email

2007-01-05 Thread shawn bright
right, thanks, Mike. i can send an email fine. Some of the providers we are trying to reach will reject anything that is not content type: text-plain thats what i need to know how to add. thanks again shawn On 1/5/07, Mike Hansen <[EMAIL PROTECTED]> wrote: > -Original Message- > Fro

Re: [Tutor] need help with sending email

2007-01-05 Thread Mike Hansen
> -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of shawn bright > Sent: Friday, January 05, 2007 10:18 AM > To: tutor-python > Subject: [Tutor] need help with sending email > > lo there all. > > i am in a tight spot because i need to send an email

[Tutor] need help with sending email

2007-01-05 Thread shawn bright
lo there all. i am in a tight spot because i need to send an email that it mime encoded plain-text ( not html or anything ) no attachements, no images, just text from a string. like message = 'some message' all the tutorials i find out there, and the cookbook recipies are for sending multipart me

Re: [Tutor] Does python produces bytecode??

2007-01-05 Thread Kent Johnson
Asrarahmed Kadri wrote: > > Hi Folks, > > Just a bit curious about how python runs the program? > > I do know that it does not compile the code; its an interpreted language. > > Do we have something like Python virtual machine ?? > > Please hlep me to understand these things. Yes, Python

[Tutor] Does python produces bytecode??

2007-01-05 Thread Asrarahmed Kadri
Hi Folks, Just a bit curious about how python runs the program? I do know that it does not compile the code; its an interpreted language. Do we have something like Python virtual machine ?? Please hlep me to understand these things. Regards, Asrarahmed -- To HIM you shall return. ___

Re: [Tutor] Python gui for file input

2007-01-05 Thread Kent Johnson
Jason Massey wrote: > The simplest way would be to use TkInter which is distributed with Python. > > Check out the cookbook recipe at: > http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/438123 > for a > bunch of examples.

Re: [Tutor] python web dev

2007-01-05 Thread Kent Johnson
OkaMthembo wrote: > Thanks Gents, > > You do all make sense to me. My dilemma really, is that im from a .NET > background where i write business logic in C# and write my own stored > procs, etc...with the "cosmetic" design fully seperated from it all. so > i think id feel more confortable with

Re: [Tutor] Python gui for file input

2007-01-05 Thread Jason Massey
The simplest way would be to use TkInter which is distributed with Python. Check out the cookbook recipe at: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/438123 for a bunch of examples. jason On 1/5/07, Mike Ellis <[EMAIL PROTECTED]> wrote: Hi all, I am looking to create a simple

[Tutor] Python gui for file input

2007-01-05 Thread Mike Ellis
Hi all, I am looking to create a simple gui interface to a small script. The script requires the user to input a directory. I would like to allow the user to browse the windows file system for the desired directory rather than type in the full path by hand. This would operate in much the sam

Re: [Tutor] python web dev

2007-01-05 Thread OkaMthembo
Thanks Gents, You do all make sense to me. My dilemma really, is that im from a .NET background where i write business logic in C# and write my own stored procs, etc...with the "cosmetic" design fully seperated from it all. so i think id feel more confortable with a framework thatd provide a bas

Re: [Tutor] Best way to call a prog that requires root access in linux

2007-01-05 Thread Christopher Arndt
[EMAIL PROTECTED] schrieb: > I want to distribute the program once > it's finished so it means explaining this (sudo bit) in the install > instructions. > > Is this a good / bad way to achieve this? Yes, the user should be always made aware, if he is to run something as root. Requiring him to co

[Tutor] Load DLL / library and run a thread from it

2007-01-05 Thread Jorgen Bodde
Hi Guys, I want to make a C++ DLL that spawns a thread, and wrap this with Python so that a thread still runs inside the DLL, but I can access methods to communicate with it, and preferrably receive callbacks from it. I searched the net for examples explaining concepts like this, but I am lost. I

Re: [Tutor] Best way to call a prog that requires root access in linux

2007-01-05 Thread Alan Gauld
<[EMAIL PROTECTED]> wrote > I've had a dig around on the forums about this and it was suggested > to > use 'sudo'. sudo is the best way to run applications with a different access level. Since this is an OS thing usinbg sudo is the right solution IMHO. If you ever want to port your code to XP

Re: [Tutor] Find and test a device by MAC address

2007-01-05 Thread János Juhász
Dear Lumbricus, > From: [EMAIL PROTECTED] > Subject: Re: [Tutor] Find and test a device by MAC address > To: tutor@python.org > Message-ID: <[EMAIL PROTECTED]> > Content-Type: text/plain; charset="iso-8859-1" > Quick and dirty: > As root: > >>> from scapy import * > >>> arping("192.168.0.1/24")

Re: [Tutor] Fwd: Reg http request object

2007-01-05 Thread Kent Johnson
Anil, I'm also confused about what you are trying to do. Are you writing a client application that talks to a web application? A web application that talks to a different web application? A new part of an existing web application? What are you using web.py for? What does facebook have to do wi

[Tutor] Fwd: Reg http request object

2007-01-05 Thread ALAN GAULD
Forwarding to the group in the hope someone may know the answer. --- anil maran <[EMAIL PROTECTED]> wrote: > Date: Thu, 4 Jan 2007 16:57:01 -0800 (PST) > From: anil maran <[EMAIL PROTECTED]> > Subject: Reg http request object > To: Alan Gauld <[EMAIL PROTECTED]> > > Hi Alan > I m using webpy

[Tutor] Best way to call a prog that requires root access in linux

2007-01-05 Thread pytutor . 20 . 247ob
Hi all, I've had a dig around on the forums about this and it was suggested to use 'sudo'. Well I have done this, I need to call tcpdump so I can sniff the traffic and find the url's, I've modified my sudoers file so that for this exe only I need no password. This seems to be the best way since th