Re: [Tutor] Trouble Downloading To MacOS Mojave 10.14.3 released mid 2014

2019-03-13 Thread Paul McCombs
rovide guidance. > > Thanks. > ___ > MacOS Mojave 10.14.3 was released in December 2018. Python 3.7.2 is available for MacOS versions as early as 10.6, which came out in 2009. Can you clarify what you mean? Paul McCombs https://www.python.org/downloads/release/python

Re: [Tutor] missing idlelib and pip

2017-11-01 Thread Paul Simon
On 11/1/2017 9:08 AM, Mats Wichmann wrote: On 11/01/17 04:39, Alan Gauld via Tutor wrote: On 01/11/17 04:30, Paul Simon wrote: The python distribution for the Mageia 6 update does not include idlelib or pip. Please tell me where to find them to add. IDLE should be in your package manager

Re: [Tutor] missing idlelib and pip

2017-11-01 Thread Paul Simon
On 11/1/2017 9:08 AM, Mats Wichmann wrote: On 11/01/17 04:39, Alan Gauld via Tutor wrote: On 01/11/17 04:30, Paul Simon wrote: The python distribution for the Mageia 6 update does not include idlelib or pip. Please tell me where to find them to add. IDLE should be in your package manager

[Tutor] missing idlelib and pip

2017-10-31 Thread Paul Simon
done. Paul Simon ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

[Tutor] help with Numpy

2016-09-21 Thread Paul Dentinger
7;s not an executable installer, it's sitting in my downloads. What I can't find is where to put NumPy such that Python can find it when I call it? I'm a little amazed that I cannot find this. Alternatively, if there is an executable installer for these, I would app

[Tutor] Python "password" securely hashed in script

2016-04-27 Thread Paul Smith
So creating small programs that automate my day specifically logins, how can one "hash" or hide the user and pass items in the python script itself? I need to prevent someone from easily seeing or accessing these if they happen to gain access to my python files. Thanks in advance. _

Re: [Tutor] Best way to install Python 3 onto Windows 10

2016-03-19 Thread paul . hermeneutic
I would visit http://www.python.org/ and hover over the "Downloads" text, then choose the desired package. If you want a 64-bit kit, go to https://www.python.org/downloads/release/python-351/ and choose "Windows x86-64 executable installer". On Tue, Mar 15, 2016 at 3:31 PM, Ken G. wrote: > Havin

[Tutor] how to receive messages form a server?

2016-03-08 Thread Paul Z
Hi, There is AP with UDP-Server(sending UDP messages). My computer has connected the AP. I know how to receive messages form a client via socket. But, Now, how to receive messages from a server? Thanks! ___ Tu

Re: [Tutor] a beginning question

2016-02-20 Thread Paul Z
SOCK_DGRAM) s.bind(("",port)) print('waiting on port:',port) while True:   data,addr = s.recvfrom(1024)   print('reciveed:', data, "from", addr) I want to arrange the messages to: array1 = #the numbers which is start as 'a' in the messages

[Tutor] a beginning question

2016-02-20 Thread Paul Z
Hi all, I receive the string messages from my Mobile via UDP as below: A, 0.1, 0.6, 0.7 B, 0.2, 0.3, 0.8 I want to arrange them to two array as below: a = (0.1, 0.6, 0.7) b = (0.2, 0.3, 0.8) all the number are float. Thanks! Paul Z ___ Tutor

[Tutor] tk Radiobutton example

2016-02-15 Thread paul . hermeneutic
+I am working through "Python GUI Programming Cookbook" by Burkhard Meier. https://www.packtpub.com/application-development/python-gui-programming-cookbook On page 20, the variable curRad is set to a string then to a Radiobutton. What is the purpose of setting curRad to a string? for col in range

Re: [Tutor] How to generate a pure tones and random noise using Python?

2015-07-26 Thread Paul Z
Are there some way to conver it to the code of Python 3? I'm too anxious to hear the sound from Python though I'm a absolute beginner. Many thanks Paul Z > From: p...@whoosh.cn > To: l...@openend.se > Date: Sun, 26 Jul 2015 19:29:19 +08

Re: [Tutor] How to generate a pure tones and random noise using Python?

2015-07-26 Thread Paul Z
on", Thank you. :-) Paul Z > To: p...@whoosh.cn > CC: tutor@python.org; l...@openend.se > From: l...@openend.se > Subject: Re: [Tutor] How to generate a pure tones and random noise using > Python? > Date: Sat, 25 Jul 2015 22:35:24

[Tutor] How to generate a pure tones and random noise using Python?

2015-07-25 Thread Paul Z
h in web, some people say that I can use winsound which can generate a fixed frequency beep. However, It is Windows only. (I'm under Linux) and I think It is not a professional library to generate audio signal. How about pygame? and some examples? any ideas? Thank

[Tutor] about real-time audio synthesis and algorithmic composition

2015-07-04 Thread Paul
thon's style, and want to learn Programming from Python. If I can learn it through synthesis sound, I will be very happy. :-) In addition, I think if I can synthesis sound via Python Code, I will have more chance to cooperate with other programer. :-) Thanks! Paul Yeh ___

Re: [Tutor] PyDeadObjectError: MainFrame deleted

2015-01-15 Thread Paul LaBerge
Good to know. Thanks again for the help. Paul > On Jan 15, 2015, at 3:43 PM, Steven D'Aprano wrote: > > On Thu, Jan 15, 2015 at 10:42:35AM -0800, Paul LaBerge wrote: > >>> (Also, bec

[Tutor] PyDeadObjectError: MainFrame deleted

2015-01-15 Thread Paul LaBerge
ot the Python interpreter.) Have you worked on easy_daq or did you download the GUI ? Cheers, Paul ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

[Tutor] PyDeadObjectError: MainFrame deleted

2015-01-14 Thread Paul LaBerge
. Thanks, Paul Pauls:PaulSan ~$ cd '/Users/OpenDAQ/opendaq-gui-master/easy_daq/' && '/usr/local/bin/pythonw' '/Users/OpenDAQ/opendaq-gui-master/easy_daq/main.py' && echo Exit status: $? && exit 1 Error trying to stop. Re

Re: [Tutor] attempting to install PIP

2014-11-24 Thread Paul LaBerge
also installed MacPorts to be able to install the SciPy stack from scipy.org <http://scipy.org/>. It contains several scientific packages needed for the PyPI package. thanks, Paul ___ > On Nov 24, 2014, a

[Tutor] attempting to install PIP

2014-11-24 Thread Paul LaBerge
Hello, I’m trying to install PIP on a Mac running Yosemite. I downloaded get-pip.py from https://pip.pypa.io/en/latest/installing.html . I copied it to /usr/local/bin/ then ran python get-pip.py. It repeatedly downloaded something up to a count o

[Tutor] Module? Error handling specific to SQLite3

2014-09-26 Thread Paul Smith
y engaging sqlite via python at this point in the code it should be a sqlite error handler or some such. So simple and yet it eludes my noobile mind. Thanks in advance, Paul ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] truncated dictionary return

2013-12-01 Thread Paul Simon
issue seems to be on the side of the > sender. Are you sure, it terminates each line with \n as it should? Where > is > that code coming from? > Best, > Wolfgang > > ___ > Tutor maillist - Tutor@python.org > To unsubscribe or

[Tutor] numrows returning -1

2013-11-22 Thread Paul Steele
Hey all... I am getting a numrows count of -1 when I print numrows (see line 23 of the code). What does "-1" mean?I think my connection is working and my table has data. Here's my code... #!/usr/bin/python # -*- coding: utf-8 -*- import mysql.connector from mysql.connector import errorcod

Re: [Tutor] Protecting username - password items in python3.3

2013-10-10 Thread Paul Smith
h our script. -Paul On Thu, Oct 10, 2013 at 5:49 PM, Oscar Benjamin wrote: > On 10 October 2013 22:28, Paul Smith wrote: > > Ok experts I need to protect username and password items in some > Python3.3 > > code I am writing. > > I'm not an expert on this subject but...

[Tutor] Protecting username - password items in python3.3

2013-10-10 Thread Paul Smith
in advance! Paul Smith ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

[Tutor] Newbie question. Is it possible to run/call a python2.7 program and reference results from/in python3.3?

2013-09-13 Thread Paul Smith
27 program and use results in python33? Thank you in advance! Another nightmare is stripping-cleaning google search results into clean url lists... but I will defer to another post for that mess. Thanks again in advance Paul Smith +++ Two Kinds of Intelligence There are two kinds of intelligenc

[Tutor] sqlite3 woes opening Moz, FFox sqlite db with only the inevitable 'DatabaseError: file is encrypted or is not a database' occurring...

2013-07-23 Thread Paul Smith
title = three days lost and counting... Thanks in advance all: Ok- I want to work with data in FFox, specifically a sqlite db found here.. 'C:\Users\Hive2\AppData\Roaming\Mozilla\Firefox\Profiles\zabt0uq4.default\places.sqlite' ...more specifically my FFox history found in a table 'moz_places'.

[Tutor] Timestamp issues when importing from FireFox sqlite field

2013-07-18 Thread Paul Smith
chew-able range, at least in python datetime module. Any suggestions? Best regards, Paul Failing code examples: >>> import datetime >>> print datetime.datetime.fromtimestamp(int("1369751000393000")).strftime('%Y-%m-%d %H:%M:%S') Traceback

[Tutor] syntax error when attempting simple urllib.request.urlopen item

2013-07-10 Thread Paul Smith
ntax error with the idle shell red highlighting the last print reference i.e. "htmltext" or "html". What is this humble newbie not getting? Best regards, Paul S ___ Tutor maillist - Tutor@python.org To unsubscribe or change su

Re: [Tutor] How to print something just after 3 attempts?

2012-07-17 Thread Paul McNally
e subscription options: > > http://mail.python.org/mailman/listinfo/tutor > > > > -- > Joel Goldstick > ___ > Tutor maillist - Tutor@python.org > To unsubscribe or change subscription options: > http://mail.python.or

Re: [Tutor] IDLE problems FIXED

2012-03-07 Thread Paul Douglas Grant
Thanks Alan, It seems like it was a keybinding issue. When I dragged IDLE into a terminal window I got a laundry list of errors having to do with correct keys. I switched to a built in key set "classic mac", and I'm running. I really appreciated your help with this. Paul On Wed, Ma

Re: [Tutor] IDLE problems

2012-03-07 Thread Paul Douglas Grant
hanks again, and here's to the hillwalking (I'm in the French Jura, so it is no stranger to me) Paul On Wed, Mar 7, 2012 at 12:30 PM, ALAN GAULD wrote: > Sorry, I was assuming too much knowledge I suspect. > >> Last login: Wed Mar  7 11:27:19 on ttys000 > >> MacBook-001FF356

Re: [Tutor] IDLE problems

2012-03-07 Thread Paul Douglas Grant
directory MacBook-001FF3569577-4:~ fedka2$ python ./idle.py /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python: can't open file './idle.py': [Errno 2] No such file or directory MacBook-001FF3569577-4:~ fedka2$ I don't seem to be getting

[Tutor] IDLE problems

2012-03-06 Thread Paul Douglas Grant
Hello folks, I am new to programming and choosing python as my first language to learn, thus excuse the perhaps naiveté of this question and the way it is formulated. For the last few weeks I've been trying to solve an issue running python on mac snow leopard 10.6.8. I was running a version of pyt

Re: [Tutor] python editor

2012-02-08 Thread Jamie Paul Griffin
On Mon, Feb 06, 2012 at 06:11:13PM +, Alan Gauld wrote: > On 06/02/12 17:17, bob gailer wrote: > >On 2/6/2012 10:25 AM, Kapil Shukla wrote: > > > >>Please also suggest a free editor for python which can at least repeat > >>previous command with a key stroke > > That depends on the editor's mod

Re: [Tutor] list mail formatting

2011-12-22 Thread Jamie Paul Griffin
On Thu, Dec 22, 2011 at 09:14:57AM +, Alan Gauld wrote: > On 22/12/11 08:59, Jamie Paul Griffin wrote: > > >I can understand that and it's a fair point. > > So, perhaps my suggestion of putting some filtering/reformatting > > software on the list server could he

Re: [Tutor] list mail formatting

2011-12-22 Thread Jamie Paul Griffin
On Wed, Dec 21, 2011 at 11:51:46PM +, Alan Gauld wrote: > On 21/12/11 11:49, Jamie Paul Griffin wrote: > >Is there not a requirement to use plain text as with > > most other technical mailing lists? > > No, because many of the users of this list are non technical >

Re: [Tutor] list mail formatting

2011-12-21 Thread Jamie Paul Griffin
On Wed, Dec 21, 2011 at 07:57:33AM -0500, Dave Angel wrote: > On 12/21/2011 06:49 AM, Jamie Paul Griffin wrote: > >Can I just ask why the majority of the mail on this list is in > >multipart/alternative and/or html format. It's driving me nuts trying to > >read this on

[Tutor] list mail formatting

2011-12-21 Thread Jamie Paul Griffin
Can I just ask why the majority of the mail on this list is in multipart/alternative and/or html format. It's driving me nuts trying to read this on my console. Is there not a requirement to use plain text as with most other technical mailing lists? I don't mean to moan and I know it's not a ma

[Tutor] twisted web client authentication?

2011-12-01 Thread Paul de Vries
Hi Made something that connects to a httpserver and parses the xml stream it sends. The webserver it has to connect to uses digest authentication. The problem is I don't have a clue how to use digest auth with twisted.web.client. Couln't find any code examples for this. Can somebody help me with

Re: [Tutor] Please code review.

2011-08-02 Thread Paul Kölle
Paul Cheers karim Python 2.7.1+ (r271:86832, Apr 11 2011, 18:13:53) [GCC 4.5.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> def _xrange_cellnames(rows, cols): ... """Internal itera

Re: [Tutor] vim as a python editor

2011-02-08 Thread Paul Griffiths
helps me because I'm a fairly competent touch typist. Every time I need to press Esc on a default keyboard, I have to lift my left hand from the asdf home keys to get at it. This 'breaks the flow' and gets quite annoying after a while. > > On Fri, Jan 7, 2011 at 7:22

Re: [Tutor] Tutor Digest, Vol 83, Issue 22

2011-01-07 Thread Paul Griffiths
Date: Fri, 7 Jan 2011 21:25:08 - > From: "Alan Gauld" > To: tutor@python.org > Subject: Re: [Tutor] vim as a python editor > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; >reply-type=original > > &qu

Re: [Tutor] vim as a python editor

2011-01-07 Thread Paul Griffiths
On 5 January 2011 11:54, Sean Carolan wrote: > > How have those of you who use vim configured it? I have looked > > on the web but got a bit confused by the advice and options. > > My setup includes: > > autoindent turned on at 4 spaces > ftplugin for "folding" functions like eclipse (this is my

[Tutor] vim as a python editor

2010-12-15 Thread Paul Griffiths
Hi - I'm a beginner at programming and Python. I have been looking for an editor to replace Idle and tried out a few. I liked Geany but decided on vim because I am also learning Linux and the vim skills might be useful. I run Python 2.6.5 on Ubuntu 10.04. How have those of you who use vim config

Re: [Tutor] Moving my C++ code to Python?

2010-10-17 Thread Paul
between the two? [1] http://blog.chrischou.org/2010/02/28/simple-benchmark-between-cython-and-boost-python/ Thank you, Paul And a link I found today. [2] http://koichitamura.blogspot.com/2008/06/various-ways-to-integrate-python-and-c.html On Sun, Oct 17, 2010 at 1:56 PM, Sithembewena Lloyd Dube

Re: [Tutor] Moving my C++ code to Python?

2010-10-15 Thread Paul
n by "someone else look at yet?" Thanks, Paul ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

[Tutor] Moving my C++ code to Python?

2010-10-15 Thread Paul
t;>> well >>> >>> python_stuff.process(largestuff, otherparams1) # It's important that this >>> data can be read (and I hope written) by python code >>> python_stuff.process(largestuff, otherparams2) >>> >>> c_stuff.write(largestuff

[Tutor] Having a return when subprocess.Popen finishes

2010-07-08 Thread Paul VanGundy
my cmd. Any help would be greatly appreciated. I'm open to improvements, different ways of doing it and corrections. :) If more info is needed let me know. Thanks. /paul ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription

[Tutor] Python 3.0

2010-02-20 Thread Paul Whittaker
Using the following script, the (Windows 7) PC echoes the key presses but doesn't quit (ever!) import msvcrt print('Press SPACE to stop...') while True: k = msvcrt.getch() # Strangely, this echoes to the IDLE window if k == ' ': # Not recognized break _

[Tutor] Still searching in html files

2010-01-21 Thread Paul Melvin
ave any tips on this? Can I just use things like raw_input and lists? Thanks paul ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

[Tutor] Searching in a file

2010-01-15 Thread Paul Melvin
after the NEW? (maybe putting this info into a list) Thanks again paul __ Information from ESET Smart Security, version of virus signature database 4773 (20100114) __ The message was checked by ESET Smart Security. http://www.ese

[Tutor] Searching in a file

2010-01-13 Thread Paul Melvin
did use enumerate and was wondering if I could use the line number, or maybe I could use an re iterator. Any advice would be much appreciated. Thanks paul __ Information from ESET Smart Security, version of virus signature database 4767 (20100113) __ The mess

[Tutor] Python and Abaqus

2009-10-20 Thread Paul Roger Leinan
Hi! Referring to http://mail.python.org/pipermail/tutor/2008-November/065270.html Would you be able to send me these python examples to? Regards Paul Leinan -- Paul Roger Leinan PhD Student Department of Structural Engineering - Biomechanics - Norwegian University of Science and Technology

Re: [Tutor] how to get blank value

2009-07-28 Thread Paul McGuire
> -Original Message- > From: amr...@iisermohali.ac.in [mailto:amr...@iisermohali.ac.in] > Sent: Wednesday, July 29, 2009 12:13 AM > To: Paul McGuire > Cc: tutor@python.org > Subject: Re: [Tutor] how to get blank value > > Thanks for help Sir but with these comm

Re: [Tutor] how to get blank value

2009-07-28 Thread Paul McGuire
#x27;=', 121.20], ['CA', '=', 54.32], ['HA', '=', 4.21], ['C', '=', 0.0]] 54.32 121.21 85 ALA H = 8.60 N = CA = HA = 4.65 C = [85, 'ALA', ['H', '=', 8.5996], ['N', '=', 0.0], ['CA', '=', 0.0], ['HA', '=', 4.6504], ['C', '=', 0.0]] - C: 0.0 - CA: 0.0 - H: 8.6 - HA: 4.65 - N: 0.0 - kvdata: [['H', '=', 8.5996], ['N', '=', 0.0], ['CA', '=', 0.0], ['HA', '=', 4.6504], ['C', '=', 0.0]] 0.0 0.0 Learn more about pyparsing at http://pyparsing.wikispaces.com. -- Paul ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] pyparsing complex search

2009-07-16 Thread Paul McGuire
> Hi Paul. Thanks. I would like to get better at pyparsing. Can you > recommend a good resource for learning. I am finding that what info I > have found on the subject (on the web) isn't really explaining it from > the ground up as much as I would like. Hrmmm, not sure what to re

Re: [Tutor] pyparsing complex search

2009-07-16 Thread Paul McGuire
123 paper clips ... 10Gb of intervening non-matching text... 456 paper planes scanString will return the match for '123 paper' right away, before processing the intervening 10Gb of non-matching text. Best of luck in your pyparsing efforts! -- Paul ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] find and replace relative to an nearby search string

2009-07-13 Thread Paul McGuire
tput: Write { file /Volumes/raid0/Z353_002_comp_v27.%04d.cin file_type cin name Write1 xpos 13762 ypos -364 } Write { file /Volumes/raid0/Z353_002_comp_v27.%04d.cin colorspace linear raw true file_type exr name Write1 selected true xpos -487 ypos -155 } Find out more about pyparsing at http://pyparsing.wikispaces.com. Cheers, -- Paul ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] thesaurus - translation, actually

2009-07-10 Thread Paul McGuire
quickly - the first conference had a session track on configuration management, and every mention of "version control" was transcribed as "virgin control" - a dubious prospect in any event. -- Paul ___ Tutor maillist - T

Re: [Tutor] Generating deck combinations

2009-06-20 Thread Paul McGuire
ch (brute-force is actually my favorite first approach), generating all possible deals and then filtering duplicates using a set of "already been seen" deals. A smarter algorithm would generate only the unique deals. If someone were paying me to be that smart, maybe I'd work on it. I'm guessing this is an attempt to optimize a deck for playing a card game like Magic or Pokemon, etc. Your plan is, given a set of 'n' cards in your collection (presumbaly n>60, or there would be no problem to solve), to compute all possible decks of 60 cards. Then you have some function to evaluate this deck, or perhaps simulate playing it against another deck. You will then exhaustively run this simulation function against each deck to find which deck from your collection of 100's of cards is the "best". By the time your program has finished running, I suspect the sun will be a cold, dark cinder. But have fun with it. -- Paul ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Iterating over a long list with regular expressions and changing each item?

2009-05-04 Thread Paul McGuire
at's going on. You could even write this as: T = lambda s : "\t".join(s.split()) 'case_def_gen' : T('case_def gen null'), 'nsuff_fem_pl' : T('nsuff null null'), 'abbrev' : T(&#x

Re: [Tutor] Tokenizing Help

2009-04-23 Thread Paul McGuire
AU - AU - AU - AU - AU - AU - AU - AU - AU - AU ['AB'] : AU - AU - AU - AU - AU - AU - AU - AU - AU - AU - ['AU'] : AU - AU - AU - AU - AU - AU - AU - AU - AU - AU ['ZZ'] : Somewhat nonsensical case If you find th

Re: [Tutor] Looping

2009-04-20 Thread Paul McGuire
de to Py3, and is fully Py2 compatible (even if you don't first bind xrange to range as in suggestion 1 - it simply copies the original list). It also makes it very explicit that you REALLY WANT THE RANGE AS A LIST, and not just as something for counting up to n. -- Paul ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Here's something to talk about

2009-04-15 Thread Paul McGuire
ributes - yet! pass def makeExportable(obj, exporter): obj.exporter = exporter a = ApplicationClass() makeExportable(a, SQLExporter) Now I have added exportability to an instance, without changing the class at all. This might even be a class from a 3rd party li

Re: [Tutor] Here's something to talk about

2009-04-15 Thread Paul McGuire
class names and/or .Net method names. In general, I find your approach too intrusive into the objects you would like to export or load. I would prefer to see a Loader and/or Exporter class that takes my own application object, configured with table name and field names, and then creates the proper

Re: [Tutor] combining Python 2.x and Python 3

2009-03-18 Thread Paul McGuire
uld impact not only the Python 3.0 users, but would also degrade performance for Python 2.x users using this code base. I can certainly use this trick in those parts of pyparsing that are not performance-critical (when building the parser to begin with for instance, as opposed

Re: [Tutor] modular program

2009-03-01 Thread Paul McGuire
osted within UtilityMill, the source code is publicly viewable.) -- Paul ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Extract strings from a text file

2009-02-27 Thread Paul McGuire
in varying order, case variability, and (of course) varying whitespace - the OP didn't explicitly say this XML data, but the sample does look suspicious. If you only easy_install'ed pyparsing or used the binary windows installer, please go back to SourceForge and download the source .ZIP or tarball package - these have the full examples and htmldoc directories that the auto-installers omit. Good luck in your continued studies! -- Paul ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] regex help

2009-02-23 Thread Paul McGuire
") + lower + H + GT tests = """\ a b c h a b c a b c""".splitlines() for t in tests: print t print sum((list(p.body) for p in patt.searchString(t) if p.body), []) print Prints: a b c h ['d', 'e', 'f',

Re: [Tutor] Looking for ConfigObj Documentation

2009-02-20 Thread Paul McGuire
Has anyone already mentioned the article in Python Magazine, May, 2008? -- Paul ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] extracting phrases and their memberships from syntax

2009-02-14 Thread Paul McGuire
-Original Message- From: Emad Nawfal (عماد نوفل) [mailto:emadnaw...@gmail.com] Sent: Saturday, February 14, 2009 8:59 AM To: Paul McGuire Cc: tutor@python.org Subject: Re: [Tutor] extracting phrases and their memberships from syntax Thank you so much Paul, Kent, and Hoftkamp. I was

Re: [Tutor] extracting phrases and their memberships from syntax

2009-02-13 Thread Paul McGuire
rker + OneOrMore(Group(syntax_tree)) | marker + Word(wordchars) | syntax_tree ) Note that we use '<<' operator to "inject" the definition of a syntax_element - we can't use '=' or we would get a different expression than the one we used to define syntax_tree. Now parse the string, and voila! Same as before. Here is the entire script: from pyparsing import nestedExpr, Suppress, oneOf, Forward, OneOrMore, Word, printables, Group syntax_element = Forward() LPAR,RPAR = map(Suppress,"()") syntax_tree = LPAR + syntax_element + RPAR marker = oneOf("VBD ADJP VBN JJ DT PP NN UCP NP-PRD " "NP NNS NNP CC NP-SBJ-1 CD VP -NONE- " "IN NP-SBJ S") punc = oneOf(", . ! ?") wordchars = printables.replace("(","").replace(")","") syntax_element << ( punc + punc | marker + OneOrMore(Group(syntax_tree)) | marker + Word(wordchars) | syntax_tree ) results = syntax_tree.parseString(st_data) from pprint import pprint pprint(results.asList()) -- Paul ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Picking up citations

2009-02-10 Thread Paul McGuire
er.py). Mailing list companies spend beaucoup $$$ trying to parse addresses in order to filter duplicates, to group by zip code, street, neighborhood, etc., and this citation format looks similarly scary. Congratulations on getting to a 95% solution using PLY. --

Re: [Tutor] Defining "bit" type

2009-01-24 Thread Paul McGuire
last fall, and some of the applications were pretty interesting/novel. If you download the tarball from PyPI, there is an included examples directory. -- Paul ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Tutor Digest, Vol 59, Issue 109

2009-01-21 Thread Paul McGuire
-Original Message- From: tutor-bounces+ptmcg=austin.rr@python.org [mailto:tutor-bounces+ptmcg=austin.rr@python.org] On Behalf Of tutor-requ...@python.org Sent: Wednesday, January 21, 2009 11:29 AM To: tutor@python.org Subject: Tutor Digest, Vol 59, Issue 109 Send Tutor mailing l

[Tutor] Finding the shortest word in a list of words

2009-01-20 Thread Paul McGuire
constructor gives us the list of all the 2-character words, which then gets printed: ['he', 'me'] Again, 'me' no longer gets left out. Maybe this will get you some extra credit... -- Paul ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] cube root

2009-01-19 Thread Paul McGuire
taking cube roots of so small a number as 64 quickly got us into floating-point roundoff errors, and if the OP is doing something like looking for perfect cubes, then there are alternatives to the one-size-fits-almost-all logarithmic implementation of the '**' operator. -- Paul

Re: [Tutor] changing string in place

2009-01-10 Thread Paul McGuire
ersions - explicit parsing of quoted strings # will skip over "new Date" strings if there are any # enclosed in quotes print (quotedString | newdate).transformString(s) -- Paul ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] object's attributes

2009-01-02 Thread Paul McGuire
ookbook: http://code.activestate.com/recipes/259174/ There is also the new namedtuple type in the Python 2.6 collections module, which started out as this recipe: http://code.activestate.com/recipes/500261/. Happy New Year! -- Paul ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] what does the "@" operator mean?

2008-12-16 Thread Paul McGuire
rward into the unicode world, we will have to have more names for symbols like "§" and "¶". My Windows character map names these (when mousing over them) as the "section sign" and "Pilcrow sign". "@" is referred to here as the "Commercial At&quo

Re: [Tutor] what does the "@" operator mean?

2008-12-16 Thread Paul McGuire
The Python Wiki has some example decorators at http://wiki.python.org/moin/PythonDecoratorLibrary. I think the CGIMethod wrapper is a good intuitive example, and memoize is a good technique to add to your Python toolkit. -- Paul ___ Tutor maillist

Re: [Tutor] Working with lists

2008-12-14 Thread Paul McGuire
fill value (one of the enhancements you get when using itertools.izip). I often use zip this way when I need to get each item and its next-highest neighbor from a list. -- Paul ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/lis

Re: [Tutor] Random equation generator

2008-12-06 Thread Paul McGuire
I would suggest a slightly modified version of is_on_line: class Line(object): EPSILON = 1e-15 ... def is_on_line(self,(x,y)): 'Test if point represtented by an (x,y) tuple is on the line' return abs(self. m * x + self.c

Re: [Tutor] poll question]

2008-11-27 Thread Paul McGuire
there is the added feature of named arguments, which would not be covered in a Java or C++ discussion. So I think Denis's question was more one of API design, not about guessing. -- Paul ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] python reverse engineering tools

2008-11-22 Thread Paul McGuire
have ever downloaded pyparsing, the included class diagrams were created using EA - by hand, unfortunately, as Python support had not yet been added when I first started creating these diagrams.) -- Paul ___ Tutor maillist - Tutor@python.org http://mai

[Tutor] pattern expressions

2008-11-07 Thread Paul McGuire
Question 1: format_code := '+' | '-' | '*' | '#' I need to specify that a single, identical, format_code code may be repeated. Not that a there may be several one on a sequence. format := (format_code)+ would catch '+-', which is wrong. I want only patterns such as '--', '+++',... T

Re: [Tutor] [Edu-sig] school physics/math courses

2008-10-18 Thread michel paul
more effectively using algorithms." This is very interesting. Thanks for sending it. On Thu, Oct 16, 2008 at 7:14 PM, Massimo Di Pierro <[EMAIL PROTECTED]>wrote: > Hi Paul, > > this is a document I write as a summary of a meeting I attended in 2006 at > Argonne National L

Re: [Tutor] [Edu-sig] school physics/math courses

2008-10-16 Thread michel paul
This would be a great text for a high school math/CS class: Math for the Digital Age . - Michel On Thu, Oct 16, 2008 at 4:15 AM, roberto <[EMAIL PROTECTED]> wrote: > hello > (i am rather new in python ...) > > i am about to start a course of physics and

Re: [Tutor] not operator

2008-09-19 Thread Paul McGuire
we are going to do something to config, but since 'validate' is not a name that clearly asserts a truth or falsity, we aren't exactly sure what validate is going to return for valid vs. invalid configs (I could envision a function named 'validate' could return a list of va

Re: [Tutor] How to match strange characters

2008-09-08 Thread Paul McGuire
27;002', '5.6564', '+0.2713', '00:22:37.54', '00:16:16.65'] - end_time: 00:16:16.65 - fld1: ['0022', '+', '002'] - magnitude: 5.6564 - phase: +0.2713 - start_time: 00:22:37.54 00:22:37.54 00:16:

Re: [Tutor] renumbering a sequence

2008-08-27 Thread Paul McGuire
in the list!" Of course, having duplicates in the original list makes no matter in the generation of a new list of consecutively-numbered file names. The problems will arise when you go to actually do something with the generated list, such as the renam

Re: [Tutor] renumbering a sequence

2008-08-27 Thread Paul McGuire
item from each list in order file_mapping = zip(original_list, new_list) # rename files to consecutive order for oldname,newname in file_mapping: if oldname != newname: os.rename(oldname,newname) -- Paul ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] SOLVED: [ FTP question (slightly OT)]

2008-08-19 Thread Paul Schewietzek
Just found the solution, I didn't realize that ftplib has 'passive mode' as the standard - so I ended up with never actually trying to use 'active mode' Thanks nonetheless :) Am Dienstag, den 19.08.2008, 15:16 +0200 schrieb Paul Schewietzek: > Hello everyone, &

[Tutor] FTP question (slightly OT)

2008-08-19 Thread Paul Schewietzek
Connection timed out') So it looks like "my_server_b" has some different requirements or something? I don't have much experience with the ftp-protocol, so I thought maybe you guys could point me in the right direction? The files

[Tutor] Easiest way to display HTML

2008-08-12 Thread Paul Tader
I have a collection of python scripts that are written to be run from the command prompt. I now want to write the output (tables mostly) to a webpage using cron or as a cgi script. I've read about most web frameworks out there but many seem to be more than what I'm looking for. The closest I've

Re: [Tutor] Developing Macro: Is it possible in Python?

2008-08-03 Thread Paul McGuire
the screen. -- Paul ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] pyopenssl - extracting email certificates information

2008-07-13 Thread Paul Tader
Given a raw email I've been able to extract the cryptographic signature (in encoded or decoded format) into a string. I would like to like to use the pyopenssl crypto module (http://pyopenssl.sourceforge.net/pyOpenSSL.html/openssl.html) to further extract things like the Signing Authority and the

Re: [Tutor] Classes v2, thoughts/suggestions please

2008-07-12 Thread Paul Melvin
> -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On > Behalf Of Alan Gauld > Sent: 12 July 2008 18:08 > To: tutor@python.org > Subject: Re: [Tutor] Classes v2, thoughts/suggestions please > > > "Paul Melvin" <[EMAIL PROTECT

[Tutor] Classes v2, thoughts/suggestions please

2008-07-12 Thread Paul Melvin
testing that i get appropriate values during the testing/building phase (generally speaking), is it lots of print/return statements and then remove them? Thanks paul #!/usr/bin/env python from pyglet.gl import * class Point: '''This init contains the x,y co-ordinates

  1   2   3   >