Well, on the bright side, at least Python is being taught in schools.
My younger sister is a CS major just starting her programming courses,
and it's Java/C++ all the way. I am becoming convinced that lines of
code are not only related to the number of bugs and development speed,
but learning spe
You could try: http://www.aminus.org/rbre/python/cleanhtml.py
YMMV, as the kids say. But I did choose this over BeautifulSoup or
Strip-o-gram to do this particular thing. I don't remember -why- I
chose it, but there you go. Easy enough to test all three :)
Oh, and if you just want a whole page
Shi Mu wrote:
> I found the code for class "now". I got confused by two things:
> First, how did the former code I posted know to import tis module of "Now";
You told it to with the statement
import now
This statement tells Python to look in the directories in its path for a file
called now.py
On 10/14/05, Shi Mu <[EMAIL PROTECTED]> wrote:
I found the code for class "now". I got confused by two things:First, how did the former code I posted know to import tis module of "Now";Second. what does "\" mean following "self.year
,"Thanks a lot!class now: def __str__(self):return ti
I found the code for class "now". I got confused by two things:
First, how did the former code I posted know to import tis module of "Now";
Second. what does "\" mean following "self.year,"
Thanks a lot!
class now:
def __init__(self):
self.t = time.time()
self.storetime()
d
Shi Mu wrote:
> After I run the following python code, I expect to have the printing such as:
> The year is 2005
>
> However, I got something like:
> The year is 2005
> Fri Oct 14 17:43:31 2005
> Fri Oct 14 17:43:31 2005
> The year is 2005
>
> What is the reason?
Maybe coming from module 'now'?
Marc Buehler wrote:
> hi.
>
> i have a ton of html files from which i want to
> extract the plain english words, and then write
> those words into a single text file.
If you just want the text from a single tag in the document then BeautifulSoup
will work well, as Danny and Bob suggest. If you h
After I run the following python code, I expect to have the printing such as:
The year is 2005
However, I got something like:
The year is 2005
Fri Oct 14 17:43:31 2005
Fri Oct 14 17:43:31 2005
The year is 2005
What is the reason?
The code follows:
import time
import now
class today(now.now):
At 03:50 PM 10/14/2005, Marc Buehler wrote:
>hi.
>
>i have a ton of html files from which i want to
>extract the plain english words, and then write
>those words into a single text file.
http://www.crummy.com/software/BeautifulSoup/ will read the html, let you
step from tag to tag and extract the
On Fri, 14 Oct 2005, Marc Buehler wrote:
> i have a ton of html files from which i want to extract the plain
> english words, and then write those words into a single text file.
Hi Marc,
The BeautifulSoup parser should be able to do what you want:
http://www.crummy.com/software/Beautiful
hi.
i have a ton of html files from which i want to
extract the plain english words, and then write
those words into a single text file.
example:
<... all kinds html tags ...>
this is text
from the above, i want to extract the string
'this is text' and write it out to a text file.
note that
On Fri, 14 Oct 2005, Luke Jordan wrote:> I'm trying to have functions to create, edit and store dictionaries
> within a class. i 2nd danny's motion: make your dictionary an instance attribute (unique to that instance) rather than a class attribute (shared amongst all instances), and 2ndly, don't
> On Fri, Oct 14, 2005, Alan Gauld wrote:
>>Bill this is a guess but try setting the terminal type to vt220
>>or vt330 or similar rather than xterm. Does that make any difference?
>
> I haven't tried fiddling the terminal type, and would prefer not
> to unless it's the last resort.
The reason I s
On Fri, 14 Oct 2005, Luke Jordan wrote:
> I'm trying to have functions to create, edit and store dictionaries
> within a class.
Here's a small example of a class:
##
class Person:
def __init__(self, name):
self.name = name
##
Let's try pickling an instance of it:
#
Hi,
Another stumped beginner here.
I'm trying to have functions to create, edit and store dictionaries within a class. What I can't figure out is how to retain the edits after making them. I think it has something to do with namespace. Ideally I'd like to pickle class instances and be able to a
Hey there,
i have a simple app that plots some numbers sent by a field sensor with
respect to time. i am trying to do this in pychart, but the problem is,
when the numbers come in, they do so at almost random times.
y shows the value sent by the sensor
x plots the time that the value came in.
what
If you mean a small one like a microcontroller (ARM, AVR, Dragonball,
68x000) then no. If you're using, say, embedded Linux on ARM, then it
probably works, here's a link:
http://www.vanille.de/projects/python.spy
Hope it helps,
Hugo
Jeff Peery wrote:
> is it possible to take python code and c
Hi Andy,
> Behalf Of Andy Dani
>
> Python 2.3.2 came with the linux distribution which is located in
> /usr/lib.
>
> Installed 2.4.1 in /usr/local/Python-2.4.1
>
> updated /etc/profile path so IDLE or "python" would point to the
> latest version (2.4.1).
>
> PATH="$PATH:/usr/local/Python-2.4.
> I want to be able to launch and run python 2.4.1, from the user account so I
> do not need to be "root" every time.
I use Ubuntu Linux and Python 2.4.1 comes with it. All I need to do is
to open a terminal and type python and press enter. What's the problem?
Norman
_
> > For some reason, the months that have 31 days work fine, but the
> > months that have 28/30 do not work.
>
> How do you know that?
>
> Show us why you think there's a problem in the program. We have our own
> opinions, of course, but it'll be very helpful if you try explaining how
> you're th
On Fri, Oct 14, 2005, Alan Gauld wrote:
>Bill this is a guess but try setting the terminal type to vt220
>or vt330 or similar rather than xterm. Does that make any difference?
I haven't tried fiddling the terminal type, and would prefer not
to unless it's the last resort.
>curses uses the termcap
> I'm having some trouble with my if, else statements.
Ok, let's pause for a moment: it seems like you're having problems with
more fundamental problems than just simple if/else statements. In the
past questions you've written:
http://mail.python.org/pipermail/tutor/2005-October/041863.htm
On Fri, 14 Oct 2005, Anthoni Shogan wrote:
> this is my first post as a test..
Hi Anthoni,
Ok, we see you. In general, it's usually not a good idea to write test
messages on these kinds of mailing lists: it adds to the "noise" in the
channel.
Anyway, do you have a question about learning Pyt
Python 2.3.2 came with the linux distribution which is located in /usr/lib.
Installed 2.4.1 in /usr/local/Python-2.4.1
updated /etc/profile path so IDLE or "python" would point to the latest version
(2.4.1).
PATH="$PATH:/usr/local/Python-2.4.1/:."
export PATH
But it is still poin
Bernard Lebel wrote:
> Hello,
>
> Is there a way to "decompile" a pyc file? I have a big problem where
> the py file was lost, but the pyc file is instact. I would need to
> extract the source code from the pyc file.
Google 'python decompiler'
try http://www.freshports.org/devel/decompyle/
or th
Hello,
Is there a way to "decompile" a pyc file? I have a big problem where
the py file was lost, but the pyc file is instact. I would need to
extract the source code from the pyc file.
Thanks for any suggestion
Beranrd
___
Tutor maillist - Tutor@pyt
> Can't you read the data from the binary file as needed?
> For example build a table of object ids versus file locations
> and then use seek() to go to an object and load it from file
> on demand?
>
> > So, in doing so, I end up with a whole lot of objects, but it's a
> > whole lot of objects I ca
Dick Moores wrote:
> Kent Johnson wrote at 19:21 10/13/2005:
>
>> > BTW in redemo.py, what do the checkboxes VERBOSE, LOCALE, and DOTALL
>> > mean? (I understand IGNORECASE and MULTILINE.)
>>
>> http://docs.python.org/lib/node115.html
>
>
> OK, but that didn't help with LOCALE. From
> http://en
It seems to depend on what you want
easygui
---
Very simple, very easy to set up, but is NOT event driven (ie the
program uses it much like it would use raw_input but with drop boxes.
All other guis are event driven - that is the gui has the main loop,
and when it detects (a button click)
There are several approaches ranging from the simple but limited to
rather advanced.
raw_input is the simplest but it is to be deprecated, and more
importantly it limits you to entering commands after the script is
running. automation becomes harder
$ myscript
Those args are put into a list ca
My apologies - I keep failing to reply-all.
-- Forwarded message --
From: paul brian <[EMAIL PROTECTED]>
Date: Oct 14, 2005 10:04 AM
Subject: Re: [Tutor] if-else statements
To: Andre Engels <[EMAIL PROTECTED]>
I would also suggest you look at either datetime module or the
mx.Date
I am also looking for a good tutorial on this subject. Have you tried
http://www.modpython.org/ ?
I think that the mod_python mailing list will be a better place to ask.
I'm going to.
Johan
nitin chandra wrote:
> Hi!...
>i am new to Python and i want to develop a website with forms; data
2005/10/14, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
> Hello
>
> I'm having some trouble with my if, else statements. For some reason, the
> months that have 31 days work fine, but the months that have 28/30 do not
> work. Am I doing something wrong? it is supposed to take a date as an
> input like 9
nitin chandra wrote:
> Hi!...
>i am new to Python and i want to develop a website with forms; data
>submitted through forms will be stored in PostgreSQL.
>I am working on deriviant of FC3, OpenLX.
>I have Apache 2.0.54 version installed, which is pre-configured with
>mod_python.
>how do i lo
Hi!...
i am new to Python and i want to develop a website with forms; data
submitted through forms will be stored in PostgreSQL.
I am working on deriviant of FC3, OpenLX.
I have Apache 2.0.54 version installed, which is pre-configured with mod_python.
how do i load and view my .py/.html web p
35 matches
Mail list logo