Re: ftpilb.FTP.stor...() freeze mystery

2009-10-29 Thread Anthra Norell
Gabriel Genellina wrote: En Wed, 28 Oct 2009 08:05:22 -0300, Anthra Norell escribió: Gabriel Genellina wrote: En Tue, 27 Oct 2009 07:53:36 -0300, Anthra Norell escribió: I am trying to upload a bunch of web pages to a hosting service.[...] I wrote a loop that iterates through the file

Re: ftpilb.FTP.stor...() freeze mystery

2009-10-30 Thread Anthra Norell
Gabriel Genellina wrote: En Thu, 29 Oct 2009 13:18:30 -0300, Anthra Norell escribió: Gabriel Genellina wrote: En Wed, 28 Oct 2009 08:05:22 -0300, Anthra Norell escribió: Gabriel Genellina wrote: En Tue, 27 Oct 2009 07:53:36 -0300, Anthra Norell escribió: I am trying to upload a bunch

Re: Minimally intrusive XML editing using Python

2009-11-18 Thread Anthra Norell
Thomas Lotze wrote: Chris Rebert wrote: Have you considered using an XML-specific diff tool such as: I'm afraid I'll have to fall back to using such a thing if I don't find a solution to what I actually want to do. I do realize that XML isn't primarily about its textual representatio

C:\Python25\Lib\IDLELIB\idle.pyw won't start

2010-02-05 Thread Anthra Norell
Hi, I upgraded from 2.4 to 2.5 and am unable to start an 2.5 idle window. This is the command I have been using: C:\Python24\pythonw.exe C:\Python24\Lib\IDLELIB\idle.pyw -n -c execfile('C:\\Python24\\i') And this is the command that doesn't start anything: C:\Python25\pythonw.exe C:\Pyt

Re: C:\Python25\Lib\IDLELIB\idle.pyw won't start

2010-02-05 Thread Anthra Norell
Thank you both (Alf and Duncan) for your comments. I answer Duncan's questions interleaved: Duncan Booth wrote: Anthra Norell wrote: Hi, I upgraded from 2.4 to 2.5 and am unable to start an 2.5 idle window. This is the command I have been using: C:\Python24\pythonw.

Re: C:\Python25\Lib\IDLELIB\idle.pyw won't start

2010-02-05 Thread Anthra Norell
Duncan Booth wrote: Anthra Norell wrote: Using pythonw.exe will start the program with all error output dumped in the bit bucket. Running from a command prompt with python.exe will at least let you see if there are any errors. python.exe from the command line works all right in

Re: C:\Python25\Lib\IDLELIB\idle.pyw won't start

2010-02-06 Thread Anthra Norell
Gabriel, Thanks for your hints. I take them up one by one: Gabriel Genellina wrote: En Fri, 05 Feb 2010 10:23:57 -0300, Anthra Norell escribió: I upgraded from 2.4 to 2.5 and am unable to start an 2.5 idle window. The OS is Windows ME. The download of 2.5 finished with a warning

Re: C:\Python25\Lib\IDLELIB\idle.pyw won't start

2010-02-06 Thread Anthra Norell
Gabriel, After reinstalling the whole package things are shaping up. It still doesn't work but it fails more to the point of your suggestions. I update the responses to your questions: Anthra Norell wrote: Gabriel, Thanks for your hints. I take them up one by one: Gabriel Gene

Re: Help with regex search-and-replace (Perl to Python)

2010-02-08 Thread Anthra Norell
Schif Schaf wrote: On Feb 7, 8:57 am, Tim Chase wrote: Steve Holden wrote: Really? Under what circumstances does a simple one-for-one character replacement operation fail? Failure is only defined in the clarified context of what the OP wants :) Replacement operations only fai

Re: Six Minutes and fourty two seconds

2010-03-01 Thread Anthra Norell
Tobiah wrote: Now that I use python, this is the amount of time per day that I spend adding forgotten semicolons while debugging other languages. What compels you to write Python code without semicolons? Frederic -- http://mail.python.org/mailman/listinfo/python-list

How to access a web site with an authentication template.

2010-03-17 Thread Anthra Norell
Hi all, I have spent the better part of this day reading docs and googling archives to no avail. About this: I understand that I can access password protected sites with urllib2. However, the protocol seems to be: I try without password and catch the error coming back. The header will then

MySQLdb - weird formatting inconsistency

2010-04-24 Thread Anthra Norell
Hi all, Can anyone explain this? Three commands with three different cutoff dates (12/30, 12/31 and 1/1) produce a formatting inconsistency. Examine the third field. The first and last run represents it correctly. The second run strips it. The field happens to be a record ID and getting it

Re: MySQLdb - weird formatting inconsistency

2010-04-24 Thread Anthra Norell
Anthra Norell wrote: Sebastian Bassi wrote: Hi, Could you post a minimal version of the DB (a DB dump) to test it? Just remove most information and leave on the ones needed to reproduce the error. Also remove any personal/confidential information. Then dump the DB so I can test it here. Best

Re: Regular expression

2010-05-19 Thread Anthra Norell
Back9 wrote: Hi, I have a string like this: 0x340x5A0x9B0xBA I want to extract 0x from the string but the first one. How I can use re for this case? The string size will vary. TIA Unless the use of a regular expression is a requirement I'd do it like this: '0x%s' % s.split ('x', 1)[1].

What is the name of the name space I am in?

2010-07-05 Thread Anthra Norell
I try to use "new.new.classobj (name, baseclass, dict)" and have no clue what the "dict" of the current name space is. I can name dicts of imported modules, because their name exists in the current name space. If, for instance, I import a module "service" then that module's name space would be

Re: What is the name of the name space I am in?

2010-07-05 Thread Anthra Norell
Thomas Jollans wrote: On 07/05/2010 11:07 AM, Anthra Norell wrote: I try to use "new.new.classobj (name, baseclass, dict)" and have no clue what the "dict" of the current name space is. I can name dicts of imported modules, because their name exists in the current

Re: What is the name of the name space I am in?

2010-07-05 Thread Anthra Norell
Chris Rebert wrote: On Mon, Jul 5, 2010 at 2:07 AM, Anthra Norell wrote: I try to use "new.new.classobj (name, baseclass, dict)" and have no clue Slight tangent: Note that both the `new` module and old-style classes (which are what `classobj` produces) are deprecated. To p

Re: What is the name of the name space I am in?

2010-07-06 Thread Anthra Norell
Gregory Ewing wrote: On 07/05/2010 11:07 AM, Anthra Norell wrote: I try to use "new.new.classobj (name, baseclass, dict)" and have no clue what the "dict" of the current name space is. Are you sure that's what you really want to know? The 'dict' argument t

CAD file format specifications?

2009-06-12 Thread Anthra Norell
Hi, Anyone working with CAD who knows about numeric data entry? I have 3d coordinates of a construction site on a slope (borders, setbacks and isometric elevation lines). Someone made me aware of Google's Sketch Up. It looks very attractive for the purpose of architectural planning, especial

Re: CAD file format specifications?

2009-06-13 Thread Anthra Norell
Andres Acosta wrote: HI there Anthara have you checked out www.Blender.org, It is open source and accepts a lot of your formats. for import and export. Anrdres Anthra Norell wrote: Hi, Anyone working with CAD who knows about numeric data entry? I have 3d coordinates of a construction site

Re: CAD file format specifications?

2009-06-18 Thread Anthra Norell
norseman wrote: Anthra Norell wrote: Andres Acosta wrote: HI there Anthara have you checked out www.Blender.org, It is open source and accepts a lot of your formats. for import and export. Anrdres Anthra Norell wrote: Hi, Anyone working with CAD who knows about numeric data entry? I have

Re: CAD file format specifications?

2009-06-19 Thread Anthra Norell
Dennis Lee Bieber wrote: On Thu, 18 Jun 2009 13:39:28 +0200, Anthra Norell declaimed the following in gmane.comp.python.general: utility. So, my question is: How do I convert a bunch of three-dimensional coordinates defining lines into a file format Sketch Up can read (skp, dwg, dxf, 3ds

Compiling regex inside function?

2009-08-03 Thread Anthra Norell
Hi all, I have a regex that has no use outside of a particular function. From an encapsulation point of view it should be scoped as restrictively as possible. Defining it inside the function certainly works, but if re.compile () is run every time the function is called, it isn't such a good

Re: Compiling regex inside function?

2009-08-04 Thread Anthra Norell
alex23 wrote: Anthra Norell wrote: def entries (l): r = re.compile ('([0-9]+) entr(y|ies)') match = r.search (l) if match: return match.group (1) So the question is: does "r" get regex-compiled once at py-compile time or repeatedly at entries()

Re: How to write replace string for object which will be substituted? [regexp]

2009-08-05 Thread Anthra Norell
MRAB wrote: ryniek90 wrote: Hi. I started learning regexp, and some things goes well, but most of them still not. I've got problem with some regexp. Better post code here: " >>> import re >>> mail = '\nn...@mail.com\nname1 [at] mail [dot] com\nname2 [$at$] mail [$dot$] com\n' >>> mail '

Re: Select column from a list

2009-08-28 Thread Anthra Norell
Vlastimil Brom wrote: 2009/8/28 hoffik : Hello, I'm quite new in Python and I have one question. I have a 2D matrix of values stored in list (3 columns, many rows). I wonder if I can select one column without having to go through the list with 'for' command. ... I guess, it won't be p

<    1   2