Chris McDonough wrote:
> I didn't mean to offend your sensibilities.
Me neither :-)
Peter
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, 2006-02-08 at 12:34, Scott Frankel wrote:
> I'm looking for a way to send a simple, plain text email message
> using Python. My initial attempts are failing with the following error:
>
> socket.error: (61, 'Connection refused')
>
> Does this imply that I do not have the machine's
[EMAIL PROTECTED] wrote:
> Ok,
>
> I give up. DRY = Don't Repeat Yourself (google Pragmatic Programmers)
> but SPOT? Google is little help here, SPOT is too common a word.
Single Point Of Truth (or Single Point Of Transformation)
And before you mention it, yes, it's *almost* the same thing as D
Don't send the whole list or parts of the list to the server unless
actually needed!
If the server has to do an append, have the server send back the new
elements to be appended and then do the appending on the client side!
Or
Does the homework specify that the entire mutable type be sent to the
Magnus Lycka wrote:
> [EMAIL PROTECTED] wrote:
>
>> Ok,
>>
>> I give up. DRY = Don't Repeat Yourself (google Pragmatic Programmers)
>> but SPOT? Google is little help here, SPOT is too common a word.
>
>
> The only SPOT I worked with (as I know of) was SPOT4
> (Le Systeme Pour 'l Observation de
Just to present a complete picture, not mentioned in this thread are
triple-quoted strings:
'abc' == '''abc''' == "abc" == """abc"""
Triple-quoted strings are no different than regular strings, though they do
allow literal newlines to be embedded in the string. Their presence is most
often d
hi i contact you because i see this mesage that you have or you want to creat a program to extract e-mails from ebay please contact me .i realy want if you have it you can give me this program ?
Thanks
--
http://mail.python.org/mailman/listinfo/python-list
I'm trying to implement a bunch of class methods in an ORM object in
order to provide functionality similar to Rails' ActiveRecord. This
means that if I have an SQL table mapped to the class "Person" with
columns name, city, and email, I can have class methods such as:
Person.find_by_name
Grant Edwards wrote:
> Why not use termcap/terminfo?
That's a good idea, but I'd have to wrap the c library myself, wouldn't
I? Also, what happens when a user has an incorrect TERM setting (I've
run into this before)
I don't want to reimpliment all the nice speed optimizations that the
curses
Dylan Moreland wrote:
> I'm trying to implement a bunch of class methods in an ORM object in
> order to provide functionality similar to Rails' ActiveRecord. This
> means that if I have an SQL table mapped to the class "Person" with
> columns name, city, and email, I can have class methods such as:
Dylan Moreland wrote:
> I have a metaclass generating basic properties such as .name and .city,
> but I don't want to generate a class method for every permutation of
> the attributes. I'd like to have something much like __getattr__ for
> instance attributes, so that if a method like
> Person.find
<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I am confused. Could you explain this ? I was under the impression said
> above(mapping don't support slicing), until after I read the language
> reference. I don't think it is slicing as in the list slicing sense but
> it does use the
On 2006-02-08, Ian Ward <[EMAIL PROTECTED]> wrote:
> Grant Edwards wrote:
>> Why not use termcap/terminfo?
>
> That's a good idea, but I'd have to wrap the c library myself,
> wouldn't I?
Probably. I don't remember seeing a python module for them.
> Also, what happens when a user has an incorrec
Seems I'm still having issues with syntax.
From what I can tell from my mail client, my outgoing mail server
name is either
mail..net
or
mail..net:@.com
The former yields the same socket error on connect() that I reported
earlier. The latter yields a "nonnumeric po
rtilley wrote:
> Duncan Booth wrote:
>
>> How about just concatentating the two lists:
>>
>>> for root, dirs, files in os.walk(path):
>>
>>for fs_object in files + dirs:
>>
>>> ADD fs_object to dictionary
>
>
> Thank you Duncan! that solves the problem perfectly!
Or a bit more effi
Nir Aides wrote:
> I can not restrict the name to CP_ACP.
> I am interested in the general case of Unicode.
So you should implement a patch, and contribute this
to sf.net/projects/python.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
Scott Frankel wrote:
>
> Seems I'm still having issues with syntax.
>
> From what I can tell from my mail client, my outgoing mail server
> name is either
>
> mail..net
> or
> mail..net:@.com
>
> The former yields the same socket error on connect() that I reported
> earlier. The latter yield
[rtilley]
> When working with file and dir info recursively on Windows XP. I'm going
> about it like this:
>
> for root, dirs, files in os.walk(path):
> for f in files:
> ADD F to dictionary
> for d in dirs:
> ADD D to dictionary
>
> Is it possible to do something such a
On Wed, 2006-02-08 at 13:49, Scott Frankel wrote:
> Seems I'm still having issues with syntax.
>
> From what I can tell from my mail client, my outgoing mail server
> name is either
>
> mail..net
This is it.
> or
> mail..net:@.com
Not this.
> The former yields the same so
In article <[EMAIL PROTECTED]>,
Pierre Quentel <[EMAIL PROTECTED]> wrote:
>This is because Python has a hidden mechanism to detect programs
>generated by Perl scripts, and make them crash with no explanation
In my case it turned out to be python having a hidden method to detect when
you are using
Simon Brunning wrote:
> On 2/8/06, Alex Martelli <[EMAIL PROTECTED]> wrote:
>
>>Bot? me? did I fail a Turing test again without even noticing?!
>
>
> If you'd noticed the test, you'd have passed.
No no, it's just a regular expression that notices the
word 'bot' close to 'Martelli'. Wouldn't sur
Michael Spencer wrote:
> Dylan Moreland wrote:
> > I'm trying to implement a bunch of class methods in an ORM object in
> > order to provide functionality similar to Rails' ActiveRecord. This
> > means that if I have an SQL table mapped to the class "Person" with
> > columns name, city, and email,
Thomas Dickey wrote:
> "Martin v. Löwis" <[EMAIL PROTECTED]> wrote:
>>The ncurses documentation suggests that you should link with
>>ncurses_w instead of linking with ncurses - you might try
>>that as well. If it helps, please do report back.
>
>
> ncursesw
I'll test it if someone would dumb dow
Dylan Moreland wrote:
> I'm trying to implement a bunch of class methods in an ORM object in
> order to provide functionality similar to Rails' ActiveRecord. This
> means that if I have an SQL table mapped to the class "Person" with
> columns name, city, and email, I can have class methods such as:
"Magnus Lycka" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Statements and operators are really fundamental in Python. We
> don't support n = 1.add(2), since we have the '+' operator.
Actually, since the 2.2 union of type and new-style classes, which gave
attributes to all type
Christoph Zwerschke wrote:
> I think this would only shift the problem. Because then I would have to
> convert the msvcr71 stream I get from Python to a msvcrt stream. Using
> fileno() (of msvcrt) to get the file descriptor will probably not work.
It actually would:
#define _fileno(_stream) ((_s
Hi All,
Thank you for your commentaries.
In the meantime, I read up in Python-Dev and came across a post by
Johnatan LaCour which kind of nicely sums up the state of affairs:
"Its really a shame. There seems to be some consensus about
multi-processing, but not a whole lot of interest in making it
Martin v. Löwis wrote:
> In general, the only Microsoft-supported strategy is that you
> must use only a single msvcrt in the entire application. So
> either recompile PostGres, or recompile Python.
If you want a compiled version of Python that already uses
MSVCRT then you try using pyMingGW:
Yes, I was doing something wrong: I was connecting to the localhost
after instantiation. All better now.
Thanks for the tips!
Scott
On Feb 8, 2006, at 11:04 AM, Carsten Haese wrote:
>
> Then you're doing something wrong. The line
>
> s = smtplib.SMTP("mail.ispname.net") instantiates an SM
Thomas Dickey wrote:
> no need for debugging - it's a well-known problem. UTF-8 uses more than
> one byte per cell, normal curses uses one byte per cell. To handle UTF-8,
> you need ncursesw.
I tried that, but it didn't improve anything.
Regards,
Martin
--
http://mail.python.org/mailman/listin
Oh, and I wondered too: is your goal to build an ORM, or do you just
need an ORM?
Cause if it's the latter then Python does already have some fairly good
ORMs such as SQLAlchemy or PyDO2, you don't *need* to create yours.
--
http://mail.python.org/mailman/listinfo/python-list
> > I made a script with 100,000 if's, (code below) and it appears
> > to work on a couple systems, including Python 2.4.2 on Win32-XP.
> > So at first cut, it doesn't seem to be just the if-count that
> > triggers the bug.
>
> I tried that code. It runs fine.
>
> However, the following gives a Sy
Grant Edwards wrote:
> Depending on what you're tring to do, slang might be an option,
I've looked at newt and snack, but all I really need is:
- a way to position the cursor at (0,0)
- a way to hide and show the cursor
- a way to detect when the terminal is resized
- a way to query the terminal s
The use of Python in a public health surveillance system is described
here (see references 15 and 26):
http://www.biomedcentral.com/1471-2458/5/141
Some more papers describing Python's starring role in some other public
health projects should appear in the next several months.
Tim C
--
http:/
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes:
> SystemError: com_backpatch: offset too large
Yeah, that sounds like there's some 16-bit fields in the bytecode format.
--
http://mail.python.org/mailman/listinfo/python-list
Your code has a little bug, I highly recommend to add a test to your
code, for an idea see below - I fixed your code as well.
#!/usr/bin/env python
import math
def number_format(num, places=0):
"""Format a number with grouped thousands and given decimal
places"""
#is_negative = (num < 0)
> Thanks for your reply and the structure of the file structure going to be
> read is
>
>
>
> ...
>
>
> The aims is to find out the shortest path(s) for the leaf node(s)
>
> Example:
> 9
> 0 1 1
> 0 4 2
> 1 2 3
> 1 3 4
> 4 3 2
> 4 5 1
> 4 8 2
> 5 6 2
> 5 7 2
> -1
>
> Output:
> Possible solut
Thanks. I noticed the bugs later. But after talking with my boss, he
suggested something more elegant (again *untested*, yet):
import locale
def number_format(num, places=0)
"""Format a number according to locality and given places"""
locale.setlocale(locale.LC_ALL, locale.getdefaultloc
Actually, I already managed to make a Patch for this problem.
I will post it soon on my website and in this group.
But I find it strange that this problem even exists, and that I could
not find any workarounds on the Internet.
Nir
Martin v. Löwis wrote:
> Nir Aides wrote:
>> I can not restrict
On 2/7/06, Steve Holden <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > Someone out there must surely know - please!
> >
> > Peter
> >
Try building the PIL from scratch. It might give you some insight as
to which library it exactly is looking for. I can remember when
compiling the PIL on
Hi there,
I've got a reasonably sized list of objects that I'd like to pull out
all combinations of five elements from. Right now I have a way to do
this that's quite slow, but manageable. I know there must be a better
way to do this, but I'm not sure what it is. Here's what I've got so
far:
Hi everyone. I have Learning Python 2nd edition (O'Reilly) and I noticed
that Wrox has a newer book out (Beginning Python) that covers version
2.4. Do you think that Learning Python is still a good enough book to be
an intro to the language? Is there anything so different about 2.4 from
2.3 tha
Antoon Pardon wrote:
> Op 2006-02-08, Steve Holden schreef <[EMAIL PROTECTED]>:
>
>>Why should a module be callable? What's the advantage? Should we be able
>>to add two modules together, yielding a module that contains all the
>>code of both modules? What happens if I multiply a module by two -
Petr Jakes wrote:
> http://www.pspad.com/en/
>
> Petr Jakes
>
Windows provides the perfectly usable Notepad which, while not perfect
for Python, is quite good enough to get started.
The Save dialog box allows the user to select an encoding, including UTF-8.
regards
Steve
--
Steve Holden
Magnus Lycka wrote:
> Ed Singleton wrote:
>
>> The point is that having to use del to clear a list appears to the
>> inexperienced as being an odd shaped brick when they've already used
>> the .clear() brick in other places.
>
>
> Agreed. The smart way to go from this stage of surprise is
> not
This is a little faster:
def number_format(num, places=0):
"""Format a number according to locality and given places"""
locale.setlocale(locale.LC_ALL, "")
return locale.format("%.*f", (places, num), True)
I tested this ok with my test
--
http://mail.python.org/mailman/listinfo/pyth
> I'll test it if someone would dumb down "link with ncursesw instead of
> ncurses" a little for me.
>
> I tried:
> ./configure --with-libs="ncursesw5"
>
> and it failed saying:
> checking size of wchar_t... configure: error: cannot compute sizeof
> (wchar_t), 77
If that was Python's configure:
Nir Aides wrote:
> Actually, I already managed to make a Patch for this problem.
> I will post it soon on my website and in this group.
>
> But I find it strange that this problem even exists, and that I could
> not find any workarounds on the Internet.
Very few people use file names not in their
"Swroteb" <[EMAIL PROTECTED]> writes:
> Atrocious and slow, I'm sure, but is there a better way? I can't
> simply create a list with the combinations I want, since it won't fit
> into memory. And I'm sure I can do it using a standard paradigm using
> five indexed for loops (ie, for i = 1, for j =
George Sakkis wrote:
> Or a bit more efficiently (no need to allocate a new list for storing
> files+dirs):
>
> from itertools import chain
> for root, dirs, files in os.walk(path):
> for fs_object in chain(files,dirs):
> ADD fs_object to dictionary
I like that! itertools is
What is the most common way to spell check comments in code? Are there
any idle plugins or modules that do this?
Thanks!
--
http://mail.python.org/mailman/listinfo/python-list
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote in
news:[EMAIL PROTECTED]:
> def number_format(num, places=0):
> """Format a number according to locality and given places"""
> locale.setlocale(locale.LC_ALL, "")
> return locale.format("%.*f", (places, num), True)
>
There are some edge
Wednesday, February 8th, 2006.
Dear all,
I hereby release Circe to the public domain.
Our repo is at http://kbrooks.ath.cx/repos/circe.
--
http://mail.python.org/mailman/listinfo/python-list
Hi all!
For my FTP library module ftputil [1], some users have asked
for a way to avoid server timeouts (FTP status code 421). But I
haven't found out yet how I can do this in all cases.
I try to explain the problem in more detail. The following is
rather special and probably not so easy to under
Paul Rubin wrote:
> "Swroteb" <[EMAIL PROTECTED]> writes:
> > Atrocious and slow, I'm sure, but is there a better way? I can't
> > simply create a list with the combinations I want, since it won't fit
> > into memory. And I'm sure I can do it using a standard paradigm using
> > five indexed for
I use JEdit and I like it very much.
http://www.jedit.org/
Uros
--
http://mail.python.org/mailman/listinfo/python-list
Radek Kubicek wrote:
> > What editor shall I use if my Python script must contain utf-8
> > characters?
> > I use XP
>
> vim :-)
>
> > Thank you for reply
> > l.b.
>
> not for all :-)
I myself have just begun using vim. Does anyone have any
tips/convenient tweaks for python programming with it?
> I myself have just begun using vim. Does anyone have any
> tips/convenient tweaks for python programming with it?
For python programming several settings can make life far less
painful (assuming you like 4-spaces-per-tab) :
set ai ts=4 sw=4 et
or
set ai ts=4 sw=4 noet
(depen
Dylan Moreland wrote:
> I myself have just begun using vim. Does anyone have any
> tips/convenient tweaks for python programming with it?
EnhancedCommentify, ShowFunc, spacehi, svncommand, and pythonhelper are
nice Vim plugins to use with Python. They can all be found on vim.org.
Not Python-spe
[EMAIL PROTECTED] wrote:
> On AIX and Linux (SuSE 9.3) each color name which contains "gray" is
> also aliased as "grey" for the benefit of both Yanks and Brits. Thus,
Yankee, n. In Europe, an American. In the Northern States of
our Union, a New Englander. In the Southern States the word is
un
Martin v. Löwis wrote:
> If that was Python's configure: don't do that. Instead, hack setup.py
> to make it change the compiler/linker settings, or even edit the
> compiler/linker line manually at first.
Ok, that compiled.
Now when I run the same test:
import curses
s = curses.initscr()
s.addst
On 2006-02-08, Ben Wilson <[EMAIL PROTECTED]> wrote:
> "But the point is, the current situation is not newbie-friendly (I can
> tell, I am a newbie)"
>
> I will agree to that, as I consider myself still new. _But_, it's a
> stumbling stone only briefly. Get enough nagging error messages, and
> you
I read somewhere else that Python was getting a ternary operator (e.g.
x = (true/false) ? y : z). I read the PEP about it and that the PEP had
been approved this past Fall. Has this been released into the wild yet?
IIRC, the operator is like:
x = y if C : else z
--
http://mail.python.org/mailma
"Swroteb" <[EMAIL PROTECTED]> writes:
> I'm a little bit confused about your generator suggestion. My list is
> a set of references to instantiated objects. I'm just unsure about how
> to iterate through every unique combination of those references. Are
> you suggesting that I set up methods to
Steven D'Aprano wrote:
> That's not a _reason_, it is just a (re-)statement of fact. We know
> that defining a __call__ method on a module doesn't make it callable.
> Why not? The answer isn't "because defining a __call__ method on a
> module or an instance doesn't make it callable", that's just a
On 2006-02-08, News <[EMAIL PROTECTED]> wrote:
> I am new in using Python
>
> Anyone know how to implement breadth first search using Python? Can Python
> create list dynamically, I want to implement a program which will read data
> from a file and store each line into a list, is this possible?
>
Hello,
I was wondering if there is a way to, within a script, jump into the
interpreter.
What I mean is something like the "keyboard" command in Matlab, where the script
pauses and you get an interpreter prompt, where you can look at variables,
change
their values, etc. then when you exit the i
Paul Rubin wrote:
> I think the natural approach is to make a generator that yields a
> 5-tuple for each combination, and then have your application iterate
> over that generator. Here's my version:
>
> def comb(x,n):
> """Generate combinations of n items from list x"""
> if n
Martin v. Löwis wrote:
> Christoph Zwerschke wrote:
>> I think this would only shift the problem. Because then I would have to
>> convert the msvcr71 stream I get from Python to a msvcrt stream. Using
>> fileno() (of msvcrt) to get the file descriptor will probably not work.
>
> It actually would:
Scott David Daniels wrote:
> To elaborate on this, once 'id' is called, you drop the reference.
> This allows quite surprising things like:
> >>> id(7**8) == id(8**7)
> True
> >>> a, b = 7**8, 8**7
> >>> id(a) == id(b) # this time there are other references to a and b
> False
>
> If you wanted
pdb might help. Add this to your code:
import pdb
pdb.set_trace()
--
http://mail.python.org/mailman/listinfo/python-list
Ben Wilson wrote:
> I read somewhere else that Python was getting a ternary operator (e.g.
> x = (true/false) ? y : z). I read the PEP about it and that the PEP had
> been approved this past Fall. Has this been released into the wild yet?
>
> IIRC, the operator is like:
>
> x = y if C : else z
>
Ben Wilson wrote:
> I read somewhere else that Python was getting a ternary operator (e.g.
> x = (true/false) ? y : z). I read the PEP about it and that the PEP had
> been approved this past Fall. Has this been released into the wild yet?
>
> IIRC, the operator is like:
>
> x = y if C : else z
>
> Ah, this definitely seems to work! It's a lot nicer in appearance than
> my previous code, that's for sure. It actually runs in approximately
> the same amount of time though.
As a side note, this problem will always be "slow". The number of
combinations grows exponentially with n. No matter h
On Wed, 8 Feb 2006 11:57:00 -0600
[EMAIL PROTECTED] wrote:
> Just to present a complete picture, not mentioned in this
> thread are triple-quoted strings:
>
> 'abc' == '''abc''' == "abc" == """abc"""
>
> Triple-quoted strings are no different than regular
> strings, though they do allow liter
Steve Holden <[EMAIL PROTECTED]> wrote:
>> x = y if C : else z
>>
>
>Currently scheduled for next (2.5) release, but not yet implemented.
This still makes me barf. Has Python jumped the shark?
It looks marginally better if you write it as:
x = (y if C else z)
--
http://mail.python.org/mailma
"Martin v. Löwis" <[EMAIL PROTECTED]> wrote:
>> I'll test it if someone would dumb down "link with ncursesw instead of
>> ncurses" a little for me.
>>
>> I tried:
>> ./configure --with-libs="ncursesw5"
>>
>> and it failed saying:
>> checking size of wchar_t... configure: error: cannot compute siz
I would like to create a dictionary based on a variable i.e read a
bunch of filenames and create a dict for each one called the filename
filename={}
to get the filenames I trraverse teh dirs woth os.path.walk or similar
Sorry I'm a bit new to python
--
http://mail.python.org/mailman/listinfo/pyt
Bob Greschke wrote:
> When you post something on eBay (and other places) you can use a 'browse'
> button on a web page to send a picture file from your hard drive to them for
> inclusion in your listing. Can the same kind of thing (not the same exact
> thing, of course) be done with a Python/Tk
On Wed, 08 Feb 2006 00:57:45 -0500, Steve Holden wrote:
> Chason Hayes wrote:
>> On Tue, 07 Feb 2006 01:58:00 +, Steve Holden wrote:
>>
>>
>>>Chason Hayes wrote:
>>>
On Mon, 06 Feb 2006 13:39:17 +, Steve Holden wrote:
>>>
>>>[...]
>>>
>The URL you reference is discussing how you
I downloaded cx_Oracle from
http://www.cxtools.net/default.aspx?nav=cxorlb and selected the windows
installer for Oracle 8i, Python 2.4
>From the readme.txt file:
BINARY INSTALL:
Place the file cx_Oracle.pyd or cx_Oracle.so anywhere on your Python
path.
So I tried this and set PYTHONPATH.
I then
Ian Ward <[EMAIL PROTECTED]> wrote:
> Martin v. Löwis wrote:
>> If that was Python's configure: don't do that. Instead, hack setup.py
>> to make it change the compiler/linker settings, or even edit the
>> compiler/linker line manually at first.
> Ok, that compiled.
same here - though it was not
Grant Edwards <[EMAIL PROTECTED]> wrote:
> Depending on what you're tring to do, slang might be an option,
perhaps not - he's trying to use UTF-8. I haven't seen any plausible
comment that indicates John Davis is interested in updating newt to
work with slang2 (though of course he's welcome to s
Ian Ward <[EMAIL PROTECTED]> wrote:
> Grant Edwards wrote:
>> Depending on what you're tring to do, slang might be an option,
> I've looked at newt and snack, but all I really need is:
> - a way to position the cursor at (0,0)
> - a way to hide and show the cursor
> - a way to detect when the term
Kyle Brooks schrieb:
> Wednesday, February 8th, 2006.
>
> Dear all,
>
> I hereby release Circe to the public domain.
>
> Our repo is at http://kbrooks.ath.cx/repos/circe.
This is the second post I read, followed the link, skimmed through some
sources and READMEs, and by now I got the impressi
Ian Ward <[EMAIL PROTECTED]> wrote:
> Thomas Dickey wrote:
>> hmm - I've read Urwid, and most of the comments I've read in that regard
>> reflect problems in Urwid. Perhaps it's time for you to do a little
>> analysis.
>>
>> (looking forward to bug reports, rather than line noise)
> A fair requ
Kirk McDonald wrote:
> Scott David Daniels wrote:
>
> You know what? That makes perfect sense. Thank you.
Thanks a lot for mentioning this. I do try to help out, and sometimes
it feels like talking to the wind. A thanks every now and then is
greatly appreciated.
Just for fun, you can play w
You may want to read
http://python.org/doc/2.4.2/whatsnew/whatsnew24.html to get an idea of
what has changed from 2.3 to 2.4 if you buy the 2.3 book.
--
http://mail.python.org/mailman/listinfo/python-list
In article <[EMAIL PROTECTED]>,
Thomas Dickey <[EMAIL PROTECTED]> wrote:
> Ian Ward <[EMAIL PROTECTED]> wrote:
...
> > Also, screen resizing only seems to be reported once by getch() even if
> > the user continues to resize the window. I have worked around this by
> > calling curses.doupdate() b
Swroteb wrote:
> Paul Rubin wrote:
>> I think the natural approach is to make a generator that yields a
>> 5-tuple for each combination, and then have your application iterate
>> over that generator. Here's my version:
>>
>> def comb(x,n):
>> """Generate combinations of n items from li
On Wed, 08 Feb 2006 15:10:26 -0500, Ian Ward <[EMAIL PROTECTED]> wrote:
>Grant Edwards wrote:
>> Depending on what you're tring to do, slang might be an option,
>
>I've looked at newt and snack, but all I really need is:
>- a way to position the cursor at (0,0)
>- a way to hide and show the cursor
I just recompiled my python to link to ncursesw, and tried your example
with a little modification:
import curses, locale
locale.setlocale(locale.LC_ALL, '')
s = curses.initscr()
s.addstr(u'\u00c5 U+00C5 LATIN CAPITAL LETTER A WITH RING
ABOVE\n'.encode('utf-8') )
s.addstr(u'\u00f5 U+00F5 LATIN SMA
Michael Spencer <[EMAIL PROTECTED]> writes:
> This is roughly 30 times faster on my box than the general solution above
Good point. You could probably improve the generator version some
(probably not 30x) by doing less list arithmetic and slicing though.
I just wrote it the most straightforward w
Jonathan Gardner wrote:
> You may want to read
> http://python.org/doc/2.4.2/whatsnew/whatsnew24.html to get an idea of
> what has changed from 2.3 to 2.4 if you buy the 2.3 book.
>
Yeah, I was looking at that, but it seems a little over my head right
now. I just didn't want to learn anything an
Thomas Dickey wrote:
> ...and send UTF-8 text, keeping track of where you really are on the screen.
You make that sound so easy.
Ross Ridge
--
http://mail.python.org/mailman/listinfo/python-list
Yes, certainly. I hadn't done any profiling up to that point, but it
really seemed like my biggest time sink was inefficiently losing time
in obtaining the combinations.
--
http://mail.python.org/mailman/listinfo/python-list
I was hoping to get some c.l.p. opinions on O'Reilly's new Twisted book.
I'm coming at Twisted as someone who's been programming mainly in
Python for almost 6 years now, but who's never done any Twisted
development. I've used some of its prepackaged libraries before (and
did some custom tweaks
hi
i have some output that returns a lines of tuples eg
('sometext1', 1421248118, 1, 'P ')
('sometext2', 1421248338, 2, 'S ')
and so on
I tried this
re.sub(r" '() ",'',str(output)) but it only get rid of the ' and not
the braces. I need to write the output to a file such that
sometext1, 142
John Salerno wrote:
> Jonathan Gardner wrote:
>> You may want to read
>> http://python.org/doc/2.4.2/whatsnew/whatsnew24.html to get an idea of
>> what has changed from 2.3 to 2.4 if you buy the 2.3 book.
>>
>
> Yeah, I was looking at that, but it seems a little over my head right
> now. I just d
Mark Fink wrote:
> I wrote a Jython class that inherits from a Java class and (thats the
> plan) overrides one method. Everything should stay the same.
>
> If I run this nothing happens whereas if I run the Java class it says:
> usage: java fit.FitServer [-v] host port socketTicket
> -v
101 - 200 of 219 matches
Mail list logo