Re: super(...).__init__() vs Base.__init__(self)

2006-02-09 Thread Tony Nelson
In article <[EMAIL PROTECTED]>, Jan Niklas Fingerle <[EMAIL PROTECTED]> wrote: > ...Super is a good tool to use, when dealing with > diamond shape inheritance. In any other case I would use the direct > calls to the base classes. In fact, i've yet to find a non-textbook-case > where I really need

Re: PEP 353: Using ssize_t as the index type

2006-02-12 Thread Tony Nelson
In article <[EMAIL PROTECTED]>, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: ... > Discussion > == > > Why not size_t > -- > > An initial attempt to implement this feature tried to use > size_t. It quickly turned out that this cannot work: Python > uses negative indices in m

Re: time.sleep(1) sometimes runs for 200 seconds under windows

2006-02-26 Thread Tony Nelson
In article <[EMAIL PROTECTED]>, Claudio Grondi <[EMAIL PROTECTED]> wrote: > Claudio Grondi wrote: > > Claudio Grondi wrote: > > > >> Paul Probert wrote: > >> > >>> Peter Hansen wrote: > >>> > Are you saying that you believe the time.sleep(1) call is actually > blocking for 200 seconds

Trouble killing a process on windows

2007-06-02 Thread Thomas Nelson
Hi, I'd like to start a program, run it for a while, then terminate it. I can do this on linux, but I'm new to working with windows. Here's my script: from subprocess import Popen from time import sleep import win32api war3game = Popen(["C:\Program Files\Warcraft III\Frozen Throne.exe"]) sleep(30

Re: Trouble killing a process on windows

2007-06-02 Thread Thomas Nelson
On Jun 2, 11:43 am, Tim Golden <[EMAIL PROTECTED]> wrote: > Thomas Nelson wrote: > > from subprocess import Popen > > from time import sleep > > import win32api > > war3game = Popen(["C:\Program Files\Warcraft III\Frozen Throne.exe"]) >

condor_compiled python interpreter

2007-07-11 Thread Thomas Nelson
Does anyone know where I could find help on condor_compiling a python interpreter? My own attempts have failed, and I can't find anything on google. Here's the condor page: http://www.cs.wisc.edu/condor/ Thanks, Tom -- http://mail.python.org/mailman/listinfo/python-list

Feedback on Until recipe

2007-04-24 Thread Thomas Nelson
Occasionally someone posts to this group complaining about the lack of "repeat ... until" in python. I too have occasionally wished for such a construct, and after some thinking, I came up with the class below. I'm hoping to get some feedback here, and if people besides me think they might use it

feedback on Until recipe

2007-04-24 Thread Thomas Nelson
Occasionally people post complaining about the lack of a "repeat...until" structure in python. I thought about it and came up with this recipe that I like. The only ugly thing is having to use lambdas, otherwise it's very terse and readable. Tell me what you think, and if anyone besides me think

Re: When are immutable tuples *essential*? Why can't you just use lists *everywhere* instead?

2007-04-24 Thread Thomas Nelson
On Apr 23, 10:38 pm, Mel Wilson <[EMAIL PROTECTED]> wrote: > Neil Cerutti wrote: > > The interpreter explains it: "A list is not a hashable object." > > Choosing a hash table instead of some kind of balanced tree seems > > to be just an optimization. ;) > > Even with a balanced tree, if a key in a

Re: editing scripts on a mac

2007-04-27 Thread Thomas Nelson
On Apr 27, 11:37 am, Tommy Grav <[EMAIL PROTECTED]> wrote: > > him> I do not have a text editor, but here are the answers to > > him> questions 1-5. > > > Now, frankly, I don't think this answer is correct, since I know OS > > X is > > a UNIX derivative, but I am loathe to involve a programming n

How safe is a set of floats?

2007-05-04 Thread Thomas Nelson
I want to generate all the fractions between 1 and limit (with limit>1) in an orderly fashion, without duplicates. def all_ratios(limit): s = set() hi = 1.0 lo = 1.0 while True: if hi/lo not in s: s.add(hi/lo) yield (hi,lo) hi += 1 if

Re: How do I get type methods?

2007-05-04 Thread Thomas Nelson
On May 4, 7:59 am, [EMAIL PROTECTED] wrote: > On 4 ÍÁÊ, 09:08, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > > > En Fri, 04 May 2007 01:34:20 -0300, <[EMAIL PROTECTED]> escribio: > > > I'm not against 'dir(MyClass)'; the question is, what should I 'dir()' > > > to get methods of 'pyuno' type ins

Re: Microsoft's Dynamic Languages Runtime (DLR)

2007-05-04 Thread Tony Nelson
In article <[EMAIL PROTECTED]>, Kaz Kylheku <[EMAIL PROTECTED]> wrote: > On May 2, 5:19 pm, sturlamolden <[EMAIL PROTECTED]> wrote: > > On May 3, 2:15 am, Kaz Kylheku <[EMAIL PROTECTED]> wrote: > > > > > Kindly refrain from creating any more off-topic, cross-posted threads. > > > Thanks. > > > >

Re: Sorting troubles

2007-05-14 Thread Thomas Nelson
On May 14, 11:05 am, [EMAIL PROTECTED] wrote: > I have the following implementations of quicksort and insertion sort: > > def qSort(List): > if List == []: return [] > return qSort([x for x in List[1:] if x< List[0]]) + List[0:1] + \ >qSort([x for x in List[1:] if x>=List[0]]) >

Re: Combinatorial of elements in Python?

2007-08-15 Thread Thomas Nelson
On Aug 15, 8:39 am, "Sebastian Bassi" <[EMAIL PROTECTED]> wrote: > That was easy :) > What about extending it for N elements inside the dictionary? Sounds > like a work for a recursive function. Here's my attempt: [code] def backtrack(groups,position=0, answer=''): if position==len(groups)

Canceling events from COM objects

2007-08-16 Thread Oliver Nelson
I have MapPoint working in Python, and I'm trying to cancel events on the map, but I can't seem to make that happen. I'm responding to the events successfully in my panel object. My code is like this: global MapPointMod MapPointMod = win32com.client.gencache.EnsureModule("{51C0A9CA-F7B7-4F5A-

Canceling events from COM Objects

2007-08-16 Thread Oliver Nelson
I have MapPoint working in Python, and I'm trying to cancel events on the map, but I can't seem to make that happen. I'm responding to the events successfully in my panel object. My code is like this: global MapPointMod MapPointMod = win32com.client.gencache.EnsureModule("{51C0A9CA-F7B7-4F5A-

Canceling events from COM Objects

2007-08-16 Thread Oliver Nelson
I have MapPoint working in Python, and I'm trying to cancel events on the map, but I can't seem to make that happen. I'm responding to the events successfully in my panel object. My code is like this: global MapPointMod MapPointMod = win32com.client.gencache.EnsureModule("{51C0A9CA-F7B7-4F5A-

Events in Com Object for Python

2007-08-16 Thread Oliver Nelson
I have MapPoint working in Python, and I'm trying to cancel events on the map, but I can't seem to make that happen. I'm responding to the events successfully in my panel object. My code is like this: global MapPointMod MapPointMod = win32com.client.gencache.EnsureModule("{51C0A9CA-F7B7-4F5A-

Cancelling events on a COM Object

2007-08-16 Thread Oliver Nelson
I have MapPoint working in Python, and I'm trying to cancel events on the map, but I can't seem to make that happen. I'm responding to the events successfully in my panel object. My code is like this: global MapPointMod MapPointMod = win32com.client.gencache.EnsureModule("{51C0A9CA-F7B7-4F5A-

Re: Cancelling events on a COM Object

2007-08-17 Thread Oliver Nelson
James, I was getting an error everytime so I thought I had a setup problem... Sorry everybody... OLIVER James Stroud wrote: > Oliver, wait a while before you panic about your post not getting through! > > James > -- http://mail.python.org/mailman/listinfo/python-list

Canceling events on COM objects

2007-08-18 Thread Oliver Nelson
I have MapPoint working in Python, and I'm trying to cancel events on the map, but I can't seem to make that happen. I'm responding to the events successfully in my panel object. My code is like this: global MapPointMod MapPointMod = win32com.client.gencache.EnsureModule("{51C0A9CA-F7B7-4F5A-

Re: Canceling events on COM Objects in python

2007-08-18 Thread Oliver Nelson
nly a different model than the standard wx event system... OLIVER [EMAIL PROTECTED] wrote: > On Aug 17, 11:54 pm, Oliver Nelson <[EMAIL PROTECTED]> wrote: >> I have MapPoint working in Python, and I'm trying to cancel events on >> the map, but I can't seem to make that happ

Re: Cancelling events on a COM Object

2007-08-18 Thread Oliver Nelson
Roger, I tried modifying my code so that I have def OnBeforeClick(self, Button, Shift, X, Y, Cancel): print "click" Cancel = True return Cancel But this doesn't seem to have changed anything. Am I doing this wrong? OLIVER Roger Upole wrote: > O

Re: Looping through File Question

2007-09-05 Thread Thomas Nelson
> > > On Sep 5, 8:58 pm, planetmatt <[EMAIL PROTECTED]> wrote: > > > > > I am a Python beginner. I am trying to loop through a CSV file which > > > > I can do. What I want to change though is for the loop to start at > > > > row 2 in the file thus excluding column headers. The DictReader object

Re: how to remove multiple occurrences of a string within a list?

2007-04-03 Thread Thomas Nelson
bahoo wrote: > Hi, > > I have a list like ['0024', 'haha', '0024'] > and as output I want ['haha'] > > If I > myList.remove('0024') > > then only the first instance of '0024' is removed. > > It seems like regular expressions is the rescue, but I couldn't find > the right tool. > > Thanks! > bahoo

Re: how to remove multiple occurrences of a string within a list?

2007-04-03 Thread Thomas Nelson
On Apr 3, 1:49 pm, [EMAIL PROTECTED] wrote: > On Apr 3, 1:31 pm, "Matimus" <[EMAIL PROTECTED]> wrote: > > > It depends on your application, but a 'set' might really be what you > > want, as opposed to a list. > > > >>> s = set(["0024","haha","0024"]) > > >>> s > > > set(["0024","haha"])>>> s.remove

PEP idea: Instrumented Python

2007-10-12 Thread Christopher Nelson
I was looking at adding dtrace-like dynamic tracing to Python. Note that this isn't dtrace itself. The basic rationale: 1. A lot of enterprise-level software is written in Python. It is difficult to impossible to reproduce the customer environment in a test lab. Sometimes applications hang myst

RE: a question about decorator

2007-10-22 Thread Trent Nelson
> def A(): > print 'warp in A' > def why(self, *arg, **kw): > print 'in A' > print self > print arg > print kw > #self(*arg, **kw) > > return why > > class T(object): > @A() > def test(g, out): >

RE: calling a function from string

2007-10-22 Thread Trent Nelson
> i have a function that I could like to call, but to make it more > dynamic I am constructing a string first that could equivalent to the > name of the function I wish to call. how could I do that? the string > could might include name of the module. > > for example > > a_string = 'datetime.' +

Trouble with max() and __cmp__()

2007-01-28 Thread Thomas Nelson
My code: class Policy(list): def __cmp__(self,other): return cmp(self.fitness,other.fitness) j = Policy() j.fitness = 3 k = Policy() k.fitness = 1 l = Policy() l.fitness = 5 print max([j,k,l]).fitness prints 3, when I was expecting it to print 5. What have I done wrong? Thanks for

Re: Trouble with max() and __cmp__()

2007-01-28 Thread Thomas Nelson
On Jan 28, 3:13 pm, Wojciech Muła <[EMAIL PROTECTED]> wrote: >Define method __gt__. This works, thanks. I was a little surprised though. is __cmp__ used by any builtin functions? Thanks, THN -- http://mail.python.org/mailman/listinfo/python-list

Re: Sorting a List of Lists

2007-01-30 Thread Thomas Nelson
On Jan 30, 5:55 pm, [EMAIL PROTECTED] wrote: > I can't seem to get this nailed down and I thought I'd toss it out > there as, by gosh, its got to be something simple I'm missing. > > I have two different database tables of events that use different > schemas. I am using python to collate these reco

c++ for python programmers

2007-02-12 Thread Thomas Nelson
I realize I'm approaching this backwards from the direction most people go, but does anyone know of a good c/c++ introduction for python programmers? Thanks, Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: c++ for python programmers

2007-02-12 Thread Thomas Nelson
On Feb 12, 1:35 pm, andrew clarke <[EMAIL PROTECTED]> wrote: > Thomas, I sent you a message off-list but it bounced due to your mailbox > being full. > > Short answer: Subscribe to the c-prog@yahoogroups.com mailing list and > ask your C/C++ questions there. > > Regards > Andrew I have to edit a

Re: list/get methods/attributes of a class?

2007-02-22 Thread Thomas Nelson
Check out the dir() function. It does what you want, I think. Tom On Feb 22, 9:27 am, [EMAIL PROTECTED] wrote: > Hello, > Sorry guys for this newbie questions. But I wonder if there is a > standard or build-in method to know the methods of a class? > > I'm not originally a progrommer and I have

Re: Possible to set cpython heap size?

2007-02-23 Thread Tony Nelson
In article <[EMAIL PROTECTED]>, "Andy Watson" <[EMAIL PROTECTED]> wrote: ... > If I could have a heap that is larger and does not need to be > dynamically extended, then the Python GC could work more efficiently. ... GC! If you're allocating lots of objects and holding on to them, GC will ru

Re: newbie needs help building Python 2.5 for Fedora Core 6

2007-02-24 Thread Tony Nelson
In article <[EMAIL PROTECTED]>, "bobmon" <[EMAIL PROTECTED]> wrote: > Hello, and please be gentle... > > I'm trying to build Python 2.5 on my Fedora Core 6 installation. I > think I've resolved most of my problems, but "make test" reports an > error for test_socket.py, shown below. > > I suppo

Re: python tutorial on a single html page?

2007-11-07 Thread Tony Nelson
In article <[EMAIL PROTECTED]>, BartlebyScrivener <[EMAIL PROTECTED]> wrote: > Is the main Python tutorial posted on single searchable page > somewhere? As opposed to browsing the index and clicking NEXT etc. For completeness (though a bit late), I'll mention that Google can search a group of

Re: python about mobile game?

2006-04-20 Thread Thomas Nelson
What is a mobile game? Is it a game that can be played on a mobile phone? THN -- http://mail.python.org/mailman/listinfo/python-list

Re: modifying iterator value.

2006-04-26 Thread Thomas Nelson
There is also this way: for index in range(len(someList)): someList[index] = 1 This is not as pretty or concise as enumerate(), but if you've never seen that function before this may be more clear. I assume you're familiar with the way range and len work. THN -- http://mail.python.org/mai

Re: print names of dictionaries

2006-04-26 Thread Thomas Nelson
Here's an OO way that may do what you want: >>> class MyD(dict): ... def __init__(self,dic,rep): ... dict.__init__(self,dic) ... self.rep = rep ... def __repr__(self): ... return self.rep ... >>> apps = MyD({'alpha':1,'beta':2},'apps') >>> apps apps >>> a

Re: do while loop

2006-04-26 Thread Thomas Nelson
My usual way of emulating do-while is: started = False while (someBoolean or not started): started = True #whatever else This simply assures "whatever else" happens at least once. Is this Pythonic? THN -- http://mail.python.org/mailman/listinfo/python-list

Re: print names of dictionaries

2006-04-26 Thread Thomas Nelson
Here's an OO way that may do what you want: >>> class MyD(dict): ... def __init__(self,dic,rep): ... dict.__init__(self,dic) ... self.rep = rep ... def __repr__(self): ... return self.rep ... >>> apps = MyD({'alpha':1,'beta':2},'apps') >>> apps apps >>> a

Re: print names of dictionaries

2006-04-26 Thread Thomas Nelson
I meant something like def printdict(dictionaries=[(apps,'apps'), (dirs,'dirs'), (sites,'sites')]): for dictionary,name in dictionaries: print name keys = dictionary.keys() keys.sort() for key in keys: print key, ":

Re: 404 not found on for Python 2.6 Itanium

2008-11-21 Thread Christopher Nelson
I'm not sure what to say about that. The company I work for is committed to Python (our product is mostly Python source), and my current job is to make our software work on Itanium, which means providing an Itanium build of Python. As long as I have this job I suspect that I will be maintaining i

Feedparser problem

2009-06-04 Thread Jonathan Nelson
I'm trying to add a feedreader element to my django project. I'm using Mark Pilgrim's great feedparser library. I've used it before without any problems. I'm getting a TypeError I can't figure out. I've tried searching google, bing, google groups to no avail. Here's the dpaste of what I'm tryin

RE: Google App Engine

2008-04-08 Thread Trent Nelson
> But people will always prefer complaining on the grounds of > insufficient information to keeping quiet on the basis of knowledge. +1 QOTW! -- http://mail.python.org/mailman/listinfo/python-list

RE: Randall Munroe loves Python

2008-04-11 Thread Trent Nelson
> Another xkcd plug for Python: http://xkcd.com/409/ Damn it. There goes another 40 minutes of my life magically whisked away by that more-addictive-than-crack 'RANDOM' button. -- http://mail.python.org/mailman/listinfo/python-list

Global Python Sprint Weekends: May 10th-11th and June 21st-22nd.

2008-04-16 Thread Trent Nelson
Following on from the success of previous sprint/bugfix weekends and sprinting efforts at PyCon 2008, I'd like to propose the next two Global Python Sprint Weekends take place on the following dates: * May 10th-11th (four days after 2.6a3 and 3.0a5 are released) * June

RE: Python script to automate use of Google Translate? (or other translator)

2008-04-22 Thread Trent Nelson
> > I have the need to occasionally translate a single word > > programatically. Would anyone have a Python script that > > would let me do this using Google (or another) translation > > service? As a matter of fact, yes, I do! This happens to be my most favourite piece of Python code I've ever

RE: Python development tools

2008-04-23 Thread Trent Nelson
> Are there any completely free developent tools for python > scripts like IDLE. I have used IDLE , but I want to try out > others also. I saw stuff like PyCrust, but I don't see that > it can run the script as well. > Thanks, Ignoring the 'free' part of your question, I've recently moved from Py

REMINDER: Python Sprint Weekend This Weekend!

2008-05-07 Thread Trent Nelson
Just a friendly reminder that this weekend is the Python sprint weekend! Look forward to seeing everyone on #python-dev irc.freenode.net over the course of the weekend! Trent. On 16 Apr, 18:52, Trent Nelson wrote: > >Following on from the success of previous sprint/bugfix we

Re: Can anyone suggest a good crypto package?

2008-09-04 Thread Trent Nelson
On Thu, Sep 04, 2008 at 11:39:42AM -0700, Fett wrote: > I need a crypto package that works on windows with python 2.5. Can > anyone suggest one for me? You could always rely on the the APIs Windows provides to do this sort out stuff, either via pywin32 or ctypes. Trent. -- h

python on Mac

2006-04-05 Thread Thomas Nelson
I just purchased a new macbook (os 10.4.6), and I'm trying to install python 2.4 on it. I downloaded and ran the two installers recommended at http://www.python.org/download/mac/. Now I have IDLE, which runs 2.4.1, but typing "python" at a terminal still opens 2.3.5, because it points to /usr/bin

Re: python on Mac

2006-04-05 Thread Thomas Nelson
There is no 2.4 in my Versions folder, only 2.3 and current. Should one of the installers have created this directory? Which one? THN -- http://mail.python.org/mailman/listinfo/python-list

Re: python on Mac

2006-04-05 Thread Thomas Nelson
Thanks to you both. I downloaded the dmg suggested, and trustingly typed: sudo rm /usr/bin/python sudo ln -s /usr/local/bin/python2.4 /usr/bin/python And now my command line and scripts behave the way I expect. Thanks again. THN -- http://mail.python.org/mailman/listinfo/python-list

Re: python on Mac

2006-04-06 Thread Thomas Nelson
Well, as I stated in post, I've already replaced the link at /usr/bin/python. I'm not clear why that's unhealthy. Should I change it back to whatever it was before? I guess maybe it was /System/Library/Frameworks/Python.framework/Versions/Current/bin/python ? Thanks, THN -- http://mail.python.

Re: python on Mac

2006-04-06 Thread Thomas Nelson
Ok, I fixed my /usr/bin/python and added /usr/public/bin/ to my PATH in .profile. Everything seems ok now. Thanks again to everyone for their help. THN -- http://mail.python.org/mailman/listinfo/python-list

Re: "The World's Most Maintainable Programming Language"

2006-04-09 Thread Thomas Nelson
I thought the paragraph about provability was interesting. Presumably the author refers to proofs in the spirit of "A Discipline of Programming" from Djikstra, 1976. Unfortunately, I don't think anyone has writting much about this since the 70s. I'd be interested to learn if anyone's tried to wr

mac install

2010-02-09 Thread Thomas Nelson
I downloaded the 3.1.1 dmg from http://www.python.org/download/releases/3.1.1/ but when I run it I get the error "The folowing install step failed: run postflight script for python documentation." The bugs list has this bug at http://bugs.python.org/issue6934 but it's described as fixed. Is it on

Trouble installing numpy on QNX

2011-02-23 Thread Nelson Powell
I'm currently using QNX 6.4.1 with Python 2.5. I went to install numpy 1.4.1, but the install kicks bakc an error saying that it cannot find Python.h and that I should install python-dev|python-devel. I look online and I can only find those two packages in relation to Ubuntu, which obviously will

RE: Django as exemplary design

2010-05-06 Thread Trent Nelson
> I'm interested in improving my python design by studying a large, > well-designed codebase. I'll tell you one of the best ways to improve your Python code: attend one of Raymond Hettinger's Code Clinic workshops at a Python conference and put some up of your work up on the projector for 20+ deve

Re: Why list comprehension faster than for loop?

2010-05-09 Thread Trent Nelson
On 9 May 2010, at 16:29, Xavier Ho wrote: On Sun, May 9, 2010 at 6:20 PM, gopi krishna mailto:dasarathulag...@gmail.com>> wrote: Why list comprehension faster than for loop? Because Python optimises for certain special cases, when the number of iterations is predicable in a list comprehension.

Feedparser Problem

2009-06-05 Thread Jonathan Nelson
I'm working with Feedparser on months old install of Windows 7, and now programs that ran before are broken, and I'm getting wierd messages that are rather opaque to me. Google, Bing, News groups have all left me empty handed. I was wondering if I could humbly impose upon the wizards of comp.lan

Re: Feedparser Problem

2009-06-05 Thread Jonathan Nelson
Thanks for the responses. I've tried the same script on a Server 2003 install, and Python 2.5 and it ran without a hitch. So, it's either a problem with Python 2.6 or with Windows 7. Thanks for all the responses. You've been great. Best, Jonathan On Jun 5, 7:39 am, Jonatha

Re: Financial time series data

2010-09-03 Thread Trent Nelson
On 03-Sep-10 7:29 AM, Virgil Stokes wrote: A more direct question on accessing stock information from Yahoo. First, use your browser to go to: http://finance.yahoo.com/q/cp?s=%5EGSPC+Components Now, you see the first 50 rows of a 500 row table of information on S&P 500 index. You can LM click

Re: Financial time series data

2010-09-03 Thread Trent Nelson
On 03-Sep-10 1:48 PM, Frederic Rentsch wrote: And do let us know if you get an answer from Yahoo. Hacks like this are unreliable. They fail almost certainly the next time a page gets redesigned, which can be any time. Indeed -- see my other post (regarding ystockquote.py). There's a CSV

Re: Welcome to the "Python-list" mailing list (Digest mode)

2018-01-28 Thread nelson jon kane
27;ll check out the FOR Loop in python and see how it is different from the WHILE Loop. ____ From: nelson jon kane Sent: Sunday, January 28, 2018 6:05:04 PM To: python-list@python.org Subject: Re: Welcome to the "Python-list" mailing list (Digest mode) W

Re: Welcome to the "Python-list" mailing list (Digest mode)

2018-01-28 Thread nelson jon kane
When I enter the word python in the search box on my Chrome Windows 10, this is what comes up. Can you tell me what each of these "types" of Python mean? Thank you. [cid:aa3fd74d-d71d-42c0-b063-4f20c463987b] From: Python-list on behalf of python-list-requ...@p

__import__ Confusion

2009-02-12 Thread scott . bronson . nelson
Can someone explain to me what's going on here? >>> __import__('some.package.module', {}, {}, []) >>> __import__('some.package.module', {}, {}, ['']) (Note that '' is two single quotes) Thanks, Scott -- http://mail.python.org/mailman/listinfo/python-list

[M2Crypto] Problems uploading to IIS using FTP over SSL

2010-02-26 Thread Stephen Nelson-Smith
System: # rpm -q python m2crypto python-2.4.3-27.el5 m2crypto-0.16-6.el5.6 # cat /etc/redhat-release Red Hat Enterprise Linux Server release 5.4 (Tikanga) I have the following method: def ftp_tarball(aggregation_dir, date_format, ftp_server, ftp_user, ftp_pass): date = datetime.today().strftim

[M2Crypto] Problems uploading to IIS using FTP over SSL

2010-02-26 Thread Stephen Nelson-Smith
Hello, System: # rpm -q python m2crypto python-2.4.3-27.el5 m2crypto-0.16-6.el5.6 # cat /etc/redhat-release Red Hat Enterprise Linux Server release 5.4 (Tikanga) I have the following method: def ftp_tarball(aggregation_dir, date_format, ftp_server, ftp_user, ftp_pass): date = datetime.today(

Re: Problems uploading to IIS using FTP over SSL

2010-02-26 Thread Stephen Nelson-Smith
On Feb 26, 2:05 pm, Stephen Nelson-Smith wrote: > Hello, I'm sorry - I hadn't realised that python-list ended up here as well. Sincere apologies for double-posting. S. -- http://mail.python.org/mailman/listinfo/python-list

Trouble with quotes

2010-03-08 Thread Stephen Nelson-Smith
ome/stephen/scratch/test-data.txt'): lines +=1 line = line.strip() match = regex.match(line) if match: data = match.groupdict() if data['SiteIntelligenceCookie'] == '': no_cookies +=1 else: print "Couldn't match ", line unmatched +=1 print "I analysed %s lines." % (lines,) print "There were %s lines with missing Site Intelligence cookies." % (no_cookies,) print "I was unable to process %s lines." % (unmatched,) How can I make the regex a bit more resilient so it doesn't break when " " is embedded? -- Stephen Nelson-Smith Technical Director Atalanta Systems Ltd www.atalanta-systems.com -- http://mail.python.org/mailman/listinfo/python-list

<    1   2