Re: [Tutor] Exploring the Standard Library

2008-07-05 Thread arsyed
This might work: >>> import os >>> print os.__file__ c:\devtools\Python25\lib\os.pyc Also, you might find Doug Hellman's "Python Module Of The Week" helpful: http://www.doughellmann.com/projects/PyMOTW/ On 7/5/08, Nathan Farrar <[EMAIL PROTECTED]> wrote: > > I'd like to spend some time expl

Re: [Tutor] module paths

2008-07-05 Thread arsyed
I copy/pasted your script and it ran fine on my end. Is it possible that you've got more than one installation of python and the feedparser module is installed somewhere other than for the python interpreter at /usr/local/bin/python (since that's what your script references)? Perhaps trying "python

Re: [Tutor] confusing HTTP error while using urlopen

2008-07-18 Thread arsyed
It looks like the site wants an Accept header. The following works: import urllib2 url = 'http://www.anuntul.ro/' headers = {'Accept': 'text/html'} req = urllib2.Request(url=url, headers=headers) rsp = urllib2.urlopen(req) page = rsp.read() print page On Fri, Jul 18, 2008 at 5:38 PM, Chad Cra

Re: [Tutor] IPython problem: Difficulty in setting editor to TextPad

2008-07-18 Thread arsyed
I just set the EDITOR environment variable under windows to textpad and %ed works fine from ipython. It also gets used by subversion and other programs for commit messages, etc. >echo %EDITOR% "C:\Program Files\TextPad 5\TextPad.exe" On Thu, Jul 17, 2008 at 11:39 AM, Dick Moores <[EMAIL PROTE

Re: [Tutor] (no subject)

2008-07-20 Thread arsyed
The python wiki has some options that might be worth checking out under "Playing and Creating Sounds": http://wiki.python.org/moin/PythonInMusic On Sun, Jul 20, 2008 at 2:16 AM, amit sethi <[EMAIL PROTECTED]> wrote: > > Hi list , > Can someone give me an idea about the audio libraries in pytho

Re: [Tutor] Import modeuls

2008-07-20 Thread arsyed
On Sun, Jul 20, 2008 at 12:46 PM, Oleg Oltar <[EMAIL PROTECTED]> wrote: > Hi > I need to import several modules from many folders which has subfolders > > ~/folder/tests/sampletest.py > ~/folder/suites/samplesuit.py > > a suit uses tests from tests folder. I need to import them somehow from > test

Re: [Tutor] Import modeuls

2008-07-21 Thread arsyed
On Mon, Jul 21, 2008 at 3:46 AM, Oleg Oltar <[EMAIL PROTECTED]> wrote: > If I am adding, __init__.py it still doesn't import anything. > Do I have add the import (from sampletest import EmailWithoutA) in my init > file? > > I didn't notice this before, but I don't think python does tilde expansio

Re: [Tutor] Import modeuls

2008-07-21 Thread arsyed
On Mon, Jul 21, 2008 at 5:15 AM, Oleg Oltar <[EMAIL PROTECTED]> wrote: > They want me to do one test runner which runs any test... And ideally it > should work on any platform > > When I added something to $PYTHONPATH, they told me to remove it... > > You can set environment variables within p

Re: [Tutor] Tkinter Help

2008-07-21 Thread arsyed
On Mon, Jul 21, 2008 at 1:59 PM, Ruivaldo Neto <[EMAIL PROTECTED]> wrote: > Hi, > > I have a Python app that runs as a Windows Service. Inside this > application, there is a Thread that starts a webservice. > When this webservice is called, this thread displays a simple Tkinter > window with some

Re: [Tutor] question about socket status

2008-07-22 Thread arsyed
On Mon, Jul 21, 2008 at 1:25 PM, Rupp, Romaine <[EMAIL PROTECTED]> wrote: > Hello, > > I am new to programming with python and sockets. > > I would like to determine the status of a socket as it is returned when you > do 'netstat –a | grep '. I would like to know if the socket state > is ESTABLI

Re: [Tutor] newbie graphing question

2008-07-27 Thread arsyed
On Sun, Jul 27, 2008 at 8:40 AM, Peter Petto <[EMAIL PROTECTED]> wrote: > I'm about to try some Python programming for drawing simple geometric > pictures (for math classes I teach) and was hoping to get some advice that > will send me off in the best direction. > > I want to write programs that ca

Re: [Tutor] regular expressions

2008-08-05 Thread arsyed
On Tue, Aug 5, 2008 at 7:01 AM, Jim Morcombe <[EMAIL PROTECTED]> wrote: > Could someone please give me some help using the "re" module. > > This works: > > import re > > text = "Jim is a good guy" > > s2 = re.sub('Jim', 'Fred', text) > print s2 > > and I get "Fred i

Re: [Tutor] How to use urllib2.https_open with SSL support in Windows XP for python 2.5.2]

2008-08-18 Thread arsyed
On Mon, Aug 18, 2008 at 4:25 PM, bob gailer <[EMAIL PROTECTED]> wrote: > Forwarding to the list. Please always reply to the list. > > -- > Bob Gailer > Chapel Hill NC 919-636-4239 > > When we take the time to be aware of our feelings and needs we have more > satisfying interatctions with others. >

Re: [Tutor] How to use urllib2.https_open with SSL support in Windows XP for python 2.5.2]

2008-08-19 Thread arsyed
On Mon, Aug 18, 2008 at 9:36 PM, xbmuncher <[EMAIL PROTECTED]> wrote: > I tried it just like both of you suggested and sent a req object straight to > urlopen. Here is my code: > import urllib2 > url = 'https://url.com' > headers = { > 'User-Agent' : 'Mozilla/4.0 (compatible; MSIE 5.5; Windows NT)'

Re: [Tutor] How to use urllib2.https_open with SSL support in Windows XP for python 2.5.2

2008-08-19 Thread arsyed
On Mon, Aug 18, 2008 at 9:26 PM, xbmuncher <[EMAIL PROTECTED]> wrote: > > > On Mon, Aug 18, 2008 at 8:44 PM, Kent Johnson <[EMAIL PROTECTED]> wrote: >> >> On Mon, Aug 18, 2008 at 12:40 PM, xbmuncher <[EMAIL PROTECTED]> wrote: >> > I wanted to use the urllib2.https_open() but it said the module did

Re: [Tutor] Problems starting python

2008-09-06 Thread arsyed
On Fri, Sep 5, 2008 at 6:28 AM, Linus Lindström <[EMAIL PROTECTED]> wrote: > Hello. When i first installed python from the cd i bought it seemed to work > perfectly... But then when i cancel the program and try to start it again I > get the message: "IDLE's subprocess didn't make connection. Either