Re: python texts?

2006-06-16 Thread Fredrik Lundh
nate wrote: > I am enjoying it at the moment. I intend to be done with it in a > week. But not sure where it will put me in the grand scheme of > programming with python. > So perhaps a more direct question would be, what do I read after this > book? Should I read something before this book? Sh

Re: Date Subtraction

2006-06-16 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, rsutradhar_python wrote: > How to subtract date which is stored in string variable? > > Example: > > date1="2006-01-10" > date2="2005-12-15" > date = date1 - date2 > should give me 25 but problem is that date1 and date2 datatype is > string which need to be conerted into

Date Subtraction

2006-06-16 Thread rsutradhar_python
How to subtract date which is stored in string variable? Example: date1="2006-01-10" date2="2005-12-15" date = date1 - date2 should give me 25 but problem is that date1 and date2 datatype is string which need to be conerted into date fromat which i am not able to do so please help me.

Re: XML, JSON, or what?

2006-06-16 Thread Frank Millman
Daniel Dittmar wrote: > > My client-server is Python-to-Python. At present, I am using cPickle to > > transfer objects between the two. Among other things, I sometimes > > transfer a tuple. Using JSON it appears on the other side as a list. As > > I sometimes use the tuple as a dictionary key, thi

python texts?

2006-06-16 Thread nate
Hello everyone, Can anyone recommend python text progression from me. Assuming I have no knowledge of python which books should I progress through? I prefer published books that I can actually hold with my hands. But if there are some awesome tutorials on-line I guess I am game. At this moment

Re: Python is fun (useless social thread) ;-)

2006-06-16 Thread Alex Martelli
BartlebyScrivener <[EMAIL PROTECTED]> wrote: ... > Especially the Python Cookbook, as I don't normally 'get it' when > someone just describes theory or an abstraction, I also must see an > example. The examples in the Cookbook are useful and also come with > explanations about how they work. Sam

Re: Python is fun (useless social thread) ;-)

2006-06-16 Thread Alex Martelli
Dave Opstad <[EMAIL PROTECTED]> wrote: > In article <[EMAIL PROTECTED]>, > John Salerno <[EMAIL PROTECTED]> wrote: > > I had retired from Apple in 2001 after 33 years in the business, feeling > completely burned out. Didn't want to even look at another line of code. > After resting and recuperat

Re: transfer rate limiting in socket.py

2006-06-16 Thread Jean-Paul Calderone
On 16 Jun 2006 13:53:48 -0700, Peter Silva <[EMAIL PROTECTED]> wrote: >Hi folks, > >I have a need in a network data distribution application to send out >data to folks who want it using the protocol of their choice. I´d >like it to support a variety of protocols and I don´t want to >implement any

Post Ur Job Requirements/Resumes Free ........

2006-06-16 Thread gmail_girl
Dear Employer/JobConsultant/JobSeeker, NEW GREAT OFFER BY US NOW ITS FREE TO SEARCH RESUME/JOB DATABASE AND CALL FOR INTERVIEW/APPLY INTERVIEW http://www.Net4Professionals.com (HERE YOU WILL GET FIVE TIMES MORE THAN EXPECTATION; FREE ...) FOR EMPLOYERS

Re: [Python-Dev] The baby and the bathwater (Re: Scoping, augmented assignment, 'fast locals' - conclusion)

2006-06-16 Thread Josiah Carlson
Before I get started with my reply, I would just like to point out that aside from my initial 'I see your using a closure for this problem as a design bug', I have tried my best to be as reasonable as I can, not once attacking your character or abilities. However, twice now you have expressed vari

Re: Need Help comparing dates

2006-06-16 Thread colincolehour
Thanks for the reply, the book I'm actually using is Python Programming for the absolute beginner. The book has been good to pick up basic things but it doesn't cover time or dates as far as I can tell. As for previous programming experience, I have had some lite introductions to C & C++ about 6 ye

Re: [Python-Dev] The baby and the bathwater (Re: Scoping, augmented assignment, 'fast locals' - conclusion)

2006-06-16 Thread John Machin
On 17/06/2006 8:00 AM, Boris Borcic wrote: > Josiah Carlson wrote: Please consider abandoning this "conversation". Plan B: Please consider conducting it using private e-mail. Plan C: Please consider conducting it in alt.you.said.I.said.you.said.I.said -- http://mail.python.org/mailman/listinfo/py

Re: Need Help comparing dates

2006-06-16 Thread John Machin
On 17/06/2006 9:55 AM, [EMAIL PROTECTED] wrote: > So when I grab the date of the website, that date is actually a string? Yes. Anything you grab off a website (or read from a file) will be held in a string. Typically you would then need to convert it (or parts of it) to some other type(s) e.g. i

Re: Noob script needs some input: CVS PatchMaker

2006-06-16 Thread John Machin
On 16/06/2006 7:28 PM, Holger wrote: > Well, that was an excellent opportunity to get some python practice, so > below is my first shot at the problem. > > Any feedback on what would be "the pythonic way" to do this would be > much appreciated! > > #!/usr/bin/env python > # Copyright 2006 Holger

Re: Need Help comparing dates

2006-06-16 Thread colincolehour
So when I grab the date of the website, that date is actually a string? How would I got about converting that to a date? -- http://mail.python.org/mailman/listinfo/python-list

Re: msvcr71.dll necessary? - Re: Which compiler will Python 2.5 / Windows (Intel) be built with?

2006-06-16 Thread Martin v. Löwis
robert wrote: > For me the great great problem with Python2.4's lib geometry was that > the size of distributable app installers swelled suddenly by many megs > with msvcr71.dll and mfc71 and codecs in core and all. codecs are in python24.dll, mscvr71, mfc71 and all are not. However, they are not

Re: Which compiler will Python 2.5 / Windows (Intel) be built with?

2006-06-16 Thread Martin v. Löwis
[EMAIL PROTECTED] wrote: > thanks for the tip, I wasn't fully aware of that. OTOH, though GCC > might be a theoretical alternative, it isn't a practical one for many > situations: > > * In a professional environment, it opens up another can of potential > problems, where one would rather like to s

ANN: updated release of PyDSTool dynamical systems package (version 0.83.2 patch #1)

2006-06-16 Thread Rob Clewley
Version 0.83.2 of PyDSTool has been released, and now includes a patchfor compilation of AUTO on Linux (as of 15th June).PyDSTool is an open-source project providing a range of dynamical systems simulation and analysis tools. It supports both continuous-and discrete-time systems including ordinary

Re: What is Expressiveness in a Computer Language

2006-06-16 Thread Raffael Cavallaro
On 2006-06-16 17:59:07 -0400, Joachim Durchholz <[EMAIL PROTECTED]> said: > I think it's easier to start with a good (!) statically-typed language > and relax the checking, than to start with a dynamically-typed one and > add static checks. > With the right restrictions, a language can make all

Re: What is Expressiveness in a Computer Language

2006-06-16 Thread Joachim Durchholz
Darren New schrieb: > Joachim Durchholz wrote: >> Give a heterogenous list that would to too awkward to live in a >> statically-typed language. > > Write a function that takes an arbitrary set of arguments and stores > them into a structure allocated on the heap. If the set of arguments is real

Re: [Python-Dev] The baby and the bathwater (Re: Scoping, augmented assignment, 'fast locals' - conclusion)

2006-06-16 Thread Boris Borcic
Josiah Carlson wrote: >> >> [BB] >> >> I'd say a first step in convincing me I am wrong would be to show me >> examples of >> >> object methods of the standard library that are recursive, and cut out >> for >> >> recursion. >> >> [JC] >> > Actually, I don't believe that is necessary. I've sh

Re: What is Expressiveness in a Computer Language

2006-06-16 Thread Joachim Durchholz
Raffael Cavallaro schrieb: > There is a very large class of software where user inputs are > unpredictable and/or where input data comes from an untrusted source. In > these cases run-time checks are going to be needed anyway so the > advantages of static type checking are greatly reduced - you

Re: What is Expressiveness in a Computer Language

2006-06-16 Thread Joachim Durchholz
Sacha schrieb: > > Many lists are heterogenous, even in statically typed languages. > For instance lisp code are lists, with several kinds of atoms and > sub-lists.. Lisp isn't exactly a statically-typed language :-) > A car dealer will sell cars, trucks and equipment.. > In a statically typed

Re: Cross-site scripting (XSS) defense

2006-06-16 Thread Lee Harr
On 2006-06-16, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Is there a module (or, better yet, sample code) that scrubs > user-entered text to remove cross-site scripting attacks, while also > allowing a small subset of HTML through? > > Contemplated application: a message board that allows peopl

Re: Pycrypto

2006-06-16 Thread luca72
> In [26]:import binascii > > In [27]:binascii.unhexlify('ea523a664dabaa4476d31226a1e3bab0') > Out[27]:'\xeaR:fM\xab\xaaDv\xd3\x12&\xa1\xe3\xba\xb0' > > Ciao, > Marc 'BlackJack' Rintsch Ciao Marc Grazie Thanks -- http://mail.python.org/mailman/listinfo/python-list

copyfile avoiding overwrites and race conditions

2006-06-16 Thread [EMAIL PROTECTED]
Here is a code fragment, where I am trying to copy a file, avoiding overwrites and race conditions. The filename gets a '02','03','04' etc appended to the end if a file with that name already exists. I know the writing of the single space is overkill, but I am surprised I cannot find an example o

Re: What is Expressiveness in a Computer Language

2006-06-16 Thread Darren New
Matthias Blume wrote: > In Danvy's solution, the format argument is not a string. That's what I said, yes. >>You can't read the printf format from a configuration file >>(for example) to support separate languages. > You don't need to do that if you want to support separate languages. That's ki

Re: Pycrypto

2006-06-16 Thread James Stroud
Laszlo Nagy wrote: > >> Not in this implementation: >> py> from Crypto.Cipher import AES >> py> crypt = AES.new('abcdefghijklmnop', AES.MODE_CBC) >> py> c = crypt.encrypt('1') >> Traceback (most recent call last): >> File "", line 1, in ? >> ValueError: Input strings must be a multiple of 16 in

transfer rate limiting in socket.py

2006-06-16 Thread Peter Silva
Hi folks, I have a need in a network data distribution application to send out data to folks who want it using the protocol of their choice. I´d like it to support a variety of protocols and I don´t want to implement any of them :-) http, ftp (via ftplib) , https (dunno how yet), ssl, ssh, sftp

Re: Cross-site scripting (XSS) defense

2006-06-16 Thread Jim
Have a look at http://feedparser.org/docs/html-sanitization.html . Jim -- http://mail.python.org/mailman/listinfo/python-list

Re: Cross-site scripting (XSS) defense

2006-06-16 Thread Jim
Have a look at http://feedparser.org/docs/html-sanitization.html . Jim -- http://mail.python.org/mailman/listinfo/python-list

Re: What is Expressiveness in a Computer Language

2006-06-16 Thread Matthias Blume
Darren New <[EMAIL PROTECTED]> writes: > Matthias Blume wrote: >> Very good statically typed versions of printf exist. See, e.g., >> Danvy's unparsing combinators. > > That seems to ignore the fact that the pattern is a string, which > means that printf's first argument in Danvy's mechanism has t

Re: GUI in Python using wxGlade

2006-06-16 Thread dimitri pater
the link should be:www.serpia.org/wxgladethanks for finding it, UrsusMaximus ;-)Dimitri On 16 Jun 2006 06:08:33 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED] > wrote:Did you paste any code ?Also the link for the next message is not working . John Salerno wrote:> [EMAIL PROTECTED] wrote:> > I am a

Re: a good programming text editor (not IDE)

2006-06-16 Thread James Stroud
Tim Chase wrote: >> No need to argue. I started with vim, and finally switched to >> emacs less than one year later. > > > Both are very-much-so good editors. I made the opposite switch > from emacs to vim in less than a year. Both are good^Wgreat > editors, so one's decision to use one over th

Re: Which compiler will Python 2.5 / Windows (Intel) be built with?

2006-06-16 Thread Fredrik Lundh
Philip Austin wrote: > Presuming I succeed in setting up vc7 correctly, is it as simple > as 'python setup.py install' from here? yup (for a suitable definition of "correctly"; afaik, all you need is a couple of registry settings; for a normal VC install, the easiest way to get them in place i

Re: Extracting values from text file

2006-06-16 Thread Mirco Wahab
Thus spoke Preben Randhol (on 2006-06-16 10:36): > A short newbie question. I would like to extract some values from a > given text file directly into python variables. Can this be done simply > by either standard library or other libraries? Some pointers where to > get started would be much appre

Re: Problem on win xp and run time error

2006-06-16 Thread Fredrik Lundh
Michele Petrazzo wrote: > just found in this moment that my applications stop to work with win xp > and receive this error: > > """ > This application has requested the Runtime to terminate it in an unusual > way. Please contact the application's support team for more information. > """ > > (Not

Re: Problem on win xp and run time error

2006-06-16 Thread Chris Lambacher
On Fri, Jun 16, 2006 at 06:11:53PM +, Michele Petrazzo wrote: > Hi list, > just found in this moment that my applications stop to work with win xp > and receive this error: > > """ > This application has requested the Runtime to terminate it in an unusual > way. Please contact the application'

Re: Opening an editor for interactive use

2006-06-16 Thread Fredrik Lundh
"Webb" wrote: > (I am sure there is a recipe somewhere, but I can't find it.) How does > one open an editor while in the middle of an interactive program, let > the user do some editing and closing, and then capture the text that > was edited? I am reminded of subversion or CVS when they open an

Re: What is Expressiveness in a Computer Language

2006-06-16 Thread Darren New
Matthias Blume wrote: > Very good statically typed versions of printf exist. See, e.g., > Danvy's unparsing combinators. That seems to ignore the fact that the pattern is a string, which means that printf's first argument in Danvy's mechanism has to be a literal. You can't read the printf forma

Re: Possible inaccuracy in Python 2.4 when using profiler calibration

2006-06-16 Thread Dieter Maurer
Brian Quinlan <[EMAIL PROTECTED]> writes on Thu, 15 Jun 2006 10:36:26 +0200: > I have a misinformed theory that I'd like to share with the list. > > I believe that profiler calibration no longer makes sense in Python > 2.4 because C functions are tracked and they have a different call > overhead t

Re: BeautifulSoup error

2006-06-16 Thread William
"Serge Orlov" <[EMAIL PROTECTED]> writes: [...] > Look at the traceback: you're not calling BeautifulSoup module! In > fact, there is no feed method in the current BeautifulSoup > documentation. Maybe it used to work well, but now it's definitely > going to fail. As I understand documentation you

Problem on win xp and run time error

2006-06-16 Thread Michele Petrazzo
Hi list, just found in this moment that my applications stop to work with win xp and receive this error: """ This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. """ (Note that the same application [pytho

Re: What is Expressiveness in a Computer Language

2006-06-16 Thread Matthias Blume
Darren New <[EMAIL PROTECTED]> writes: > Joachim Durchholz wrote: >> Give a heterogenous list that would to too awkward to live in a >> statically-typed language. > > Printf()? Very good statically typed versions of printf exist. See, e.g., Danvy's unparsing combinators. -- http://mail.python.o

Re: Which compiler will Python 2.5 / Windows (Intel) be built with?

2006-06-16 Thread Philip Austin
[EMAIL PROTECTED] writes: >> This is the .NET 11 SDK, I belive it includes the 2003 compiler (*): > > Last time I checked the .NET SDK they had the C# compiler in there, but > not the C++ optimizing 2003 compiler. Might be wrong though I just downloaded and installed this, and see a directory

Cross-site scripting (XSS) defense

2006-06-16 Thread johnzenger
Is there a module (or, better yet, sample code) that scrubs user-entered text to remove cross-site scripting attacks, while also allowing a small subset of HTML through? Contemplated application: a message board that allows people to use , , and so on, but does not allow any javascript, vbscript,

Re: BeautifulSoup error

2006-06-16 Thread Serge Orlov
William Xu wrote: > Hi, all, > > This piece of code used to work well. i guess the error occurs after > some upgrade. > > >>> import urllib > >>> from BeautifulSoup import BeautifulSoup > >>> url = 'http://www.google.com' > >>> port = urllib.urlopen(url).read() > >>> soup = BeautifulSoup() > >>> so

Opening an editor for interactive use

2006-06-16 Thread Webb
Hi all, (I am sure there is a recipe somewhere, but I can't find it.) How does one open an editor while in the middle of an interactive program, let the user do some editing and closing, and then capture the text that was edited? I am reminded of subversion or CVS when they open an $EDITOR sessi

Re: add elements to indexed list locations

2006-06-16 Thread Steven Bethard
[EMAIL PROTECTED] wrote: > # I have a list of names: > names = ['clark', 'super', 'peter', 'spider', 'bruce', 'bat'] > > # and another set of names that I want to insert into > # the names list at some indexed locations: > surnames = { 1: 'kent', 3:'parker', 5:'wayne' } > > # The thing I couldn't

Re: add elements to indexed list locations

2006-06-16 Thread Alexis Roda
En/na [EMAIL PROTECTED] ha escrit: > Hi, > > I have a very simple problem, but do not know an elegant way to > accomplish this. > ### > # I have a list of names: > names = ['clark', 'super', 'peter', 'spider', 'bruce', 'bat'] > > # and another set of names that I want to insert into > # the names

Re: add elements to indexed list locations

2006-06-16 Thread Diez B. Roggisch
[EMAIL PROTECTED] schrieb: > Hi, > > I have a very simple problem, but do not know an elegant way to > accomplish this. > ### > # I have a list of names: > names = ['clark', 'super', 'peter', 'spider', 'bruce', 'bat'] > > # and another set of names that I want to insert into > # the names list at

Re: MS VC++ Toolkit 2003 installer (VCToolkitSetup.exe)

2006-06-16 Thread Jarek Zgoda
[EMAIL PROTECTED] napisał(a): > I need to build some Win32 Python extensions. If somebody happens to > have the Microsoft Visual C++ Toolkit 2003 installer > (VCToolkitSetup.exe), please kindly contact me off-list at: I think only Microsoft has enough rights to distribute this. -- Jarek Zgoda h

add elements to indexed list locations

2006-06-16 Thread leventyilmaz
Hi, I have a very simple problem, but do not know an elegant way to accomplish this. ### # I have a list of names: names = ['clark', 'super', 'peter', 'spider', 'bruce', 'bat'] # and another set of names that I want to insert into # the names list at some indexed locations: surnames = { 1: 'kent'

download file from intranet linux server to windows clients

2006-06-16 Thread Luis P. Mendes
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I'm building an intranet web server in Linux for around 40 windows clients with Django. The problem is that I want to build an excel file based on criteria entered by the client, that the client must be able do download to his personal work space

Re: What is Expressiveness in a Computer Language

2006-06-16 Thread Darren New
Joachim Durchholz wrote: > Give a heterogenous list that would to too awkward to live in a > statically-typed language. Printf()? -- Darren New / San Diego, CA, USA (PST) My Bath Fu is strong, as I have studied under the Showerin' Monks. -- http://mail.python.org/mailman/listinfo/

Re: PythonPerl 0.9

2006-06-16 Thread Jim Fulton
Have you looked at PyPerl? http://wiki.python.org/moin/PyPerl I think it was further along. It might be good to build on. Jim On Jun 16, 2006, at 11:37 AM, Bruno Obsomer wrote: > You love Python, but think Perl can be useful anyway. You can now > mix the > two in a single program with th

Re: What is Expressiveness in a Computer Language

2006-06-16 Thread Darren New
Joachim Durchholz wrote: > Give a heterogenous list that would to too awkward to live in a > statically-typed language. Write a function that takes an arbitrary set of arguments and stores them into a structure allocated on the heap. > Give a case of calling nonexistent functions that's useful.

Re: Duplex communication with pipes - is possible ?

2006-06-16 Thread alisonken1
> readlines () will try to read until the stream/socket is closed. Try to > read only one line. This of course means that you cannot sent \n as part > of the data, you have to escape them somehow. > If I remember correctly, if you want to pass '\n' so readline won't stop, you should be able to

Re: Pycrypto

2006-06-16 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, luca72 wrote: > Hello again i have solve doing this: > > from Crypto.Cipher import AES > stri=(chr(int('9b',16))+chr(int('d3',16))+chr(int('2d',16))+chr(int('24',16))+chr(int('af',16))+chr(int('c9',16))+chr(int('e9',16))+chr(int('d7',16))+chr(int('46',16))+chr(int('69',16)

Re: Which compiler will Python 2.5 / Windows (Intel) be built with?

2006-06-16 Thread sam
I have been using the latest VC.net to compile my SCSIPython extension dll for Python 2.3, 2.4, and 2.5 without any problems. I just have to make shure that I link with the correct Python.lib Sam Schulenburg -- http://mail.python.org/mailman/listinfo/python-list

Re: What is Expressiveness in a Computer Language

2006-06-16 Thread Raffael Cavallaro
On 2006-06-16 05:22:08 -0400, Joachim Durchholz <[EMAIL PROTECTED]> said: > And this is a typical dynamic type advocate's response when told that static typing has different needs: > "*I* don't see the usefulness of static typing so *you* shouldn't want it, either." But I haven't made this sort

Re: a good programming text editor (not IDE)

2006-06-16 Thread josiah . carlson
Walter Dörwald wrote: > I tried it out and the first problem I noticed is that on Windows > opening a file from a Samba drive doesn't seem to work, as PyPE converts > the filename to lowercase. ...Samba is tricky, and I hadn't thought of it before. Normal Windows is case-insensitive but case-pres

msvcr71.dll necessary? - Re: Which compiler will Python 2.5 / Windows (Intel) be built with?

2006-06-16 Thread robert
[EMAIL PROTECTED] wrote: > Hi everyone, > > which compiler will Python 2.5 on Windows (Intel) be built with? I > notice that Python 2.4 apparently has been built with the VS2003 > toolkit compiler, and I read a post from Scott David Daniels [1] where > he said that probably the VS2003 toolkit will

Re: a good programming text editor (not IDE)

2006-06-16 Thread Istvan Albert
Scott David Daniels wrote: > Surprise, surprise. One hour is not two weeks. I wrote: > pressing Ctrl-1 while editing the source will execute the python on the > current source *and* it displays the output in a lower pane as it runs > *and* it allows me to simultanously edit the file *while* th

Re: What is Expressiveness in a Computer Language

2006-06-16 Thread Raffael Cavallaro
On 2006-06-16 05:22:08 -0400, Joachim Durchholz <[EMAIL PROTECTED]> said: > And this is a typical dynamic type advocate's response when told that > static typing has different needs: > > "*I* don't see the usefulness of static typing so *you* shouldn't want > it, either." But I haven't made th

Re: What is Expressiveness in a Computer Language

2006-06-16 Thread Raffael Cavallaro
On 2006-06-16 11:29:12 -0400, Raffael Cavallaro <[EMAIL PROTECTED]'espam-s'il-vous-plait-mac.com> said: > In software like this it isn't worth satisfying a static type checker > because you don't get much of the benefit > anywaytext Dx¤description£text Dx¢fromname > as bei

Re: __lt__ slowing the "in" operator even if not called

2006-06-16 Thread Steven Bethard
Emanuele Aina wrote: > [EMAIL PROTECTED] dettagliò: > >>> Someone can explain me why? >> The list's __contains__ method is very simple > > [...] > >> So if you define "__lt__" in your object then the type gets a richcmp >> function and your == test implicit in the 'in' search always incurs the >

Re: What is Expressiveness in a Computer Language

2006-06-16 Thread Raffael Cavallaro
On 2006-06-16 05:22:08 -0400, Joachim Durchholz <[EMAIL PROTECTED]> said: > And this is a typical dynamic type advocate's response when told that > static typing has different needs: > > "*I* don't see the usefulness of static typing so *you* shouldn't want > it, either." But I haven't made th

Re: Pycrypto

2006-06-16 Thread luca72
Hello again i have solve doing this: from Crypto.Cipher import AES stri=(chr(int('9b',16))+chr(int('d3',16))+chr(int('2d',16))+chr(int('24',16))+chr(int('af',16))+chr(int('c9',16))+chr(int('e9',16))+chr(int('d7',16))+chr(int('46',16))+chr(int('69',16))+chr(int('71',16))+chr(int('32',16))+chr(int(

Re: What is Expressiveness in a Computer Language

2006-06-16 Thread genea
Torben Ægidius Mogensen wrote: > There are several aspects relevant to this issue, some of which are: > - Compactness: How much do I have to type to do what I want? .. > - Naturality: How much effort does it take to convert the concepts of >my problem into the concepts of the language?

Re: Pycrypto

2006-06-16 Thread Philippe Martin
Hi, Look at the bin2ascii module. Philippe luca72 wrote: > > Excuse me again, > If the string is not a sting but hex number how i have to proced : > > look this page: > http://www.cs.eku.edu/faculty/styer/460/Encrypt/JS-AES.html > > Regards Luca -- http://mail.python.org/mailman/listinfo

Re: What is Expressiveness in a Computer Language

2006-06-16 Thread Pascal Costanza
Torben Ægidius Mogensen wrote: > Pascal Costanza <[EMAIL PROTECTED]> writes: > >> Torben Ægidius Mogensen wrote: > >>> So while it may take longer to get a program that gets >>> past the compiler, it takes less time to get a program that works. >> That's incorrect. See http://haskell.org/papers/N

Re: XML, JSON, or what?

2006-06-16 Thread Daniel Dittmar
> My client-server is Python-to-Python. At present, I am using cPickle to > transfer objects between the two. Among other things, I sometimes > transfer a tuple. Using JSON it appears on the other side as a list. As > I sometimes use the tuple as a dictionary key, this fails, as you > obviously can

Re: Duplex communication with pipes - is possible ?

2006-06-16 Thread Daniel Dittmar
Dara Durum wrote: > Hi ! > > I want to create a Process Pool Object. > I can hold started processes, and can communicate with them. > > I tryed with many ipc methods, but every of them have bug or other problem. > Sockets are unavailabe (because Windows Firewall hold them). > > I think I will us

Re: a good programming text editor (not IDE)

2006-06-16 Thread Walter Dörwald
[EMAIL PROTECTED] wrote: > John Salerno wrote: > [snip] >> Thanks for any suggestions, and again I'm sorry if this feels like the >> same question as usual (it's just that in my case, I'm not looking for >> something like SPE, Komodo, Eric3, etc. right now). > > I was taking a peek at c.l.py to c

Re: a good programming text editor (not IDE)

2006-06-16 Thread Tim Chase
> No need to argue. I started with vim, and finally switched to > emacs less than one year later. Both are very-much-so good editors. I made the opposite switch from emacs to vim in less than a year. Both are good^Wgreat editors, so one's decision to use one over the other is more a matter of wo

Re: Python is fun (useless social thread) ;-)

2006-06-16 Thread bruno at modulix
BartlebyScrivener wrote: (snip) > I am not touching OO, classes, You may not be aware of this, but as soon as you're programming in Python, you *are* using OO. Strings are objects, dicts are objects, tuples are objects, lists are objects, numbers are objects, and even functions and modules are ob

Re: Python is fun (useless social thread) ;-)

2006-06-16 Thread bruno at modulix
Scott David Daniels wrote: > BartlebyScrivener wrote: > >> I am not touching OO, classes, or GUIs until I understand >> EVERYTHING else. Could take a few years. ;) > > > You know how modules separate globals, right? That is, what you > write in one module doesn't affect the names in anothe

Re: Extracting values from text file

2006-06-16 Thread Paul McGuire
"Preben Randhol" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > What I first though was if there was possible to make a filter such as: > > Apples (apples) > (ducks) Ducks > (butter) g butter > > The data can be put in a hash table. > > Or maybe there are better ways? I general

Re: Python is fun (useless social thread) ;-)

2006-06-16 Thread bruno at modulix
BartlebyScrivener wrote: >>>I'd like something a bit like a module, >>>but I'd like to make several of them, >>>and not have them interfere with each other." > > > Thank you. I sense what you are saying, but at this point I'd be > thinking, "Why not just make several modules?" :) Because you wa

Re: Python is fun (useless social thread) ;-)

2006-06-16 Thread bruno at modulix
BartlebyScrivener wrote: (snip) > Also, it seems to be a minimalist > language. *seems* minimalist, but is really not - have a look at the object model (metaclasses, descriptors etc), at closures and HOFs and decorators, at list-comp and generators and (coming in 2.5) coroutines... Definitively

Re: a good programming text editor (not IDE)

2006-06-16 Thread bruno at modulix
BartlebyScrivener wrote: >>>Most IDEs are rather weak as text editors compared to emacsen. > > > That's true, but even emacs and xemacs don't offer simple automatic > word wrap (i.e. wrap a line without splitting words or putting an eol > or hard carriage return at the end of every line). I don't

Re: Python is fun (useless social thread) ;-)

2006-06-16 Thread Mirco Wahab
Thus spoke John Salerno (on 2006-06-15 15:50): > Did you have to learn it for a job? No, I was just interested in things that are found interesting ;-) > Or did you just like what you saw and decided to learn it for fun? I read some remarks, from "both sides", on the feasibility of a programmin

Re: XML, JSON, or what?

2006-06-16 Thread Frank Millman
Alan Kennedy wrote: > [Frank Millman] > > I am writing a multi-user accounting/business application, which uses > > sockets to communicate between server and client. The server contains > > all the business logic. It has no direct knowledge of the client. I > > have devised a simple message format

Re: Pycrypto

2006-06-16 Thread luca72
Excuse me again, If the string is not a sting but hex number how i have to proced : look this page: http://www.cs.eku.edu/faculty/styer/460/Encrypt/JS-AES.html Regards Luca -- http://mail.python.org/mailman/listinfo/python-list

wxPython question

2006-06-16 Thread diffuser78
I tried to follow wxPython Demo examples to understand it better. I used wxGlade to generate my code from the GUI builder. When I try to see the code for Menu and Menubar I see a little mismatch in the way functions are being used. For example, wxGlade produces code like this self.Action = wx.Me

Duplex communication with pipes - is possible ?

2006-06-16 Thread Dara Durum
Hi ! I want to create a Process Pool Object. I can hold started processes, and can communicate with them. I tryed with many ipc methods, but every of them have bug or other problem. Sockets are unavailabe (because Windows Firewall hold them). I think I will use pipe. The object's pseudocode: wh

Re: Pycrypto

2006-06-16 Thread Laszlo Nagy
> Not in this implementation: > py> from Crypto.Cipher import AES > py> crypt = AES.new('abcdefghijklmnop', AES.MODE_CBC) > py> c = crypt.encrypt('1') > Traceback (most recent call last): > File "", line 1, in ? > ValueError: Input strings must be a multiple of 16 in length > This is strange.

Re: Pycrypto

2006-06-16 Thread luca72
Thanks Luca -- http://mail.python.org/mailman/listinfo/python-list

Re: a good programming text editor (not IDE)

2006-06-16 Thread bruno at modulix
BartlebyScrivener wrote: > Emacs must be dying if this thread could get all the way to 20 with > nobody arguing with the vi folks. No need to argue. I started with vim, and finally switched to emacs less than one year later. -- bruno desthuilliers python -c "print '@'.join(['.'.join([w[::-1] f

Re: a good programming text editor (not IDE)

2006-06-16 Thread bruno at modulix
John Salerno wrote: > Ant wrote: > >> jEdit is for me still the best text editor available. Very extensible >> with macros (which can be written in Jython with the appropriate plugin >> installed). > > > I like the idea of being extensible, but of course I can only write in > Python. Jython is

Re: GUI in Python using wxGlade

2006-06-16 Thread diffuser78
Did you paste any code ? Also the link for the next message is not working . John Salerno wrote: > [EMAIL PROTECTED] wrote: > > I am a newbie. I was looking for some code where I could a list of > > different items from a file and display it in a list box. Then give a > > user the capability

Re: a good programming text editor (not IDE)

2006-06-16 Thread bruno at modulix
BartlebyScrivener wrote: > I see Eclipse mentioned here a lot. If you go for a Mammoth-weight GUI-only Java IDE and have a really powerful computer, why not ? -- bruno desthuilliers python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for p in '[EMAIL PROTECTED]'.split('@')])" -

Re: a good programming text editor (not IDE)

2006-06-16 Thread bruno at modulix
John Salerno wrote: (snip) > Based on another thread, I tried out Scite, but no matter what I do it > doesn't seem to remember the window size and position, or any options I > choose (like showing line numbers). This is in the configuration files. Don't remember which and where, but I clearly rem

Re: Python is fun (useless social thread) ;-)

2006-06-16 Thread André
John Salerno wrote: > So out of curiosity, I'm just wondering how everyone else came to learn > it. If you feel like responding, I'll ask my questions for easy quoting: > > Did you have to learn it for a job? No. My job is purely administrative; I have absolutely no need to do any programming. I

Re: Pycrypto

2006-06-16 Thread [EMAIL PROTECTED]
Laszlo Nagy wrote: > > You can do this as follows: > > > > py> from Crypto.Cipher import AES > > py> # key has to be 16, 24 or 32 bytes for AES > > py> crypt = AES.new('abcdefghijklmnop', AES.MODE_ECB) > > # we're lucky, the string to encrypt is a multiple of 16 in length > > py> txt = 'ea523a664d

Re: What is Expressiveness in a Computer Language

2006-06-16 Thread Dr.Ruud
Torben Ægidius Mogensen schreef: > Bugs that in dynamically typed languages would > require testing to find are found by the compiler in a statically > typed language. So whil[e ]it may take [l]onger to get a program that[ ] > gets past the compiler, it takes less time to get a program that works

Re: Video capture from webcam on Mac?

2006-06-16 Thread faulkner
gstreamer has python bindings. http://gstreamer.net/ Joseph Chase wrote: > Is there a cross-platform solution for video capture from a webcam? > > I am aware of the Win32 videocapture library, but am unaware of how to > accomplish the same functionality on the Mac side. > > Thanks in advance. --

Re: Video capture from webcam on Mac?

2006-06-16 Thread Diez B. Roggisch
Joseph Chase schrieb: > Is there a cross-platform solution for video capture from a webcam? > > I am aware of the Win32 videocapture library, but am unaware of how to > accomplish the same functionality on the Mac side. You could try and make OpenCV work - it has a part called anygui that allo

Re: Pycrypto

2006-06-16 Thread Laszlo Nagy
> You can do this as follows: > > py> from Crypto.Cipher import AES > py> # key has to be 16, 24 or 32 bytes for AES > py> crypt = AES.new('abcdefghijklmnop', AES.MODE_ECB) > # we're lucky, the string to encrypt is a multiple of 16 in length > py> txt = 'ea523a664dabaa4476d31226a1e3bab0' > py> c =

  1   2   >