Re: Is Python like VB?

2005-03-17 Thread Matthew
"Mike Cox" <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... > As you may or may not know, Microsoft is discontinuing Visual Basic in favor > of VB.NET and that means I need to find a new easy programming language. I > heard that Python is an interpreted language similar to VB. Thi

hello

2004-12-17 Thread matthew
testing ... -- http://mail.python.org/mailman/listinfo/python-list

Python / Win32 extensions compatibility with Windows XP

2005-04-12 Thread Matthew
? Thank You Matthew Harelick -- http://mail.python.org/mailman/listinfo/python-list

pyOpenGL tom demo segmentation fault

2006-07-26 Thread matthew
Hi, I have Python 2-4-2, Numpy 24.2, and PyOpenGL-2.0.2.01 install, along with glut 3.7. The 1st 'funny' thing is that I always seem to get two pythons in /usr/local/bin, ie python and python2.4. These are exactly the same timestamp and size. The other problem is that the demos in ../site-pack

Testing Python updates

2007-03-21 Thread Matthew
Hello: What is the methodology for testing the updates to the Python language? Thanks Matthew Harelick -- http://mail.python.org/mailman/listinfo/python-list

Non-identifiers in dictionary keys for **expression syntax

2013-05-23 Thread Matthew Gilson
This is a question regarding the documentation around dictionary unpacking. The documentation for the call syntax (http://docs.python.org/3/reference/expressions.html#grammar-token-call) says: "If the syntax **expression appears in the function call, expression must evaluate to a mapping, th

Re: Non-identifiers in dictionary keys for **expression syntax

2013-05-23 Thread Matthew Gilson
On 05/23/2013 03:20 PM, Neil Cerutti wrote: On 2013-05-23, Matthew Gilson wrote: That's fine, but what is a keyword argument? According to the glossary (http://docs.python.org/3.3/glossary.html): /"keyword argument/: an argument preceded by an identifier (e.g. name=) in a functi

Re: Non-identifiers in dictionary keys for **expression syntax

2013-05-23 Thread Matthew Gilson
On 05/23/2013 04:52 PM, Terry Jan Reedy wrote: On 5/23/2013 2:52 PM, Matthew Gilson wrote: This is a question regarding the documentation around dictionary unpacking. The documentation for the call syntax (http://docs.python.org/3/reference/expressions.html#grammar-token-call) says: "I

Building a HPC data assimilation system using Python?

2013-05-29 Thread Matthew Francis
I have a prototype data assimilation code ( an ionospheric nowcast/forecast model driven by GPS data ) that is written in IDL (interactive data language) which is a horrible language choice for scaling the application up to large datasets as IDL is serial and slow (interpreted). I am embarking

KeyboardInterrupt in Subproccesses

2013-07-19 Thread Matthew Lefavor
All: I am maintaining a program in Python 2 and need to send it a KeyboardInterrupt to close it. Unfortunately, the program is used as a subprocess in a wrapper subprocess, and so I cannot just directly press CTL-C; I have to use a signal. When I run the program "bare" (not in a subprocess), I ha

Messages to Python-List aren't posting

2013-07-19 Thread Matthew Lefavor
ng to gmail has had no effect. Is there some obscure setting I am missing? Has anybody else had this problem? Matthew Lefavor -- http://mail.python.org/mailman/listinfo/python-list

Re: Messages to Python-List aren't posting

2013-07-19 Thread Matthew Lefavor
(Sorry to reply-all, but in this case I think the direct messages will get to people on this thread 12 hours earlier than the others.) Well, I have had this problem with both my work email (matthew dot lefavor _at_ nasa dpt gov) and my Gmail account. Since this doesn't happen to all users

Re: Messages to Python-List aren't posting

2013-07-19 Thread Matthew Lefavor
Well, it seems like the last message I posted did post in time. I'll keep tabs on the issue and email the postmaster if it persists. Matthew Lefavor On Fri, Jul 19, 2013 at 11:00 AM, Chris Angelico wrote: > On Sat, Jul 20, 2013 at 12:57 AM, Skip Montanaro wrote: > >> One

Re: Python Script Hashplings

2013-07-25 Thread Matthew Lefavor
The answer is "probably not." If you just want to use the latest version of Python 3 you have installed on your system, use: "#!/usr/bin/python3". When you use the specific minor version numbers, they point to that specific minor version. Actually, the preferred shebang line is of the form: "#!/us

Re: Is it that easy to install Python ?

2013-07-25 Thread Matthew Lefavor
On Thu, Jul 25, 2013 at 11:11 AM, wrote: > Hi there, > > I never write any Python program but as a system administrator, I'm often > asked to install python on Debian servers. > > I just finished downloading, configuring, making and installing. > > The binary is now installed in : > /usr/local/Py

Re: Python Script Hashplings

2013-07-26 Thread Matthew Lefavor
> > > Thanks Matthew Lefavor! But specifically, why use "#!/usr/bin/env python3" > instead of "#!/usr/bin/python3"? > The "env" program looks up its argument in the current $PATH environment variable, and then executes that. This means you aren

Re: [pyxl] xlrd 0.8.0 released!

2012-08-01 Thread Matthew Smith
ribed to the Google Groups > "python-excel" group. > To post to this group, send an email to python-ex...@googlegroups.com. > To unsubscribe from this group, send email to python-excel+unsubscribe@** > googlegroups.com . > For more options, visit this group at http://groups.go

Re: Getting started with IDLE and Python - no highlighting and no execution

2012-08-05 Thread Matthew Barnett
On 06/08/2012 01:58, MRAB wrote: On 06/08/2012 01:09, Rotwang wrote: On 06/08/2012 00:46, PeterSo wrote: I am just starting to learn Python, and I like to use the editor instead of the interactive shell. So I wrote the following little program in IDLE # calculating the mean data1=[49, 66, 24,

Legal: Introduction to Programming App

2012-08-19 Thread Matthew Zipf
to recognize the Python Software Foundation in my app? Thank you, Matthew Zipf -- http://mail.python.org/mailman/listinfo/python-list

Error when deleting and reimporting subpackages

2011-08-22 Thread Matthew Brett
into this because the nose testing framework does exactly this kind of thing when loading test modules, causing some very confusing errors and failures. Is this behavior expected? Best, Matthew -- http://mail.python.org/mailman/listinfo/python-list

Re: Error when deleting and reimporting subpackages

2011-08-22 Thread Matthew Brett
On Monday, August 22, 2011 12:06:44 PM UTC-7, Stephen Hansen wrote: > On 8/22/11 11:51 AM, Matthew Brett wrote: > > Hi, > > > > I recently ran into this behavior: > > > >>>> import sys > >>>> import apkg.subpkg > >>>> d

Re: Tkinter not working

2022-08-01 Thread Matthew Barnett
On 01/08/2022 13:17, Daniel Lee wrote: Hello, I my code with tkinter was working before, and now, it has many errors in it. I’m not sure what has happened. The results after running are below: "D:\Python Projects\tes\venv\Scripts\python.exe" "D:/Python Projects/tes/main.py" Traceback (most rec

Repair Install of 64 bit python

2021-04-15 Thread Dodson, Matthew
Hi, Having an issue after installing 64 bit python. Can't pip install any packages. Get the error "No module named pip". Thanks, Matt Matthew Dodson 2020 Data Analytics/Video Intern New York Football Giants Quest Diagnostics Training Center 1925 Giants Drive East Rutherford,

Re: Python path and append

2016-04-19 Thread Matthew Barnett
On 2016-04-19 23:38, Chris Angelico wrote: On Wed, Apr 20, 2016 at 8:29 AM, Seymore4Head wrote: handle = open("\\Winmx\New$\q.txt") for line in handle: line=line.strip() print line Traceback (most recent call last): File "\\Winmx\New$\add viewed.py", line 2, in handle = open("

Re: The following modules appear to be missing ['_sysconfigdata']

2019-01-08 Thread Matthew Lemon
Hi, I would start from scratch with this. 1. You have latest Python 2 version. 2. Use virtualenv to create and activate a new virtual environment. 3. pip install wxPython and other dependencies. 4. Get your application running from the command line first and follow up any DLL exceptions. 5. Use

Re: The following modules appear to be missing ['_sysconfigdata']

2019-01-09 Thread Matthew Lemon
If the OP was able to take the time to familiarise himself with the technologies, rather than bemoan the difficulty of deploying a ten year old code-base without mininal effort, he might have some success. Code rot is an issue after weeks sometimes, never mind ten years, and Python deployment is

Sub-Org Applications for GSoC 2019 due soon!

2019-01-27 Thread Matthew Lagoe
The PSF GSoC page is http://python-gsoc.org/ That has contact information and answers to questions like "what does it take to be a mentor?" and please feel free to ask if there's more you want to know! Thank you! Matthew Lagoe -- https://mail.python.org/mailman/listinfo/python-list

Complaints on installing packages

2020-01-13 Thread ofomi matthew
Good day Python Team, I'm Matt by name and I have been having difficulties in installing packages on my pycharm.it keeps telling me "error installing package". Please how do I rectify this issues step by step. Looking forward to get a response as soon as possible. Thank you -- https://mail.python.

Errno 8 Exec format error

2005-10-25 Thread Matthew Fowler
Hi there I have been porting python to the Etrax platform and everything seems to be working. However when I run the program in question I get: "problem with execution of xhpl on AxisProduct: [Errno 8] Exec format error" Im looking for any help to try and solve this issue. Am I correct in th

Setup/install issues including site.py

2005-10-25 Thread Matthew Fowler
Hello there Im trying to port Python 2.4.3 to the Etrax platform, things have been working but im having some issues I dont get. if I issue #python I get ... Could not find platform dependent libraries Consider setting $PYTHONHOME to [:] (i do get the interpreter prompt) so I set PYTHONHOME #

Re: ANN: Circe 0.0.3b1 released

2005-11-07 Thread Matthew Nuzum
lly combines the two. On 6 Nov 2005 20:41:10 -0800, Nick <[EMAIL PROTECTED]> wrote: > === Whats Circe? === > Circe is a multiplatform IRC client written in the Python language that > utilizes the wxpython library for the graphical interface. Circe > features Unicode, Scripting, and

python win32 and COM? for internet monitoring

2005-11-22 Thread Matthew Thorley
e one please tell me if I'm way off and point me in the right direction? Thanks very much --Matthew -- http://mail.python.org/mailman/listinfo/python-list

Re: python win32 and COM? for internet monitoring

2005-11-22 Thread Matthew Thorley
Python; Google should > turn up numerous existing implementations. > > Graham > Thanks for the tip, I'll check that out. -- Matthew -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: Louie-1.0b2 - Signal dispatching mechanism

2005-12-06 Thread Matthew Scott
> > > http://louie.berlios.de/changes.html > > Ok, so I won't need it (yet). One difference that may help you out if you ever experiment with PJE's RuleDispatch, is that the 'louie' top-level package name does not conflict with RuleDispatch's 'dispatch' top-level package name. - Matthew -- http://mail.python.org/mailman/listinfo/python-list

formatted xml output from ElementTree inconsistency

2005-06-23 Thread Matthew Thorley
be nice if their was a way to create 'standard' formatted output for all elements regardless of how they were created. Comments and suggestions are greatly appreciated. regards -Matthew -- http://mail.python.org/mailman/listinfo/python-list

Re: formatted xml output from ElementTree inconsistency

2005-06-23 Thread Matthew Thorley
Jarek Zgoda wrote: > Matthew Thorley napisał(a): > >> The output I get shows xmla as nicely formatted text, with elements on >> different lines and everything all tabbed and pretty. Inverly, xmlb is >> one long string on one line. >> >> Is that because

problem with tk and pass by refference (I think :)

2005-02-11 Thread Matthew Thorley
ry thing I can think of to fix this. If any one has any thoughts I would really appreciate it. Thanks very much! -Matthew -- http://mail.python.org/mailman/listinfo/python-list

Re: problem with tk and pass by refference (I think :)

2005-02-11 Thread Matthew Thorley
Diez B. Roggisch wrote: Hi, button = Button(self.songWin, text=verse, command=(lambda num=verseNum: self.showVerse(num)) ) should do the trick. The reason is basically that your version kept a reference to verseNum - and when executed, the value verseNum points to is the lasts one stored. Rebinding

Re: problem with tk and pass by refference (I think :)

2005-02-11 Thread Matthew Thorley
would have asked somebody sooner :) -Matthew -- http://mail.python.org/mailman/listinfo/python-list

Re: do you master list comprehensions?

2004-12-15 Thread Matthew Moss
Diez B. Roggisch wrote: > >>> data = [['foo','bar','baz'],['my','your'],['holy','grail']] > >>> [e for l in data for e in l] > ['foo', 'bar', 'baz', 'my', 'your', 'holy', 'grail'] Okay, I tried this in an interactive Python session and it works as stated. My question is, why? How is the interpre

trouble building python2.4

2004-12-22 Thread Matthew Thorley
hat the tarball I downloaded wasn't really python2.4, even though it was 'official' and named Python-2.4.tgz. Can anyone please tell me what might of happened, or if they have had a similar experience? Thanks -Matthew -- http://mail.python.org/mailman/listinfo/python-list

Re: trouble building python2.4

2004-12-22 Thread Matthew Thorley
Erik Max Francis wrote: Matthew Thorley wrote: Greetings, I just downloaded the python2.4 source from python.org and built it the usual way, i.e. ./configure && make. What I don't understand is that the resulting binary, when run, prints this line Python 2.3.4 (#1, Nov 15 2004, 10:

Can dictionary values access their keys?

2005-04-08 Thread Matthew Thorley
gt;>> class child: ... def get_parent_index(self): parent = self.magic_parent_discovery() ... return parent.index(self) ... Thanks much -- Matthew -- http://mail.python.org/mailman/listinfo/python-list

Re: Can dictionary values access their keys?

2005-04-08 Thread Matthew Thorley
Can you please elaborate on this? -Matthew Diez B. Roggisch wrote: >>keeping a additional mapping between values and keys. > -- http://mail.python.org/mailman/listinfo/python-list

Re: Can dictionary values access their keys?

2005-04-08 Thread Matthew Thorley
under-the-hood? I mean is list.index(y) just the same as itemnum = 0 for item in list: if y == item: return itemnum else: itemnum = itemnum+1 I think I am going to have to reevaluate my system design... grrr. thanks -- Matthew -- http://mail.python.org/mailman/listinfo/python-list

Re: Can dictionary values access their keys?

2005-04-08 Thread Matthew Thorley
rfuly beautiful use of python an oop, but perhaps I am mistaken and there is a much more pragmatic way to get the job done. In the end preformance doesn't matter a lot. The front end will be web based, so if the db can process faster than http/javascript and user Bob who has to mouse, then everything will be fine. Let me know what you think Thanks much --Matthew -- http://mail.python.org/mailman/listinfo/python-list

Re: Can dictionary values access their keys?

2005-04-08 Thread Matthew Thorley
Scott David Daniels wrote: > Matthew Thorley wrote: > >> This may be a very rudimentary question, but here goes: > > From your questions, I believe you are not thinking of values as > being distinct from the names and data structures that refer to them. > > What

Re: Can dictionary values access their keys?

2005-04-08 Thread Matthew Thorley
rt of > its first round of grant funding last year, so there's at least one > other person working on this stuff! > I did see that and I was quite pleased! :) I am currently using the authors 'old' pysnmp which gets me by, but I am very excited to try out the new version

Re: Can dictionary values access their keys?

2005-04-08 Thread Matthew Thorley
e it with a reference to the collection of parent > objects and let it work out which one it wants. Where's the benefit? All right then. > Happy to help, but I can't take credit for the grant, since all I did as > a PSF director was vote affirmatively on the recommendations of

Re: Utah Python Users Group

2005-04-13 Thread Matthew Thorley
lugal wrote: > Is anyone aware if there's a Utah-based Python User Group? If not, does > any else from Utah have any interest in forming a Utah-based Python > User Group? > I'm in Utah, I don't know of any groups but I might be interested. -Matthew -- http://mail.

I need help

2016-03-26 Thread matthew thiel
So I downloaded python and made an account but when I run it all it does is give me 3 options repair modify and uninstall I have clicked repair and modify and let them run but at the end it just exit out so how do I get it to work??? Sent from Mail

Re: (test) ? a:b

2014-10-22 Thread Matthew Ruffalo
On 10/22/2014 12:40 PM, Chris Angelico wrote: > That's true when it's fundamentally arithmetic. But part of that > readability difference is the redundancy in the second one. What if it > weren't so redundant? > > 'Negative' if x < 0 else 'Low' if x < 10 else 'Mid' if x < 20 else 'High' > > You can

Re: generating unique variable name via loops

2014-11-04 Thread Matthew Ruffalo
Hi- Questions like this appear so often in various places (mailing lists, forums, sites like Stack Overflow) that I think a very blunt/candid answer is appropriate. This is especially true since there's always someone who responds to the question as-is with some monstrosity of exec() and string fo

Re: [Python-Dev] Python 2.x and 3.x use survey, 2014 edition

2014-12-12 Thread Matthew Ruffalo
On 12/11/2014 09:48 PM, Terry Reedy wrote: > A possible reason: one is developing an app expected to be released > fall 2015 after the 3.5 release and the app depends on something new > in 3.5. I must admit though that I cannot think of any such thing now > for 3.5. For 3.3 there was the new unic

Re: How to "wow" someone new to Python

2015-01-21 Thread Matthew Ruffalo
On 01/21/2015 02:06 PM, Chris Angelico wrote: > On Thu, Jan 22, 2015 at 5:20 AM, Irmen de Jong wrote: >> On 21-1-2015 18:59, Steve Hayes wrote: >> >>> 3. When I started to look at it, I found that strings could be any length >>> and >>> were not limited to swomething arbitrary, like 256 character

Re: How to "wow" someone new to Python

2015-01-21 Thread Matthew Ruffalo
On 01/21/2015 04:26 PM, Chris Angelico wrote: > On Thu, Jan 22, 2015 at 8:20 AM, Matthew Ruffalo wrote: >> Yes, length-unlimited strings are *extremely* useful in some >> applications. I remember bitterly cursing Java's string length limit of >> 2 ** 31 (maybe - 1) on mu

Re: [OT] fortran lib which provide python like data type

2015-02-01 Thread Matthew Barnett
On 2015-02-02 02:04, Chris Angelico wrote: On Mon, Feb 2, 2015 at 12:59 PM, Steven D'Aprano wrote: And there are underspecified rules too. What is the plural of octopus? No fair looking it up in the dictionary. Standard and well-known piece of trivia, and there are several options. "Octopodes

Re: Python 3.x stuffing utf-8 into SQLite db

2015-02-09 Thread Matthew Ruffalo
On 02/09/2015 12:30 PM, Skip Montanaro wrote: > Thanks, Chris. Are you telling me I should have defined the input file > encoding for my CSV file as CP-1252, or that something got hosed on > the export from XLSX to CSV? Or something else? > > Skip Hi Skip- I think it's most likely that the encodi

building c extensions with setuptools that are not tied to python installed on build machine

2015-02-11 Thread Matthew Taylor
Hello pythonistas, This is my first message to this mailing list, so if my question is off-topic, please direct me to the correct mailing list. I manage the NuPIC [1] open source machine intelligence project, which is a python project with C extensions. We have a build on Travis-CI [2] that creat

Re: building c extensions with setuptools that are not tied to python installed on build machine

2015-02-12 Thread Matthew Taylor
Ned, thank you for your insight on this problem. I will take your advice and do some more digging. You've been very helpful. Regards, - Matt Taylor OS Community Flag-Bearer Numenta On Wed, Feb 11, 2015 at 4:23 PM, Ned Deily wrote: > In article > , > Matthew Taylor

MacOS 10.9.2: threading error using python.org 2.7.6 distribution

2014-04-25 Thread Matthew Pounsett
I've run into a threading error in some code when I run it on MacOS that works flawlessly on a *BSD system running the same version of python. I'm running the python 2.7.6 for MacOS distribution from python.org's downloads page. I have tried to reproduce the error with a simple example, but so

Re: Proper deletion of selected items during map iteration in for loop

2014-04-25 Thread Matthew Barnett
On 2014-04-25 18:53, Charles Hixson wrote: What is the proper way to delete selected items during iteration of a map? What I want to do is: for (k, v) in m.items(): if f(k): # do some processing of v and save result elsewhere del m[k] But this gives (as should be expected

Re: MacOS 10.9.2: threading error using python.org 2.7.6 distribution

2014-04-27 Thread Matthew Pounsett
On Friday, 25 April 2014 10:05:03 UTC-4, Chris Angelico wrote: > First culprit I'd look at is the mixing of subprocess and threading. > It's entirely possible that something goes messy when you fork from a > thread. I liked the theory, but I've run some tests and can't reproduce the error that w

Re: MacOS 10.9.2: threading error using python.org 2.7.6 distribution

2014-04-27 Thread Matthew Pounsett
On Friday, 25 April 2014 14:58:56 UTC-4, Ned Deily wrote: > FWIW, the Python 2 version of subprocess is known to be thread-unsafe. > There is a Py2 backport available on PyPI of the improved Python 3 > subprocess module: Since that't the only thread that calls anything in subprocess, and I'm o

Re: MacOS 10.9.2: threading error using python.org 2.7.6 distribution

2014-04-28 Thread Matthew Pounsett
On Sunday, 27 April 2014 10:33:38 UTC-4, Chris Angelico wrote: > In most contexts, "thread unsafe" simply means that you can't use the > same facilities simultaneously from two threads (eg a lot of database > connection libraries are thread unsafe with regard to a single > connection, as they'll

Is a Metaclass the appropriate way to solve this problem?

2013-08-07 Thread Matthew Lefavor
All: Like most people, I find the whole metaclass topic pretty obscure, and I have avoided trying to use one for a while. I am also aware of Tim Peter's famous advice that if you have to ask whether you need a metaclass, then you almost certainly don't. But in this case I know I am solving a probl

Re: Lockfile hanling

2015-03-31 Thread Matthew Ruffalo
On 2015-03-31 10:50, Ervin Hegedüs wrote: > there is an app, written in Python, which stores few bytes of > datas in a single file. The application uses threads. Every > thread can modify the file, but only one at a time. I'm using a > lock file to prevent the multiple access. > > ... > > How can I

Re: Great Math Mystery

2015-04-16 Thread Matthew Barnett
Do you mean Pythonesque or Pythonic?-- https://mail.python.org/mailman/listinfo/python-list

Re: Writing list of dictionaries to CSV

2015-05-05 Thread Matthew Ruffalo
On 2015-05-05 14:25, Skip Montanaro wrote: > More likely, viewing the CSV file in Excel, Gnumeric, or some other > spreadsheet which interprets some inputs as dates and formats them > according to its default rules. Skip This is depressingly common, and I've even received CSV and plain text data

Re: No Error; No Output...Nothing

2014-10-21 Thread Matthew Ruffalo
On 10/21/2014 05:44 PM, ryguy7272 wrote: > Hey everyone, I'm trying to run this code. > > ... > > I commented out the import pylab as pl because I couldn't get the > matplotlib.pylab import working. So, anyway, I hit F5, and it seems to run, > but it doesn't really do anything. Isn't this eithe

cause __init__ to return a different class?

2011-09-14 Thread Matthew Pounsett
I'm wondering if there's a way in python to cause __init__ to return a class other than the one initially specified. My use case is that I'd like to have a superclass that's capable of generating an instance of a random subclass. I've tried both returning the subclass (as I would when overloa

Re: cause __init__ to return a different class?

2011-09-15 Thread Matthew Pounsett
On Sep 15, 1:35 am, Chris Rebert wrote: > Override __new__() instead: > http://docs.python.org/reference/datamodel.html#object.__new__ Aha.. thanks! The reference book I'm working from neglects to mention __new__, so I'd assumed __init__ was the constructor. It hadn't occurred to me that python

Re: cause __init__ to return a different class?

2011-09-15 Thread Matthew Pounsett
On Sep 15, 1:54 am, Ryan Kelly wrote: > The above will do exactly what you want, but it's generally bad style > unless you have a very specific use-case.  Is there a particular reason > you need to "magically" return a subclass, rather than making this > explicit in the code? > > To be friendlier

Re: cause __init__ to return a different class?

2011-09-18 Thread Matthew Pounsett
On Sep 15, 1:54 am, Ryan Kelly wrote: > To be friendlier to others reading your code, I would consider using a > classmethod to create an alternative constructor: I finally got back to looking at this today. As it turns out, un- overriding __new__ in the child class is more complicated than I fi

Re: Non-POSIX parity (mark/space) with Python-Serial on Linux.

2011-11-21 Thread Matthew Lenz
I should also note that I am aware of the following discussion on the newsgroup: https://groups.google.com/d/msg/comp.lang.python/1HyCqPSOf50/eQINFrrFKwoJ However, I believe this refers to implementing the solution for 8M1 and 8S1. -- http://mail.python.org/mailman/listinfo/python-list

Re: Non-POSIX parity (mark/space) with Python-Serial on Linux.

2011-11-21 Thread Matthew Lenz
Using 8N1 under minicom with this device resulted in garbled text when once connected. Connection using 7M1 resulted in the correct text. So there must be something else that needs to be done in my python program correct? -- http://mail.python.org/mailman/listinfo/python-list

Re: Non-POSIX parity (mark/space) with Python-Serial on Linux.

2011-11-21 Thread Matthew Lenz
Ahh. Ok. So how would I go about doing that with python? I think in perl (sorry for the naughty word) I could use the tr// (translate) but is there a quick way to do so with python? Is it going to be necessary to convert commands I SEND to the device or only convert what I receive? -- http:/

Re: Non-POSIX parity (mark/space) with Python-Serial on Linux.

2011-11-21 Thread Matthew Lenz
Thanks, this will be a great help. Just wanted to confirm that you meant to use [ .. for x in ord_str] in the example conversion? Got a TypeError using the received_str. -- http://mail.python.org/mailman/listinfo/python-list

Re: Non-POSIX parity (mark/space) with Python-Serial on Linux.

2011-11-21 Thread Matthew Lenz
Another thing I noticed is that the & and | appear to give the same result as adding or subtracting 128 from the ordinal value. I'm assuming that isn't coincidence. :) -- http://mail.python.org/mailman/listinfo/python-list

Two questions about logging

2012-01-11 Thread Matthew Pounsett
I'm trying to figure out a couple of things with the logging module, and I'm hoping someone can provide some pointers. I've read through the module docs on python.org, the basic and advanced tutorials, and the cookbook post, but a couple of things still elude me. First, I'd like to be able to per

Re: Two questions about logging

2012-01-11 Thread Matthew Pounsett
On Jan 11, 9:34 pm, Roy Smith wrote: > What I would do is log to syslog (logging.handlers.SysLogHandler) and > let syslog worry about rotating log files.  Why reinvent the wheel? Syslog is fine for an application run by an administrator, but isn't an option for a user. -- http://mail.python.org/

Re: Two questions about logging

2012-01-14 Thread Matthew Pounsett
On Jan 12, 8:03 pm, K Richard Pixley wrote: > Here's the confusion.  Each log named __name__ is under the root logger. >   If you want them all, then catch them all with the root logger. Thanks! I knew I was missing something obvious. Between you and Jean- Michael Pichavant I've figured out wha

Feature Request: `operator.not_in`

2013-04-19 Thread Matthew Gilson
I believe that I read somewhere that this is the place to start discussions on feature requests, etc. Please let me know if this isn't the appropriate venue (and what the appropriate venue would be if you know). This request has 2 related parts, but I think they can be considered seperately:

Re: Feature Request: `operator.not_in`

2013-04-19 Thread Matthew Gilson
On 4/19/13 2:27 PM, Terry Jan Reedy wrote: On 4/19/2013 10:27 AM, Matthew Gilson wrote: ) It seems to me that the operator module should have a `not_in` or `not_contains` function. It seems asymmetric that there exists a `is_not` function which implements `x is not y` but there isn

Re: Pythonic way to count sequences

2013-04-25 Thread Matthew Gilson
A Counter is definitely the way to go about this. Just as a little more information. The below example can be simplified: from collections import Counter count = Counter(mylist) With the other example, you could have achieved the same thing (and been backward compatible to python2.

chi-squared tests in python?

2006-01-17 Thread Matthew Vernon
s you random numbers from a chi-squared distribution with a set number of degrees of freedom - not really what I want. Does there exist python code to do this? preferably something vaguely standard? Thanks, Matthew ps: given the "batteries included" philosphy, there's a re

Warning when new attributes are added to classes at run time

2006-07-19 Thread Matthew Wilson
I sometimes inadvertently create a new attribute on an object rather update a value bound to an existing attribute. For example: In [5]: class some_class(object): ...: def __init__(self, a=None): ...: self.a = a ...: In [6]: c = some_class(a=1) In

Re: Warning when new attributes are added to classes at run time

2006-07-20 Thread Matthew Wilson
On Thu 20 Jul 2006 04:32:28 AM EDT, Bruno Desthuilliers wrote: >> self.__dict__[name] = value > Make it: > object.__setattr__(self, name, value) > > Your approach will lead to strange results if you mix it with properties > or other descriptors... Thanks! >> cl

ftplib errors/exceptions

2006-07-30 Thread Matthew Little
I'm new to Python and I am writing a simple FTP client.  I am having trouble handling errors like connection refused, invalid username or password, and the like.  I can use a try exception block like thistry:  ftp=FTP('some_server')   ftp.login()  # more linesexcept:  print "An error has occured.\n

Re: upgrading python...

2006-08-02 Thread Matthew Miller
ritten in python. > is there a way to point 'yum' at my new python RPM, and let yum take care of > dealing with any dependcy issues? and how would yum handle weird dependency > issues with RPMs that don't exist.. does yum have the ability to actually > buil

Need advice on how to improve this function

2006-08-20 Thread Matthew Wilson
I wrote a function that converts a tuple of tuples into html. For example: In [9]: x Out[9]: ('html', ('head', ('title', 'this is the title!')), ('body', ('h1', 'this is the header!'), ('p', 'paragraph one is boring.'), ('p', 'but paragraph 2 ',

Why do this?

2006-10-05 Thread Matthew Warren
Ok, not really python focused, but it feels like the people here could explain it for me :) Now, I started programming when I was 8 with BBC Basic. I never took any formal classes however, and I have never become an expert programmer. I'm an average/hobbyist programmer with quite a few languages

RE: Why do this?

2006-10-05 Thread Matthew Warren
> > | Now, I started programming when I was 8 with BBC Basic. > > Hey, likewise! (Except I was 12 when it came out!) I think it came out before I was 8, and I started out with print and input. Not sure if that's 'real' programming - I don't think I graduated to ifs and thens and gotos and gosubs

RE: Why do this?

2006-10-05 Thread Matthew Warren
> Also, having a variable of type str called 'number' seems > perverse (and > probably error prone), so I suspect I might need something like: > And not something I would normally do, but for hastily written contrived examples I might :) >print "There are "+str(number)+" ways to skin a "

RE: Why do this?

2006-10-05 Thread Matthew Warren
> Duncan Booth wrote: > > > print "There are"+number+"ways to skin a"+furryanimal > > > > or at least something equivalent to it. If I try to make > the same mistake > > with a format string it jumps out to me as wrong: > > > > "There are%sways to skin a%s" % (number, furryanimal) > > Relate

RE: Why do this?

2006-10-05 Thread Matthew Warren
> [Matthew Warren] > > | Blame outlook and AutoCaps. If number were a number I would write > | > | print "There are",number,"ways to skin a "+furryanimal > > You see now that strikes me as a bit mixed up. Why not simply use? > > print "a"

RE: dictionary of list from a file

2006-10-05 Thread Matthew Warren
> -> > Python 2.5 introduced a dictionary type with automatic > > creation of values, > > ala Perl: > > > > === > > from collections import defaultdict > > > > d = defaultdict(list) > > for line in fl: > > k, v = line.strip().split() > > d[k].append(v

RE: dictionary of list from a file

2006-10-05 Thread Matthew Warren
> -Original Message- > From: > [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] > rg] On Behalf Of Giovanni Bajo > Sent: 04 October 2006 15:17 > To: python-list@python.org > Subject: Re: dictionary of list from a file > > [EMAIL PROTECTED] wrote: > > > while(){ > > @info=split

RE: building strings from variables

2006-10-05 Thread Matthew Warren
> -Original Message- > From: > [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] > rg] On Behalf Of Gal Diskin > Sent: 05 October 2006 16:01 > To: python-list@python.org > Subject: building strings from variables > > Following a discussion with an associate at work about various ways to > b

Using twisted, not telnetlib for interactive telnet (WAS: RE: Improving telnetlib)

2006-10-06 Thread Matthew Warren
> >The trouble is, I havent got a clue where to start and would > appreciate > >a couple of pointers to get me going... > > > > I'd suggest taking a look at Twisted, which contains a more complete > telnet implementation (not as important for being able to launch vi), > an ssh implementation (

  1   2   3   4   5   >