Re: Functional way to compare things inside a list

2012-09-21 Thread 88888 Dihedral
Ian於 2012年9月22日星期六UTC+8下午2時23分43秒寫道: > On Fri, Sep 21, 2012 at 7:25 PM, Steven D'Aprano > > wrote: > > > On Fri, 21 Sep 2012 14:49:55 -0600, Ian Kelly wrote: > > > > > >> On Fri, Sep 21, 2012 at 1:54 PM, 8 Dihedral > > >> wrote: > > >>> I don't think functional aspects are only marked a

Re: Functional way to compare things inside a list

2012-09-21 Thread Ian Kelly
On Fri, Sep 21, 2012 at 7:25 PM, Steven D'Aprano wrote: > On Fri, 21 Sep 2012 14:49:55 -0600, Ian Kelly wrote: > >> On Fri, Sep 21, 2012 at 1:54 PM, 8 Dihedral >> wrote: >>> I don't think functional aspects are only marked as lazy programming. >> >> He wrote "lazy evaluation", not "lazy progr

Re: how to do draw pattern with python?

2012-09-21 Thread Chris Angelico
On Sat, Sep 22, 2012 at 5:55 AM, Mark Lawrence wrote: > I tried running your code but got this:- > > c:\Users\Mark>pattern.py > File "C:\Users\Mark\pattern.py", line 22 > > Doing your homework since 2001 > ^ > SyntaxError: invalid syntax > > What am I doing wrong? The problem i

Re: How to limit CPU usage in Python

2012-09-21 Thread Ramchandra Apte
you On Saturday, 22 September 2012 05:14:15 UTC+5:30, Cameron Simpson wrote: > On 20Sep2012 12:53, Terry Reedy wrote: > > | On 9/20/2012 12:46 PM, Terry Reedy wrote: > > | > On 9/20/2012 11:12 AM, Rolando Cañer Roblejo wrote: > > | >> Is it possible for me to put a limit in the amount of proc

Re: Python 3.3 and .pyo files

2012-09-21 Thread Terry Reedy
On 9/21/2012 5:10 AM, Marco wrote: I was trying to import a pyo module in Python 3.3, but Python does not find it: You appear to be trying to *run*, not *import* a .pyo module. $ echo "print(__file__)" > foo.py $ python3.3 -O -m foo Since foo.py is in the current directory, I am not sure wh

Re: technologies synergistic with Python

2012-09-21 Thread Chris Angelico
On Sat, Sep 22, 2012 at 11:48 AM, Steven D'Aprano wrote: > Integration with Java frameworks and applications? > > Java :-P I asked you not to tell me that! JavaScript/ECMAScript/etc-script isn't that bad a language. It's workable. And thanks to it, my boss now understands pass-by-object semantic

Re: Does python have built command for package skeleton creation?

2012-09-21 Thread Chris Angelico
On Sat, Sep 22, 2012 at 11:43 AM, Steven D'Aprano wrote: > On Sat, 22 Sep 2012 03:44:55 +1000, Chris Angelico wrote: > >> On Sat, Sep 22, 2012 at 1:54 AM, Steven D'Aprano >> wrote: >>> For a programming language with a lot of corporate use, Python already >>> seems like it changes at the drop of

Re: technologies synergistic with Python

2012-09-21 Thread Steven D'Aprano
On Fri, 21 Sep 2012 14:59:47 -0700, Ethan Furman wrote: > Greetings! > > What is the consensus... okay, okay -- what are some wide ranging > opinions on technologies that I should know if my dream job is one that > consists mostly of Python, and might allow telecommuting? That depends on what yo

Re: Does python have built command for package skeleton creation?

2012-09-21 Thread Steven D'Aprano
On Sat, 22 Sep 2012 03:44:55 +1000, Chris Angelico wrote: > On Sat, Sep 22, 2012 at 1:54 AM, Steven D'Aprano > wrote: >> But consider, C and C++ don't have minor releases *at all*. The last >> versions of those two languages are C99 and C+98 -- that's FOURTEEN >> YEARS since the last version of C

Re: One of my joomla webpages has been hacked. Please help.

2012-09-21 Thread Chris Angelico
On Sat, Sep 22, 2012 at 11:42 AM, Steven D'Aprano wrote: > But you asked anyway. Why don't you ask your car mechanic to fix your > plumbing, or go to the doctor to ask advice on how to cook pizza? Or your plumber to rescue the princess who's in another castle... ChrisA -- http://mail.python.org

Re: One of my joomla webpages has been hacked. Please help.

2012-09-21 Thread Steven D'Aprano
On Fri, 21 Sep 2012 11:45:14 -0700, Νίκος Γκρεεκ wrote: > One webpage of mine, [url redacted] has been *hacked* 15 mins ago. [...] > I would be gratefull for any help you provide me. Yeah yeah, sure. Is this an attempt to get people to visit your web site so it can do a drive-by install of malwa

Re: Exact integer-valued floats

2012-09-21 Thread Steven D'Aprano
On Fri, 21 Sep 2012 15:23:41 -0700, Paul Rubin wrote: > Steven D'Aprano writes: >> Have I got this right? Is there a way to work out the gap between one >> float and the next? > > Yes, 53-bit mantissa as people have mentioned. That tells you what ints > can be exactly represented. But, arithme

Re: One of my joomla webpages has been hacked. Please help.

2012-09-21 Thread Chris Angelico
On Sat, Sep 22, 2012 at 4:45 AM, Νίκος Γκρεεκ wrote: > One webpage of mine, http://www.varsa.gr/ has been *hacked* 15 mins ago. > > I know this is not a python question but you guyshave high knowledge of web > sites programming and i though you wouldnt mind helping me out. No, this is not a Pyth

Re: Algorithms using Python?

2012-09-21 Thread Steven D'Aprano
On Fri, 21 Sep 2012 17:14:14 -0400, Dennis Lee Bieber wrote: > On Fri, 21 Sep 2012 14:07:01 -0600, Ian Kelly > declaimed the following in gmane.comp.python.general: > > >> It seems to work fine to me. > > You are working with dynamically allocated memory for the nodes; Doesn't everybod

Re: Print Function

2012-09-21 Thread Steven D'Aprano
On Fri, 21 Sep 2012 13:20:09 -0700, gengyangcai wrote: > I am currently using Python 3.2.3 . WHen I use the print function by > typing print "Game Over" , it mentions " SyntaxError : invalid syntax > ". Any ideas on what the problem is and how to resolve it ? No, none what so ever. Perhaps you

Re: Functional way to compare things inside a list

2012-09-21 Thread Steven D'Aprano
On Fri, 21 Sep 2012 14:49:55 -0600, Ian Kelly wrote: > On Fri, Sep 21, 2012 at 1:54 PM, 8 Dihedral > wrote: >> I don't think functional aspects are only marked as lazy programming. > > He wrote "lazy evaluation", not "lazy programming". Two entirely > different things. For the record, the

Re: Obnoxious postings from Google Groups (was: datetime issue)

2012-09-21 Thread Hank Gay
On 2012-09-21 15:07:09 +, Grant Edwards said: I told my news client years ago to filter out anything posted from Google Groups -- and I know I'm not alone. If one wants the best chance of getting a question answered, using something other than Google Groups is indeed a good idea. What's t

Re: technologies synergistic with Python

2012-09-21 Thread Tim Chase
On 09/21/12 17:33, Rodrick Brown wrote: >> What is the consensus... okay, okay -- what are some wide >> ranging opinions on technologies that I should know if my dream >> job is one that consists mostly of Python, and might allow >> telecommuting? > > Django, JavaScript, HTML 5, JQuery, , SQL, Red

Re: How to limit CPU usage in Python

2012-09-21 Thread Cameron Simpson
On 20Sep2012 12:53, Terry Reedy wrote: | On 9/20/2012 12:46 PM, Terry Reedy wrote: | > On 9/20/2012 11:12 AM, Rolando Cañer Roblejo wrote: | >> Is it possible for me to put a limit in the amount of processor usage (% | >> CPU) that my current python script is using? Is there any module useful | >>

Re: technologies synergistic with Python

2012-09-21 Thread 88888 Dihedral
i Rodrick Brown於 2012年9月22日星期六UTC+8上午6時33分59秒寫道: > On Sep 21, 2012, at 5:59 PM, Ethan Furman wrote: > > > > > Greetings! > > > > > > What is the consensus... okay, okay -- what are some wide ranging opinions > > on technologies that I should know if my dream job is one that consists > > m

Re: Blue Screen Python

2012-09-21 Thread Dave Angel
On 09/21/2012 12:01 PM, Alister wrote: > On Fri, 21 Sep 2012 15:14:53 +, Grant Edwards wrote: > >> On 2012-09-21, mikcec82 wrote: >>> Hallo to all, >>> >>> I'm using Python 2.7.3 with Windows 7 @ 64 bit and an Intel Core i3 >>> -2350M CPU @2.30GHz 2.3GHz. >>> >>> Sometimes, when I'm programmin

Re: Print Function

2012-09-21 Thread Ian Kelly
On Fri, Sep 21, 2012 at 3:11 PM, Alister wrote: > On Fri, 21 Sep 2012 14:54:14 -0600, Ian Kelly wrote: > >> On Fri, Sep 21, 2012 at 2:28 PM, Rodrick Brown >> wrote: >>> Go away troll! >> >> Troll? It looked like a sincere question to me. > > but one that page 1 of the documentation would answer.

Client Needs---QA Manual Tester at Sacramento, CA

2012-09-21 Thread ram dev
Good Day, We have an urgent Contract Openings in Folsom, CA Looking forward to submit your resume for below mentioned Requirement… If you are interested, Please forward your latest resume along with location and pay rate details to r...@tech-netinc.com Job Title: QA Engineer(Strong Web services

Re: technologies synergistic with Python

2012-09-21 Thread Rodrick Brown
On Sep 21, 2012, at 5:59 PM, Ethan Furman wrote: > Greetings! > > What is the consensus... okay, okay -- what are some wide ranging opinions on > technologies that I should know if my dream job is one that consists mostly > of Python, and might allow telecommuting? > > (Please don't say Java,

Re: Exact integer-valued floats

2012-09-21 Thread Paul Rubin
Steven D'Aprano writes: > Have I got this right? Is there a way to work out the gap between one > float and the next? Yes, 53-bit mantissa as people have mentioned. That tells you what ints can be exactly represented. But, arithmetic in some situations can have a 1-ulp error. So I wonder if i

technologies synergistic with Python

2012-09-21 Thread Ethan Furman
Greetings! What is the consensus... okay, okay -- what are some wide ranging opinions on technologies that I should know if my dream job is one that consists mostly of Python, and might allow telecommuting? (Please don't say Java, please don't say Java, please don't say... ;) ~Ethan~ -- http

Re: Obnoxious postings from Google Groups (was: datetime issue)

2012-09-21 Thread Walter Hurry
On Fri, 21 Sep 2012 15:07:09 +, Grant Edwards wrote: > I told my news client years ago to filter out anything posted from > Google Groups -- and I know I'm not alone. If one wants the best chance > of getting a question answered, using something other than Google Groups > is indeed a good ide

Re: Functional way to compare things inside a list

2012-09-21 Thread 88888 Dihedral
A Ian於 2012年9月22日星期六UTC+8上午4時50分49秒寫道: > On Fri, Sep 21, 2012 at 1:54 PM, 8 Dihedral > > wrote: > > > I don't think functional aspects are only marked as lazy > > > programming. > > > > He wrote "lazy evaluation", not "lazy programming". Two entirely > > different things. > > > > >

Re: Functional way to compare things inside a list

2012-09-21 Thread Joshua Landau
On 21 September 2012 21:49, Ian Kelly wrote: > On Fri, Sep 21, 2012 at 1:54 PM, 8 Dihedral > wrote: > > I don't think functional aspects are only marked as lazy > > programming. > > He wrote "lazy evaluation", not "lazy programming". Two entirely > different things. > > > It just means when

Re: Print Function

2012-09-21 Thread John Gordon
In gengyang...@gmail.com writes: > I am currently using Python 3.2.3 . WHen I use the print function by > typing print "Game Over" , it mentions " SyntaxError : invalid syntax ". > Any ideas on what the problem is and how to resolve it ? Thanks a lot . In python version 3, print was changed i

Re: Exact integer-valued floats

2012-09-21 Thread Alister
On Fri, 21 Sep 2012 17:29:13 +, Steven D'Aprano wrote: > Python floats can represent exact integer values (e.g. 42.0), but above > a certain value (see below), not all integers can be represented. For > example: > > py> 1e16 == 1e16 + 1 # no such float as 10001.0 True py> > 1e16

Re: Print Function

2012-09-21 Thread Alister
On Fri, 21 Sep 2012 14:54:14 -0600, Ian Kelly wrote: > On Fri, Sep 21, 2012 at 2:28 PM, Rodrick Brown > wrote: >> Go away troll! > > Troll? It looked like a sincere question to me. but one that page 1 of the documentation would answer. -- Waste not, get your budget cut next year. -- http:/

Re: Exact integer-valued floats

2012-09-21 Thread Hans Mulder
On 21/09/12 22:26:26, Dennis Lee Bieber wrote: > On 21 Sep 2012 17:29:13 GMT, Steven D'Aprano > declaimed the following in > gmane.comp.python.general: > >> >> The question is, what is the largest integer number N such that every >> whole number between -N and N inclusive can be represented as a

Re: Print Function

2012-09-21 Thread Ian Kelly
On Fri, Sep 21, 2012 at 2:28 PM, Rodrick Brown wrote: > Go away troll! Troll? It looked like a sincere question to me. -- http://mail.python.org/mailman/listinfo/python-list

Re: Functional way to compare things inside a list

2012-09-21 Thread Ian Kelly
On Fri, Sep 21, 2012 at 1:54 PM, 8 Dihedral wrote: > I don't think functional aspects are only marked as lazy > programming. He wrote "lazy evaluation", not "lazy programming". Two entirely different things. > It just means when one is experimenting something > the efficient execution in sp

Re: Re: Algorithms using Python?

2012-09-21 Thread Evan Driscoll
On 09/21/2012 02:45 PM, Dennis Lee Bieber wrote: > On Fri, 21 Sep 2012 14:26:04 +0530, Mayuresh Kathe > declaimed the following in gmane.comp.python.general: > >> Is there a good book on foundational as well as advanced algorithms >> using Python? >> > Depends on what you mean by "foundati

Re: Print Function

2012-09-21 Thread Rodrick Brown
Go away troll! Sent from my iPhone On Sep 21, 2012, at 4:27 PM, "gengyang...@gmail.com" wrote: > Hello , > > > I am currently using Python 3.2.3 . WHen I use the print function by typing > print "Game Over" , it mentions " SyntaxError : invalid syntax ". Any ideas > on what the problem is a

Re: Reading a file in IDLE 3 on Mac-Lion

2012-09-21 Thread Hans Mulder
On 21/09/12 16:29:55, Franck Ditter wrote: > I create a text file utf-8 encoded in Python 3 with IDLE (Mac Lion). > It runs fine and creates the disk file, visible with > TextWrangler or another. > But I can't open it with IDLE (its name is greyed). > IDLE is supposed to read utf-8 files, no ? > Th

Re: Print Function

2012-09-21 Thread Tarek Ziadé
On 9/21/12 10:20 PM, gengyang...@gmail.com wrote: Hello , I am currently using Python 3.2.3 . WHen I use the print function by typing print "Game Over" , it mentions " SyntaxError : invalid syntax ". Any ideas on what the problem is and how to resolve it ? Thanks a lot . print was a stat

Print Function

2012-09-21 Thread gengyangcai
Hello , I am currently using Python 3.2.3 . WHen I use the print function by typing print "Game Over" , it mentions " SyntaxError : invalid syntax ". Any ideas on what the problem is and how to resolve it ? Thanks a lot . GengYang -- http://mail.python.org/mailman/listinfo/python-list

Re: [Q] How to exec code object with local variables specified?

2012-09-21 Thread 88888 Dihedral
Makoto Kuwata於 2012年9月20日星期四UTC+8下午7時27分40秒寫道: > Hi, > > > > Is it possible to run code object with local variables specified? > > I'm trying the following code but not work: > > > > def fn(): > >x = 1 > >y = 2 > > localvars = {'x': 0} > > exec(fn.func_code, g

Re: Algorithms using Python?

2012-09-21 Thread Ian Kelly
On Fri, Sep 21, 2012 at 1:45 PM, Dennis Lee Bieber wrote: > You can probably implement them, but they're not going to be very > efficient. (And never "remove" an element from the linked-list > implementation because Python would shift all the other elements, hence > your "links" become inv

Re: Exact integer-valued floats

2012-09-21 Thread Nobody
On Fri, 21 Sep 2012 17:29:13 +, Steven D'Aprano wrote: > The question is, what is the largest integer number N such that every > whole number between -N and N inclusive can be represented as a float? > > If my tests are correct, that value is 9007199254740992.0 = 2**53. > > Have I got this r

Re: Functional way to compare things inside a list

2012-09-21 Thread 88888 Dihedral
Ulrich Eckhardt於 2012年9月21日星期五UTC+8下午5時15分03秒寫道: > Am 21.09.2012 00:58, schrieb thorso...@lavabit.com: > > > list = [{'1': []}, {'2': []}, {'3': ['4', '5']}] > > > > > > I want to check for a value (e.g. '4'), and get the key of the dictionary > > > that contains that value. > > > > Note: >

Re: how to do draw pattern with python?

2012-09-21 Thread Mark Lawrence
On 21/09/2012 15:29, Peter Otten wrote: echo.hp...@gmail.com wrote: may i know how to shift the bits using only looping and branching?? import time data = """\ xx .x..x. ..xx.. ..xx.. .x..x. xx """.splitlines() data = [line * 12 for line in data] # optional while True: print

Re: Exact integer-valued floats

2012-09-21 Thread Jussi Piitulainen
Steven D'Aprano writes: > Python floats can represent exact integer values (e.g. 42.0), but above a > certain value (see below), not all integers can be represented. For > example: > > py> 1e16 == 1e16 + 1 # no such float as 10001.0 > True > py> 1e16 + 3 == 1e16 + 4 # or 1

One of my joomla webpages has been hacked. Please help.

2012-09-21 Thread Νίκος Γκρεεκ
Hello, One webpage of mine, http://www.varsa.gr/ has been *hacked* 15 mins ago. I logged into CPanel but the joomla files seem ok. but when i view page code with chrome i get the source code, i dont knwo of which file thaty contains javascript inside. Please visit my web page varsa.gr and view

Re: Exact integer-valued floats

2012-09-21 Thread Ian Kelly
On Fri, Sep 21, 2012 at 11:29 AM, Steven D'Aprano wrote: > The question is, what is the largest integer number N such that every > whole number between -N and N inclusive can be represented as a float? > > If my tests are correct, that value is 9007199254740992.0 = 2**53. > > Have I got this right

Re: Does python have built command for package skeleton creation?

2012-09-21 Thread Chris Angelico
On Sat, Sep 22, 2012 at 1:54 AM, Steven D'Aprano wrote: > But consider, C and C++ don't have minor releases *at all*. The last > versions of those two languages are C99 and C+98 -- that's FOURTEEN YEARS > since the last version of C++. And Java hasn't had a major feature update > since 2006. > > F

Re: how to do draw pattern with python?

2012-09-21 Thread Chris Angelico
On Sat, Sep 22, 2012 at 3:31 AM, Chris Angelico wrote: > It's an ANSI escape sequence, or rather two of them. The first one > clears the screen, the second returns you to 0,0. (Isn't that implicit > in the 2J code? Maybe I'm misremembering.) Ah. From Wikipedia: "If n is two, clear entire screen (

Re: Does python have built command for package skeleton creation?

2012-09-21 Thread Steven D'Aprano
On Fri, 21 Sep 2012 13:26:32 -0400, Dave Angel wrote: > On 09/21/2012 11:54 AM, Steven D'Aprano wrote: >> Python's release cycle is actually closer to 18 months for minor >> releases (3.2 -> 3.3, for example), and 10 years for major releases >> (2.x -> 3.x). But consider, C and C++ don't have min

Re: how to do draw pattern with python?

2012-09-21 Thread Chris Angelico
On Sat, Sep 22, 2012 at 2:50 AM, Ismael Farfán wrote: > 2012/9/21 Peter Otten <__pete...@web.de>: >> echo.hp...@gmail.com wrote: >> >> print "\x1b[2J\x1b[0;0H" # optional > > Nice code : ) > > Could you dissect that weird string for us? > > It isn't returning the cursor to (0,0), it's just lik

Re: how to do draw pattern with python?

2012-09-21 Thread Ian Kelly
On Fri, Sep 21, 2012 at 10:50 AM, Ismael Farfán wrote: > 2012/9/21 Peter Otten <__pete...@web.de>: >> echo.hp...@gmail.com wrote: >> >> print "\x1b[2J\x1b[0;0H" # optional > > Nice code : ) > > Could you dissect that weird string for us? > > It isn't returning the cursor to (0,0), it's just li

Exact integer-valued floats

2012-09-21 Thread Steven D'Aprano
Python floats can represent exact integer values (e.g. 42.0), but above a certain value (see below), not all integers can be represented. For example: py> 1e16 == 1e16 + 1 # no such float as 10001.0 True py> 1e16 + 3 == 1e16 + 4 # or 10003.0 True So some integers are m

Re: how to do draw pattern with python?

2012-09-21 Thread Peter Otten
Ismael Farfán wrote: > 2012/9/21 Peter Otten <__pete...@web.de>: >> echo.hp...@gmail.com wrote: >> >> print "\x1b[2J\x1b[0;0H" # optional > > Nice code : ) > > Could you dissect that weird string for us? > > It isn't returning the cursor to (0,0), it's just like executing > clear(1), and lo

Re: Does python have built command for package skeleton creation?

2012-09-21 Thread Dave Angel
On 09/21/2012 11:54 AM, Steven D'Aprano wrote: > On Fri, 21 Sep 2012 14:50:36 +0100, Mark Lawrence wrote: > >> On 21/09/2012 14:13, xliiv wrote: >>> Why is this '2 years release cycle'? >>> >>> >> Because there aren't enough volunteers to get it done any faster? > Because if it were any faster, it

Re: how to do draw pattern with python?

2012-09-21 Thread Ismael Farfán
2012/9/21 Peter Otten <__pete...@web.de>: > echo.hp...@gmail.com wrote: > > print "\x1b[2J\x1b[0;0H" # optional Nice code : ) Could you dissect that weird string for us? It isn't returning the cursor to (0,0), it's just like executing clear(1), and looks like those line coloring scape sequen

Re: Blue Screen Python

2012-09-21 Thread Alister
On Fri, 21 Sep 2012 16:01:16 +, Alister wrote: > On Fri, 21 Sep 2012 15:14:53 +, Grant Edwards wrote: > >> On 2012-09-21, mikcec82 wrote: >>> Hallo to all, >>> >>> I'm using Python 2.7.3 with Windows 7 @ 64 bit and an Intel Core i3 >>> -2350M CPU @2.30GHz 2.3GHz. >>> >>> Sometimes, when

Re: Blue Screen Python

2012-09-21 Thread Alister
On Fri, 21 Sep 2012 15:14:53 +, Grant Edwards wrote: > On 2012-09-21, mikcec82 wrote: >> Hallo to all, >> >> I'm using Python 2.7.3 with Windows 7 @ 64 bit and an Intel Core i3 >> -2350M CPU @2.30GHz 2.3GHz. >> >> Sometimes, when I'm programming in Python on my screen compare this > Python is

Re: Does python have built command for package skeleton creation?

2012-09-21 Thread Steven D'Aprano
On Fri, 21 Sep 2012 14:50:36 +0100, Mark Lawrence wrote: > On 21/09/2012 14:13, xliiv wrote: >> Why is this '2 years release cycle'? >> >> > Because there aren't enough volunteers to get it done any faster? Because if it were any faster, it would piss off a lot of people. Python's release cycle

Re: Python 3.3 and .pyo files

2012-09-21 Thread Marco
On 09/21/2012 02:55 PM, Steven D'Aprano wrote: $ ls >foo.pyo ># The following works in Python3.2, but not in 3.3 >$ python3.3 -O -m foo >/usr/local/bin/python3.3: No module named foo I can confirm that (1) it works using Python 3.2; (2) it doesn't work using Python 3.3; and (3) it does work in

Re: How to apply the user's HTML environment in a Python programme?

2012-09-21 Thread David Smith
On 2012-09-21 08:57, BobAalsma wrote: This text can be behind a username/password, but for several reasons, I don't want to know those. So I would like to set up a situation where the user logs in (if/when appropriate), points out the URL to my programme and my programme would then be able to

Re: Blue Screen Python

2012-09-21 Thread Grant Edwards
On 2012-09-21, mikcec82 wrote: > Hallo to all, > > I'm using Python 2.7.3 with Windows 7 @ 64 bit and an Intel Core i3 > -2350M CPU @2.30GHz 2.3GHz. > > Sometimes, when I'm programming in Python on my screen compare this > blue screen: > http://imageshack.us/a/img228/8352/48579647436249494527021.j

Re: Obnoxious postings from Google Groups (was: datetime issue)

2012-09-21 Thread Grant Edwards
On 2012-09-16, Ben Finney wrote: > writes: > >> Iam sorry i didnt do that on purpose and i dont know how this is done. >> >> Iam positng via google groups using chrome, thats all i know. > > It is becoming quite clear that some change has happened recently to > Googl

Re: How to apply the user's HTML environment in a Python programme?

2012-09-21 Thread Peter Otten
BobAalsma wrote: > Hmm, from the previous posts I get the impression that I could best solve > this by asking the user for the specific combination of username, password > and URL + promising not to keep any of that... > > OK, that does sound doable - thank you all Hmm, promising seems doable, b

Re: Algorithms using Python?

2012-09-21 Thread Joel Goldstick
On Fri, Sep 21, 2012 at 4:56 AM, Mayuresh Kathe wrote: > Is there a good book on foundational as well as advanced algorithms using > Python? > > Thanks. > > -- > http://mail.python.org/mailman/listinfo/python-list There is one on Apress that I've seen http://www.amazon.com/Python-Algorithms-Mast

Reading a file in IDLE 3 on Mac-Lion

2012-09-21 Thread Franck Ditter
Hello, I create a text file utf-8 encoded in Python 3 with IDLE (Mac Lion). It runs fine and creates the disk file, visible with TextWrangler or another. But I can't open it with IDLE (its name is greyed). IDLE is supposed to read utf-8 files, no ? This works on Windows-7. Thanks for the tip,

Re: Blue Screen Python

2012-09-21 Thread Chris Angelico
On Sat, Sep 22, 2012 at 12:04 AM, mikcec82 wrote: > Hallo to all, > > I'm using Python 2.7.3 with Windows 7 @ 64 bit > and an Intel Core i3 -2350M CPU @2.30GHz 2.3GHz. > > Sometimes, when I'm programming in Python on my screen compare this blue > screen: > http://imageshack.us/a/img228/8352/48579

Re: how to do draw pattern with python?

2012-09-21 Thread Peter Otten
echo.hp...@gmail.com wrote: > may i know how to shift the bits using only looping and branching?? import time data = """\ xx .x..x. ..xx.. ..xx.. .x..x. xx """.splitlines() data = [line * 12 for line in data] # optional while True: print "\x1b[2J\x1b[0;0H" # optional for i, li

Re: How to apply the user's HTML environment in a Python programme?

2012-09-21 Thread Joel Goldstick
On Fri, Sep 21, 2012 at 9:58 AM, BobAalsma wrote: > Op vrijdag 21 september 2012 15:36:11 UTC+2 schreef Jerry Hill het volgende: >> On Fri, Sep 21, 2012 at 9:31 AM, BobAalsma wrote: >> >> > Thanks, Joel, yes, but as far as I'm aware these would all require the >> > Python programme to have the us

Blue Screen Python

2012-09-21 Thread mikcec82
Hallo to all, I'm using Python 2.7.3 with Windows 7 @ 64 bit and an Intel Core i3 -2350M CPU @2.30GHz 2.3GHz. Sometimes, when I'm programming in Python on my screen compare this blue screen: http://imageshack.us/a/img228/8352/48579647436249494527021.jpg Can you help on what is the issue, and how

Re: how to do draw pattern with python?

2012-09-21 Thread Dave Angel
On 09/21/2012 09:36 AM, echo.hp...@gmail.com wrote: > may i know how to shift the bits using only looping and branching?? Yes, show us your code, and what isn't working, and we'll try to help you complete the assignment. It'd probably also be good to specify the rest of the homework, like what ve

Re: How to apply the user's HTML environment in a Python programme?

2012-09-21 Thread BobAalsma
Op vrijdag 21 september 2012 15:36:11 UTC+2 schreef Jerry Hill het volgende: > On Fri, Sep 21, 2012 at 9:31 AM, BobAalsma wrote: > > > Thanks, Joel, yes, but as far as I'm aware these would all require the > > Python programme to have the user's username and password (or > > "credentials"), whic

Re: how to do draw pattern with python?

2012-09-21 Thread Mark Lawrence
On 21/09/2012 14:36, echo.hp...@gmail.com wrote: may i know how to shift the bits using only looping and branching?? xx .x..x. ..xx.. ..xx.. .x..x. xx xx ..x..x ...xx. ...xx. ..x..x xx .xx... x..x.. xx xx x..x.. .xx... etc.. You write some code and test it. If it d

Re: how to do draw pattern with python?

2012-09-21 Thread Laszlo Nagy
On 2012-09-21 15:36, echo.hp...@gmail.com wrote: may i know how to shift the bits using only looping and branching?? xx .x..x. ..xx.. ..xx.. .x..x. xx What kinds of bits? What are these points and x-es anyway? Are they strings? Or binary data? I recommend this for reading: http:

Re: Does python have built command for package skeleton creation?

2012-09-21 Thread Mark Lawrence
On 21/09/2012 14:13, xliiv wrote: On Friday, September 21, 2012 3:04:02 PM UTC+2, Tarek Ziadé wrote: On 9/21/12 2:14 PM, xliiv wrote: Python Paste is probably what you are looking for - see http://lucasmanual.com/mywiki/PythonPaste for example It's a nice beast but: - it's not

how to do draw pattern with python?

2012-09-21 Thread echo . hping
may i know how to shift the bits using only looping and branching?? xx .x..x. ..xx.. ..xx.. .x..x. xx xx ..x..x ...xx. ...xx. ..x..x xx .xx... x..x.. xx xx x..x.. .xx... etc.. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to apply the user's HTML environment in a Python programme?

2012-09-21 Thread Jerry Hill
On Fri, Sep 21, 2012 at 9:31 AM, BobAalsma wrote: > Thanks, Joel, yes, but as far as I'm aware these would all require the Python > programme to have the user's username and password (or "credentials"), which > I wanted to avoid. No matter what you do, your web service is going to have to authe

Re: How to apply the user's HTML environment in a Python programme?

2012-09-21 Thread BobAalsma
Op vrijdag 21 september 2012 15:23:14 UTC+2 schreef Joel Goldstick het volgende: > On Fri, Sep 21, 2012 at 8:57 AM, BobAalsma wrote: > > > I'd like to write a programme that will be offered as a web service > > (Django), in which the user will point to a specific URL and the programme > > will b

Re: How to apply the user's HTML environment in a Python programme?

2012-09-21 Thread Joel Goldstick
On Fri, Sep 21, 2012 at 8:57 AM, BobAalsma wrote: > I'd like to write a programme that will be offered as a web service (Django), > in which the user will point to a specific URL and the programme will be used > to read the text of that URL. > > This text can be behind a username/password, but f

Re: Does python have built command for package skeleton creation?

2012-09-21 Thread xliiv
On Friday, September 21, 2012 3:04:02 PM UTC+2, Tarek Ziadé wrote: > On 9/21/12 2:14 PM, xliiv wrote: > > > > > > Python Paste is probably what you are looking for - see > > > > > > http://lucasmanual.com/mywiki/PythonPaste for example > > > It's a nice beast but: > > > - it's not built in. S

Re: Does python have built command for package skeleton creation?

2012-09-21 Thread Tarek Ziadé
On 9/21/12 2:14 PM, xliiv wrote: Python Paste is probably what you are looking for - see http://lucasmanual.com/mywiki/PythonPaste for example It's a nice beast but: - it's not built in. Should it be? I think it should. You can suggest this to python-ideas but I really doubt you will get any t

How to apply the user's HTML environment in a Python programme?

2012-09-21 Thread BobAalsma
I'd like to write a programme that will be offered as a web service (Django), in which the user will point to a specific URL and the programme will be used to read the text of that URL. This text can be behind a username/password, but for several reasons, I don't want to know those. So I woul

Re: Python 3.3 and .pyo files

2012-09-21 Thread Steven D'Aprano
On Fri, 21 Sep 2012 11:10:07 +0200, Marco wrote: > I was trying to import a pyo module in Python 3.3, but Python does not > find it: > > $ echo "print(__file__)" > foo.py > $ python3.3 -O -m foo > /home/marco/temp/foo.py > $ ls > foo.py __pycache__ > $ rm foo.py > $ mv __pycache__/foo.cpython-33

Re: Does python have built command for package skeleton creation?

2012-09-21 Thread xliiv
On Friday, September 21, 2012 1:08:23 PM UTC+2, Tarek Ziadé wrote: > On 9/21/12 12:07 PM, xliiv wrote: > > > Like the topic.. . I found this: > > > > > > http://learnpythonthehardway.org/book/ex46.html > > > > > > it seems fine, but shouldn't be an interactive (with CLI API) script > > creati

Re: Does python have built command for package skeleton creation?

2012-09-21 Thread Tarek Ziadé
On 9/21/12 12:07 PM, xliiv wrote: Like the topic.. . I found this: http://learnpythonthehardway.org/book/ex46.html it seems fine, but shouldn't be an interactive (with CLI API) script creating that? It's a lot of effort for common work. I can contribute but i have to know that i'm not reinven

[WSGI] FCGID + Flup vs. mod_wsgi?

2012-09-21 Thread Gilles
Hello The shared host I intend to use to run a small Python web app only supports mod_fcgid on its Apache server. If I understood what I read on the Net, the ideal solution would be to have mod_wsgi installed and have it run either as a module within Apache or a stand-alone process to tal

Re: portable way of locating an executable (like which)

2012-09-21 Thread Hans Mulder
On 21/09/12 04:31:17, Dave Angel wrote: > On 09/20/2012 06:04 PM, Jason Swails wrote: >> On Thu, Sep 20, 2012 at 5:06 PM, Gelonida N wrote: >> >>> I'd like to implement the equivalent functionality of the unix command >>> /usr/bin/which >>> >>> The function should work under Linux and under window

Re: Functional way to compare things inside a list

2012-09-21 Thread Ulrich Eckhardt
Am 21.09.2012 00:58, schrieb thorso...@lavabit.com: list = [{'1': []}, {'2': []}, {'3': ['4', '5']}] I want to check for a value (e.g. '4'), and get the key of the dictionary that contains that value. Note: 1. list is a built-in type, who's name is rebound above 2. The list above contains dict

Python 3.3 and .pyo files

2012-09-21 Thread Marco
I was trying to import a pyo module in Python 3.3, but Python does not find it: $ echo "print(__file__)" > foo.py $ python3.3 -O -m foo /home/marco/temp/foo.py $ ls foo.py __pycache__ $ rm foo.py $ mv __pycache__/foo.cpython-33.pyo foo.pyo $ rm __pycache__ -r $ ls foo.pyo # The following works

Seome kind of unblocking input

2012-09-21 Thread janis . judvaitis
Hello! I'm building small console like program for embedded system control over serial port. Naturally I need to be able to recieve commands from user and print reply's from embedded device. Since I'm using threads and pipes everything works ok, except that when i call input() there is no way

Algorithms using Python?

2012-09-21 Thread Mayuresh Kathe
Is there a good book on foundational as well as advanced algorithms using Python? Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: "Development mode"

2012-09-21 Thread Tarek Ziadé
On 9/20/12 9:02 PM, py_lrnr wrote: I am new to python and I have come across the following command and its description: Now to be able to run the project you will need to install it and its >dependencies. python setup.py develop I looked up what the 'develop' argument does and found: Extra

Re: Functional way to compare things inside a list

2012-09-21 Thread Alexander Blinne
On 21.09.2012 00:58, thorso...@lavabit.com wrote: > Hi, > > list = [{'1': []}, {'2': []}, {'3': ['4', '5']}] > > I want to check for a value (e.g. '4'), and get the key of the dictionary > that contains that value. > (Yep, this is bizarre.) > > some_magic(list, '4') > => '3' > > What's the func

Re: Functional way to compare things inside a list

2012-09-21 Thread Chris Rebert
On Thu, Sep 20, 2012 at 3:58 PM, wrote: > Hi, > > list = [{'1': []}, {'2': []}, {'3': ['4', '5']}] Are the dictionaries each guaranteed to only contain a single key-value pair? (Or is your example just simplistic?) > I want to check for a value (e.g. '4'), and get the key of the dictionary > th

Re: Functional way to compare things inside a list

2012-09-21 Thread Ivan@work
On 21.09.2012 00:58, thorso...@lavabit.com wrote: Hi, list = [{'1': []}, {'2': []}, {'3': ['4', '5']}] I want to check for a value (e.g. '4'), and get the key of the dictionary that contains that value. (Yep, this is bizarre.) some_magic(list, '4') => '3' What's the functional way to do it? I

Re: Functional way to compare things inside a list

2012-09-21 Thread Chris Angelico
On Fri, Sep 21, 2012 at 6:28 PM, Chris Rebert wrote: > On Fri, Sep 21, 2012 at 1:23 AM, Chris Angelico wrote: >> On Fri, Sep 21, 2012 at 8:58 AM, wrote: > >> That gets the result, but probably not in the cleanest way. I'm not >> sure off-hand if Python has a convenient way to curry a function,

Re: Functional way to compare things inside a list

2012-09-21 Thread Chris Rebert
On Fri, Sep 21, 2012 at 1:23 AM, Chris Angelico wrote: > On Fri, Sep 21, 2012 at 8:58 AM, wrote: > That gets the result, but probably not in the cleanest way. I'm not > sure off-hand if Python has a convenient way to curry a function, http://docs.python.org/library/functools.html#functools.par

Re: Functional way to compare things inside a list

2012-09-21 Thread Chris Angelico
On Fri, Sep 21, 2012 at 8:58 AM, wrote: > Hi, > > list = [{'1': []}, {'2': []}, {'3': ['4', '5']}] > > I want to check for a value (e.g. '4'), and get the key of the dictionary > that contains that value. > (Yep, this is bizarre.) > > some_magic(list, '4') > => '3' > > What's the functional way t

Re: portable way of locating an executable (like which)

2012-09-21 Thread Tarek Ziadé
On 9/21/12 1:59 AM, Nobody wrote: On Thu, 20 Sep 2012 23:06:46 +0200, Gelonida N wrote: I'd like to implement the equivalent functionality of the unix command /usr/bin/which The function should work under Linux and under windows. Note that "which" attempts to emulate the behaviour of execvp()

  1   2   >