On Jan 15, 4:09 pm, "Martin v. Löwis" wrote:
> >> One of self.title and self.content is a Unicode string, the other is
> >> a byte string. You need to change them to have the same type (depending
> >> on whether you want to process them as Unicode or byte strings).
>
> > How can I do that?
>
> Fir
On Jan 15, 3:34 pm, "Martin v. Löwis" wrote:
> > rc_file.write("\n\n".join([self.title, "### BEGIN CONTENT ###",
> > self.content]))
> > .
> > UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position
> > 442: ordinal not in range()
>
> > What should I change to make thi
This line of code is throwing a UnicodeError for a handful of the few
hundred files I'm processing:
rc_file.write("\n\n".join([self.title, "### BEGIN CONTENT ###",
self.content]))
.
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position
442: ordinal not in range()
Wh
On Jan 15, 10:56 am, Mark Smith wrote:
> > File "C:\Python25\lib\site-packages\wx-2.8-msw-unicode\wx\_core.py",
> > line 6, in
> > new_instancemethod = new.instancemethod
> > AttributeError: 'module' object has no attribute 'instancemethod'
>
> I'm guessing you either have a python file cal
On Jan 15, 10:46 am, tmallen wrote:
> I've tried a few of the examples
> fromhttp://wiki.wxpython.org/Getting%20Started
> , but after "Hello World" (window) nothing works. I get the following
> error message with the other examples:
>
> Traceback (most recent c
I've tried a few of the examples from http://wiki.wxpython.org/Getting%20Started
, but after "Hello World" (window) nothing works. I get the following
error message with the other examples:
Traceback (most recent call last):
File "C:/Documents and Settings/MyUserName/Desktop/WxExample.py",
line
Here's my problem (it's a conceptual one). Coming from the world of
mod_php, each file can represent a page with no intervention. I was
not able to achieve the same with mod_python when I tried, and for
that matter, couldn't put the pieces together in a usable way.
Let me start simply: If I wanted
I'm trying again because I'm stubborn. Maybe the fourth time will be
the charm...
Are there any good tutorials out there for setting up Apache with
mod_python?
Thanks,
Thomas
--
http://mail.python.org/mailman/listinfo/python-list
m, Jorgen Grahn <[EMAIL PROTECTED]> wrote:
> On Tue, 04 Nov 2008 15:36:23 -0600, Larry Bates <[EMAIL PROTECTED]> wrote:
> > [EMAIL PROTECTED] wrote:
> >> tmallen:
> >>> I'm parsing some text files, and I want to strip blank lines in the
> >>> pro
e.strip()]
+1 for "list_o_lines"
Thanks for the help!
Thomas
On Nov 4, 6:36 pm, Falcolas <[EMAIL PROTECTED]> wrote:
> On Nov 4, 3:30 pm, tmallen <[EMAIL PROTECTED]> wrote:
>
>
>
> > On Nov 4, 4:30 pm, [EMAIL PROTECTED] wrote:
>
> > > tmallen:
>
On Nov 4, 4:30 pm, [EMAIL PROTECTED] wrote:
> tmallen:
>
> > I'm parsing some text files, and I want to strip blank lines in the
> > process. Is there a simpler way to do this than what I have here?
> > lines = filter(lambda line: len(line.strip()) > 0, lines)
>
I'm parsing some text files, and I want to strip blank lines in the
process. Is there a simpler way to do this than what I have here?
lines = filter(lambda line: len(line.strip()) > 0, lines)
Thomas
--
http://mail.python.org/mailman/listinfo/python-list
On Aug 14, 9:54 am, tmallen <[EMAIL PROTECTED]> wrote:
> On Aug 13, 11:53 pm, "Python Nutter" <[EMAIL PROTECTED]> wrote:
>
>
>
> > sorry cut off due to original email being sent not to the list due to gmail:
>
> > A second for that suggestion--the
On Aug 13, 11:53 pm, "Python Nutter" <[EMAIL PROTECTED]> wrote:
> sorry cut off due to original email being sent not to the list due to gmail:
>
> A second for that suggestion--the ftp module in the python standard library is
> very low level and not very useful for beginners as a lot of the heavy
On Aug 13, 3:27 pm, tmallen <[EMAIL PROTECTED]> wrote:
> Here's the code:http://pastebin.com/m21dfcc19
>
> What could be improved? The script feels clumsy, and I have no
> experience refactoring Python code. This will eventually be a GUI FTP
> client. I'm mainly loo
Here's the code:
http://pastebin.com/m21dfcc19
What could be improved? The script feels clumsy, and I have no
experience refactoring Python code. This will eventually be a GUI FTP
client. I'm mainly looking for design advice...
--
http://mail.python.org/mailman/listinfo/python-list
I'm working on a little FTP project to get comfortable with ftplib.
It's all terminal-based right now, and one issue I'm having is hiding
password input text. I'd like one of two things to happen with this:
Either don't show any characters while I'm typing (like $ su), or
better, a '*' for every ch
On Jun 3, 3:03 pm, Chris <[EMAIL PROTECTED]> wrote:
> On Jun 3, 8:40 pm, tmallen <[EMAIL PROTECTED]> wrote:
>
> > What's the proper way to instantiate a new variable? x = ""?
>
> You don't need to pre-declare your variables. Just assign them as y
Is there a way to pick apart this text without resorting to regular
expressions?
p {
color: black;
}
p -> element
color -> property
black -> value
--
http://mail.python.org/mailman/listinfo/python-list
What's the proper way to instantiate a new variable? x = ""?
--
http://mail.python.org/mailman/listinfo/python-list
20 matches
Mail list logo