Re: can I overload operators like "=>", "->" or something like that?

2012-04-19 Thread Ben Finney
alex23 writes: > On Apr 20, 5:54 am, Jacob MacDonald wrote: > > > On Thursday, April 19, 2012 12:28:50 PM UTC-7, dmitrey wrote: > > > can I somehow overload operators like "=>", "->" or something like > > > that? > > I don't believe that you could overload those particular operators, > > since t

Re: can I overload operators like "=>", "->" or something like that?

2012-04-19 Thread Karl Knechtel
On Fri, Apr 20, 2012 at 12:43 AM, Chris Angelico wrote: > On Fri, Apr 20, 2012 at 2:38 PM, alex23 wrote: >> On Apr 20, 5:54 am, Jacob MacDonald wrote: >> >>> On Thursday, April 19, 2012 12:28:50 PM UTC-7, dmitrey wrote: >>> > can I somehow overload operators like "=>", "->" or something like >>>

Re: can I overload operators like "=>", "->" or something like that?

2012-04-19 Thread Karl Knechtel
On Thu, Apr 19, 2012 at 3:28 PM, dmitrey wrote: > hi all, > can I somehow overload operators like "=>", "->" or something like > that? (I'm searching for appropriate overload for logical implication > "if a then b") > Thank you in advance, D. > -- > http://mail.python.org/mailman/listinfo/python-l

Re: can I overload operators like "=>", "->" or something like that?

2012-04-19 Thread Chris Angelico
On Fri, Apr 20, 2012 at 2:38 PM, alex23 wrote: > On Apr 20, 5:54 am, Jacob MacDonald wrote: > >> On Thursday, April 19, 2012 12:28:50 PM UTC-7, dmitrey wrote: >> > can I somehow overload operators like "=>", "->" or something like >> > that? > >> I don't believe that you could overload those part

Re: can I overload operators like "=>", "->" or something like that?

2012-04-19 Thread alex23
On Apr 20, 5:54 am, Jacob MacDonald wrote: > On Thursday, April 19, 2012 12:28:50 PM UTC-7, dmitrey wrote: > > can I somehow overload operators like "=>", "->" or something like > > that? > I don't believe that you could overload those particular operators, > since to my knowledge they do not ex

Re: Twisted: UDP socket not closed.

2012-04-19 Thread MRAB
On 20/04/2012 02:29, Luther Edwards wrote: Did anyone in the group ever have an answer to Kevac’s question, I’m having a similar issue? Thanks in advance, Luther After a brief look at the documentation, I can only suggest that you try the .loseConnection method. [Python] Twisted: UDP socke

Twisted: UDP socket not closed.

2012-04-19 Thread Luther Edwards
Did anyone in the group ever have an answer to Kevac's question, I'm having a similar issue? Thanks in advance, Luther [Python] Twisted: UDP socket not closed. [cid:image001.png@01CD1E6B.15DF6BB0] Kevac Marko

Re: How do you refer to an iterator in docs?

2012-04-19 Thread Terry Reedy
On 4/19/2012 6:16 PM, Cameron Simpson wrote: On 19Apr2012 18:07, Terry Reedy wrote: | On 4/19/2012 5:32 PM, Cameron Simpson wrote: |> On 19Apr2012 14:32, Terry Reedy wrote: |> | On 4/19/2012 11:51 AM, Jacob MacDonald wrote: |> |> When I talk about an iterable, I say "iterable". |> | |>

Re: Suggest design to accomodate non-unix platforms ?

2012-04-19 Thread Chris Angelico
On Fri, Apr 20, 2012 at 8:35 AM, Dan Stromberg wrote: > It's not nearly as adaptive as scaning $PATH for ssh, falling back on putty > if necessary - this is analogous to GNU autoconf.  You'd probably have a > small class you genericize this with - with one instance for each such > executable that

Re: with statement

2012-04-19 Thread Ethan Furman
Ian Kelly wrote: On Thu, Apr 19, 2012 at 3:33 PM, Terry Reedy wrote: On 4/19/2012 1:15 PM, Kiuhnm wrote: A with statement is not at the module level only if it appears inside a function definition or a class definition. This is true, I believe, of all statements. Am I forgetting something?

Re: Suggest design to accomodate non-unix platforms ?

2012-04-19 Thread Dan Stromberg
On Wed, Apr 18, 2012 at 5:16 PM, Miki Tebeka wrote: > > So I'm interested in suggestions/examples where a user can update a > > config file to specify by which means they want (in this case) the ssh > > functionality to be supplied. > You can do something like that (it's called a factory): > > CO

Re: with statement

2012-04-19 Thread Ian Kelly
On Thu, Apr 19, 2012 at 3:33 PM, Terry Reedy wrote: > On 4/19/2012 1:15 PM, Kiuhnm wrote: >> >> A with statement is not at the module level only if it appears inside a >> function definition or a class definition. > > > This is true, I believe, of all statements. > >> Am I forgetting something? >

Re: How do you refer to an iterator in docs?

2012-04-19 Thread Cameron Simpson
On 19Apr2012 18:07, Terry Reedy wrote: | On 4/19/2012 5:32 PM, Cameron Simpson wrote: | > On 19Apr2012 14:32, Terry Reedy wrote: | > | On 4/19/2012 11:51 AM, Jacob MacDonald wrote: | > |> When I talk about an iterable, I say "iterable". | > | | > | Ditto. | > | > I used to, but find myself sayin

Re: How do you refer to an iterator in docs?

2012-04-19 Thread Terry Reedy
On 4/19/2012 5:32 PM, Cameron Simpson wrote: On 19Apr2012 14:32, Terry Reedy wrote: | On 4/19/2012 11:51 AM, Jacob MacDonald wrote: |> When I talk about an iterable, I say "iterable". | | Ditto. I used to, but find myself saying "sequence" these days. It reads better, but is it the same thing?

Re: Regular expressions, help?

2012-04-19 Thread Andy
If you plan on doing more work with regular expressions in the future and you have access to a Windows machine you may want to consider picking up a copy of RegxBuddy. I don't have any affiliation with the makers but I have been using the software for a few years and it has saved me a lot of fru

Re: with statement

2012-04-19 Thread Terry Reedy
On 4/19/2012 1:15 PM, Kiuhnm wrote: A with statement is not at the module level only if it appears inside a function definition or a class definition. This is true, I believe, of all statements. Am I forgetting something? Comprehensions (in Py3) and lambda expressions also introduce new loc

Re: How do you refer to an iterator in docs?

2012-04-19 Thread Cameron Simpson
On 19Apr2012 14:32, Terry Reedy wrote: | On 4/19/2012 11:51 AM, Jacob MacDonald wrote: | > When I talk about an iterable, I say "iterable". | | Ditto. I used to, but find myself saying "sequence" these days. It reads better, but is it the same thing? Cheers, -- Cameron Simpson DoD#743 http://

*.sdf database access

2012-04-19 Thread Page3D
Hi, I am trying to connect and access data in a *.sdf file on Win7 system using Python 2.7. I have three questions: 1. What python module should I use? I have looked at sqlite3 and pyodbc. However, I can seem to get the connection to the database file setup properly. 2. How can I determine the ap

Re: os.system()

2012-04-19 Thread Steve
"Yigit Turgut" wrote in message news:b9a8bb28-3003-4a36-86fb-339ef697b...@i2g2000vbd.googlegroups.com... When I use os.system() function, script waits for termination of the windows that is opened by os.system() to continue thus throwing errors and etc. How can i tell Python to let it go and

Re: can I overload operators like "=>", "->" or something like that?

2012-04-19 Thread Jacob MacDonald
On Thursday, April 19, 2012 12:28:50 PM UTC-7, dmitrey wrote: > hi all, > can I somehow overload operators like "=>", "->" or something like > that? (I'm searching for appropriate overload for logical implication > "if a then b") > Thank you in advance, D. I don't believe that you could overload t

Re: can I overload operators like "=>", "->" or something like that?

2012-04-19 Thread Ian Kelly
On Thu, Apr 19, 2012 at 1:28 PM, dmitrey wrote: > hi all, > can I somehow overload operators like "=>", "->" or something like > that? (I'm searching for appropriate overload for logical implication > "if a then b") No, because those aren't operators in Python. You could overload ">=" (__ge__) o

Passing a object to my test case from mainthread using unittest

2012-04-19 Thread venkat
i am new to python and just now started developing an linux application automation. scenario i am trying is thread.py --- will invoke all primary device threads and load test from testcase admincase.py --- hold my tests for the case.. what i am unable to do is i want to pass certain obje

can I overload operators like "=>", "->" or something like that?

2012-04-19 Thread dmitrey
hi all, can I somehow overload operators like "=>", "->" or something like that? (I'm searching for appropriate overload for logical implication "if a then b") Thank you in advance, D. -- http://mail.python.org/mailman/listinfo/python-list

Re: How do you refer to an iterator in docs?

2012-04-19 Thread Jon Clements
On Thursday, 19 April 2012 13:21:20 UTC+1, Roy Smith wrote: > Let's say I have a function which takes a list of words. I might write > the docstring for it something like: > > def foo(words): >"Foo-ify words (which must be a list)" > > What if I want words to be the more general case of so

Re: os.system()

2012-04-19 Thread Jacob MacDonald
On Thursday, April 19, 2012 11:09:22 AM UTC-7, Yigit Turgut wrote: > When I use os.system() function, script waits for termination of the > windows that is opened by os.system() to continue thus throwing errors > and etc. How can i tell Python to let it go and keep on with the next > execution afte

pyjamas-desktop running under python 2.6... on wine (!)

2012-04-19 Thread lkcl
i think this is so hilarious and just such a stunning achievement by the wine team that i had to share it with people. the writeup's here: http://appdb.winehq.org/objectManager.php?sClass=version&iId=25765 but, to summarise: * python2.6 runs under wine (the win32 emulator) * so does python-comty

Re: How do you refer to an iterator in docs?

2012-04-19 Thread Terry Reedy
On 4/19/2012 11:51 AM, Jacob MacDonald wrote: When I talk about an iterable, I say "iterable". Ditto. Examples from manual: "filter(function, iterable) Construct an iterator from those elements of iterable for which function returns true." (I would work this differently.) "map(function, iter

Re: os.system()

2012-04-19 Thread MRAB
On 19/04/2012 19:09, Yigit Turgut wrote: When I use os.system() function, script waits for termination of the windows that is opened by os.system() to continue thus throwing errors and etc. How can i tell Python to let it go and keep on with the next execution after os.system() ? Try using the

Re: with statement

2012-04-19 Thread Kiuhnm
On 4/19/2012 20:02, Jacob MacDonald wrote: On Thursday, April 19, 2012 10:15:23 AM UTC-7, Kiuhnm wrote: A with statement is not at the module level only if it appears inside a function definition or a class definition. Am I forgetting something? Kiuhnm That sounds about right to me. However,

os.system()

2012-04-19 Thread Yigit Turgut
When I use os.system() function, script waits for termination of the windows that is opened by os.system() to continue thus throwing errors and etc. How can i tell Python to let it go and keep on with the next execution after os.system() ? -- http://mail.python.org/mailman/listinfo/python-list

Re: Framework for a beginner

2012-04-19 Thread Terry Reedy
On 4/19/2012 8:12 AM, lkcl luke wrote: you don't *have* to use lambdas with map and reduce, you just have touse a function, > where a lambda happens to be a nameless function. Abbreviated statements like the above sometimes lead people to think that there is more difference between def functi

Re: with statement

2012-04-19 Thread Jacob MacDonald
On Thursday, April 19, 2012 10:15:23 AM UTC-7, Kiuhnm wrote: > A with statement is not at the module level only if it appears inside a > function definition or a class definition. > Am I forgetting something? > > Kiuhnm That sounds about right to me. However, I haven't really used with's very mu

Re: Framework for a beginner

2012-04-19 Thread Grzegorz Staniak
On 19.04.2012, Kiuhnm wroted: > When you know more than 30 languages you stop thinking that way > and you also don't try to defend your language against "infidels". Then again, even when you know more than 100 languages, you may find some that fit your brain and some that just don't work well wi

Re: Framework for a beginner

2012-04-19 Thread Terry Reedy
On 4/19/2012 7:20 AM, Alek Storm wrote: Why not use list comprehension syntax? For 3.x, that should be shortened to "Why not use comprehension syntax?", where comprehensions by default become generator expressions. These: > Map: [val+1 for val in some_list] > Filter: [val for val in some_li

Re: Framework for a beginner

2012-04-19 Thread Terry Reedy
On 4/19/2012 7:14 AM, Kiuhnm wrote: On 4/19/2012 6:21, lkcl wrote: yeah, it does :) python is... the best word i can describe it is: it's beautiful. it has an elegance of expression that is only marred by the rather silly mistake of not taking map, filter and reduce into the list object itself:

Re: How do you refer to an iterator in docs?

2012-04-19 Thread Jacob MacDonald
On Thursday, April 19, 2012 5:21:20 AM UTC-7, Roy Smith wrote: > Let's say I have a function which takes a list of words. I might write > the docstring for it something like: > > def foo(words): >"Foo-ify words (which must be a list)" > > What if I want words to be the more general case of

Re: Request META Help

2012-04-19 Thread Chris Angelico
On Thu, Apr 19, 2012 at 11:32 PM, Gabriel Novaes wrote: > The domains testes1.xyz.com.br, tes.xyzk.com.br, xx.xyzk.com.br through a DNS > redirect TYPE A link to the server IP. > > In most cases I get the request.META ['HTTP_HOST'] with the URL in the > request header, but today I had a problem

Re: Regular expressions, help?

2012-04-19 Thread Chris Angelico
On Fri, Apr 20, 2012 at 1:07 AM, Sania wrote: > Azrazer what you suggested works but I need to make sure that it > catches numbers like 6,370 as well as 637. And I tried tweaking the > regex around from the one you said in your reply but It didn't work > (probably would have if I was more adept).

Re: Regular expressions, help?

2012-04-19 Thread Sania
On Apr 19, 9:52 am, Jon Clements wrote: > On Thursday, 19 April 2012 07:11:54 UTC+1, Sania  wrote: > > Hi, > > So I am trying to get the number of casualties in a text. After 'death > > toll' in the text the number I need is presented as you can see from > > the variable called text. Here is my co

Re: Framework for a beginner

2012-04-19 Thread Kiuhnm
On 4/19/2012 14:02, Roy Smith wrote: In article<4f8ff38c$0$1381$4fafb...@reader1.news.tin.it>, Kiuhnm wrote: I don't like when a community imposes style on a programmer. For instance, many told me that I shouldn't use camelCase and I should adhere to PEP8. Well, that's not me. I write my cod

Re: Regular expressions, help?

2012-04-19 Thread Jon Clements
On Thursday, 19 April 2012 07:11:54 UTC+1, Sania wrote: > Hi, > So I am trying to get the number of casualties in a text. After 'death > toll' in the text the number I need is presented as you can see from > the variable called text. Here is my code > I'm pretty sure my regex is correct, I think i

Request META Help

2012-04-19 Thread Gabriel Novaes
I have a system that uses request.META ['HTTP_HOST'] to identify which will run APPLICATION. The domains testes1.xyz.com.br, tes.xyzk.com.br, xx.xyzk.com.br through a DNS redirect TYPE A link to the server IP. In most cases I get the request.META ['HTTP_HOST'] with the URL in the request heade

Re: Regular expressions, help?

2012-04-19 Thread Jussi Piitulainen
Sania writes: > On Apr 19, 2:48 am, Jussi Piitulainen > wrote: > > Sania writes: > > > So I am trying to get the number of casualties in a text. After 'death > > > toll' in the text the number I need is presented as you can see from > > > the variable called text. Here is my code > > > I'm pretty

Re: Framework for a beginner

2012-04-19 Thread Chris Angelico
On Thu, Apr 19, 2012 at 10:56 PM, lkcl luke wrote: > i'm belabouring the point (not entirely intentionally) but you see how > clumsy that is?  it's probably just as complex in the actual > lexer/grammar file in the http://python.org source code itself, as it > is to think about in real life and to

Re: Regular expressions, help?

2012-04-19 Thread azrazer
Le 19/04/2012 14:02, Sania a écrit : On Apr 19, 2:48 am, Jussi Piitulainen [...] text="accounts put the death toll at 637 and those missing at 653 , but the total number is likely to be much bigger" dead=re.match(r".*death toll.*(\d[,\d\.]*)", text) deadnum=dead.group(1)

Re: Framework for a beginner

2012-04-19 Thread Chris Angelico
On Thu, Apr 19, 2012 at 10:12 PM, lkcl luke wrote: >  that's what i meant about beauty and elegance.  the "bang per buck" > ratio in python, results obtained for the number of characters used, > is higher, and that's something that i personally find to be a > priority over speed. Number of charac

Re: Framework for a beginner

2012-04-19 Thread lkcl luke
On Thu, Apr 19, 2012 at 1:21 PM, Alek Storm wrote: > On Thu, Apr 19, 2012 at 7:12 AM, lkcl luke wrote: >> >> On Thu, Apr 19, 2012 at 12:20 PM, Alek Storm wrote: >> > Why not use list comprehension syntax? >> >>  because it's less characters to type, and thus less characters to >> read.  i find t

Re: Python Gotcha's?

2012-04-19 Thread Chris Angelico
On Thu, Apr 19, 2012 at 11:11 PM, Albert van der Horst wrote: > I still think the doubling convention of Algol68 is superior: > """Help me Obiwan,"" she said, ""You're my only hope!""" > > No special treatment of any other symbol than the quote itself. > A quoting symbol is such a devious syntacti

Re: How do you refer to an iterator in docs?

2012-04-19 Thread Chris Angelico
On Thu, Apr 19, 2012 at 10:21 PM, Roy Smith wrote: > def foo(words): >   "Foo-ify words (which must be a list)" > > What if I want words to be the more general case of something you can > iterate over?  How do people talk about that in docstrings?  Do you say > "something which can be iterated ove

Re: Regular expressions, help?

2012-04-19 Thread Chris Angelico
On Thu, Apr 19, 2012 at 10:02 PM, Sania wrote: > So now my regex is > >    dead=re.match(r".*death toll.{0,20}(\d[,\d\.]*)", text) > > But I only find 7 not 657. How is it that the group is only matching > the last digit? The whole thing is parenthesis not just the last > part. ? Your problem is

Re: Python Gotcha's?

2012-04-19 Thread Albert van der Horst
In article <4f7de152$0$29983$c3e8da3$54964...@news.astraweb.com>, Steven D'Aprano wrote: >On Thu, 05 Apr 2012 08:32:10 -0400, Roy Smith wrote: > >> In article <4f7d896f$0$29983$c3e8da3$54964...@news.astraweb.com>, >> Steven D'Aprano wrote: >> >>> > You mean JSON expects a string with valid JSON

Re: Bug in Python

2012-04-19 Thread Chris Angelico
On Thu, Apr 19, 2012 at 10:01 PM, Kiuhnm wrote: > I read that bug fix releases have a 6-month cycle :( > It seems that I'll have to work around the problem... If a fix has been committed, the easiest thing to do is clone the Mercurial repository and build Python from source. Takes a little bit of

Re: A case for "real" multiline comments

2012-04-19 Thread Chris Angelico
On Thu, Apr 19, 2012 at 10:15 PM, Devin Jeanpierre wrote: > Why don't you allow nested multiline comments? Many languages (e.g. > ML, Scheme, Haskell, etc.) allow you to nest multi-line comments. It's > mostly the C family of languages that refuse to do this, AFAIK. Allowing nesting or not allowi

Re: Framework for a beginner

2012-04-19 Thread Neil Cerutti
On 2012-04-19, Kiuhnm wrote: > I don't like when a community imposes style on a programmer. > For instance, many told me that I shouldn't use camelCase and I > should adhere to PEP8. > > Well, that's not me. I write my code the way I like it and if > that is frowned upon by some "standardizing" co

How do you refer to an iterator in docs?

2012-04-19 Thread Roy Smith
Let's say I have a function which takes a list of words. I might write the docstring for it something like: def foo(words): "Foo-ify words (which must be a list)" What if I want words to be the more general case of something you can iterate over? How do people talk about that in docstrings

Re: python kinterbasdb - check default charset of db or table

2012-04-19 Thread Marglix
On Wednesday, April 18, 2012 9:08:59 PM UTC+8, miamia wrote: > Hello, > I am using python 2.7 and kinterbasdb. How could I find out default > charset used by database? I need to check it and then according to > used charset decode returned strings. thank you You could use a tool like flamerobin an

Re: Framework for a beginner

2012-04-19 Thread Alek Storm
On Thu, Apr 19, 2012 at 7:12 AM, lkcl luke wrote: > On Thu, Apr 19, 2012 at 12:20 PM, Alek Storm wrote: > > Why not use list comprehension syntax? > > because it's less characters to type, and thus less characters to > read. i find that syntax incredibly klunky. left to right you're > reading

Re: A case for "real" multiline comments

2012-04-19 Thread Devin Jeanpierre
On Thu, Apr 19, 2012 at 2:56 AM, Chris Angelico wrote: > So, here's a proposal. (Maybe I should take this part to another list > or the Python issue tracker.) Introduce a new keyword or reuse > existing keywords to form a marker that unambiguously says "Ignore > these lines" and then subsequently

Re: Framework for a beginner

2012-04-19 Thread lkcl luke
On Thu, Apr 19, 2012 at 12:20 PM, Alek Storm wrote: > On Wed, Apr 18, 2012 at 11:21 PM, lkcl wrote: >> >> On Apr 11, 9:11 pm, biofob...@gmail.com wrote: >> >> > I am new to python and only have read the Byte of Python ebook, but want >> > to move to the web. I am tired of being a CMS tweaker and

Re: Regular expressions, help?

2012-04-19 Thread Sania
On Apr 19, 2:48 am, Jussi Piitulainen wrote: > Sania writes: > > So I am trying to get the number of casualties in a text. After 'death > > toll' in the text the number I need is presented as you can see from > > the variable called text. Here is my code > > I'm pretty sure my regex is correct, I

Re: Framework for a beginner

2012-04-19 Thread Roy Smith
In article <4f8ff38c$0$1381$4fafb...@reader1.news.tin.it>, Kiuhnm wrote: > I don't like when a community imposes style on a programmer. For > instance, many told me that I shouldn't use camelCase and I should > adhere to PEP8. > Well, that's not me. I write my code the way I like it and if tha

Re: Bug in Python

2012-04-19 Thread Kiuhnm
On 4/18/2012 3:08, Kiuhnm wrote: I'm using Python 3.2.2, 64 bit on Windows 7. Consider this code: ---> print(1) print(2) print(3) with open('test') as f: data = f.read() with open('test') as f: data = f.read() <--- If I debug this code with python -m pdb script.py and I issue the command j 7 Py

Re: Framework for a beginner

2012-04-19 Thread Chris Angelico
On Thu, Apr 19, 2012 at 9:14 PM, Kiuhnm wrote: > There are many things I don't like about Python. The first flaw is the > absence of anonymous code blocks, but I've already solved this problem. You mean lambdas? Yeah, they're a lot more limited in Python than in some other languages. However, you

Re: Framework for a beginner

2012-04-19 Thread Alek Storm
On Wed, Apr 18, 2012 at 11:21 PM, lkcl wrote: > On Apr 11, 9:11 pm, biofob...@gmail.com wrote: > > > I am new to python and only have read the Byte of Python ebook, but want > to move to the web. I am tired of being a CMS tweaker and after I tried > python, ruby and php, the python language makes

Re: Framework for a beginner

2012-04-19 Thread Kiuhnm
On 4/19/2012 6:21, lkcl wrote: yeah, it does :) python is... the best word i can describe it is: it's beautiful. it has an elegance of expression that is only marred by the rather silly mistake of not taking map, filter and reduce into the list object itself: l.map(str) for example would be i

Re: A case for "real" multiline comments

2012-04-19 Thread Chris Angelico
On Thu, Apr 19, 2012 at 8:17 PM, Alek Storm wrote: >> comment def >> ... parser completely ignores these lines ... >> comment break > > > I believe the more Pythonic syntax would be: > > comment: >     ...some >     ...indented >     ...lines > > God help us if that ever happens. Certainly not. T

Re: A case for "real" multiline comments

2012-04-19 Thread Jean-Michel Pichavant
Chris Angelico wrote: [snip] Since Python doesn't have multiline comments, triple-quoted strings are sometimes pressed into service. [snip] Chris Angelico Let the triple quotes where they're meant to be. Use your text editor, any decent one will allow you to comment uncomment a block of cod

Re: A case for "real" multiline comments

2012-04-19 Thread Alek Storm
I think docstrings should look like strings, because they're essentially data: they end up as the __doc__ attribute of whatever class or function they're documenting. Conversely, they shouldn't be used as multi-line comments that aren't data (in the middle of functions) - the parser should disallow

Re: Whither paramiko?

2012-04-19 Thread Richard Shea
On Apr 19, 8:28 pm, Richard Shea wrote: > On Apr 16, 1:42 am, Bryan wrote:> > Paramiko is a Python library for SSH (Secure Shell). Over about the > > last year, I've grown dependent upon it. Its home page is still easy > > to search up, but the links to its mailing list and repository don't > >

Re: Whither paramiko?

2012-04-19 Thread Richard Shea
On Apr 16, 1:42 am, Bryan wrote: > Paramiko is a Python library for SSH (Secure Shell). Over about the > last year, I've grown dependent upon it. Its home page is still easy > to search up, but the links to its mailing list and repository don't > work. > > Paramiko depends on PyCrypto, and not so

Re: how do i merge two sequence

2012-04-19 Thread Hegedüs Ervin
Hello, On Thu, Apr 19, 2012 at 08:54:28AM +0200, Peter Otten wrote: > Have a second look at the desired output. Your suggestion doesn't produce > that. oh', I'm really sorry, I was distracted... thanks: a. -- I � UTF-8 -- http://mail.python.org/mailman/listinfo/python-list

Re: md5 check

2012-04-19 Thread Chris Angelico
On Thu, Apr 19, 2012 at 5:46 PM, contro opinion wrote: import hashlib > f=open('c:\gpg4win-2.1.0.exe','rb') print  hashlib.md5(f.read()).hexdigest() > ad6245f3238922bb7afdc4a6d3402a65 print  hashlib.sha1(f.read()).hexdigest() > da39a3ee5e6b4b0d3255bfef95601890afd80709 > > i get

Re: md5 check

2012-04-19 Thread Peter Otten
contro opinion wrote: import hashlib f=open('c:\gpg4win-2.1.0.exe','rb') print hashlib.md5(f.read()).hexdigest() > ad6245f3238922bb7afdc4a6d3402a65 print hashlib.sha1(f.read()).hexdigest() > da39a3ee5e6b4b0d3255bfef95601890afd80709 > > i get it with md5,why the sha1 is wrong

Re: md5 check

2012-04-19 Thread contro opinion
>>> import hashlib >>> f=open('c:\gpg4win-2.1.0.exe','rb') >>> print hashlib.md5(f.read()).hexdigest() ad6245f3238922bb7afdc4a6d3402a65 >>> print hashlib.sha1(f.read()).hexdigest() da39a3ee5e6b4b0d3255bfef95601890afd80709 i get it with md5,why the sha1 is wrong? the sha1 right is f619313cb4224