RE: [Tutor] Getting a Process.start() error pickle.PicklingError: Can't pickle : it's not found as __builtin__.module with Python 2.7

2024-09-03 Thread AVI GROSS via Python-list
tware or interest. -Original Message- From: Tutor On Behalf Of Alan Gauld via Tutor Sent: Tuesday, September 3, 2024 4:41 AM To: tu...@python.org Cc: python-list@python.org Subject: Re: [Tutor] Getting a Process.start() error pickle.PicklingError: Can't pickle : it's not found

Re: Getting a Process.start() error pickle.PicklingError: Can't pickle : it's not found as __builtin__.module with Python 2.7

2024-09-03 Thread geodandw via Python-list
On 9/2/24 11:36, Barry Scott wrote: On 2 Sep 2024, at 15:00, marc nicole via Python-list wrote: I am using Python 2.7 on Windows 10 Why? Install Python 3.12 and it will be easier to get help and support. If you have legacy that still needs porting then you can install 3.12 along side the

Re: [Tutor] Getting a Process.start() error pickle.PicklingError: Can't pickle : it's not found as __builtin__.module with Python 2.7

2024-09-03 Thread marc nicole via Python-list
ore or after the error message? It might make things easier to > debug(clearer error traceback) if you put the code to create the thread > into a separate function? > > def do_Something(text)... > > def start(fn): > q = Process >q.start() > > if __name_ >

Re: Getting a Process.start() error pickle.PicklingError: Can't pickle : it's not found as __builtin__.module with Python 2.7

2024-09-02 Thread Barry Scott via Python-list
> On 2 Sep 2024, at 15:00, marc nicole via Python-list > wrote: > > I am using Python 2.7 on Windows 10 Why? Install Python 3.12 and it will be easier to get help and support. If you have legacy that still needs porting then you can install 3.12 along side the unsupported 3.12. Barry --

Getting a Process.start() error pickle.PicklingError: Can't pickle : it's not found as __builtin__.module with Python 2.7

2024-09-02 Thread marc nicole via Python-list
PicklingError: Can't pickle : it's not found as __builtin__.module anybody could provide an alternative to call the function do_something() in a separate thread ? -- https://mail.python.org/mailman/listinfo/python-list

Re: In code, list.clear doesn't throw error - it's just ignored

2022-11-25 Thread Dan Stromberg
On Sun, Nov 13, 2022 at 4:45 PM DFS wrote: > In code, list.clear is just ignored. > At the terminal, list.clear shows > > > > in code: > x = [1,2,3] > x.clear > print(len(x)) > 3 > > at terminal: > x = [1,2,3] > x.clear > > print(len(x)) > 3 > > > Caused me an hour of frustration before I notic

Re: In code, list.clear doesn't throw error - it's just ignored

2022-11-23 Thread Chris Angelico
On Thu, 24 Nov 2022 at 06:26, Stefan Ram wrote: > > Jon Ribbens writes: > >If you want to catch this sort of mistake automatically then you need > >a linter such as pylint: > > output > > , line 1 > list.clear > Warning: Attribute used as statement. > > , line 5 > list.clear > Warning: Attribut

RE: In code, list.clear doesn't throw error - it's just ignored

2022-11-15 Thread avi.e.gross
: Python-list On Behalf Of Chris Angelico Sent: Tuesday, November 15, 2022 6:16 PM To: python-list@python.org Subject: Re: In code, list.clear doesn't throw error - it's just ignored On Wed, 16 Nov 2022 at 10:11, wrote: > > That is clear, Cameron, but on my python interpreter values

Re: In code, list.clear doesn't throw error - it's just ignored

2022-11-15 Thread Chris Angelico
On Wed, 16 Nov 2022 at 10:11, wrote: > > That is clear, Cameron, but on my python interpreter values evaluated on the > command line ARE saved: > > >>> numb = 5 > >>> 5 + numb > 10 > >>> numb > 5 > >>> _ + _ + 1 > 11 That's a REPL feature. ChrisA -- https://mail.python.org/mailman/listinfo/pyth

RE: In code, list.clear doesn't throw error - it's just ignored

2022-11-15 Thread avi.e.gross
I grant generally a naked evaluation is generally an error. LOL! -Original Message- From: Python-list On Behalf Of Cameron Simpson Sent: Tuesday, November 15, 2022 4:13 AM To: python-list@python.org Subject: Re: In code, list.clear doesn't throw error - it's just ignored On 15Nov

Re: In code, list.clear doesn't throw error - it's just ignored

2022-11-15 Thread Cameron Simpson
On 15Nov2022 00:45, avi.e.gr...@gmail.com wrote: What would be the meaning of an ordering relation determining what is MORE VALID? Are you asking what criterion would rate: clearx = x.clear as "more" valid than: x.clear on its own? I don't want to speak for the OP, but I'd think t

RE: In code, list.clear doesn't throw error - it's just ignored

2022-11-14 Thread avi.e.gross
22 9:34 PM To: python-list@python.org Subject: Re: In code, list.clear doesn't throw error - it's just ignored On 14Nov2022 19:15, Dennis Lee Bieber wrote: > There is also the minor facet that "x.clear" can be bound to a >different name... > >>>&g

Re: In code, list.clear doesn't throw error - it's just ignored

2022-11-14 Thread Cameron Simpson
On 14Nov2022 19:15, Dennis Lee Bieber wrote: There is also the minor facet that "x.clear" can be bound to a different name... x = [1, 2, 3.145926536, "Pie"] clearx = x.clear x [1, 2, 3.145926536, 'Pie'] clearx() x [] I think the OP would take the stance that this: clearx =

Re: In code, list.clear doesn't throw error - it's just ignored

2022-11-14 Thread Dennis Lee Bieber
On Tue, 15 Nov 2022 09:11:10 +1100, Cameron Simpson declaimed the following: >On 13Nov2022 22:23, DFS wrote: >>This is an easy check for the interpreter to make. > >It really isn't, given that (a) this isn't known by the interpreter to >be a `list` until runtime and (b) that would need embeddin

Re: In code, list.clear doesn't throw error - it's just ignored

2022-11-14 Thread Cameron Simpson
On 13Nov2022 22:23, DFS wrote: On 11/13/2022 9:11 PM, Chris Angelico wrote: [ ... `x.clear` ... ] No part of it is invalid, so nothing causes a problem. For instance, you can write this: If it wastes time like that it's invalid. It's a valid expression. It looks to your eye li

Re: In code, list.clear doesn't throw error - it's just ignored

2022-11-14 Thread Chris Angelico
On Tue, 15 Nov 2022 at 05:57, Stefan Ram wrote: > > Michael Speer writes: > >Python doesn't care what an expression returns. > > In my English, functions return values, > expression are being evaluated to a value. > The evaluation of a function yields or > produces a value. Expressions do

Re: In code, list.clear doesn't throw error - it's just ignored

2022-11-14 Thread Jon Ribbens via Python-list
On 2022-11-14, Stefan Ram wrote: > Jon Ribbens writes: >>"""Create an array and print its length""" >>array = [1, 2, 3] >>array.clear > > BTW: Above, there are /two/ expression statements > with no effect; the other one is > > """Create an array and print its length""" > > . Apparently, lin

Re: In code, list.clear doesn't throw error - it's just ignored

2022-11-14 Thread Weatherby,Gerard
you don’t: “Statement seems to have no effect and can be replaced with a function call to have effect” From: Python-list on behalf of DFS Date: Sunday, November 13, 2022 at 7:46 PM To: python-list@python.org Subject: In code, list.clear doesn't throw error - it's just ignored ***

Re: In code, list.clear doesn't throw error - it's just ignored

2022-11-14 Thread Karsten Hilbert
Am Mon, Nov 14, 2022 at 02:13:34AM + schrieb MRAB: > But if it's an expression where it's expecting a statement and it's not a > call, then > it's probably a bug. That "probably" makes it suitable for a linter, as was pointed out. Karsten -- GPG 4

Re: In code, list.clear doesn't throw error - it's just ignored

2022-11-14 Thread Roel Schroeven
tance, you can write this: If it wastes time like that it's invalid. It's not invalid. In the REPL for example, it does something useful: >>> x = [1, 2, 3] >>> x.clear Others have shown instances where writing a method or function without calling it are useful in

Re: In code, list.clear doesn't throw error - it's just ignored

2022-11-13 Thread dn
On 14/11/2022 12.12, DFS wrote: On 11/13/2022 5:20 PM, Jon Ribbens wrote: On 2022-11-13, DFS wrote: In code, list.clear is just ignored. At the terminal, list.clear shows in code: x = [1,2,3] x.clear print(len(x)) 3 at terminal: x = [1,2,3] x.clear print(len(x)) 3 Caused me an hour of f

Re: In code, list.clear doesn't throw error - it's just ignored

2022-11-13 Thread Chris Angelico
On Mon, 14 Nov 2022 at 18:00, Greg Ewing wrote: > > On 14/11/22 3:13 pm, MRAB wrote: > > But if it's an expression where it's expecting a statement and it's not > > a call, then it's probably a bug. > > The key word there is "probably". If t

Re: In code, list.clear doesn't throw error - it's just ignored

2022-11-13 Thread Greg Ewing
On 14/11/22 3:13 pm, MRAB wrote: But if it's an expression where it's expecting a statement and it's not a call, then it's probably a bug. The key word there is "probably". If there's any chance it could be not a bug, it can't be an error. At most

Re: In code, list.clear doesn't throw error - it's just ignored

2022-11-13 Thread Michael Speer
t; $ cat test.py > >>> """Create an array and print its length""" > >>> > >>> array = [1, 2, 3] > >>> array.clear > >>> print(len(array)) > >>> $ pylint -s n test.py > >

Re: In code, list.clear doesn't throw error - it's just ignored

2022-11-13 Thread DFS
why is it allowed in the first place? I stared at list.clear and surrounding code a dozen times and said "Looks right! Why isn't it clearing the list?!?!" 2 parens later and I'm golden! No part of it is invalid, so nothing causes a problem. For instance, you can write this:

Re: In code, list.clear doesn't throw error - it's just ignored

2022-11-13 Thread Jon Ribbens via Python-list
On 2022-11-14, Greg Ewing wrote: > On 14/11/22 1:31 pm, Jon Ribbens wrote: >> On 2022-11-13, DFS wrote: >>> But why is it allowed in the first place? >> >> Because it's an expression, and you're allowed to execute expressions. > > To put it a bit

Re: In code, list.clear doesn't throw error - it's just ignored

2022-11-13 Thread Chris Angelico
On Mon, 14 Nov 2022 at 13:18, MRAB wrote: > > On 2022-11-14 00:55, Greg Ewing wrote: > > On 14/11/22 1:31 pm, Jon Ribbens wrote: > >> On 2022-11-13, DFS wrote: > >>> But why is it allowed in the first place? > >> > >> Because it's

Re: In code, list.clear doesn't throw error - it's just ignored

2022-11-13 Thread MRAB
On 2022-11-14 00:55, Greg Ewing wrote: On 14/11/22 1:31 pm, Jon Ribbens wrote: On 2022-11-13, DFS wrote: But why is it allowed in the first place? Because it's an expression, and you're allowed to execute expressions. To put it a bit more clearly, you're allowed to evaluat

Re: In code, list.clear doesn't throw error - it's just ignored

2022-11-13 Thread Chris Angelico
On Mon, 14 Nov 2022 at 11:53, DFS wrote: > > On 11/13/2022 5:20 PM, Jon Ribbens wrote: > > On 2022-11-13, DFS wrote: > >> In code, list.clear is just ignored. > >> At the terminal, list.clear shows > >> > >> > >> > >> in code: > >> x = [1,2,3] > >> x.clear > >> print(len(x)) > >> 3 > >> > >> at

Re: In code, list.clear doesn't throw error - it's just ignored

2022-11-13 Thread Greg Ewing
On 14/11/22 1:31 pm, Jon Ribbens wrote: On 2022-11-13, DFS wrote: But why is it allowed in the first place? Because it's an expression, and you're allowed to execute expressions. To put it a bit more clearly, you're allowed to evaluate an expression and ignore the r

Re: In code, list.clear doesn't throw error - it's just ignored

2022-11-13 Thread Jon Ribbens via Python-list
>"""Create an array and print its length""" >> >>array = [1, 2, 3] >>array.clear >>print(len(array)) >>$ pylint -s n test.py >>* Module test >>test.py:4:0: W0104: Statement seems to have no effect >> (pointless-statement) > > > Thanks, I should use linters more often. > > But why is it allowed in the first place? Because it's an expression, and you're allowed to execute expressions. -- https://mail.python.org/mailman/listinfo/python-list

Re: In code, list.clear doesn't throw error - it's just ignored

2022-11-13 Thread DFS
On 11/13/2022 5:20 PM, Jon Ribbens wrote: On 2022-11-13, DFS wrote: In code, list.clear is just ignored. At the terminal, list.clear shows in code: x = [1,2,3] x.clear print(len(x)) 3 at terminal: x = [1,2,3] x.clear print(len(x)) 3 Caused me an hour of frustration before I noticed list.

Re: In code, list.clear doesn't throw error - it's just ignored

2022-11-13 Thread Jon Ribbens via Python-list
On 2022-11-13, DFS wrote: > In code, list.clear is just ignored. > At the terminal, list.clear shows > > > > in code: > x = [1,2,3] > x.clear > print(len(x)) > 3 > > at terminal: > x = [1,2,3] > x.clear > > print(len(x)) > 3 > > > Caused me an hour of frustration before I noticed list.clear() was

In code, list.clear doesn't throw error - it's just ignored

2022-11-13 Thread DFS
In code, list.clear is just ignored. At the terminal, list.clear shows in code: x = [1,2,3] x.clear print(len(x)) 3 at terminal: x = [1,2,3] x.clear print(len(x)) 3 Caused me an hour of frustration before I noticed list.clear() was what I needed. x = [1,2,3] x.clear() print(len(x)) 0 --

Re: when I open a python idle it's constantly showing subprocess connection error

2022-09-20 Thread Mats Wichmann
On 9/20/22 09:36, asika wrote: Sent from [1]Mail for Windows References Visible links 1. https://go.microsoft.com/fwlink/?LinkId=550986 dunno if you were trying to send screenshots or something, that doesn't work here. Try: https://docs.python.org/3/libra

when I open a python idle it's constantly showing subprocess connection error

2022-09-20 Thread asika
    Sent from [1]Mail for Windows   References Visible links 1. https://go.microsoft.com/fwlink/?LinkId=550986 -- https://mail.python.org/mailman/listinfo/python-list

Re: when the new version of XPN py2 newsreader src-tarball hits alt.binaries, the world will hold it's breath

2018-01-03 Thread a
py2 now, gotta fix that one -- https://mail.python.org/mailman/listinfo/python-list

when the new version of XPN py2 newsreader src-tarball hits alt.binaries, the world will hold it's breath

2018-01-03 Thread XPN
when the new version of XPN py2 newsreader src-tarball hits alt.binaries, the world will hold it's breath. major usability overhaul is ongoing. release will be in style in usenet binary newsgroup. full autoconfigure, no bs asked. -- https://mail.python.org/mailman/listinfo/python-list

Re: How does CPython build it's NEWS or changelog?

2017-09-21 Thread Ben Finney
Stefan Behnel writes: > https://docs.python.org/devguide/committing.html#what-s-new-and-news-entries > > https://github.com/larryhastings/blurb Also of interest is the more general-use Town Crier tool: towncrier is a utility to produce useful, summarised news files for your project. Rat

Re: How does CPython build it's NEWS or changelog?

2017-09-21 Thread Stefan Behnel
Hartmut Goebel schrieb am 21.09.2017 um 10:59: > I just discovered that CPython now uses Misc/NEWS.d/next to collect > changes an there are a lot of Misc/NEWS/*.rst files for the respective > released version. I'm investigating whether to adopt this for PyInstaller. > > What is the tooling for thi

Re: How does CPython build it's NEWS or changelog?

2017-09-21 Thread Paul Moore
On 21 September 2017 at 09:59, Hartmut Goebel wrote: > Hello, > > I just discovered that CPython now uses Misc/NEWS.d/next to collect > changes an there are a lot of Misc/NEWS/*.rst files for the respective > released version. I'm investigating whether to adopt this for PyInstaller. > > What is th

Re: How does CPython build it's NEWS or changelog?

2017-09-21 Thread Skip Montanaro
> I just discovered that CPython now uses Misc/NEWS.d/next to collect > changes an there are a lot of Misc/NEWS/*.rst files for the respective > released version. I'm investigating whether to adopt this for PyInstaller. > > What is the tooling for this? Is there some documentation, maybe a > mailin

How does CPython build it's NEWS or changelog?

2017-09-21 Thread Hartmut Goebel
Hello, I just discovered that CPython now uses Misc/NEWS.d/next to collect changes an there are a lot of Misc/NEWS/*.rst files for the respective released version. I'm investigating whether to adopt this for PyInstaller. What is the tooling for this? Is there some documentation, maybe a mailingsl

Embedding python, run a function and get it's result

2017-01-31 Thread Charles Heizer
Hello, I'm messing around with the embedded python and I can get parts to work. What I'm having a hard time is getting my head around calling a function in the python string and getting it's result. Question, how do I load the python script and call runMe() and get it's valu

it's posible? raw audio encoder to vorbis

2015-11-30 Thread Heber Futuri
Receipt from websocket server audio raw and I want to encode ogg help! :( from websocket_server import WebsocketServer # Called when a client sends a messagedef data_received(client, server, datos): #HERE encoder "datos" to ogg and save data PORT=9001 server = WebsocketServer(PORT) server.s

Re: (Still OT) It's not the size of the vocabulary that matters, but what you do with it [was Re: Python Worst Practices]

2015-03-01 Thread Chris Angelico
you could do worse than deposit him somewhere in the Western Australian desert. It's kinda like sending him to hell, only the postage is cheaper. ChrisA -- https://mail.python.org/mailman/listinfo/python-list

Re: (Still OT) It's not the size of the vocabulary that matters, but what you do with it [was Re: Python Worst Practices]

2015-03-01 Thread Paul Rubin
Steven D'Aprano writes: > The Aussie replies “Ah yes, I had a car like that once. American-made, is > it?” Is it true that in Australia, the number of the beast is 999? -- https://mail.python.org/mailman/listinfo/python-list

(Still OT) It's not the size of the vocabulary that matters, but what you do with it [was Re: Python Worst Practices]

2015-03-01 Thread Steven D'Aprano
Dennis Lee Bieber wrote: > Well... when we've got states bigger than some countries... A Texan farmer goes to Australia on vacation. There he meets an Aussie farmer and gets to talking. They walk around the farm a little, and the Aussie shows off his herd of cattle. The Texan immediately replie

SMITHSONIAN HAS IT'S LAST WORDS...

2013-07-14 Thread LOUZY
=== A TOUCHY SUBJECT... === > A WILY THRINAXODON SUED THE SMITHSONIAN FIVE HUNDRED DOLLARS FOR SUPPRESSION OF FREEDOM OF EXPRESSION. > "This is a blow to evolutionism," SAID RICHARD DAWKINS. > ONE WHOM THRINAXODON HAS HAD SEVERAL *long* RUNNING FEUDS OVER

Re: IndentationError: expected an indented block but it's there

2013-05-29 Thread Chris Angelico
On Wed, May 29, 2013 at 2:53 AM, Peter Otten <__pete...@web.de> wrote: > Chris Angelico wrote: > >> On Wed, May 29, 2013 at 2:19 AM, Peter Otten <__pete...@web.de> wrote: >>> Solution: configure your editor to use four spaces for indentation. >> >> ITYM eight spaces. > > I meant: one hit of the Tab

Re: IndentationError: expected an indented block but it's there

2013-05-28 Thread Peter Otten
Chris Angelico wrote: > On Wed, May 29, 2013 at 2:19 AM, Peter Otten <__pete...@web.de> wrote: >> Solution: configure your editor to use four spaces for indentation. > > ITYM eight spaces. I meant: one hit of the Tab key should add spaces up to the next multiple of four. Which implies > But t

Re: IndentationError: expected an indented block but it's there

2013-05-28 Thread Chris Angelico
On Wed, May 29, 2013 at 2:19 AM, Peter Otten <__pete...@web.de> wrote: > Solution: configure your editor to use four spaces for indentation. ITYM eight spaces. But the real solution is to not mix tabs and spaces. Stick to one or the other and you're safe. ChrisA -- http://mail.python.org/mailman

Re: IndentationError: expected an indented block but it's there

2013-05-28 Thread Peter Otten
JackM wrote: > Having a problem getting a py script to execute. Got this error: > > File "/scripts/blockIPv4.py", line 19 > ip = line.split(';')[0] > ^ > IndentationError: expected an indented block > > > I'm perplexed because the code that the error refers to *is* indented: > > >

Re: IndentationError: expected an indented block but it's there

2013-05-28 Thread Steven D'Aprano
On Tue, 28 May 2013 11:32:06 -0400, JackM wrote: > Having a problem getting a py script to execute. Got this error: > > File "/scripts/blockIPv4.py", line 19 > ip = line.split(';')[0] > ^ > IndentationError: expected an indented block > > > I'm perplexed because the code that the err

Re: IndentationError: expected an indented block but it's there

2013-05-28 Thread Michael Torrie
On 05/28/2013 09:32 AM, JackM wrote: > Having a problem getting a py script to execute. Got this error: > > File "/scripts/blockIPv4.py", line 19 > ip = line.split(';')[0] > ^ > IndentationError: expected an indented block > I'm perplexed because the code that the error refers to *is* i

IndentationError: expected an indented block but it's there

2013-05-28 Thread JackM
Having a problem getting a py script to execute. Got this error: File "/scripts/blockIPv4.py", line 19 ip = line.split(';')[0] ^ IndentationError: expected an indented block I'm perplexed because the code that the error refers to *is* indented: with open('/var/www/html/mydomain.com/

Re: Processing user input as it's entered

2013-03-26 Thread Sven
On 26 March 2013 14:41, Arnaud Delobelle wrote: > On 26 March 2013 10:07, Sven wrote: > > Hello, > > > > Is there a way (ideally cross platform but a *nix OS solution would be > > great) to process user input as they type? > > What I aim to achieve is to count the number of characters a user has

Re: Processing user input as it's entered

2013-03-26 Thread Arnaud Delobelle
On 26 March 2013 10:07, Sven wrote: > Hello, > > Is there a way (ideally cross platform but a *nix OS solution would be > great) to process user input as they type? > What I aim to achieve is to count the number of characters a user has > entered and display it while they are typing. The entered t

Processing user input as it's entered

2013-03-26 Thread Sven
Hello, Is there a way (ideally cross platform but a *nix OS solution would be great) to process user input as they type? What I aim to achieve is to count the number of characters a user has entered and display it while they are typing. The entered text will also need to be captured once the user

Re: Converting a number back to it's original string (that was hashed to generate that number)

2013-01-23 Thread Ferrous Cranus
tring to a number. Can this be decoded > > back? I gues that can also be decoded-converted back because its not losing > > any information. Its encoding, not compressing. > > > > > > But it's the % modulo that breaks the forth/back association

Re: Converting a number back to it's original string (that was hashed to generate that number)

2013-01-23 Thread Dave Angel
( string ) ) can encode a string to a number. Can this be decoded back? I gues that can also be decoded-converted back because its not losing any information. Its encoding, not compressing. But it's the % modulo that breaks the forth/back association. So, the question is: HOW to map both

Re: Converting a number back to it's original string (that was hashed to generate that number)

2013-01-23 Thread Ferrous Cranus
n this be decoded back? I gues that can also be decoded-converted back because its not losing any information. Its encoding, not compressing. But it's the % modulo that breaks the forth/back association. So, the question is: HOW to map both ways, in a one to one relation, (5-digit-intege

Re: Converting a number back to it's original string (that was hashed to generate that number)

2013-01-23 Thread newspost2012
please don't feed the troll. cu, Kurt -- http://mail.python.org/mailman/listinfo/python-list

Re: Converting a number back to it's original string (that was hashed to generate that number)

2013-01-23 Thread Lele Gaifax
Ferrous Cranus writes: > pin = int( htmlpage.encode("hex"), 16 ) % 10 > > Now i need the opposite procedure. As already said several times by different persons in this thread, there is no way you can get the original string that originated a particular “pin”: the function you are using is “l

Converting a number back to it's original string (that was hashed to generate that number)

2013-01-23 Thread Ferrous Cranus
Now my website finally works as intended. Just visit the following links plz. -- 1. http://superhost.gr 2. http://superhost.gr/?show=log 3. http://i.imgur.com/89Eqmtf.png (this displays the database's column 'pin',

Re: it's really strange.how does it work?

2012-08-14 Thread Chris Rebert
On Tue, Aug 14, 2012 at 10:07 PM, levi nie wrote: > ok,what does "start, stop = 0, start" in the code mean? > it's really strange.how does it work? It's just parallel assignment (http://en.wikipedia.org/wiki/Assignment_%28computer_science%29#Parallel_assignment ).

Re: it's really strange.how does it work?

2012-08-14 Thread Ramchandra Apte
Even I got confused a bit: explaination: this is called iterable unpacking `start, stop = 0, start` is the same as: temp = start start = 0 stop = temp On 15 August 2012 10:37, levi nie wrote: > ok,what does "start, stop = 0, start" in the code mean? > it's really str

it's really strange.how does it work?

2012-08-14 Thread levi nie
ok,what does "start, stop = 0, start" in the code mean? it's really strange.how does it work? code: def interval(start, stop=None, step=1): 'Imitates range() for step > 0' if stop is None: start, stop = 0, start result = []

Strings show as brackets with a 'u'. Hi, ...[u'174'] ...Probably newbie question but not sure how suppress the brackets and the 'u' ? I assume pyhon is telling me it's a unicode string in the n variab

2011-07-24 Thread Saranya Sweet
http://123maza.com/65/beauty147/ -- http://mail.python.org/mailman/listinfo/python-list

Re: How do you print a string after it's been searched for an RE?

2011-06-23 Thread John Salerno
On Jun 23, 4:47 pm, "Thomas L. Shinnick" wrote: > There is also >        print(match_obj.string) > which gives you a copy of the string searched.  See end of section > 6.2.5. Match Objects I tried that, but the only time I wanted the string printed was when there *wasn't* a match, so the match ob

Re: How do you print a string after it's been searched for an RE?

2011-06-23 Thread Thomas L. Shinnick
ry to print it directly, it's an empty string, I assume because it has been "consumed." How do I prevent this? It seems to work fine for this 2.x code: import urllib.request import re next_nothing = '12345' pc_url = 'http://www.pythonchallenge.com/pc/def/linkedlist.ph

Re: How do you print a string after it's been searched for an RE?

2011-06-23 Thread John Salerno
On Jun 23, 3:47 pm, Ian Kelly wrote: > On Thu, Jun 23, 2011 at 1:58 PM, John Salerno wrote: > > After I've run the re.search function on a string and no match was > > found, how can I access that string? When I try to print it directly, > > it's an empty strin

Re: How do you print a string after it's been searched for an RE?

2011-06-23 Thread Ian Kelly
On Thu, Jun 23, 2011 at 1:58 PM, John Salerno wrote: > After I've run the re.search function on a string and no match was > found, how can I access that string? When I try to print it directly, > it's an empty string, I assume because it has been "consumed." How d

How do you print a string after it's been searched for an RE?

2011-06-23 Thread John Salerno
After I've run the re.search function on a string and no match was found, how can I access that string? When I try to print it directly, it's an empty string, I assume because it has been "consumed." How do I prevent this? It seems to work fine for this 2.x code: import urll

Re: Standardizing RPython - it's time.

2010-10-13 Thread Carl Friedrich Bolz
Hi John, John Nagle animats.com> writes: > All attempts to make the dialect defined by CPython significantly > faster have failed. PyPy did not achieve much of a speed > improvement over CPython, and is sometimes slower. This is not true. While PyPy is indeed sometimes slower than CPython

Re: Standardizing RPython - it's time.

2010-10-12 Thread Stefan Behnel
Stefan Behnel, 12.10.2010 09:18: If you implemented an RPython to CPython extension compiler, [...] BTW, if anyone wanted to do that, it might be a good idea to start with Cython, adapt its type inference layer and add the few missing Python language features (or pay the core developers to d

Re: Standardizing RPython - it's time.

2010-10-12 Thread Nils Ruettershoff
On 10/12/2010 05:18 PM, Nils Ruettershoff wrote: Hi, On 10/12/2010 07:41 AM, John Nagle wrote: [...] With Unladen Swallow looking like a failed IT project, a year behind schedule and not delivering anything like the promised performance, Google management may pull the plug on funding. Since

Re: Standardizing RPython - it's time.

2010-10-12 Thread Nils Ruettershoff
Hi, On 10/12/2010 07:41 AM, John Nagle wrote: [...] With Unladen Swallow looking like a failed IT project, a year behind schedule and not delivering anything like the promised performance, Google management may pull the plug on funding. Since there hasn't been a "quarterly release" in a year

Re: Standardizing RPython - it's time.

2010-10-12 Thread Stefan Behnel
John Nagle, 11.10.2010 22:01: It may be time to standardize "RPython". There are at least three implementations of "RPython" variants - PyPy, Shed Skin, and RPython for LLVM. The first two are up and running. The thing is, while RPython can be seen as a general purpose programming language,

Re: Standardizing RPython - it's time.

2010-10-11 Thread alex23
John Nagle wrote: >      All the schemes to speed up Python as defined by CPython seem to hit > a wall on speed improvement.  Some of the numeric benchmarks go faster > on implementations that don't box all numbers, but 2x seems to be about > as good as it gets, even with a JIT compiler. That has

Re: Standardizing RPython - it's time.

2010-10-11 Thread John Nagle
On 10/11/2010 1:47 PM, Ryan Kelly wrote: On Mon, 2010-10-11 at 13:01 -0700, John Nagle wrote: It may be time to standardize "RPython". There are at least three implementations of "RPython" variants - PyPy, Shed Skin, and RPython for LLVM. The first two are up and running. There's a theory

Re: Standardizing RPython - it's time.

2010-10-11 Thread Ryan Kelly
On Mon, 2010-10-11 at 13:01 -0700, John Nagle wrote: > It may be time to standardize "RPython". > >There are at least three implementations of "RPython" variants - PyPy, > Shed Skin, and RPython for LLVM. The first two are up and running. > There's a theory paper on the subject: > > http://c

Re: Standardizing RPython - it's time.

2010-10-11 Thread John Nagle
On 10/11/2010 1:01 PM, John Nagle wrote: (Correct Shed Skin tutorial link) > Shed Skin: > http://shedskin.googlecode.com/files/shedskin-tutorial-0.3.html -- http://mail.python.org/mailman/listinfo/python-list

Re: Standardizing RPython - it's time.

2010-10-11 Thread Jed Smith
On Mon, Oct 11, 2010 at 4:01 PM, John Nagle wrote: > file:///C:/Users/nagle/AppData/Local/Temp/shedskin-tutorial-0.3.html This gives me a 404. Your Web server is broken! Fix it! ;) Temporarily mirrored: http://jedsmith.org/tmp/shedskin-tutorial-0.5.html -- Jed Smith j...@jedsmith.org -- http

Standardizing RPython - it's time.

2010-10-11 Thread John Nagle
It may be time to standardize "RPython". There are at least three implementations of "RPython" variants - PyPy, Shed Skin, and RPython for LLVM. The first two are up and running. There's a theory paper on the subject: http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.142.1457&rep=rep

[SOLVED]: Copying a file with a question mark in it's name in Windows

2010-08-17 Thread drodrig
On Aug 12, 9:16 am, Aleksey wrote: > On 12 авг, 18:49,drodrig wrote: > > > A python script I use to backup files on a Windows 2003 server > > occasionally fails to retrieve the size of a file with a question mark > > in the name. The exception I get is "OSError #123 The filename, > > directory nam

Re: Copying a file with a question mark in it's name in Windows

2010-08-12 Thread Aleksey
On 12 авг, 18:49, drodrig wrote: > A python script I use to backup files on a Windows 2003 server > occasionally fails to retrieve the size of a file with a question mark > in the name. The exception I get is "OSError #123 The filename, > directory name, or volume label syntax is incorrect". I rea

Re: Copying a file with a question mark in it's name in Windows

2010-08-12 Thread Tim Golden
get a question mark into a file name; even using the file namespace prefix \\?\ doesn't allow it as far as I can tell. Where are you seeing the question mark? Is it possible it's a placeholder for an unprintable character rather than an actual question mark? TJG -- http://mail.python.org/mailman/listinfo/python-list

Copying a file with a question mark in it's name in Windows

2010-08-12 Thread drodrig
on mark in the name of a file on Windows is illegal, but nevertheless these files exist on the file system. It seems that they are created by Office 2007 Word, for the most part. The line that fails is: os.path.getsize(source) Where source is the full path to the file with the question mark in

It's a fact not lost on the opportunity to see yourself

2010-04-12 Thread a m
http://www.google.com/url?sa=D&q=http://osamah2000.jeeran.com/daauageralmuslmeen1.htm&usg=AFQjCNGQhhGz-1TGv9Y7gE8zKwHHustJCg -- http://mail.python.org/mailman/listinfo/python-list

It's a fact not lost on the opportunity to see yourself

2010-04-11 Thread a m
http://www.google.com/url?sa=D&q=http://osamah2000.jeeran.com/daauageralmuslmeen1.htm&usg=AFQjCNGQhhGz-1TGv9Y7gE8zKwHHustJCg -- http://mail.python.org/mailman/listinfo/python-list

It's a fact not lost on the opportunity to see yourself

2010-03-30 Thread a m
http://www.google.com/url?sa=D&q=http://www.google.com/url%3Fsa%3DD%26q%3Dhttp://osamah2000.jeeran.com/daauageralmuslmeen1.htm%26usg%3DAFQjCNGQhhGz-1TGv9Y7gE8zKwHHustJCg&usg=AFQjCNH5ZzXRqkh5EGL1dsjQxcjNQCmAEQ -- http://mail.python.org/mailman/listinfo/python-list

Re: installing something to a virtualenv when it's already in site-packages

2010-03-19 Thread Rolando Espinoza La Fuente
On Fri, Mar 19, 2010 at 4:05 AM, nbv4 wrote: > I have ipython installed via apt. I can go to the command line and > type 'ipython' and it will work. If I try to install ipython to a > virtualenv, I get this: > > $ pip install -E env/ ipython > Requirement already satisfied: ipython in /usr/share/p

installing something to a virtualenv when it's already in site-packages

2010-03-19 Thread nbv4
I have ipython installed via apt. I can go to the command line and type 'ipython' and it will work. If I try to install ipython to a virtualenv, I get this: $ pip install -E env/ ipython Requirement already satisfied: ipython in /usr/share/pyshared Installing collected packages: ipython Successful

Hi, I know it's stupid, but does your foreigner do a lot of OT work?

2010-02-25 Thread Gao
I'm Chinese, I'm working in a famous vendor company which let employee do a lot of OT work, 2 more hours per day, and sometime work in weekend. Is that the same in USA and European? -- http://mail.python.org/mailman/listinfo/python-list

Re: __import__ returns module without it's attributes?

2009-11-15 Thread Gabriel Genellina
En Fri, 13 Nov 2009 20:27:29 -0300, Zac Burns escribió: I've overloaded __import__ to modify modules after they are imported... but running dir(module) on the result only returns __builtins__, __doc__, __file__, __name__, __package__, and __path__. Why is this? More importantly, where can I ho

Re: __import__ returns module without it's attributes?

2009-11-14 Thread Dave Angel
Zac Burns wrote: I've overloaded __import__ to modify modules after they are imported... but running dir(module) on the result only returns __builtins__, __doc__, __file__, __name__, __package__, and __path__. Why is this? More importantly, where can I hook in that would allow me to see the co

__import__ returns module without it's attributes?

2009-11-13 Thread Zac Burns
I've overloaded __import__ to modify modules after they are imported... but running dir(module) on the result only returns __builtins__, __doc__, __file__, __name__, __package__, and __path__. Why is this? More importantly, where can I hook in that would allow me to see the contents of the module?

Why does Python not stop when it's supposed to?

2009-07-15 Thread Mensanator
So, I'm playing around with Python (running 2.6 and 3.1 versions of IDLE). After I shut everything down and close the windows, I notice the Task Manager's activity light is still glowing. In looking at the Process window I see this: Image...User Name CPU Memory(... Description pythonw.exe me

Re: way for a function to understand whether it's being run through a OnCreate callback or not

2009-07-10 Thread Martin Vilcans
On Fri, Jul 10, 2009 at 8:18 AM, slamdunk wrote: > is there a way for a function to understand whether it's being run > through a OnCreate callback or not? > I have working functions that I want to recycle through the OnCreate > but need to catch the "nuke.thisNode()"

  1   2   3   4   >