Import aliases

2009-03-26 Thread p p
For a while a maintained a Python package 'foo' with a number of modules (including a nested structure of module). Now the package moved into a namespace package'a.b.foo'. What is the way to approach making old code work with the new package in order that imports like import foo.bar.xxx or fro

Re: Run process with timeout

2005-10-17 Thread P
Natan wrote: > Hi. > > I have a python script under linux where I poll many hundreds of > interfaces with mrtg every 5 minutes. Today I create some threads and > use os.system(command) to run the process, but some of them just hang. > I would like to terminate the process after 15 seconds if it do

Re: get the IP address of a host

2005-01-06 Thread P
J Berends wrote: def getipaddr(hostname='default'): [snip] It returns the IP address with which it connects to the world (not lo), might be a pvt LAN address or an internet routed IP. Depend on where the host is. I hate the google trick actually, so any suggestions to something better is always

Re: Python & unicode

2005-01-11 Thread P
Michel Claveau - abstraction mÃta-galactique non triviale en fuite perpÃtuelle. wrote: Hi ! If Python is Ok with Unicode, why the next script not run ? # -*- coding: utf-8 -*- def Ñ(toto): return(toto*3) Because the coding is only supported in string literals. But I'm not sure exactly w

Re: Python & unicode

2005-01-12 Thread P
Scott David Daniels wrote: [EMAIL PROTECTED] wrote: Because the coding is only supported in string literals. But I'm not sure exactly why. The why is the same as why we write in English on this newsgroup. Not because English is better, but because that leaves a single language for everyone to use

Re: regular expression match collection

2005-02-04 Thread P
[EMAIL PROTECTED] wrote: Hello, For example I have a string : "Halo by by by" Then I want to take and know the possition of every "by" how can I do it in python? [ match.start() for match in p.finditer("Helo by by by") ] see: http://mail.python.org/pipermail/python-list/2004-December/255013.html --

Re: ssh popen stalling on password redirect output?

2005-07-18 Thread P
for ssh automation I would in order: paramiko twisted keys + popen pexpect -- Pádraig Brady - http://www.pixelbeat.org -- -- http://mail.python.org/mailman/listinfo/python-list

Re: python connect to server using SSH protocol

2005-02-08 Thread P
[EMAIL PROTECTED] wrote: How can python connect to server which use SSH protocol? Is it easy since my python has to run third party vendor, write data, read data inside the server (supercomputer). Any suggestion? you can use popen around the ssh binary. You man need the pty module if you want to de

Re: graph visualisation

2005-02-08 Thread P
Alexander Zatvornitskiy wrote: Hello, All! I need routines for visualization of graphs, like this for Matlab: You could output the dot language, parsed by graphviz See: http://dkbza.org/pydot.html PÃdraig. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python glade tute

2005-03-04 Thread P
somesh wrote: hello, I wrote a small tute for my brother to teach him python + glade, plz see, and suggest to make it more professional , In tute I discussed on Glade + Python for developing Applications too rapidly as ppls used to work on win32 platform with VB. http://www40.brinkster.com/s4somesh

Re: [perl-python] a program to delete duplicate files

2005-03-10 Thread P
I've written a python GUI wrapper around some shell scripts: http://www.pixelbeat.org/fslint/ the shell script logic is essentially: exclude hard linked files only include files where there are more than 1 with the same size print files with matching md5sum Pádraig. -- http://mail.python.org/mailma

Re: RegEx: find all occurances of a single character in a string

2004-12-14 Thread P
Franz Steinhaeusler wrote: given a string: st="abcdatraataza" ^ ^ ^ ^ (these should be found) I want to get the positions of all single 'a' characters. (Without another 'a' neighbour) So I tried: r=re.compile('[^a]a([^a]') but this applies only for the a's, which has neighbours. So I

Re: Efficient grep using Python?

2004-12-15 Thread P
sf wrote: Just started thinking about learning python. Is there any place where I can get some free examples, especially for following kind of problem ( it must be trivial for those using python) I have files A, and B each containing say 100,000 lines (each line=one string without any space) I want

Re: Efficient grep using Python?

2004-12-16 Thread P
Christos TZOTZIOY Georgiou wrote: On Wed, 15 Dec 2004 16:10:08 +, rumours say that [EMAIL PROTECTED] might have written: Essentially, want to do efficient grep, i..e from A remove those lines which are also present in file B. You could implement elegantly using the new sets feature For referen

Re: Efficient grep using Python?

2004-12-17 Thread P
Christos TZOTZIOY Georgiou wrote: On Thu, 16 Dec 2004 14:28:21 +, rumours say that [EMAIL PROTECTED] I challenge you to a benchmark :-) Well, the numbers I provided above are almost meaningless with such a small set (and they easily could be reverse, I just kept the convenient-to-me first run

Re: Efficient grep using Python?

2004-12-17 Thread P
sf wrote: The point is that when you have 100,000s of records, this grep becomes really slow? There are performance bugs with current versions of grep and multibyte characters that are only getting addressed now. To work around these do `export LANG=C` first. In my experience grep is not scalable s

Re: subprocess.Popen

2004-12-13 Thread P
Michele Simionato wrote: I was looking at Python 2.4 subprocess.Popen. Quite nice and handy, but I wonder why a "kill" method is missing. I am just adding it via subclassing, class Popen(subprocess.Popen): def kill(self, signal = SIGTERM): os.kill(self.pid, signal) but I would prefer to

Re: RegEx: find all occurances of a single character in a string

2004-12-14 Thread P
[EMAIL PROTECTED] wrote: import re s='abcdatraataza' r=re.compile('(? Oops, tested this time: import re def index_letters(s,l): regexp='(? print index_letters('abcdatraataza','a') -- Pádraig Brady - http://www.pixelbeat.org -- -- http://mail.python.org/mailman/listi

Re: RegEx: find all occurances of a single character in a string

2004-12-14 Thread P
[EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: import re s='abcdatraataza' r=re.compile('(? Oops, tested this time: import re def index_letters(s,l): regexp='(? print index_letters('abcdatraataza','a') Just comparing Fredrik Lundh's method: r=re.compile("a+") [m.

Re: [ann] fdups 0.15

2005-03-21 Thread P
Patrick Useldinger wrote: I am happy to announce version 0.15 of fdups. Cool. For reference have a look at: http://www.pixelbeat.org/fslint/ Pádraig. -- http://mail.python.org/mailman/listinfo/python-list

Re: Getting directory size

2005-03-21 Thread P
francisl wrote: How can we get a full directory size (sum of all his data)? like when we type `du -sh mydir` Because os.path.getsize('mydir') only give the size of the directory physical representation on the disk. Have a look at: http://www.pixelbeat.org/scripts/dutop Pádraig. -- http://mail.pyth

MP3 and ID3 library/module recommendations

2007-11-02 Thread p.
. Ideally, i'd also like something that converts audio files to mp3 format. Looking on the the python package index, I see the following: - eyeD3 - PyMedia - hachoir-metadata - libtagedit - mutagen Any others to consider? What are peoples comments on these? thanks all, p. -- http://mail.pytho

mimicking a file in memory

2007-11-20 Thread p.
I am using the mutagen module to extract id3 information from mp3 files. In order to do this, you give mutagen a filename, which it converts into a file object using the python built-in "file" function. Unfortunately, my mp3 files don't live locally. They are on a number of remote servers which I

Re: mimicking a file in memory

2007-11-20 Thread p.
On Nov 20, 1:20 pm, Larry Bates <[EMAIL PROTECTED]> wrote: > p. wrote: > > I am using the mutagen module to extract id3 information from mp3 > > files. In order to do this, you give mutagen a filename, which it > > converts into a file object using the pyth

Re: mimicking a file in memory

2007-11-20 Thread p.
On Nov 20, 2:06 pm, Grant Edwards <[EMAIL PROTECTED]> wrote: > On 2007-11-20, Jarek Zgoda <[EMAIL PROTECTED]> wrote: > > >> Here is my dilemma: I don't want to copy the files into a > >> local directory for mutagen's sake, only to have to remove > >> them afterward. Instead, I'd like to load the fi

Re: mimicking a file in memory

2007-11-20 Thread p.
On Nov 20, 3:14 pm, Grant Edwards <[EMAIL PROTECTED]> wrote: > On 2007-11-20, p. <[EMAIL PROTECTED]> wrote: > > > > >> By "memory" I presume you mean virtual memory? RAM with > >> disk-blocks as backing store? On any real OS, tempfiles

Transforming ascii file (pseduo database) into proper database

2008-01-21 Thread p.
I need to take a series of ascii files and transform the data contained therein so that it can be inserted into an existing database. The ascii files are just a series of lines, each line containing fields separated by '|' character. Relations amongst the data in the various files are denoted throu

Re: Transforming ascii file (pseduo database) into proper database

2008-01-21 Thread p.
So in answer to some of the questions: - There are about 15 files, each roughly representing a table. - Within the files, each line represents a record. - The formatting for the lines is like so: File1: somval1|ID|someval2|someval3|etc. File2: ID|someval1|someval2|somewal3|etc. Where ID is the o

Re: Transforming ascii file (pseduo database) into proper database

2008-01-21 Thread p.
Thanks to all for the ideas. I am familiar with external sorting. Hadn't considered it though. Will definitely be giving that a go, and then merging. Again, thanks all. -- http://mail.python.org/mailman/listinfo/python-list

download timeout vs. socket timeout

2009-01-09 Thread p.
i'm using urllib2 in python 2.4 wondering how people typically deal with the case in which a download is too slow. setting the socket timeout only covers those cases where there is no response in the socket for whatever the timeout period is. what if, however, i'm getting bits back but want simply

Google App Engine dev_appserver and pdb?

2013-05-30 Thread Tom P
Is there a way to use pdb to debug Google apps written in Python? When I start the development system to run the app "test" like this - './google_appengine/dev_appserver.py' './test' - I'd like to send the program into debug. I couldn't see anything in the documentation how to do this. If I do

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-04 Thread Russ P.
On Tuesday, June 4, 2013 8:44:11 AM UTC-7, Rick Johnson wrote: > Yes, but the problem is not "my approach", rather the lack > > of proper language design (my apologizes to the "anointed > > one". ;-) If you don't like implicit conversion to Boolean, then maybe you should be using another langu

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-05 Thread Russ P.
On Wednesday, June 5, 2013 12:15:57 AM UTC-7, Chris Angelico wrote: > On Wed, Jun 5, 2013 at 4:11 PM, Russ P. wrote: > > > On Tuesday, June 4, 2013 8:44:11 AM UTC-7, Rick Johnson wrote: > > > > > >> Yes, but the problem is not "my approach", rather

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-05 Thread Russ P.
On Wednesday, June 5, 2013 1:59:01 AM UTC-7, Mark Lawrence wrote: > On 05/06/2013 07:11, Russ P. wrote: > > > > > But then, what would you expect of a language that allows you to write > > > > > > x = 1 > > > x = "Hello" > &

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-05 Thread Russ P.
On Wednesday, June 5, 2013 9:59:07 AM UTC-7, Chris Angelico wrote: > On Thu, Jun 6, 2013 at 2:15 AM, Russ P. wrote: > > > On Wednesday, June 5, 2013 1:59:01 AM UTC-7, Mark Lawrence wrote: > > >> I want to launch this rocket with an expensive satellite on top. I know >

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-05 Thread Russ P.
On Wednesday, June 5, 2013 4:18:13 PM UTC-7, Michael Torrie wrote: > On 06/05/2013 12:11 AM, Russ P. wrote: > > > But then, what would you expect of a language that allows you to > > > write > > > > > > x = 1 > > > x = "Hello" >

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-05 Thread Russ P.
On Wednesday, June 5, 2013 7:29:44 PM UTC-7, Chris Angelico wrote: > On Thu, Jun 6, 2013 at 11:56 AM, Steven D'Aprano > > wrote: > > > On Wed, 05 Jun 2013 14:59:31 -0700, Russ P. wrote: > > >> As for Python, my experience with it is that, as > > >

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-06 Thread Russ P.
On Thursday, June 6, 2013 2:29:02 AM UTC-7, Steven D'Aprano wrote: > On Thu, 06 Jun 2013 12:29:44 +1000, Chris Angelico wrote: > > > > > On Thu, Jun 6, 2013 at 11:56 AM, Steven D'Aprano > > > wrote: > > >> On Wed, 05 Jun 2013 14:59:31

Re: Newbie question on python programming

2012-07-21 Thread Tom P
On 07/21/2012 02:30 AM, Ian Kelly wrote: On Fri, Jul 20, 2012 at 5:38 PM, Chris Williams wrote: Hello I hope this is the right newsgroup for this post. I am just starting to learn python programming and it seems very straightforward so far. It seems, however, geared toward doing the sort of p

looking for a neat solution to a nested loop problem

2012-08-06 Thread Tom P
consider a nested loop algorithm - for i in range(100): for j in range(100): do_something(i,j) Now, suppose I don't want to use i = 0 and j = 0 as initial values, but some other values i = N and j = M, and I want to iterate through all 10,000 values in sequence - is there a neat py

Re: looking for a neat solution to a nested loop problem

2012-08-06 Thread Tom P
On 08/06/2012 06:18 PM, Nobody wrote: On Mon, 06 Aug 2012 17:52:31 +0200, Tom P wrote: consider a nested loop algorithm - for i in range(100): for j in range(100): do_something(i,j) Now, suppose I don't want to use i = 0 and j = 0 as initial values, but some other val

Re: looking for a neat solution to a nested loop problem

2012-08-06 Thread Tom P
On 08/06/2012 06:03 PM, John Gordon wrote: In Tom P writes: consider a nested loop algorithm - for i in range(100): for j in range(100): do_something(i,j) Now, suppose I don't want to use i = 0 and j = 0 as initial values, but some other values i = N and j = M,

Re: looking for a neat solution to a nested loop problem

2012-08-06 Thread Tom P
On 08/06/2012 08:29 PM, Grant Edwards wrote: On 2012-08-06, Grant Edwards wrote: On 2012-08-06, Tom P wrote: On 08/06/2012 06:18 PM, Nobody wrote: On Mon, 06 Aug 2012 17:52:31 +0200, Tom P wrote: consider a nested loop algorithm - for i in range(100): for j in range(100

I'm looking for a Junior level Django job (telecommute)

2013-01-07 Thread P Dev
I'm looking for a Junior level Django job (telecommute) About me: - less than year of experience with Python/Django - Intermediate knowledge of Python/Django - Experience with Linux - Experience with Django ORM - Passion for developing high-quality software and Python language - I am able to us

Re: Uniquely identifying each & every html template

2013-01-21 Thread Tom P
On 01/21/2013 01:39 PM, Oscar Benjamin wrote: On 21 January 2013 12:06, Ferrous Cranus wrote: Τη Δευτέρα, 21 Ιανουαρίου 2013 11:31:24 π.μ. UTC+2, ο χρήστης Chris Angelico έγραψε: Seriously, you're asking for something that's beyond the power of humans or computers. You want to identify that

Re: are int, float, long, double, side-effects of computer engineering?

2012-03-06 Thread Russ P.
On Mar 5, 10:34 pm, Xah Lee wrote: > On Mar 5, 9:26 pm, Tim Roberts wrote: > > > Xah Lee wrote: > > > >some additional info i thought is relevant. > > > >are int, float, long, double, side-effects of computer engineering? > > > Of course they are.  Such concepts violate the purity of a computer

Re: are int, float, long, double, side-effects of computer engineering?

2012-03-07 Thread Russ P.
On Mar 6, 7:25 pm, rusi wrote: > On Mar 6, 6:11 am, Xah Lee wrote: > > > some additional info i thought is relevant. > > > are int, float, long, double, side-effects of computer engineering? > > It is a bit naive for computer scientists to club integers and reals > as mathematicians do given that

Re: numpy (matrix solver) - python vs. matlab

2012-05-01 Thread Russ P.
On Apr 29, 5:17 pm, someone wrote: > On 04/30/2012 12:39 AM, Kiuhnm wrote: > > >> So Matlab at least warns about "Matrix is close to singular or badly > >> scaled", which python (and I guess most other languages) does not... > > > A is not just close to singular: it's singular! > > Ok. When do you

Re: numpy (matrix solver) - python vs. matlab

2012-05-01 Thread Russ P.
On May 1, 11:52 am, someone wrote: > On 04/30/2012 03:35 AM, Nasser M. Abbasi wrote: > > > On 04/29/2012 07:59 PM, someone wrote: > > I do not use python much myself, but a quick google showed that pyhton > > scipy has API for linalg, so use, which is from the documentation, the > > following code

Re: numpy (matrix solver) - python vs. matlab

2012-05-01 Thread Russ P.
On May 1, 4:05 pm, Paul Rubin wrote: > someone writes: > > Actually I know some... I just didn't think so much about, before > > writing the question this as I should, I know theres also something > > like singular value decomposition that I think can help solve > > otherwise illposed problems, >

Re: numpy (matrix solver) - python vs. matlab

2012-05-01 Thread Russ P.
On May 1, 11:03 pm, someone wrote: > On 05/02/2012 01:38 AM, Russ P. wrote: > > > > > > > > > > > On May 1, 4:05 pm, Paul Rubin  wrote: > >> someone  writes: > >>> Actually I know some... I just didn't think so much about, before &

Re: numpy (matrix solver) - python vs. matlab

2012-05-02 Thread Russ P.
On May 2, 1:29 pm, someone wrote: > > If your data starts off with only 1 or 2 digits of accuracy, as in your > > example, then the result is meaningless -- the accuracy will be 2-2 > > digits, or 0 -- *no* digits in the answer can be trusted to be accurate. > > I just solved a FEM eigenvalue pro

Re: numpy (matrix solver) - python vs. matlab

2012-05-03 Thread Russ P.
On May 3, 10:30 am, someone wrote: > On 05/02/2012 11:45 PM, Russ P. wrote: > > > > > On May 2, 1:29 pm, someone  wrote: > > >>> If your data starts off with only 1 or 2 digits of accuracy, as in your > >>> example, then the result is meaningless -

Re: numpy (matrix solver) - python vs. matlab

2012-05-03 Thread Russ P.
ather than empirical. Still, a condition number of 1e6 would bother me, but maybe that's just me. --Russ P. On May 3, 3:21 pm, someone wrote: > On 05/03/2012 07:55 PM, Russ P. wrote: > > > > > On May 3, 10:30 am, someone  wrote: > >> On 05/02/2012 11:45 PM, Russ P. wro

Re: numpy (matrix solver) - python vs. matlab

2012-05-03 Thread Russ P.
On May 3, 4:59 pm, someone wrote: > On 05/04/2012 12:58 AM, Russ P. wrote: > > > Yeah, I realized that I should rephrase my previous statement to > > something like this: > > > For any *empirical* engineering or scientific work, I'd say that a > > c

killing a script

2011-08-28 Thread Russ P.
and keeps running. If I hit Control-C repeatedly, I eventually get "lucky" and kill the top-level script. Is there a simple way to ensure that the first Control-C will kill the whole darn thing, i.e, the top-level script? Thanks. --Russ P. -- http://mail.python.org/mailman/listinfo/python-list

Re: killing a script

2011-08-28 Thread Russ P.
On Aug 28, 6:52 pm, MRAB wrote: > On 29/08/2011 02:15, Russ P. wrote:> I have a Python (2.6.x) script on Linux > that loops through many > > directories and does processing for each. That processing includes > > several "os.system" calls for each directory (s

Re: killing a script

2011-08-28 Thread Russ P.
On Aug 28, 7:51 pm, Chris Angelico wrote: > On Mon, Aug 29, 2011 at 12:41 PM, Russ P. wrote: > > On Aug 28, 6:52 pm, MRAB wrote: > >> You could look at the return value of os.system, which may tell you the > >> exit status of the process. > > > Thanks for t

Re: killing a script

2011-08-28 Thread Russ P.
On Aug 28, 8:16 pm, Chris Rebert wrote: > On Sun, Aug 28, 2011 at 8:08 PM, Russ P. wrote: > > On Aug 28, 7:51 pm, Chris Angelico wrote: > >> On Mon, Aug 29, 2011 at 12:41 PM, Russ P. wrote: > >> > On Aug 28, 6:52 pm, MRAB wrote: > >> >> You could

Re: killing a script

2011-08-29 Thread Russ P.
On Aug 28, 8:16 pm, Chris Rebert wrote: > On Sun, Aug 28, 2011 at 8:08 PM, Russ P. wrote: > > On Aug 28, 7:51 pm, Chris Angelico wrote: > >> On Mon, Aug 29, 2011 at 12:41 PM, Russ P. wrote: > >> > On Aug 28, 6:52 pm, MRAB wrote: > >> >> You could

Re: .Well, ok, I will try some of that. But I am running window 7, not Linux.

2011-04-22 Thread P S
I did a little writeup for setting PyVISA up in Windows. It's not exactly polished, but it can get you through the difficult bits. If you need any additional help, leave comments/questions on my blog. http://psonghi.wordpress.com/2011/03/29/pyvisa-setup-in-windows/ > On Friday, April 01, 2011 1

Single line if statement with a continue

2022-12-14 Thread Aaron P
I occasionally run across something like: for idx, thing in enumerate(things): if idx == 103: continue do_something_with(thing) It seems more succinct and cleaner to use: if idx == 103: continue. Of course this would be considered an anti-pattern, and Flake8 will complain. Any

How to fix PyV8 linux setup error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

2016-09-12 Thread p . infante413
Hello, I am currently installing Pyv8 and other requirements for me to run a honeypot. I downloaded pyv8 from source and using v8 (version 5.5) - built it with depot_tools. I already exported the V8_HOME path. But I still have this error whenever I run 'python setup.py build' of pyv8. Also, I am

Python Access logging of another program ran in subprocess

2016-06-26 Thread p . infante413
Hello, I'm currently running another Python program (prog2.py) in my program via subprocess. input_args = ['python', '/path/to/prog2.py'] + self.chosen_args file = open("logfile.txt",'w') self.process = Popen((input_args), stdout=file) However, the logs that prog2.py contains still show at the

Re: Python Access logging of another program ran in subprocess

2016-06-26 Thread p . infante413
On Monday, June 27, 2016 at 1:36:24 AM UTC+8, MRAB wrote: > > > The output you're seeing might be going to stderr, not stdout. Wow, huhuhu. Thank you. I did not know that. Thanks man! -- https://mail.python.org/mailman/listinfo/python-list

python 3.7.2

2019-01-27 Thread Sarah P
Hi, I’m having problems installing and using python as it defaults into [ ...users/ user/appdata/local/programs/] etc etc, its about 9 locations in all but there is no route to ‘app data’, the trail is lost at this point. Its such an obscure location and I cannot find it anywhere on windows,

Re: Is it possible to open a dbf

2005-01-01 Thread Miklós P
> Paul Rubin wrote: > > > John Fabiani <[EMAIL PROTECTED]> writes: > >> I'm wondering if there is a module available that will open a dbf > > > So far (more than a minute) I have discovered a reader only. So if you have > a URL or a search string it would be very helpful. > TIA > John Yes, "dBa

Re: Python! Is! Truly! Amazing!

2005-01-02 Thread Miklós P
"Erik Bethke" <[EMAIL PROTECTED]> wrote: > Hello Everyone, > > I have to say: > > Python! Is! Truly! Amazing! > > So I started with python about a month ago and put in 24 hours across > three weekends. ... > > Truly thank you. > > -Erik > I enjoyed to read about your enthusiasm about Python you

Guild of Python consultants?

2005-01-09 Thread Miklós P
Hello freelancers out there, Is there such a thing somewhere? Yes, I'm aware of the Python Business Forum. But I mean something specifically for (individual) consultants. By searching on Google, I couldn't find a "virtual guild" of consultants who try to make a living from Python and technologies

Re: Guild of Python consultants?

2005-01-09 Thread Miklós P
"Peter Hansen" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I also know of many people (myself included) who restrict the term > to those who have a deep expertise in one or more areas and who > look for projects where they can be brought in to apply that > expertise, usually by t

PythonWin (build 203) for Python 2.3 causes Windows 2000 to grind to a halt?

2005-01-27 Thread Chris P.
I've been having a problem with PythonWin that seemed to start completely spontaneously and I don't even know where to START to find the answer. The only thing I can think of that marks the point between "PythonWin works fine" and "PythonWin hardly every works fine" was that I changed the size of

Re: PythonWin (build 203) for Python 2.3 causes Windows 2000 to grind to a halt?

2005-01-28 Thread Chris P.
AWESOME - my life just got THAT much better. The bug you suggested is exactly the problem that I was having... I had looked through the bugs being tracked, but the title of that one didn't jump out at me as something that would help. Thanks! - Chris P.S. For anyone reading this group who wants

Re: UML to Python/Java code generation

2005-06-21 Thread Mike P.
"Magnus Lycka" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > James wrote: > > The brain may be fine for generating Python from UML but it is MANY > > MANY orders of magnitude harder to generate UML from code with just > > your brain than using a tool (usually zero effort and error

Re: map vs. list-comprehension

2005-06-30 Thread Mike P.
"Björn Lindström" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > "F. Petitjean" <[EMAIL PROTECTED]> writes: > > > res = [ bb+ii*dd for bb,ii,dd in zip(b,i,d) ] > > > > Hoping that zip will not be deprecated. > > Nobody has suggested that. The ones that are planned to be removed are

XML Pickle with PyGraphLib - Problems

2005-09-05 Thread Mike P.
sn't support the boolean and set types which are part of Python 2.4 and are used in pygraphlib. I get errors of the form: AttributeError: Marshaller instance has no attribute 'tag_bool' AttributeError: Marshaller instance has no attribute 'm_Set' Again strange given that bool

Re: How to upgrade to 2.4.1 on Mac OS X tiger

2005-09-11 Thread Mike P.
On Fri, 9 Sep 2005 13:55:03 -0700, Trent Mick wrote: > [Mike Meyer wrote] >> stri ker <[EMAIL PROTECTED]> writes: >>> Has anyone here upgraded from 2.3 to 2.4 on Tiger? >>> If so how'd ya do it? >> >> You don't. You install 2.4 in parallel with 2.3. You can do pretty >> much whatever you want wit

xhtml-print parser

2005-02-25 Thread p . nagarajkumar
my question is i have parsed the xhtml data stream using c i need to diplay the content present in the command prompt as the data present in the webpage as links how it can be done? -- http://mail.python.org/mailman/listinfo/python-list

Text To Speech with pyTTS

2005-02-27 Thread Mike P.
age just in case, but I still get the SAPI not supported error. Anyone get this working - any suggestions? Or am I missing something obvious? Thanks In Advance. Mike P. -- http://mail.python.org/mailman/listinfo/python-list

Re: wxPython vs. pyQt

2005-03-18 Thread Mike P.
"RM" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Of course, the licensing terms may still be too restrictive for those > that want to create comercial closed source applications and can't > afford the comercial license of Qt. That is why, for many, wxPython > will remain the pre

Rounding the elements of a Python array (numarray module)

2004-11-30 Thread Chris P.
Hi. I have a very simple task to perform and I'm having a hard time doing it. Given an array called 'x' (created using the numarray library), is there a single command that rounds each of its elements to the nearest integer? I've already tried something like >>> x_rounded = x.astype(numarray.Int

Re: Help With Hiring Python Developers

2004-12-01 Thread Miklós P
"fuego" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > My company (http://primedia.com/divisions/businessinformation/) has > two job openings that we're having a heckuva time filling. We've > posted at Monster, Dice, jobs.perl.org and python.jobmart.com. Can > anyone advise other j

Re: Need help on program!!!

2004-12-03 Thread Miklós P
"Darth Haggis" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I need help writing a program > > You are to write a python program to accomplish the following: > ... > > > Haggis > Seems very much like homework to me... ;) And that's something you are supposed to do on your own

Re: Rounding the elements of a Python array (numarray module)

2004-12-03 Thread Chris P.
occurred first. So here's the way to do it: >>> import numarray >>> a = numarray.array([1.6, 1.9, 2.1]) >>> rounded_a = numarray.around(a) and rounded_a then equals ([2., 2., 2.]) - Chris [EMAIL PROTECTED] (Chris P.) wrote in message news:<[EMAIL PROTECT

Re: Need help on program!!!

2004-12-03 Thread Miklós P
"Dan Perl" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > "Hopefully" for whom? For us, who may have to work with him someday or use > a product that he developed? Most of us here have been students (or still > are) and may sympathize with the OP, but personally I have been also

Re: Need help on program!!!

2004-12-03 Thread Miklós P
"Brad Tilley" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > elif first in (2,3,7): > > I think you mean 'elif first in (2,3,12):' > Seems you've grown out of school.. So why make the little rascal even lazier? :-\ M. -- http://mail.python.org/mailman/listinfo/python-list

Re: Need help on program!!!

2004-12-04 Thread Miklós P
"Dan Perl" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > > I'm not sure what you mean by "benignity" here, but I think I agree with > you. Sympathy for TAs is not really my reason for how I feel towards I meant that I think the real (or long term) interest of the OP is to *learn

numpy masked array puzzle

2013-11-17 Thread Tom P
I have two numpy arrays, xx and yy - (Pdb) xx array([0.7820524520874, masked, masked, 0.3700476837158, 0.7252384185791, 0.6002384185791, 0.6908474121094, 0.7878760223389, 0.6512288818359, 0.1110143051147, masked, 0.716205039978, 0.546038

problem with dateutil

2016-02-13 Thread Tom P
I am writing a program that has to deal with various date/time formats and convert these into timestamps. It looks as if dateutil.parser.parse should be able to handle about any format, but what I get is: datetimestr = '2012-10-22 11:22:33' print(dateutil.parser.parse(datetimestr)) result: date

Re: problem with dateutil

2016-02-13 Thread Tom P
On 02/13/2016 07:13 PM, Gary Herron wrote: On 02/13/2016 09:58 AM, Tom P wrote: I am writing a program that has to deal with various date/time formats and convert these into timestamps. It looks as if dateutil.parser.parse should be able to handle about any format, but what I get is

Re: problem with dateutil

2016-02-14 Thread Tom P
On 02/13/2016 09:45 PM, Gary Herron wrote: On 02/13/2016 12:27 PM, Tom P wrote: On 02/13/2016 07:13 PM, Gary Herron wrote: On 02/13/2016 09:58 AM, Tom P wrote: I am writing a program that has to deal with various date/time formats and convert these into timestamps. It looks as if

Re: problem with dateutil

2016-02-14 Thread Tom P
On 02/13/2016 10:01 PM, Mark Lawrence wrote: On 13/02/2016 17:58, Tom P wrote: I am writing a program that has to deal with various date/time formats and convert these into timestamps. It looks as if dateutil.parser.parse should be able to handle about any format, but what I get is

Re: Help

2016-03-04 Thread Tom P
On 02/29/2016 01:53 PM, tomwilliamson...@gmail.com wrote: Thanks. If a word appears more than once how would I bring back both locations? for i, str in enumerate(l): . . . . -- https://mail.python.org/mailman/listinfo/python-list

Getting a stable virtual env

2014-02-17 Thread P J
Hi ppl, I'm trying to figure out the whole virtualenv story. Right now I'm using it to creating an environment for our upcoming debian upgrade to squeeze. I'm doing some tests in our current distrib (python 2.5). I have come to realize that a lot of packages in the version I'm interested in are n

Re: Convert numpy array to single number

2014-04-29 Thread Tom P
On 28.04.2014 15:04, mboyd02...@gmail.com wrote: I have a numpy array consisting of 1s and zeros for representing binary numbers: e.g. >>> binary array([ 1., 0., 1., 0.]) I wish the array to be in the form 1010, so it can be manipulated. I do not want to use built in binary con

A Pragmatic Case for Static Typing

2013-09-01 Thread Russ P.
I just stumbled across this video and found it interesting: http://vimeo.com/72870631 My apologies if it has been posted here already. -- http://mail.python.org/mailman/listinfo/python-list

Re: A Pragmatic Case for Static Typing

2013-09-02 Thread Russ P.
On Monday, September 2, 2013 1:10:34 AM UTC-7, Paul Rubin wrote: > "Russ P." writes: > > > I just stumbled across this video and found it interesting: > > > http://vimeo.com/72870631 > > > My apologies if it has been posted here already. > > >

Re: Can I trust downloading Python?

2013-09-10 Thread Tom P
On 10.09.2013 11:45, Oscar Benjamin wrote: On 10 September 2013 01:06, Steven D'Aprano wrote: On Mon, 09 Sep 2013 12:19:11 +, Fattburger wrote: But really, we've learned *nothing* from the viruses of the 1990s. Remember when we used to talk about how crazy it was to download code from untr

Python PDB conditional breakpoint

2013-11-06 Thread Tom P
I can't get conditional breakpoints to work. I have a variable ID and I want to set a breakpoint which runs until ID==11005. Here's what happens - -> import sys ... (Pdb) b 53, ID==11005 Breakpoint 1 at /home/tom/Desktop/BEST Tmax/MYSTUFF/sqlanalyze3.py:53 (Pdb) b Num Type Disp Enb W

[solved]Re: Python PDB conditional breakpoint

2013-11-06 Thread Tom P
On 06.11.2013 16:14, Tom P wrote: ok I figured it. ID is a tuple, not a simple variable. The correct test is ID[0]==11005 I can't get conditional breakpoints to work. I have a variable ID and I want to set a breakpoint which runs until ID==11005. Here's what happens -

i want to know about python language

2013-11-06 Thread Kewl p
h -- https://mail.python.org/mailman/listinfo/python-list

  1   2   3   4   5   6   7   8   9   10   >