Re: "pip" error message

2020-04-21 Thread Frank Millman
re discussing how to improve the download experience on Windows for newbies. Frank Millman -- https://mail.python.org/mailman/listinfo/python-list

Re: Strings: double versus single quotes

2020-05-23 Thread Frank Millman
dding more and more SQL in my code. How do you handle parameters? Do you leave placeholders ('?' or '%s') in the query, and leave it to the 'importer' of the query to figure out what is required? Frank Millman -- https://mail.python.org/mailman/listinfo/python-list

Re: Strings: double versus single quotes

2020-05-24 Thread Frank Millman
On 2020-05-24 9:58 AM, DL Neil via Python-list wrote: On 24/05/20 5:43 PM, Frank Millman wrote: On 2020-05-23 9:45 PM, DL Neil via Python-list wrote: My habit with SQL queries is to separate them from other code, cf the usual illustration of having them 'buried' within the code, i

Re: [Beginner] Spliting input

2020-06-25 Thread Frank Millman
input("enter 1st and 2nd no ").split() ValueError: not enough values to unpack (expected 2, got 1) Without arguments, split() splits on whitespace. If you entered 2 numbers separated by a comma, but no spaces, there is no split. Maybe you meant split(',') whi

Re: Bulletproof json.dump?

2020-07-06 Thread Frank Millman
'datetime.date(2020, 7, 6)'. I look for that pattern on retrieval to detect that it is actually a date object. I use the same trick for Decimal objects. Maybe the OP could do something similar. Frank Millman -- https://mail.python.org/mailman/listinfo/python-list

Re: Bulletproof json.dump?

2020-07-06 Thread Frank Millman
On 2020-07-06 3:08 PM, Jon Ribbens via Python-list wrote: On 2020-07-06, Frank Millman wrote: On 2020-07-06 2:06 PM, Jon Ribbens via Python-list wrote: While I agree entirely with your point, there is however perhaps room for a bit more helpfulness from the json module. There is no sensible

Access last element after iteration

2020-07-07 Thread Frank Millman
using the last element, I assume that this would be the way to do it - >>> for i in range(5): ... print(i) ... j = i ... 0 1 2 3 4 >>> print(j) 4 >>> Alternatively, this also works, but is this one guaranteed? >>> for i in range(5): ... print(i) .

Re: Need tests of turtledemo.colordemo on Windows installations

2020-09-13 Thread Frank Millman
est with no issues at all. I will upgrade to 3.8.5 later today and try again. Frank Millman -- https://mail.python.org/mailman/listinfo/python-list

Re: Need tests of turtledemo.colordemo on Windows installations

2020-09-13 Thread Frank Millman
On 2020-09-14 7:07 AM, Frank Millman wrote: On 2020-09-14 3:18 AM, Terry Reedy wrote: User Tushar Sadhwani and I both have Win 10 with 3.8.5 installed. When he runs ...> py -3.8 -m turtledemo.colormixer and moves the sliders a reasonable amount, he repeatably gets Fatal Python error: Can

wxpython-OGL fails to render objects with Python-3

2020-09-17 Thread Frank Miles
I have a substantial wxpython-based application that I'm trying to port from python-2 to -3. Almost everything is working properly, except for a few small but important sections that use the OGL library. That executes without any exceptions, but the objects created within the diagram/canvas

Re: Pythonic style

2020-09-21 Thread Frank Millman
I made the mistake of relying on the error message in my logic, to distinguish between 'too few' and 'too many'. Guess what happened - Python changed the wording of the messages, and my logic failed. After messing about with some alternatives, I ended up with the OP's f

list comprehension namespace problem

2020-09-24 Thread Frank Millman
ing on? Q2. Is there a way to get what I want? Thanks Frank Millman -- https://mail.python.org/mailman/listinfo/python-list

Re: list comprehension namespace problem

2020-09-24 Thread Frank Millman
On 2020-09-25 7:46 AM, Chris Angelico wrote: On Fri, Sep 25, 2020 at 3:43 PM Frank Millman wrote: Hi all I have a problem related (I think) to list comprehension namespaces. I don't understand it enough to figure out a solution. In the debugger, I want to examine the contents of the cu

Debugging technique

2020-10-02 Thread Frank Millman
using the extra info from the traceback. Is there a way to combine these into one step, so that, while in the debugger, I can find out how I got there? Frank Millman -- https://mail.python.org/mailman/listinfo/python-list

Re: Debugging technique

2020-10-03 Thread Frank Millman
On 2020-10-03 8:58 AM, Chris Angelico wrote: On Sat, Oct 3, 2020 at 4:53 PM Frank Millman wrote: Hi all When debugging, I sometimes add a 'breakpoint()' to my code to examine various objects. However, I often want to know how I got there, so I replace the 'breakpoint()&#x

Re: How do I get datetime to stop showing seconds?

2020-10-16 Thread Frank Millman
On 2020-10-16 9:42 AM, Steve wrote: d2 = datetime.datetime.now() #Time Right now Show this: 2020-10-16 02:53 and not this: 2020-10-16 02:53:48.585865 >>> >>> str(d2) '2020-10-16 10:29:38.423371' >>> >>> d2.strftime('%Y-%m-%d %H:%M

Re: Basic Python help

2020-10-23 Thread Frank Millman
ng. So the result is the concatenation of - 1. '\n' + '#' + length of string + '\n' as the start delimiter 2. the string itself 3. '\n' + '#' + '#' + '\n' as the end delimiter Frank Millman -- https://mail.python.org/mailman/listinfo/python-list

asyncio question

2020-11-03 Thread Frank Millman
x27; method, KeyboardInterrupt is not caught by 'server.serve_forever()' but by 'asyncio.run()'. It is too late to do any cleanup at this point, as the loop has already been stopped. Is it ok to stick to the 'old' method, or is there a better way to do this. Thanks Frank Millman -- https://mail.python.org/mailman/listinfo/python-list

Re: Is there a conflict of libraries here?

2020-11-05 Thread Frank Millman
move the line 'from datetime import datetime'. 2. Change dt = datetime.fromisoformat(ItemDateTime) to dt = datetime.datetime.fromisoformat(ItemDateTime) Unless I have missed something, that should work. Frank Millman -- https://mail.python.org/mailman/listinfo/python-list

Re: strip() method makes me confused

2020-11-07 Thread Frank Millman
If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string HTH Frank Millman -- https://mail.python.org/mailman/listinfo/python-list

Re: strip() method makes me confused

2020-11-07 Thread Frank Millman
On 2020-11-07 1:28 PM, Frank Millman wrote: On 2020-11-07 1:03 PM, Bischoop wrote: [...] another example: text = "this is text, there should be not commas, but as you see there are still" y = txt.strip(",") print(text) output: this is text, there should be not commas,

Python in The Economist

2005-09-27 Thread Frank Millman
FYI http://www.economist.com/science/displayStory.cfm?Story_id=4368122&CFID=65783500&CFTOKEN=ed98f5-9eb5adc6-80da-4e08-a843-746292fe83b8 Frank Millman -- http://mail.python.org/mailman/listinfo/python-list

Question about StringIO

2005-10-09 Thread Frank Millman
but hopefully this is enough for a simple yes or no answer, and if so, how. BTW, I have tried using popen2() and passing my data via stdin, but the other program (psql) does not react well to this - again, I will give more info if necessary. Thanks Frank Millman -- http://mail.python.org/mail

Re: Question about StringIO

2005-10-10 Thread Frank Millman
Diez B. Roggisch wrote: > Frank Millman wrote: > > Hi all > > > > I understand that StringIO creates a file-like object in memory. > > > > Is it possible to invoke another program, using os.system() or > > os.popen(), and use the < redirect operat

Re: Question about StringIO

2005-10-11 Thread Frank Millman
Benjamin Niemann wrote: > Frank Millman wrote: > > > I will try to explain my experience with popen() briefly. > > > > I run through all the scripts and create a StringIO object with the > > string I want to pass. It is about 250 000 bytes long. If I run psql >

Re: Question about StringIO

2005-10-11 Thread Frank Millman
what you want, so it is desirable to specify the primary key as NONCLUSTERED, and then specify a CLUSTERED index for a more frequently used column. These are just a few of the differences, but you get the idea. If there is a better way to do this in a cross-platform manner, I would love to know how. Thanks Frank -- http://mail.python.org/mailman/listinfo/python-list

Re: Question about StringIO

2005-10-11 Thread Frank Millman
e point: the psql blocks because you don't read > away the buffered data. Start a thread, read that stdout/stderr and see > if things go smoothly. > > Diez Of course (kicks himself), it is obvious now that you have explained it. I tried your suggestion and it works perfectly. Many thanks Frank -- http://mail.python.org/mailman/listinfo/python-list

Re: Question about StringIO

2005-10-11 Thread Frank Millman
- but the communication with the programs would go away. > > Diez I understand. It certainly gives me an alternative approach - I will experiment to see which suits my purpose best. Many thanks for your assistance. Frank -- http://mail.python.org/mailman/listinfo/python-list

win32api.FindFiles Win2003, problem with Short Name

2005-10-13 Thread Frank Borell
x27;') The versions of Python / Win32 are the same on all servers. Does anyone have any ideas? Frank -- http://mail.python.org/mailman/listinfo/python-list

Re: win32api.FindFiles Win2003, problem with Short Name

2005-10-14 Thread Frank Borell
Neil, On all three types of PC/Servers they are set to 0. For now I'll have to process this script on non 2003 servers?!? Thanks, Frank -- http://mail.python.org/mailman/listinfo/python-list

Re: win32api.FindFiles Win2003, problem with Short Name

2005-10-17 Thread Frank Borell
Neil Hodgson wrote: > Frank Borell: > > On all three types of PC/Servers they are set to 0. > > > > For now I'll have to process this script on non 2003 servers?!? > > What do you get if you call win32api.GetShortPathName on the long name? > > Neil

Re: looking for a good python module for MS SQL server

2005-10-31 Thread Frank Millman
at API's which support block cursors are OLE DB, ODBC, ADO, and DB-Library, and that each one has its own syntax. Do adodbapi, mxODBC, or any other modules allow you to do this? Thanks Frank -- http://mail.python.org/mailman/listinfo/python-list

Re: looking for a good python module for MS SQL server

2005-11-02 Thread Frank Millman
; -- > > # p.d. I preserved this link from a discussion about a year ago, as I may well need it one day. I have not actually tried any of the suggestions. http://groups.google.co.za/group/comp.lang.python/browse_frm/thread/bce901b08536cd89/ba6d5359c3c1b4bd Frank -- http://mail.python.org/mailman/listinfo/python-list

Do you have PERL and SQL programming experience?

2005-11-15 Thread Frank Odia
If the answer is yes I want to talk to you. My name is Frank Odia and I am a recruiter with High Tech Staffing, an IT placement firm in Portland. I came across your name while searching for PERL programmer with relational database background (Postgress or Oracle) for a client here in Portland

sax.make_parser() segfaults

2005-11-29 Thread Frank Millman
supply as much info as possible. As mentioned above, I do not have the problem with MSW. Any suggestions will be much appreciated. Thanks Frank Millman -- http://mail.python.org/mailman/listinfo/python-list

Re: sax.make_parser() segfaults

2005-11-29 Thread Frank Millman
Frank Millman wrote: > Hi all > > I am using Python 2.4.1. I have machines running FC4, RH9, and MSW > Server 2003 for testing. > > If I call sax.make_parser() from the interpreter or from a stand-alone > program, it works fine on all machines, but in the following setup it

Re: sax.make_parser() segfaults

2005-11-30 Thread Frank Millman
Frank Millman wrote: > > Hi all > > > > I am using Python 2.4.1. I have machines running FC4, RH9, and MSW > > Server 2003 for testing. > > > > If I call sax.make_parser() from the interpreter or from a stand-alone > > program, it works fine on a

Re: sax.make_parser() segfaults

2005-12-01 Thread Frank Millman
Bernhard Herzog wrote: > "Frank Millman" <[EMAIL PROTECTED]> writes: > > >> > If I call sax.make_parser() from the interpreter or from a stand-alone > >> > program, it works fine on all machines, but in the following setup it > >> >

Re: Is Python string immutable?

2005-12-07 Thread Frank Potter
Thank you very much.Steve Holden, I post my soucecode at my blog here:http://hiparrot.wordpress.com/2005/12/08/implementing-a-simple-net-spider/ I wish you can read and give me some suggestion. Any comments will be appreciated.On 12/2/05, Steve Holden < [EMAIL PROTECTED]> wrote:could ildg wrote:> I

Re: sql escaping module

2005-12-08 Thread Frank Millman
required by the underlying API. Unfortunately the DB-API allows a choice of 'paramstyles'. There may be technical reasons for this, but it does make supporting multiple databases awkward. Frank Millman -- http://mail.python.org/mailman/listinfo/python-list

Re: sql escaping module - Frank Millman Followup

2005-12-08 Thread Frank Millman
sycopg.ProgrammingError: invalid input syntax for integer: "a" >>> c.execute('insert into xxx values (%s)', '1\n') TypeError: not all arguments converted during string formatting Different DBAPI modules may handle it differently. Frank -- http://mail.python.org/mailman/listinfo/python-list

Re: how to write a tutorial

2005-01-21 Thread Frank Buss
drewc <[EMAIL PROTECTED]> wrote: > What does this have to do with Lisp? (i'm in c.l.l). he is a troll, but one who confess this fact: http://www.xahlee.org/Netiquette_dir/troll.html -- Frank Buß, [EMAIL PROTECTED] http://www.frank-buss.de, http://www.it4-systems.de -- http://m

Re: Best python postgres module?

2005-01-31 Thread Frank Miles
involve cross-platform development (i.e. Linux and >Windows), pypgsql seems to fit the bill nicely. psycopg is available for WinXX as well, though I'm not sure how long it takes for bleeding-edge (development versions) to get to WinXX. -frank -- -- http://mail.python.org/mailman/listinfo/python-list

Re: Line graphics on Linux console

2005-01-31 Thread Frank Millman
Frank Millman wrote: > Hi all > > The following is a message I sent to co.os.linux.setup - > > "My question concerns line graphics on a text-based console. ­My > actual problem relates to a [Python] program I have written using > ncurses, b­ut you can easily test it

Python 2.4 binaries for accessing PostgreSQL from Windows?

2005-02-04 Thread Frank Millman
have been using. It does not have one for 2.4. I tried the psycopg site, but it does not seem to have binaries at all. Does anyone know if either of these will be available in binary form for Python 2.4 on Windows? Thanks Frank Millman -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 2.4 binaries for accessing PostgreSQL from Windows?

2005-02-06 Thread Frank Millman
Frank Millman wrote: > Hi all > > The subject line says it all. > > I have been using pypgsql to access PostgreSQL from Linux and from > Windows, and it works fine. > > I am upgrading to Python 2.4. I can recompile pypgsql for Linux, but I > do not have a Windows

Re: debugger?

2005-07-03 Thread Frank LaFond
? -- hope this thread will help IDE developers to fill their > todo list with some shining ideas :) > Frank LaFond http://www.effectiveqa.com -- http://mail.python.org/mailman/listinfo/python-list

out of office auto-reply

2005-07-06 Thread Frank Fuchs
onday/Tuesday, July 11th/12th, but you will not be able to reach me during my vacation. During my absence, please contact one of my colleagues in management or your sales representative. Sincerely, Frank Fuchs Managing Director, CIO and CTO SOFTPRO Group SOFTPRO Software Professional GmbH &am

[OT] Problems with permissions etc

2005-07-27 Thread Frank Millman
se kinds of issues. Is it just something that one learns the hard way? Any advice, especially pointers to reading matter that covers this topic, will be much appreciated. Thanks Frank Millman -- http://mail.python.org/mailman/listinfo/python-list

Re: Problems with permissions etc

2005-07-28 Thread Frank Millman
' place, but I guess that anywhere reasonable is fine. Many thanks to all Frank -- http://mail.python.org/mailman/listinfo/python-list

Buglet in win32 odbc

2005-08-11 Thread Frank Millman
more correct if it returned an int in the first place. If Mark Hammond is listening, is it possible that this can be fixed? Thanks Frank Millman -- http://mail.python.org/mailman/listinfo/python-list

Re: jython debugger

2005-08-24 Thread Frank LaFond
thing properly. PyDev currently only works with Java 1.5; Java 1.4 is expected, but not available yet. If you try it, let us know if you can get it to work. Frank. [EMAIL PROTECTED] wrote: > Hi, > I am looking for an ide debugger for jython: is there someone with > some suggestions

How to protect Python source from modification

2005-09-12 Thread Frank Millman
advice which helps to clarify my thinking will be much appreciated. Thanks Frank Millman -- http://mail.python.org/mailman/listinfo/python-list

Re: How to protect Python source from modification

2005-09-12 Thread Frank Millman
Gerhard Häring wrote: > Frank Millman wrote: > > Hi all > > > > I am writing a multi-user accounting/business system. Data is stored in > > a database (PostgreSQL on Linux, SQL Server on Windows). I have written > > a Python program to run on the client, whic

Re: How to protect Python source from modification

2005-09-12 Thread Frank Millman
Peter Hansen wrote: > Frank Millman wrote: > > I am writing a multi-user accounting/business system. Data is stored in > > a database (PostgreSQL on Linux, SQL Server on Windows). I have written > > a Python program to run on the client, which uses wxPython as a gui, &g

Re: How to protect Python source from modification

2005-09-12 Thread Frank Millman
bruno modulix wrote: > Frank Millman wrote: > > Hi all > > > > I am writing a multi-user accounting/business system. Data is stored in > > a database (PostgreSQL on Linux, SQL Server on Windows). I have written > > a Python program to run on the client, whic

Re: How to protect Python source from modification

2005-09-12 Thread Frank Millman
Steven D'Aprano wrote: > On Mon, 12 Sep 2005 08:33:10 -0700, Frank Millman wrote: > > > My problem is that, if someone has access to the network and to a > > Python interpreter, they can get hold of a copy of my program and use > > it to knock up their own client pr

Re: How to protect Python source from modification

2005-09-13 Thread Frank Millman
Dennis Lee Bieber wrote: > On 12 Sep 2005 08:33:10 -0700, "Frank Millman" <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: > > > > > My problem is that, if someone has access to the network and to a > > Python interpreter, they can get

Re: How to protect Python source from modification

2005-09-13 Thread Frank Millman
Bugs wrote: > As a side question Frank, how was your experiences using wxPython for > your GUI? > Any regrets choosing wxPyton over another toolkit? > Was it very buggy? > How was it to work with in general? > Any other real-world wxPython feedback you have is appreciated. >

Re: How to protect Python source from modification

2005-09-13 Thread Frank Millman
and reinvent that wheel at the moment. Frank -- http://mail.python.org/mailman/listinfo/python-list

Re: How to protect Python source from modification

2005-09-13 Thread Frank Millman
Dennis Lee Bieber wrote: > On 13 Sep 2005 01:00:37 -0700, "Frank Millman" <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: > > > > 2. I am a great believer in 'field-by-field' validation when doing data > > entry, instead of f

Re: How to protect Python source from modification

2005-09-13 Thread Frank Millman
to the asyncore module, and it says "this strategy can seem strange and complex, especially at first". This describes my present situation exactly :-) Many thanks for the valuable comments. Frank -- http://mail.python.org/mailman/listinfo/python-list

Re: How to protect Python source from modification

2005-09-14 Thread Frank Millman
Magnus Lycka wrote: > Frank Millman wrote: > > I have seen Twisted mentioned many times in this ng, but I have no idea > > what it actually does. Can someone tell me in simple terms what > > advantage it might give me over a multi-threaded socket server program. > >

Re: {SPAM} start a python application as a win NT service

2005-03-15 Thread Frank Millman
http://groups-beta.google.com/group/comp.lang.python/browse_frm/thread/3b6ca01be1c70c76/1d172ee2d5c627b8?q=srvany#1d172ee2d5c627b8 I hope this comes out in a usable form - it seems rather long. If it does not work, search in google groups for 'srvany' and look for the message dated July 2004. HTH Frank Millman -- http://mail.python.org/mailman/listinfo/python-list

How to create datetime object from DbiDate (win32.odbc)?

2005-03-17 Thread Frank Millman
how to extract the elements. Does anyone know if this is possible, and if so, how? Many thanks Frank Millman -- http://mail.python.org/mailman/listinfo/python-list

Re: How to create datetime object from DbiDate (win32.odbc)?

2005-03-18 Thread Frank Millman
Robert Brewer wrote: > Frank Millman wrote: > > > > First prize would be to have a datetime constructor that takes a > > DbiDate object as input, in the same way that mx does, but this does > > not seem to exist. > > Try: > > datetime.datetime.utcfromtimest

Re: fastest postgresql module

2005-03-18 Thread Frank Miles
does too much backand forth, i don't know. >>> >>> >> >>You might want to try psycopg, it's claimed to be optimized for speed. >> >> >my only issue with psycopg, is last time i looked they had no win32 port? psycopg is available for win

newbie question: starting external application(win)?

2004-12-09 Thread Frank Esselbach
hanks a lot, Frank -- http://mail.python.org/mailman/listinfo/python-list

Re: Lambda: the Ultimate Design Flaw

2005-04-07 Thread Frank Wilde
Ulrich Hobelmann wrote: > alex goldman wrote: >> I personally think GOTO was unduly criticized by Dijkstra. With the >> benefit of hindsight, we can see that giving up GOTO in favor of >> other primitives failed to solve the decades-old software crisis. > The fault of goto in imperative languages

Best way to create temporary file?

2005-04-29 Thread Frank Millman
nistrators group. Any advice on the best approach for this will be much appreciated. Frank Millman -- http://mail.python.org/mailman/listinfo/python-list

Re: Showing Progress Bar

2013-11-23 Thread Frank Millman
set() Before starting the copy - progress_bar = ProgressBar() progress_bar.start() When the copy is finished - progress_bar.stop() progress_bar.join() HTH Frank Millman -- https://mail.python.org/mailman/listinfo/python-list

sys.stdout and Python3

2013-11-23 Thread Frank Millman
I could not see the reason for the above behaviour. Is there a way to reproduce the Python2 behaviour in Python3 using sys.stdout? Thanks Frank Millman -- https://mail.python.org/mailman/listinfo/python-list

RE: Cracking hashes with Python

2013-11-25 Thread Frank Cui
Hi, I'm assuming you are taking a computer/network security course. Md5 hashing operation is designed to be mathematically unidirectional, you can only attempt to find a collision situation but it's technically impossible to reverse the operation. With that said, it's possible to "crack" or "decr

A cautionary tale

2013-12-04 Thread Frank Millman
that change, done some more testing, and for now it seems ok. So have the last couple of days been a waste of time? I don't think so. Is the program a bit cleaner and conceptually sounder? I hope so. Why am I telling you all this? No particular reason, just thought some of you migh

Re: A cautionary tale

2013-12-05 Thread Frank Millman
"Steven D'Aprano" wrote in message news:[email protected]... > On Wed, 04 Dec 2013 11:16:40 +0200, Frank Millman wrote: > > [...] >> Then I noticed that certain changes were not being written back to the >> database. After some invest

Re: Experiences/guidance on teaching Python as a first programming language

2013-12-13 Thread Frank Miles
On Thu, 12 Dec 2013 16:18:22 -0500, Larry Martell wrote: > On Thu, Dec 12, 2013 at 11:51 AM, bob gailer wrote: >> On 12/11/2013 9:07 PM, Larry Martell wrote: >> >>> Nope. Long before that I was working on computers that didn't boot when >>> you powered them up, You had to manually key in a bootst

Re: New to Python, Help to get script working?

2013-12-16 Thread Frank Millman
can help. BTW, did you notice that I removed the bulk of your original message, and left behind just enough to provide a context for your question and for my reply? This is good etiquette, and others will appreciate your doing the same. Frank Millman -- https://mail.python.org/mailman/listinfo/python-list

seeking a framework to automate router configurations

2013-12-17 Thread Frank Cui
imilar existing work such as exscript and trigger, however I was stuck in the following two problems : 1. telneting to a non-default port number (other than 23)2. handling of customized banner messages. can you give some hints on this ? Thanks in advance for yo

RE: seeking a framework to automate router configurations

2013-12-17 Thread Frank Cui
to automate router configurations > From: [email protected] > CC: [email protected] > > On Wed, Dec 18, 2013 at 1:40 PM, Frank Cui wrote: > > "Asynchronously reset a large number of cisco routers back to their original > > configurations and push prepared initial config

RE: seeking a framework to automate router configurations

2013-12-17 Thread Frank Cui
Thank you guys for the input, I have determined to go with the plain old "expect" as it seems most easy to go with for this task. Frank > Date: Tue, 17 Dec 2013 19:59:31 -0800 > Subject: Re: seeking a framework to automate router configurations > From: [email protected]

Regular Expression : Bad Character Range

2013-12-19 Thread Frank Cui
Hey guys, I'm trying to compile a regular Expression while encountering the following issue, any hints ? is hyphen "-" or underscore "_" considered any meta character which is not allowed when putting into the range ? Thanks Frank

RE: Regular Expression : Bad Character Range

2013-12-19 Thread Frank Cui
while encountering the following issue, any hints ? is hyphen "-" or underscore "_" considered any meta character which is not allowed when putting into the range ? Thanks Frank In [2]: re.compile("[\w-_]+>") ---

cascading python executions only if return code is 0

2013-12-22 Thread Frank Cui
b() == 0:c() Thanks for your input. frank -- https://mail.python.org/mailman/listinfo/python-list

RE: cascading python executions only if return code is 0

2013-12-22 Thread Frank Cui
Thanks, this looks beautiful > To: [email protected] > From: [email protected] > Subject: Re: cascading python executions only if return code is 0 > Date: Sun, 22 Dec 2013 20:26:15 +0100 > > Frank Cui wrote: > > > hey guys, > > I have a requirement where

RE: cascading python executions only if return code is 0

2013-12-22 Thread Frank Cui
mith wrote: > > In article , > > Frank Cui wrote: > > > >> hey guys, > >> I have a requirement where I need to sequentially execute a bunch of > >> executions, each execution has a return code. the followed executions > >> should &

RE: cascading python executions only if return code is 0

2013-12-22 Thread Frank Cui
> To: [email protected] > From: [email protected] > Subject: Re: cascading python executions only if return code is 0 > Date: Sun, 22 Dec 2013 14:49:43 -0500 > > On 12/22/13 2:10 PM, Frank Cui wrote: > > sorry, but what if I need to have different param

RE: cascading python executions only if return code is 0

2013-12-22 Thread Frank Cui
> Date: Sun, 22 Dec 2013 14:27:35 -0800 > Subject: Re: cascading python executions only if return code is 0 > From: [email protected] > To: [email protected] > > On Sunday, December 22, 2013 12:37:04 PM UTC-6, Frank Cui wrote: > > I have a req

Re: Python mange with liste

2013-12-29 Thread Frank Millman
. In the previous version, message is set to 'wrong' for every iteration of the loop until a valid name is found. In this version, it is only set to 'wrong' if no valid name is found. 3. This uses a feature of python which allows you to iterate over the contents of a list directly - for name in names: print name[0] print name[1] if x == name[0] and y == name[1]: message = "right" break else: message = "wrong" Hope this gives you some ideas. Frank Millman -- https://mail.python.org/mailman/listinfo/python-list

Re: Creating a list with holes

2014-01-03 Thread Frank Millman
one, None, None, 'a'] >>> I wanted it because I was familiar with it from a previous language I had used. As is turns out, I never actually used it, but I was impressed! Frank Millman -- https://mail.python.org/mailman/listinfo/python-list

word replacing in a paragraph

2014-01-06 Thread Frank Cui
Hey guys, I'm trying to automate a process by initially creating a standard template and then replace some text fields with variable values. [for example, "DATE" in the paragraph will be replaced by the current date value. it doesn't have to be a literal word of "DATE", "DATE" in "TESTDATE" can

Re: nested dictionaries and functions in data structures.

2014-01-07 Thread Frank Millman
nary funct(addict[key1][key2]) # call the function with arguments This is usually compressed into one line - funct_call[var](addict[key1][key2]) This works if you always use the same arguments, no matter which function you call. Things get trickier if they differ. Frank Millman -- https://mail.python.org/mailman/listinfo/python-list

a web UI to invoke a python script at server side

2014-01-14 Thread Frank Cui
Hey guys, I'm working on to provide a lightweight web UI for providing an interface to invoke a python script(a sequential script which could involve some system calls) at the server side. The UI should collect some parameters for input into this python script, and conversely the output of the s

Re: wx (not responding)

2014-01-14 Thread Frank Miles
On Tue, 14 Jan 2014 07:26:10 -0800, ngangsia akumbo wrote: > When i run this code on my pc it actually runs but signals that the app is > not responding. [snip most of the code]- > def main(): > ex = wx.App() > Example(None) > ex.Mainloop() > > > if __name__ == "__main__": > m

Re: Learning python networking

2014-01-15 Thread Frank Millman
lit(b'\n',1) return line.decode().replace('\r', '') Also, as I am looking at it, I notice that the second line should say - while b'\n' not in buffer: I feel a bit guilty nitpicking, as you have provided a wonderfully comprehensive answer, but I wanted to make sure the OP did not get confused. Frank Millman -- https://mail.python.org/mailman/listinfo/python-list

Re: 'Stra�Ye' ('Strasse') and Python 2

2014-01-16 Thread Frank Millman
ou are putting in the effort to port ReportLab to python3, and I trust that you will get plenty of support from the gurus here in achieving this. Frank Millman -- https://mail.python.org/mailman/listinfo/python-list

Re: Self healthcheck

2014-01-22 Thread Frank Millman
ier)) In this case calling __del__() is safe, as no reference to the main object is held. If you do find that an object is not being deleted, it is then trial-and-error to find the problem and fix it. It is probably a circular reference HTH Frank Millman -- https://mail.python.org/mailman/listinfo/python-list

Re: Self healthcheck

2014-01-22 Thread Frank Millman
"Asaf Las" wrote in message news:[email protected]... > On Wednesday, January 22, 2014 10:56:30 AM UTC+2, Frank Millman wrote: >> >> class MainObject: >> def __init__(self, identifier): >> self._del = delwatch

Re: Python declarative

2014-01-24 Thread Frank Millman
More verbose - sure. Less human-readable - I don't think so. Also, intuitively one would think it would take much longer to process the XML version compared with the JSON version. I have not done any benchmarks, but I use lxml, and I am astonished at the speed. Admittedly a typical form-processor spends most of its time waiting for user input. Even so, for my purposes, I have never felt the slightest slowdown caused by XML. Comments welcome. Frank Millman -- https://mail.python.org/mailman/listinfo/python-list

Re: Python declarative

2014-01-24 Thread Frank Millman
"Chris Angelico" wrote in message news:captjjmo+euy439wb0c8or+zacyenr844hakwl3i2+55dde8...@mail.gmail.com... > On Fri, Jan 24, 2014 at 8:21 PM, Frank Millman wrote: >> I find that I am using JSON and XML more and more in my project, so I >> thought I would explain

Re: Python declarative

2014-01-24 Thread Frank Millman
"Rustom Mody" wrote in message news:[email protected]... > On Friday, January 24, 2014 2:51:12 PM UTC+5:30, Frank Millman wrote: > Comments welcome. > > Of json/XML/yml I prefer yml because it has the terseness of json and the > stru

<    1   2   3   4   5   6   7   8   9   10   >