I have a module, mycalc.py, which is a collection of functions designed
to be imported independently.
I've heard about using assert() to check up on whether things are still
working correctly, or something like that. So I've begun to write some
assert() expressions(?) and put them at the bottom
That's what I thought but no. There is an install of 2.4 but not in
use. /usr/local/bin/Python points to ->
/Library/Frameworks/Python.framework/Versions/2.5/bin/python
feedparser is installed in
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages
both the interactive in
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
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
Per someone's suggestion I changed my wave files from 32 bit to 16 bit. I
can now open (and manipulate) them without any error. I'm not sure why it
worked but it worked.
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Dear fellow Python enthusiasts:
I want to run an idea by you to see if I understand modeling objects
adequately, after reading Alan Gauld's excellent tutorial and two brief
articles about interfaces in Python, here:
http://www.freenetpages.co.uk/hp/alan.gauld/tutclass.htm
http:/
Hi!
I got my text to speech to work better, will in the future remove the
buttons and only have the file menu.
It seems to work fine and now use sub menu's for voice settings.
What will be needed as an event to capture the cursor movement inside
the text box. How do I get the key and
"kinuthiA muchanE" <[EMAIL PROTECTED]> wrote
python on Ubuntu. How would I find the location of the modules
(find / -name "os.py" does not yield results)?
Not all modules are implemented as .py files.
Some are compiled C libraries. Thus searching
for .py will not find all Python modules. A
Hello,
I'm trying to join two .wav files with the wave module. But when I try to
use wave.open(filename, "rb") I receive the following error:
Traceback (most recent call last):
File "", line 1, in
File "F:\PortablePython1.0\lib\wave.py", line 483, in open
return Wave_read(f)
File "F:\P
I'm looking at python after a long time. I wanted to build a quick
parser for some rss feeds and have started using feedparser.
When I test my code on the python interactive shell things work fine
but when I try to write it into a file I get the following error:
AttributeError: 'module' object has
How about the following:
import os
print os.path.abspath(__file__) # the full absolute path to the
current module's file
print os.path.split(os.path.abspath(__file__)) # if you need the
individual components of the path.
On Jul 5, 2008, at 11:00 AM, Monika Jisswel wrote:
import sys
On Sat, 2008-07-05 at 20:23 +0200, [EMAIL PROTECTED] wrote:
> Message: 7
> Date: Sat, 05 Jul 2008 12:23:36 -0600
> From: Nathan Farrar <[EMAIL PROTECTED]>
> Subject: [Tutor] Exploring the Standard Library
> To: Python Tutor
> Message-ID: <[EMAIL PROTECTED]>
> Content-Type: text/plain; charset="us
Monika Jisswel wrote:
import sys #a module that gives access to the system
import os#a module that gives access to the os
print sys.argv[0] #prints file name of the script
print os.getcwd() #print current working directory
print os.getcwd()+sys.argv[0] #
but os.getcwd() retu
import sys
print sys.path
but no one recommends starting with python from there. you're better of
reading the python.org/doc files.
2008/7/5 Nathan Farrar <[EMAIL PROTECTED]>:
> I'd like to spend some time exploring the standard library. I'm running
> python on Ubuntu. How would I find the
The python interpreter can give you this information; just type:
import sys
for i in sys.path:
print i
And search in the lib directories it shows.
You might also be interested in the std library reference at docs.python.org.
--
Amin Rainmaker--- Begin Message ---
I'd like to spend some time
James wrote:
All,
I'm trying to do something pretty simple, but I can't seem to get
Python to behave nicely. :)
I'd like to automate a script that sends out three or four lists in an
e-mail. I have a function dedicated to sending e-mail that will take a
string variable, slap it in a message, an
I'd like to spend some time exploring the standard library. I'm running
python on Ubuntu. How would I find the location of the modules (find /
-name "os.py" does not yield results)?
Thanks!
Nathan
___
Tutor maillist - Tutor@python.org
http://mail.pyt
maybe StringIO ?
MsgBody = StringIO.StringIO()
print >> MsgBody, "Hello. Below is an automated e-mail with important
statistics."
print >> MsgBody, ""#empty line
print >> MsgBody, ""#empty line
print >> MsgBody, "The following user accounts expired today:"
print >> MsgBody, " - " %
import sys #a module that gives access to the system
import os#a module that gives access to the os
print sys.argv[0] #prints file name of the script
print os.getcwd() #print current working directory
print os.getcwd()+sys.argv[0] #
2008/7/5 Nathan Farrar <[EMAIL PROTECTED]>
I'm new to python and wondering if there is a way to reference
information about the script that is running. For example, if I was
running a script named "FileInfo.py" from the directory
"/home/username", I'm looking for attributes such that something similar
to:
print self.name
print self.path
All,
I'm trying to do something pretty simple, but I can't seem to get
Python to behave nicely. :)
I'd like to automate a script that sends out three or four lists in an
e-mail. I have a function dedicated to sending e-mail that will take a
string variable, slap it in a message, and send it on it
On Fri, Jul 4, 2008 at 3:54 PM, Monika Jisswel
<[EMAIL PROTECTED]> wrote:
> Hi Again,
>
> What is the best library for drawing graphs & diagrams to ilustrate some
> statistics ?
A few possibilities here:
http://wiki.python.org/moin/GraphicsAndImages
Kent
__
22 matches
Mail list logo