Re: Could you verify this, Oh Great Unicode Experts of the Python-List?

2013-08-13 Thread Steven D'Aprano
On Tue, 13 Aug 2013 15:34:45 +, Prasad, Ramit wrote: > Michael Torrie wrote: [...] >> However I know of no phone or network that won't let you use longer >> messages; multiple SMS packets are used and most phone paste them back >> together. So no there's nothing that anyone needs to change to

Re: Getting a value that follows string.find()

2013-08-13 Thread Steven D'Aprano
On Tue, 13 Aug 2013 16:03:46 -0700, englishkevin110 wrote: > On Tuesday, August 13, 2013 5:58:07 PM UTC-5, Joel Goldstick wrote: [fixing Joel's top-posting] >> On Tue, Aug 13, 2013 at 6:51 PM, <> wrote: >> >> > I know the title doesn't make much sense, but I didnt know how to >> > explain my p

Re: PEP 450 Adding a statistics module to Python

2013-08-13 Thread Steven D'Aprano
On Tue, 13 Aug 2013 20:14:55 +0200, Wolfgang Keller wrote: >> I am seeking comments on PEP 450, Adding a statistics module to >> Python's standard library: > > I don't think that you want to re-implement RPy. I never suggested re-implementing RPy. When you read the PEP, you will see that this p

Re: .split() Qeustion

2013-08-13 Thread eschneider92
It's obvious that the word 'without' in my first sentence was meant to be ommited, and it's a simple question. Thank Gary! -- http://mail.python.org/mailman/listinfo/python-list

Re: .split() Qeustion

2013-08-13 Thread Krishnan Shankar
Hi, >How can I use the '.split()' method (am I right in calling it a method?) The .split() is a method in Python which comes as in built method for String objects in Python. Any string defined in python will have the ability to call this function. >>> var = 'Hello how r u?' >>> dir(var) ['__add_

Re: .split() Qeustion

2013-08-13 Thread Dave Angel
eschneide...@comcast.net wrote: > How can I use the '.split()' method (am I right in calling it a method?) > without instead of writing each comma between words in the pie list in the > following code? Also, is there a way to use .split instead of typing the > apostrophes? Thank you. > > import

Re: .split() Qeustion

2013-08-13 Thread Gary Herron
On 08/13/2013 09:51 PM, eschneide...@comcast.net wrote: How can I use the '.split()' method (am I right in calling it a method?) without instead of writing each comma between words in the pie list in the following code? Also, is there a way to use .split instead of typing the apostrophes? Than

.split() Qeustion

2013-08-13 Thread eschneider92
How can I use the '.split()' method (am I right in calling it a method?) without instead of writing each comma between words in the pie list in the following code? Also, is there a way to use .split instead of typing the apostrophes? Thank you. import random pie=['keylime', 'peach', 'apple', 'c

Subprocess embedded in curses window

2013-08-13 Thread Veritatem Ignotam
Hey All, I'm fairly new to python and even newer to curses. Does any one have a good solution for how to embed the output of a subprocess (ex. subprocess.Popen("htop", stdout=subprocess.PIPE)) into an ncurses window? So for example, the terminal window is broken up into quadrants and the top right

Re: Am I not seeing the Error?

2013-08-13 Thread Michael Torrie
On 08/13/2013 04:31 AM, Devyn Collier Johnson wrote: > For me, this style is easier to read. I have tried the "typical" style, > but I find this one to be easier. One thing I do know is that your style makes it very hard to find errors, even when the parser flags them. And the fact that you post

Re: Pair of filenos read/write each other?

2013-08-13 Thread Roy Smith
In article , Jack Bates wrote: > Can anyone suggest a way to get a pair of file descriptor numbers such > that data written to one can be read from the other and vice versa? > > Is there anything like os.pipe() where you can read/write both ends? > > Thanks! I think you're looking for socket

Re: Getting a value that follows string.find()

2013-08-13 Thread Dave Angel
englishkevin...@gmail.com wrote: > I know the title doesn't make much sense, but I didnt know how to explain my > problem. > > Anywho, I've opened a page's source in URLLIB > starturlsource = starturlopen.read() > string.find(starturlsource, '>> import string >>> help(string.find) Traceback (most

Re: Am I not seeing the Error?

2013-08-13 Thread Gregory Ewing
Ned Batchelder wrote: Everyone: this program seems to be a direct and misguided transliteration from a bash script. Not a particularly well-written bash script, either -- it's full of superfluous uses of 'cat'. -- Greg -- http://mail.python.org/mailman/listinfo/python-list

Re: Pair of filenos read/write each other?

2013-08-13 Thread Chris Angelico
On Wed, Aug 14, 2013 at 1:17 AM, Rhodri James wrote: > On Wed, 14 Aug 2013 00:10:41 +0100, Jack Bates > wrote: > >> Can anyone suggest a way to get a pair of file descriptor numbers such >> that data written to one can be read from the other and vice versa? >> >> Is there anything like os.pipe()

Re: Pair of filenos read/write each other?

2013-08-13 Thread Rhodri James
On Wed, 14 Aug 2013 00:10:41 +0100, Jack Bates wrote: Can anyone suggest a way to get a pair of file descriptor numbers such that data written to one can be read from the other and vice versa? Is there anything like os.pipe() where you can read/write both ends? Sockets? It depends a bit

Re: Am I not seeing the Error?

2013-08-13 Thread Ned Batchelder
On 8/13/13 5:16 PM, Dave Angel wrote: Denis McMahon wrote: On Sat, 10 Aug 2013 22:19:23 -0400, Devyn Collier Johnson wrote: I am checking my 1292-line script for syntax errors. I ran the following commands in a terminal to check for errors, but I do not see the error. JOB_WRITEURGFILES = mul

Re: Am I not seeing the Error?

2013-08-13 Thread MRAB
On 13/08/2013 21:28, Denis McMahon wrote: On Sat, 10 Aug 2013 22:19:23 -0400, Devyn Collier Johnson wrote: I am checking my 1292-line script for syntax errors. I ran the following commands in a terminal to check for errors, but I do not see the error. JOB_WRITEURGFILES = multiprocessing.Proc

Re: Getting a value that follows string.find()

2013-08-13 Thread Joel Goldstick
On Tue, Aug 13, 2013 at 7:18 PM, Joel Goldstick wrote: > On Tue, Aug 13, 2013 at 7:03 PM, wrote: >> On Tuesday, August 13, 2013 5:58:07 PM UTC-5, Joel Goldstick wrote: >>> lookup urlparse for you answer >>> >>> >>> >>> On Tue, Aug 13, 2013 at 6:51 PM, <> wrote: >>> >>> > I know the title doesn'

Pair of filenos read/write each other?

2013-08-13 Thread Jack Bates
Can anyone suggest a way to get a pair of file descriptor numbers such that data written to one can be read from the other and vice versa? Is there anything like os.pipe() where you can read/write both ends? Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: Getting a value that follows string.find()

2013-08-13 Thread Joel Goldstick
On Tue, Aug 13, 2013 at 7:03 PM, wrote: > On Tuesday, August 13, 2013 5:58:07 PM UTC-5, Joel Goldstick wrote: >> lookup urlparse for you answer >> >> >> >> On Tue, Aug 13, 2013 at 6:51 PM, <> wrote: >> >> > I know the title doesn't make much sense, but I didnt know how to explain >> > my proble

Re: Python-List

2013-08-13 Thread Ben Finney
"Williams, Elisabeth S" writes: > We have an immediate need for a Python Developer and Development > Technical Lead Please use the Python Job Board to recruit Python programmers http://www.python.org/community/jobs/>, not this forum. Thanks! -- \ “I call him Governor Bush because that

Writing a “social network” in Python (was: Open-source vs. closed-source for centralised social-networks?)

2013-08-13 Thread Ben Finney
Alec Taylor writes: > Fear open-sourcing fledgling social-networks; as centralisation is > easily losable. Welcome! This forum is for discussing the practice of programming with Python. Your topic doesn't seem much to do with Python (and no, “I'm writing it in Python” isn't much to do with Pyth

Re: Getting a value that follows string.find()

2013-08-13 Thread englishkevin110
On Tuesday, August 13, 2013 5:58:07 PM UTC-5, Joel Goldstick wrote: > lookup urlparse for you answer > > > > On Tue, Aug 13, 2013 at 6:51 PM, <> wrote: > > > I know the title doesn't make much sense, but I didnt know how to explain > > my problem. > > > > > > Anywho, I've opened a page's so

Re: Getting a value that follows string.find()

2013-08-13 Thread Joel Goldstick
lookup urlparse for you answer On Tue, Aug 13, 2013 at 6:51 PM, wrote: > I know the title doesn't make much sense, but I didnt know how to explain my > problem. > > Anywho, I've opened a page's source in URLLIB > starturlsource = starturlopen.read() > string.find(starturlsource, 'http://mail.py

Getting a value that follows string.find()

2013-08-13 Thread englishkevin110
I know the title doesn't make much sense, but I didnt know how to explain my problem. Anywho, I've opened a page's source in URLLIB starturlsource = starturlopen.read() string.find(starturlsource, 'http://mail.python.org/mailman/listinfo/python-list

Re: Am I not seeing the Error?

2013-08-13 Thread Dave Angel
Denis McMahon wrote: > On Sat, 10 Aug 2013 22:19:23 -0400, Devyn Collier Johnson wrote: > >> I am checking my 1292-line script for syntax errors. I ran the following >> commands in a terminal to check for errors, but I do not see the error. > >> JOB_WRITEURGFILES = >> multiprocessing.Process(write

Re: Am I not seeing the Error?

2013-08-13 Thread Denis McMahon
On Sat, 10 Aug 2013 22:19:23 -0400, Devyn Collier Johnson wrote: > I am checking my 1292-line script for syntax errors. I ran the following > commands in a terminal to check for errors, but I do not see the error. > JOB_WRITEURGFILES = > multiprocessing.Process(write2file('./mem/ENGINE_PID', ENGI

Re: python and displaying on 10 bit monitors

2013-08-13 Thread rlkling
Yea, that is not quite what I am looking for. He uses Python Image Library and as far as I can tell it does not display the images as 10 bits on 10 bit displays. So far the only app that I can find that does this is photoshop. -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP 450 Adding a statistics module to Python

2013-08-13 Thread Oscar Benjamin
On Aug 13, 2013 7:22 PM, "Wolfgang Keller" wrote: > > > I am seeking comments on PEP 450, Adding a statistics module to > > Python's standard library: > > I don't think that you want to re-implement RPy. You're right. He doesn't. Oscar -- http://mail.python.org/mailman/listinfo/python-list

Re: python and displaying on 10 bit monitors

2013-08-13 Thread Ian Kelly
On Tue, Aug 13, 2013 at 6:25 AM, wrote: > Are there any python libraries that read and display High Dynamic Range > images like this matlab code? > > http://www.mathworks.com/matlabcentral/fileexchange/27115-hdr-image-viewer-for-deep-color-monitor > > Or, asking another way, are there any python

Re: PEP 450 Adding a statistics module to Python

2013-08-13 Thread Wolfgang Keller
> I am seeking comments on PEP 450, Adding a statistics module to > Python's standard library: I don't think that you want to re-implement RPy. Sincerely, Wolfgang -- http://mail.python.org/mailman/listinfo/python-list

Re: Question about function failing with large number

2013-08-13 Thread Chris Angelico
On Tue, Aug 13, 2013 at 4:33 PM, MRAB wrote: > Here's a way to calculate the integer square root: Yes, but the actual value of the square root isn't needed. All that's needed is to stop the loop once the sqrt is reached. ChrisA -- http://mail.python.org/mailman/listinfo/python-list

Re: python and displaying on 10 bit monitors

2013-08-13 Thread Terry Reedy
On 8/13/2013 8:25 AM, rlkl...@gmail.com wrote: Are there any python libraries that read and display High Dynamic Range images like this matlab code? http://www.mathworks.com/matlabcentral/fileexchange/27115-hdr-image-viewer-for-deep-color-monitor Or, asking another way, are there any python li

Re: Am I not seeing the Error?

2013-08-13 Thread Terry Reedy
On 8/13/2013 6:31 AM, Devyn Collier Johnson wrote: I now see why this programming style is called trolling. 'Trolling' is a posting style. Your initial post was legitimate. When the first three respondents missed the syntax error, ';' instead of ',' within function() calls, I reported it. Y

Re: multithreading in python

2013-08-13 Thread Terry Reedy
On 8/13/2013 4:06 AM, samaneh.yahyap...@gmail.com wrote: Aside from the other comments... def item_thread(self): imageAnalyzer=ctypes.CDLL("../so/image_process.so") imageAnalyzer.aref_img_score_init("/opt/amniran/etc/face.xml", "/opt/amniran/etc/porn.xml") for f

RE: Could you verify this, Oh Great Unicode Experts of the Python-List?

2013-08-13 Thread Prasad, Ramit
Michael Torrie wrote: > On 08/11/2013 11:54 PM, Gregory Ewing wrote: > > Michael Torrie wrote: > >> I've always wondered if the 160 character limit or whatever it is is a > >> hard limit in their system, or if it's just a variable they could tweak > >> if they felt like it. > > > > Isn't it for com

Re: Question about function failing with large number

2013-08-13 Thread MRAB
On 13/08/2013 13:42, Chris Angelico wrote: On Tue, Aug 13, 2013 at 1:12 PM, Anthony Papillion wrote: So I'm using the function below to test a large (617 digit) number for primality. For some reason, when I execute the code, I get an error telling me: OverflowError: long int too large to conve

Re: Digging into multiprocessing

2013-08-13 Thread Chris Angelico
On Tue, Aug 13, 2013 at 12:17 AM, Demian Brecht wrote: > Hi all, > > Some work that I'm doing atm is in some serious need of > parallelization. As such, I've been digging into the multiprocessing > module more than I've had to before and I had a few questions come up > as a result: > > (Running 2.

Python-List

2013-08-13 Thread Williams, Elisabeth S
We have an immediate need for a Python Developer and Development Technical Lead (proficient in Python) in Charlotte, NC. Please reply with you r resume for consideration. Thanks, Beth Elisabeth Williams Technical Recruiter 704-227-3142 ewilli...@diversant.com

Re: Am I not seeing the Error?

2013-08-13 Thread Grant Edwards
On 2013-08-13, Joshua Landau wrote: > On 12 August 2013 16:47, Roy Smith wrote: >> I can't quite sort out the multiple quoting levels, but somebody said: >> > Programming like that is called trolling. A programmer that uses > trolling is called a troll. A troll can also refer to such a li

Re: Question about function failing with large number

2013-08-13 Thread Dave Angel
Anthony Papillion wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA512 > > So I'm using the function below to test a large (617 digit) number for > primality. For some reason, when I execute the code, I get an error > telling me: > > OverflowError: long int too large to convert to float In

Re: Question about function failing with large number

2013-08-13 Thread Chris Angelico
On Tue, Aug 13, 2013 at 1:12 PM, Anthony Papillion wrote: > So I'm using the function below to test a large (617 digit) number for > primality. For some reason, when I execute the code, I get an error > telling me: > > OverflowError: long int too large to convert to float > > The error is being th

python and displaying on 10 bit monitors

2013-08-13 Thread rlkling
Are there any python libraries that read and display High Dynamic Range images like this matlab code? http://www.mathworks.com/matlabcentral/fileexchange/27115-hdr-image-viewer-for-deep-color-monitor Or, asking another way, are there any python libraries that display images to 10 bit monitors a

Re: Am I not seeing the Error?

2013-08-13 Thread Robert Kern
On 2013-08-13 11:31, Devyn Collier Johnson wrote: I now see why this programming style is called trolling. This programming style is not called "trolling". It does not have a name. It's just your particular style. I think you misinterpreted someone who accused you of deliberately coding in t

Question about function failing with large number

2013-08-13 Thread Anthony Papillion
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 So I'm using the function below to test a large (617 digit) number for primality. For some reason, when I execute the code, I get an error telling me: OverflowError: long int too large to convert to float The error is being thrown on this line: fo

Re: multithreading in python

2013-08-13 Thread Dave Angel
samaneh.yahyap...@gmail.com wrote: > hi > my program work by 4 thread but when i use more thread it terminates > > how can i solve this problem I simplified the code so I could actually run it, and tested it in Python 2.7, both under Komodo IDE and in the terminal. The code: #!/usr/bin/en

Re: multithreading in python

2013-08-13 Thread Dave Angel
samaneh.yahyap...@gmail.com wrote: > hi > my program work by 4 thread but when i use more thread it terminates > > I simplified your code so anybody could run it, and tested it inside Komodo IDE, on Python 2.7 #!/usr/bin/env python import sys import os import time import threading class MyC

Re: Am I not seeing the Error?

2013-08-13 Thread Devyn Collier Johnson
On 08/13/2013 04:50 AM, Steven D'Aprano wrote: On Tue, 13 Aug 2013 09:19:07 +0100, Joshua Landau wrote: On 12 August 2013 16:47, Roy Smith wrote: I can't quite sort out the multiple quoting levels, but somebody said: Programming like that is called trolling. A programmer that uses trolling

Re: Calling Python macro from ctypes

2013-08-13 Thread Peter Otten
Steven D'Aprano wrote: > On Mon, 12 Aug 2013 13:42:14 +0200, Peter Otten wrote: > >> Steven D'Aprano wrote: >> >>> Is it possible to call a Python macro from ctypes? For example, Python >>> 3.3 introduces some new macros for querying the internal representation >>> of strings: >>> >>> http://ww

Re: Calling Python macro from ctypes

2013-08-13 Thread Steven D'Aprano
On Tue, 13 Aug 2013 10:11:29 +0200, Stefan Behnel wrote: > Steven D'Aprano, 13.08.2013 08:25: >> On Mon, 12 Aug 2013 13:42:14 +0200, Peter Otten wrote: >>> Steven D'Aprano wrote: >>> Is it possible to call a Python macro from ctypes? For example, Python 3.3 introduces some new macros for

Re: Am I not seeing the Error?

2013-08-13 Thread Steven D'Aprano
On Tue, 13 Aug 2013 09:19:07 +0100, Joshua Landau wrote: > On 12 August 2013 16:47, Roy Smith wrote: >> I can't quite sort out the multiple quoting levels, but somebody said: >> > Programming like that is called trolling. A programmer that uses > trolling is called a troll. A troll can al

Re: Could you verify this, Oh Great Unicode Experts of the Python-List?

2013-08-13 Thread Joshua Landau
On 11 August 2013 12:14, Steven D'Aprano wrote: > On Sun, 11 Aug 2013 10:44:40 +0100, Joshua Landau wrote: "café" will be in your Copy-Paste buffer, and you can paste it in to the tweet-box. It takes 5 characters. So much for testing ;). >>> >>> How do you know that it takes 5 character

Re: multithreading in python

2013-08-13 Thread Steven D'Aprano
On Tue, 13 Aug 2013 01:06:01 -0700, samaneh.yahyapour wrote: > hi > my program work by 4 thread but when i use more thread it terminates Is that a problem? Isn't it supposed to terminate, when it has finished? If it raises an exception, or crashes, you should tell us. > i use opencv in my ima

Open-source vs. closed-source for centralised social-networks?

2013-08-13 Thread Alec Taylor
Fear open-sourcing fledgling social-networks; as centralisation is easily losable. Open-sourcing social-networks when large, seems to work (e.g.: Reddit). Without centralisation it becomes difficult to establish community. An example of a "decentralised" open-source social-network is: Disapora.

Re: Am I not seeing the Error?

2013-08-13 Thread Joshua Landau
On 12 August 2013 16:47, Roy Smith wrote: > I can't quite sort out the multiple quoting levels, but somebody said: > Programming like that is called trolling. A programmer that uses trolling is called a troll. A troll can also refer to such a line of code itself. My scripts contain

Re: Could you verify this, Oh Great Unicode Experts of the Python-List?

2013-08-13 Thread Chris Angelico
On Tue, Aug 13, 2013 at 4:32 AM, MRAB wrote: > On 13/08/2013 04:20, Jason Friedman wrote: > > I've always wondered if the 160 character limit or whatever it is is a > hard limit in their system, or if it's just a variable they could tweak > if they felt like it. >> >> >> I thought

Re: Calling Python macro from ctypes

2013-08-13 Thread Stefan Behnel
Steven D'Aprano, 13.08.2013 08:25: > On Mon, 12 Aug 2013 13:42:14 +0200, Peter Otten wrote: >> Steven D'Aprano wrote: >> >>> Is it possible to call a Python macro from ctypes? For example, Python >>> 3.3 introduces some new macros for querying the internal representation >>> of strings: >>> >>> htt

multithreading in python

2013-08-13 Thread samaneh . yahyapour
hi my program work by 4 thread but when i use more thread it terminates i use opencv in my image_process.so my code is : #!/usr/bin/python import sys import os import io import time import copy import threading import ctypes class MyClass(): def __init__(self): i = 0