Re: Yet Another Switch-Case Syntax Proposal

2014-04-10 Thread Lucas Malor
On 6 April 2014 20:07, Chris Angelico rosuav-at-gmail.com |python-list@python.org| wrote: > Here's a simpler form of the proposal, which might cover what you > need. It's basically a short-hand if/elif tree. > > case expression comp_op expression: > suite > case [comp_op] expression: > su

Typed python comparison / code analysis questions

2012-01-04 Thread Lucas Vickers
would spit an exception when comparing non-equal types/instances. rows = pamss.conn.fetchRows(results) count = rows[0]['cases']// should be int(rows[0]['cases']) return count < MAX_CONCURRENT_IVR thanks! Lucas -- http://mail.python.org/mailman/listinfo/python-list

Re: Typed python comparison / code analysis questions

2012-01-04 Thread Lucas Vickers
Thank you! At the moment python3 isn't an option. There's a variety of dependencies I'm working around. Is there any type of 2.x add-on? either way thanks for the info L On Wed, Jan 4, 2012 at 3:34 PM, Ian Kelly wrote: > On Wed, Jan 4, 2012 at 1:09 PM, Lucas Vickers

Make never ends when compiling from source

2012-01-18 Thread Lucas Moauro
never starts. Does anyone know the cause of this behaviour and how to solve it? - Lucas -- http://mail.python.org/mailman/listinfo/python-list

Re: Make never ends when compiling from source

2012-01-18 Thread Lucas Moauro
Just found that the issue was that the clock was not set properly on the server. 2012/1/19 Lucas Moauro > I'm trying to install Python 2.7 from source on Centos 6.0. When running > make after first running ./configure successfully on the source directory, > it performs the chec

msvccompiler issues

2005-05-01 Thread Lucas Raab
I tried looking the distutils code, but it's way over my head. I found the find_exe function in msvccompiler.py file, but it seems to be not finding cl.exe. I made sure the path to cl.exe was set in the winXP Path variable. Any help is appreciated. -- ------ Lucas Raab lvraa

Re: Any decent IM protocol implementations (icq or aim)

2005-05-03 Thread Lucas Raab
Jaime Wyant wrote: > Can anyone recommend one? Google isn't giving me much. > > jw I believe there's one for AIM called pyTOC. Trying Googling that or something like "Python ABC". ABC being the messenger service. -- ------ Lucas Raab l

Re: The world is really unstable these days......

2005-05-15 Thread Lucas Raab
ck the floors fully, order them amazingly. > > Hardly any tags will be strange smart boats. Let's creep around the > polite rooms, but don't sow the handsome figs. > > > Y'know, I really do love these random word spam messages. They're quite entertain

Re: Python on a public library computer

2005-05-17 Thread Lucas Raab
you think, unless it costs money. On the other hand > money would solve this problem so if I can do something to get that it > would be even better. > > Anton > > [the things they make you go through ...] > Hehehe. If it's possible you could run Knoppix from a CD.

Re: SSL (HTTPS) with 2.4

2005-05-18 Thread Lucas Raab
sed on the raise URL error('unknown url type: %' % type) URLError: -- -- Lucas Raab lvraab"@"earthlink.net dotpyFE"@"gmail.com AIM:Phoenix11890 MSN:dotpyfe "@" gmail.com IRC:lvraab ICQ:324767918 Yahoo: Phoenix11890 -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Developers Handbook

2005-06-09 Thread Lucas Raab
> listing for Python books copied to this forum. Please don't repeat. > > TJR > > > I don't think that was his intention. -- -- Lucas Raab lvraab"@"earthlink.net dotpyFE"@"gmail.com AIM:Phoenix11890 MSN:dotpyfe "

Re: Python Developers Handbook

2005-06-09 Thread Lucas Raab
wise one, we bow to you with your deep knowledge. -- -- Lucas Raab lvraab"@"earthlink.net dotpyFE"@"gmail.com AIM:Phoenix11890 MSN:dotpyfe "@" gmail.com IRC:lvraab ICQ:324767918 Yahoo: Phoenix11890 -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Developers Handbook

2005-06-09 Thread Lucas Raab
Aahz wrote: > In article <[EMAIL PROTECTED]>, > Lucas Raab <[EMAIL PROTECTED]> wrote: > >>Terry Reedy wrote: >> >>>Perhaps you have never seen a newgroup ruined by commercial announcements >>>like I have. >> >>O wise one, we bo

Re: New to Python

2007-03-12 Thread Lucas Torri
Something like that? z = tuple(map(lambda x,y: x+y, x, y)) On 3/11/07, Alberto Vieira Ferreira Monteiro <[EMAIL PROTECTED]> wrote: Hi, I am new to Python, how stupid can be the questions I ask? For example, how can I add (mathematically) two tuples? x = (1,2) y = (3,4) How can I get z = (1 +

Re: backslashes in lists

2007-03-12 Thread Lucas Torri
The backslash is a key to enter especial characters, like breakline: '\n' There is two backslashes cause of this especial condition of this char, but if you try print the specific string you will see that only one backslash remain: print alist[2] On 3/12/07, Fabio Gomes <[EMAIL PROTECTED]> wrot

Re: backslashes in lists

2007-03-12 Thread Lucas Torri
I don't know how ugly this look like, but { print str(alist).replace('', '\\') } works... On 3/12/07, Fabio Gomes <[EMAIL PROTECTED]> wrote: Yes, Luca. I noticed that printing the list item will show the string as expected. But I need to print the entire list in the script I'm writing a

Re: backslashes in lists

2007-03-12 Thread Lucas Torri
sh table? On 3/12/07, Fabio Gomes <[EMAIL PROTECTED]> wrote: Nice, Lucas. But help me again, please. What about "echoing" the list: >>> str(alist).replace('','\\') "['a', 'b', 'c:\\some\\path']" B

Re: backslashes in lists

2007-03-12 Thread Lucas Torri
tr2_value = ['value', path] attr2_List = [attr2_desc, attr2_name, attr2_required, attr2_value] attr_List = [attr1_List, attr2_List] property= ['systemProperties', attr_List] AdminConfig.modify(jvm, [property]) print 'Salvando configuracoes...' AdminConf

[optparse] Problem with getting an option value

2007-04-06 Thread Lucas Malor
Hello all. I'm trying to do a little script. Simply I want to make a list of all options with them default values. If the option is not specified in the command line, the script must try to read it in a config.ini file. If it's not present also there, it must set the default value. The problem

Re: Problem with getting an option value

2007-04-10 Thread Lucas Malor
Peter Otten wrote: > Lucas Malor wrote: >> >> The problem is options is an instance, so options."delete", for example, >> is wrong; I should pass options.delete . How can I do? > > Use getattr(): Thank you. Do you know also if I can do a similar operation wit

Python source checkout problem

2010-07-15 Thread Andrew Lucas
I am trying to check-out the python source using subversion. The documentation says that "svn co http://svn.python.org/projects/python/trunk"; should do the trick. When I do this I get the following response: "svn: REPORT of '/projects/!svn/vcc/default': 200 OK (http:// svn.python.org)" There

Re: Remoting over SSH

2009-07-08 Thread Lucas Carvalho
Hussein B wrote: Hey, I want to perform commands on a remote server over SSH. What do I need? Thanks. Hi, If you want to use the SSH2 protocol into a python code, you should take a look at this module: paramiko [1]. [1] http://www.lag.net/paramiko/ Regards, Lucas. -- http://mail.python.org

windows command-line

2009-07-08 Thread Lucas Junqueira
Hi, I'd like to run a simple windows command-line program from within my python script and agt all the returt it generates. Is this possible? How can I do it? Thank you! Veja quais são os assuntos do mo

Using mouse

2008-01-01 Thread Lucas Prado Melo
I would like to control mouse events (i.e. I would like to "click" and move mouse around by code). How do I do this in python? regards -- http://mail.python.org/mailman/listinfo/python-list

"prove"

2008-05-08 Thread Lucas Prado Melo
Hello, How could I "prove" to someone that python accepts this syntax using the documentation (I couldn't find it anywhere): classname.functionname(objectname) -- http://mail.python.org/mailman/listinfo/python-list

Re: "prove"

2008-05-08 Thread Lucas Prado Melo
Thanks Marco, this is just what I was looking for. On Thu, May 8, 2008 at 11:02 AM, David <[EMAIL PROTECTED]> wrote: > > classname.functionname(objectname) > > Do you mean something like this? > > class myclass: > @staticmethod > def myfunction(myobject): pass > > myobject = None > my

Re: "prove"

2008-05-09 Thread Lucas Prado Melo
On Fri, May 9, 2008 at 5:32 AM, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > Why do you need the documentation ? Just fire up your python shell and hack > a Q&D example: I agree. I said it to this person, but he insisted I should use documentation... -- http://mail.python.org/mailman/listinfo/p

Re: "prove"

2008-05-09 Thread Lucas Prado Melo
Thanks for all the answers. I bet I will convince this guy! -- http://mail.python.org/mailman/listinfo/python-list

For...in statement and generators

2009-12-21 Thread Lucas Prado Melo
Is there a way to send() information back to a generator while using the for...in statement? Thanks in advance. -- http://mail.python.org/mailman/listinfo/python-list

Tool for browsing python code

2009-06-16 Thread Lucas P Melo
Is there any tool for browsing python code? (I'm having a hard time trying to figure this out) Anything like cscope with vim would be great. -- http://mail.python.org/mailman/listinfo/python-list

List insertion cost

2009-07-21 Thread Lucas P Melo
Hello, I would like to know how much it costs to insert an element into a list using this operation: a[2:2] = [ 1 ] i. e, what is the complexity of the operation above (given that len(a) = n)? Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: List insertion cost

2009-07-21 Thread Lucas P Melo
Robert Kern wrote: O(n). Python lists are contiguous arrays in memory, and everything after the insertion point needs to be moved. Raymond Hettinger has a good talk about the implementation of Python lists and other container objects. http://www.youtube.com/watch?v=hYUsssClE94 http://www.pyco

Balanced binary tree implementation

2009-07-21 Thread Lucas P Melo
Hello, I would like to use a balanced binary tree implementation (preferably within some API). Any hints about where I could find it? I am looking for something that implements insertion, deletion, search and a special search that returns the lesser element bigger than a given key [1]. A n

Generators through the C API

2009-07-30 Thread Lucas P Melo
Hello, I'm a total noob about the C API. Is there any way to create a generator function using the C API? I couldn't find anything like the 'yield' keyword in it. Thanks in advance. -- http://mail.python.org/mailman/listinfo/python-list

Re: File Handling Problem

2009-09-04 Thread Lucas Prado Melo
On Fri, Sep 4, 2009 at 9:50 AM, joy99 wrote: > Dear Group, > > I have a file. The file has multiple lines. I want to get the line > number of any one of the strings. > Once I get that I like to increment the line number and see the string > of the immediate next line or any following line as outp

Tiny Python interpreter

2005-08-10 Thread Lucas Correia Villa Real
es, as I'm not subscribed to this list. -- Lucas powered by /dev/dsp -- http://mail.python.org/mailman/listinfo/python-list

Decoding bytes to text strings in Python 2

2024-06-21 Thread Rayner Lucas via Python-list
I'm curious about something I've encountered while updating a very old Tk app (originally written in Python 1, but I've ported it to Python 2 as a first step towards getting it running on modern systems). The app downloads emails from a POP server and displays them. At the moment, the code is

Re: Decoding bytes to text strings in Python 2

2024-06-23 Thread Rayner Lucas via Python-list
In article , ros...@gmail.com says... > > If you switch to a Linux system, it should work correctly, and you'll > be able to migrate the rest of the way onto Python 3. Once you achieve > that, you'll be able to operate on Windows or Linux equivalently, > since Python 3 solved this problem. At lea

Re: Decoding bytes to text strings in Python 2

2024-06-23 Thread Rayner Lucas via Python-list
In article , r...@zedat.fu- berlin.de says... > > I didn't really do a super thorough deep dive on this, > but I'm just giving the initial impression without > actually being familiar with Tkinter under Python 2, > so I might be wrong! > > The Text widget typically expects text in Tcl

<    1   2