python list files and folder using tkinter

2021-12-05 Thread Pascal B via Python-list
Hello, I have already posted a message some time ago for this app. Since then, I didn't code in python or made any changes. I think before getting further with functionnalities a few things or the whole thing need to be changed. For exemple, it would need a button to pick folders and maybe ask if

Php vs Python gui (tkinter...) for small remote database app

2021-06-14 Thread Pascal B via Python-list
Hi, I would like to know if for a small app for instance that requires a connection to a remote server database if php is more suitable than Python mainly regarding security. Php requires one port for http and one port for the connection to the database open. If using Python with a tkinter gui,

Re: learning python building 2nd app, need advices

2021-01-11 Thread pascal z via Python-list
On Monday, January 11, 2021 at 2:07:03 PM UTC, Chris Angelico wrote: > On Tue, Jan 12, 2021 at 1:01 AM pascal z via Python-list > wrote: > > > > On Monday, January 11, 2021 at 1:45:31 PM UTC, Greg Ewing wrote: > > > On 12/01/21 1:12 am, pascal z wrote: > >

Re: learning python building 2nd app, need advices

2021-01-11 Thread pascal z via Python-list
On Monday, January 11, 2021 at 1:45:31 PM UTC, Greg Ewing wrote: > On 12/01/21 1:12 am, pascal z wrote: > > As alternative, I pasted it into github and pasted it back into this page, > > it's ok when pasting but when posting it fails keeping spaces... > The indentation i

Re: learning python building 2nd app, need advices

2021-01-11 Thread pascal z via Python-list
On Monday, January 11, 2021 at 12:00:28 PM UTC, Loris Bennett wrote: > pascal z writes: > > > tab to space on linux is not something easy to do > > I would argue that you are mistaken, although that depends somewhat on > your definition of 'easy'. > >

Re: learning python building 2nd app, need advices

2021-01-11 Thread pascal z via Python-list
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import locale import os import csv from tkinter import messagebox as msg try: from tkinter import * import ttk except: import tkinter as tk #GUI package from tkinter import ttk def fx_BasicListing(): #argx mode = 1 pour basic li

Re: learning python building 2nd app, need advices

2021-01-11 Thread pascal z via Python-list
tab to space on linux is not something easy to do, I had to launch windows and use notepad++. Anyway, indentation should all be converted to spaces below #!/usr/bin/env python3 # -*- coding: utf-8 -*- import locale import os import csv from tkinter import messagebox as msg try: from tkinte

Re: learning python building 2nd app, need advices

2021-01-11 Thread pascal z via Python-list
tab to space on linux is not something easy to do, I had to launch windows and use notepad++. Anyway, indentation should all be converted to spaces below #!/usr/bin/env python3 # -*- coding: utf-8 -*- import locale import os import csv from tkinter import messagebox as msg try: from tkinter

Re: learning python building 2nd app, need advices

2021-01-08 Thread pascal z via Python-list
And something important to this app, is about listing files, how to avoid listing small application files parts .ini and binary files so if it's an application it would tell the size of of the folder of this application and not list the content or make it optionnal? -- https://mail.python.org/m

Re: learning python building 2nd app, need advices

2021-01-08 Thread pascal z via Python-list
any way to attach a file because I loose indentation? -- https://mail.python.org/mailman/listinfo/python-list

learning python building 2nd app, need advices

2021-01-08 Thread pascal z via Python-list
Hi, This is a python app I was working on, can you help making it a beautiful looking app like bleachbit or ccleaner? The whole code below (what it does: it lists all folders and files from a specified path and tells some infos like size in mb or gb... and export it to a csv file for further p

Re: sudo python PermissionError [Errno 13] Permission denied

2020-12-17 Thread Pascal
gt; On 2020-12-17 at 11:17:37 +0100, > Pascal wrote: > > > hi, > > > > here, I have this simple script that tests if the /tmp/test file can be > > opened in write mode : > > > > $ cat /tmp/append > > #!/usr/bin/python > > with open('/tm

sudo python PermissionError [Errno 13] Permission denied

2020-12-17 Thread Pascal
hi, here, I have this simple script that tests if the /tmp/test file can be opened in write mode : $ cat /tmp/append #!/usr/bin/python with open('/tmp/test', 'a'): pass the file does not exist yet : $ chmod +x /tmp/append $ ls -l /tmp/test ls: cannot access '/tmp/test': No such file or director

Re: python show folder files and not subfolder files

2020-10-04 Thread pascal z via Python-list
On Thursday, September 24, 2020 at 4:37:07 PM UTC+2, Terry Reedy wrote: > On 9/23/2020 7:24 PM, pascal z via Python-list wrote: > > Please advise if the following is ok (i don't think it is) > > > > #!/usr/bin/env python3 > > # -*- coding: utf-8 -*- > >

Re: python if and same instruction line not working

2020-10-04 Thread pascal z via Python-list
On Tuesday, September 29, 2020 at 5:28:22 PM UTC+2, MRAB wrote: > On 2020-09-29 15:42, pascal z via Python-list wrote: > > I need to change the script commented out to the one not commented out. Why? > > > > # for x in sorted (fr, key=str.lower): > > # t

python if and same instruction line not working

2020-09-29 Thread pascal z via Python-list
I need to change the script commented out to the one not commented out. Why? # for x in sorted (fr, key=str.lower): # tmpstr = x.rpartition(';')[2] # if x != csv_contents and tmpstr == "folder\n": # csv_contentsB += x # elif x != csv_contents and tmpstr == "

Re: python show folder files and not subfolder files

2020-09-23 Thread pascal z via Python-list
ok, i came up with if os.path.isfile(path) following path = os.path.join(Lpath, f) and it seems to be ok, no dupplicates or wrong sizes... thanks -- https://mail.python.org/mailman/listinfo/python-list

Re: python show folder files and not subfolder files

2020-09-23 Thread pascal z via Python-list
Please advise if the following is ok (i don't think it is) #!/usr/bin/env python3 # -*- coding: utf-8 -*- import os csv_contents = "" output_file = '/home/user/Documents/csv/output3csv.csv' Lpath = '/home/user/Documents/' csv_contents = "FOLDER PATH;Size in Byte;Size in Kb;Size in Mb;Size in Gb

python show .

2020-09-23 Thread pascal z via Python-list
, f_size/1048576, f_size/1073741824) fp = open(output_file, "w") fp.write(csv_contents) fp.close() ### END OF SCRIPT### When I run this script, I get files in subfolders. For now, I need to keep using "os.walk" because the script includes functions that I didn't include to make thing simple. Pascal -- https://mail.python.org/mailman/listinfo/python-list

python oop learning communication between function inside a class

2020-09-17 Thread pascal z via Python-list
Hello, I would like to know how possible it is to call a member function from a class and pass it a variable Example: class Application(tk.Frame): """docstring for .""" def __init__(self, parent): super(Application, self).__init__(parent) self.parent = parent par

fileinput

2019-10-26 Thread Pascal
I have a small python (3.7.4) script that should open a log file and display its content but as you can see, an encoding error occurs : --- import fileinput import sys try: source = sys.argv[1:] except IndexError: source = None for line in fileinput.input(source):

Code with random module faster on the vm than the vm host...

2013-11-08 Thread Pascal Bit
Here's the code: from random import random from time import clock s = clock() for i in (1, 2, 3, 6, 8): M = 0 N = 10**i for n in xrange(N): r = random() if 0.5 < r < 0.6: M += 1 k = (N, float(M)/N) print (clock()-s) Running on win7 python 2.7 32 b

Re: Open Source: you're doing it wrong - the Pyjamas hijack

2012-05-15 Thread Pascal Chambon
Hi, cool down, people, if anything gave FOSS a bad reputation, that's well the old pyjamas website (all broken, because "wheel must be reinvented here"), and most of all the "terror management" that occurred on its mailing list. Previously I had always considered open-source as a benevolent st

Re: John Carmack glorifying functional programing in 3k words

2012-05-03 Thread Pascal J. Bourguignon
Tim Bradshaw writes: > On 2012-05-02 14:44:36 +, jaialai.technol...@gmail.com said: > >> He may be nuts > > But he's right: programmers are pretty much fuckwits[*]: if you think > that's not true you are not old enough. > > [*] including me, especially. You need to watch: http://blog.ted.co

Re: f python?

2012-04-11 Thread Pascal J. Bourguignon
Shmuel (Seymour J.) Metz writes: > In <87wr5nl54w@sapphire.mobileactivedefense.com>, on 04/10/2012 >at 09:10 PM, Rainer Weikusat said: > >>'car' and 'cdr' refer to cons cells in Lisp, not to strings. How the >>first/rest terminology can be sensibly applied to 'C strings' (which >>are sim

Re: Is Programing Art or Science?

2012-04-03 Thread Pascal J. Bourguignon
ccc31807 writes: > On Apr 2, 5:48 pm, "Pascal J. Bourguignon" >> This is a narrow-minded definition of programming. > > Well, that's the point. > > If we make a list and include things like: > computer science > software engineering > computer

Re: Is Programing Art or Science?

2012-04-02 Thread Pascal J. Bourguignon
ccc31807 writes: > Programming is neither an art nor a science, but a trade. > > It's not an art in the sense of painting, music, dance, poetry, etc., > because the objective isn't to make a beautiful something, but to give > instructions to a machine to accomplish some useful task. > > It's not

Re: Lisp refactoring puzzle

2011-07-12 Thread Pascal J. Bourguignon
Neil Cerutti writes: > What's the rationale for providing them? Are the definitions > obvious for collections that a not sets? The rational is to prove that Xah is dumb. -- __Pascal Bourguignon__ http://www.informatimago.com/ A bad day in () is better than a good day in {}.

Re: Keyboard Layout: Dvorak vs Colemak: is it Worthwhile to Improve the Dvorak Layout?

2011-06-13 Thread Pascal J. Bourguignon
Steven D'Aprano writes: > The actual physical cost of typing is a small part of coding. > Productivity-wise, optimizing the distance your hands move is worthwhile > for typists who do nothing but type, e.g. if you spend their day > mechanically copying text or doing data entry, then increasing

Re: GIL in alternative implementations

2011-05-30 Thread Pascal Chambon
Thanks for the details on IronPython's implementation B-) Hopefully Pypy will eventually get rid of its own Gil, since it doesn't do refcounting either. Regards, Pascal Le 28/05/2011 00:52, Dino Viehland a écrit : In IronPython we have fine grained locking on our mutable data

Re: Functional Programing: stop using recursion, cons. Use map & vectors

2011-05-23 Thread Pascal J. Bourguignon
torb...@diku.dk (Torben Ægidius Mogensen) writes: > Xah Lee writes: > > >> Functional Programing: stop using recursion, cons. Use map & vectors. >> >> 〈Guy Steele on Parallel Programing〉 >> http://xahlee.org/comp/Guy_Steele_parallel_computing.html > > This is more or less what Backus said in his

Re: English Idiom in Unix: Directory Recursively

2011-05-19 Thread Pascal J. Bourguignon
t...@sevak.isi.edu (Thomas A. Russ) writes: > "Pascal J. Bourguignon" writes: > >> t...@sevak.isi.edu (Thomas A. Russ) writes: >> > >> > This will only work if there is a backpointer to the parent. >> >> No, you don't need backpointer

Re: English Idiom in Unix: Directory Recursively

2011-05-18 Thread Pascal J. Bourguignon
t...@sevak.isi.edu (Thomas A. Russ) writes: > Well, unless you have a tree with backpointers, you have to keep the > entire parent chain of nodes visited. Otherwise, you won't be able to > find the parent node when you need to backtrack. A standard tree > representation has only directional link

Re: English Idiom in Unix: Directory Recursively

2011-05-17 Thread Pascal J. Bourguignon
Roland Hutchinson writes: > Sorry to have to contradict you, Don't be sorry. > but it really is a textbook example of > recursion. Try this psuedo-code on for size: > > FUNCTION DIR-DELETE (directory) > FOR EACH entry IN directory > IF entry IS-A-DIRECTORY THEN DIR-DELETE (entry).

Re: A question about Python Classes

2011-04-21 Thread Pascal J. Bourguignon
chad writes: > Let's say I have the following > > class BaseHandler: > def foo(self): > print "Hello" > > class HomeHandler(BaseHandler): > pass > > > Then I do the following... > > test = HomeHandler() > test.foo() > > How can HomeHandler call foo() when I never created an in

Re: Directly calling python's function arguments dispatcher

2010-12-13 Thread Pascal Chambon
Le 12/12/2010 23:41, Peter Otten a écrit : Pascal Chambon wrote: I've encountered several times, when dealing with adaptation of function signatures, the need for explicitly resolving complex argument sets into a simple variable mapping. Explanations. Consider that function: def f

Directly calling python's function arguments dispatcher

2010-12-12 Thread Pascal Chambon
Hello I've encountered several times, when dealing with adaptation of function signatures, the need for explicitly resolving complex argument sets into a simple variable mapping. Explanations. Consider that function: def foo(a1, a2, *args, **kwargs): pass calling foo(1, a2=2, a3=3) wi

Re: openmp do loops

2010-11-04 Thread Pascal
On 11/04/2010 11:13 AM, Pascal wrote: Hi, Oops, wrong group, sorry... Pascal -- http://mail.python.org/mailman/listinfo/python-list

openmp do loops

2010-11-04 Thread Pascal
(2,i),hkltable(3,i)) end do !$OMP END PARALLEL DO However it seems that the order of the final table is not guarantee compared to the serial version. I need a j element of the table to stay there because I have an other table and I am using the index to match the data. Regards, Pascal -- http

Re: Land Of Lisp is out

2010-10-28 Thread Pascal J. Bourguignon
kodifik writes: > On Oct 28, 1:55 am, Lawrence D'Oliveiro central.gen.new_zealand> wrote: >> Would it be right to say that the only Lisp still in common use is the Elisp >> built into Emacs? > > Surely surpassed by autolisp (a xlisp derivative inside the Autocad > engineering software). I would

Re: Land Of Lisp is out

2010-10-28 Thread Pascal J. Bourguignon
Alain Ketterlin writes: > Lawrence D'Oliveiro writes: > Would it be right to say that the only Lisp still in common use is the Elisp built into Emacs? >>> >>> There is a new version of Lisp called Clojure that runs on the Java >>> Virtual Machine (JVM) that is on the upswing. >> >> No

Re: Land Of Lisp is out

2010-10-28 Thread Pascal J. Bourguignon
sthueb...@googlemail.com (Stefan Hübner) writes: >> Would it be right to say that the only Lisp still in common use is the Elisp >> built into Emacs? > > Clojure (http://clojure.org) is a Lisp on the JVM. It's gaining more and > more traction. There are actually 2 REAL Lisp on the JVM: - abcl

Re: Land Of Lisp is out

2010-10-27 Thread Pascal J. Bourguignon
Lawrence D'Oliveiro writes: > Would it be right to say that the only Lisp still in common use is the Elisp > built into Emacs? The lisps in common use nowadays are emacs lisp, Common Lisp, and the various schemes, from R4RS to R6RS. Some other lisps are in use in niches too. Eg. guile (a kind

Re: Scheme as a virtual machine?

2010-10-14 Thread Pascal J. Bourguignon
namekuseijin writes: > On 13 out, 19:41, p...@informatimago.com (Pascal J. Bourguignon) > wrote: >> namekuseijin writes: >> > On 11 out, 08:49, Oleg  Parashchenko wrote: >> >> Hello, >> >> >> I'd like to try the idea that Scheme can b

Re: Scheme as a virtual machine?

2010-10-13 Thread Pascal J. Bourguignon
namekuseijin writes: > On 11 out, 08:49, Oleg Parashchenko wrote: >> Hello, >> >> I'd like to try the idea that Scheme can be considered as a new >> portable assembler. We could code something in Scheme and then compile >> it to PHP or Python or Java or whatever. >> >> Any suggestions and point

Re: "Strong typing vs. strong testing"

2010-10-13 Thread Pascal J. Bourguignon
Steven D'Aprano writes: > On Wed, 13 Oct 2010 17:28:42 +0200, Pascal J. Bourguignon wrote: > >>>> But what exactly *is* this number? Is it 0.25, 1.57 or 90? >>> >>> That's the wrong question. It's like asking, what exactly "is" the &g

Re: "Strong typing vs. strong testing"

2010-10-13 Thread Pascal J. Bourguignon
Steven D'Aprano writes: > Hmmm, my ISP's news software really doesn't like it when I cross-post to > more than three newsgroups. So, trying again without comp.lang.c. > > On Wed, 13 Oct 2010 02:00:46 +0100, BartC wrote: > >> "RG" wrote in message >> news:rnospamon-20651e.17410012102...@news.alba

Re: "Strong typing vs. strong testing"

2010-10-12 Thread Pascal J. Bourguignon
Tim Bradshaw writes: > On 2010-10-12 20:46:26 +0100, BartC said: > >> You can't do all that if angles are just numbers. > > I think that the discussion of percentages is relevant here: angles > //are// just numbers, but you're choosing a particular way of > displaying them (or reading them). 100%

Re: "Strong typing vs. strong testing"

2010-10-06 Thread Pascal J. Bourguignon
Keith H Duggar writes: > On Sep 29, 9:01 pm, RG wrote: >> That the problem is "elsewhere in the program" ought to be small >> comfort.  But very well, try this instead: >> >> [...@mighty:~]$ cat foo.c >> #include >> >> int maximum(int a, int b) { return a > b ? a : b; } >> >> int main() { >>  

Re: Problem installing psycopg2 in virtualenv (Ubuntu 10.04, Python 2.5)

2010-10-05 Thread Pascal Polleunus
On 05/10/10 10:18, Alex Willmer wrote: On Oct 5, 7:41 am, Pascal Polleunus wrote: On 05/10/10 00:11, Diez B. Roggisch wrote: Install the python-dev-package. It contains the Python.h file, which the above error message pretty clearly says. Usually, it's a good idea to search pa

Re: "Strong typing vs. strong testing"

2010-10-05 Thread Pascal Costanza
ecause they offer both type safety and succinctness. And when we need algorithms that should work the same independent of types, Haskell has typeclasses which are pretty intuitive, unlike the horrible C++ templates. Static typing still doesn't mesh well with certain kinds of reflection. Pas

Re: Problem installing psycopg2 in virtualenv (Ubuntu 10.04, Python 2.5)

2010-10-04 Thread Pascal Polleunus
On 05/10/10 00:11, Diez B. Roggisch wrote: Pascal Polleunus writes: Hi, I've problems to install psycopg2 in a virtualenv on Ubuntu 10.04. My problem is also explained on stackoverflow: http://stackoverflow.com/questions/3847536/installing-psycopg2-in-virtualenv-ubuntu-10-04-python-2-

Problem installing psycopg2 in virtualenv (Ubuntu 10.04, Python 2.5)

2010-10-04 Thread Pascal Polleunus
ory ./psycopg/python.h:34:4: error: #error "psycopg requires Python >= 2.4" In file included from psycopg/psycopgmodule.c:32: Does anyone have any idea how to solve that? Thanks in advance, Pascal -- http://mail.python.org/mailman/listinfo/python-list

Re: "Strong typing vs. strong testing"

2010-10-01 Thread Pascal J. Bourguignon
"BartC" writes: > "Pascal J. Bourguignon" wrote in message > news:877hi1iq2o@kuiper.lan.informatimago.com... >> "BartC" writes: > >>> (defun fib (n) >>> (if (< n 2) >>> n >>> (+ n (fib (- n

Re: "Strong typing vs. strong testing"

2010-10-01 Thread Pascal J. Bourguignon
"BartC" writes: > "Pascal J. Bourguignon" wrote in message > news:87sk0qkzhz@kuiper.lan.informatimago.com... > >> Nothing extraordinary here. Common Lisp is more efficient than C. >> http://www.lrde.epita.fr/~didier/research/verna.06.ecoop.pdf

Re: "Strong typing vs. strong testing"

2010-10-01 Thread Pascal J. Bourguignon
Seebs writes: > On 2010-10-01, Pascal J. Bourguignon wrote: >> Seebs writes: >>> On 2010-10-01, Pascal J. Bourguignon wrote: >>>> compiler passes wrong type wrong resultfails at run-time >>>>

Re: "Strong typing vs. strong testing"

2010-10-01 Thread Pascal J. Bourguignon
Seebs writes: > On 2010-10-01, Pascal J. Bourguignon wrote: >> static dynamic >> >> compiler detects wrong type fail at compile fails at run-time >>

Re: "Strong typing vs. strong testing"

2010-10-01 Thread Pascal J. Bourguignon
"BartC" writes: > "Pascal J. Bourguignon" wrote in message > news:87zkuyjawh@kuiper.lan.informatimago.com... >> "BartC" writes: >> >>> "Pascal J. Bourguignon" wrote in message > >>>> When Intel will realiz

Re: "Strong typing vs. strong testing"

2010-10-01 Thread Pascal J. Bourguignon
"BartC" writes: > "Pascal J. Bourguignon" wrote in message > news:87sk0qkzhz@kuiper.lan.informatimago.com... >> rustom writes: > >>> Much more mainstream, C# is almost as 'managed' as dynamic languages >>> and has efficiency

Re: "Strong typing vs. strong testing"

2010-10-01 Thread Pascal J. Bourguignon
Seebs writes: > On 2010-09-30, Ian Collins wrote: >> Which is why agile practices such as TDD have an edge. If it compiles >> *and* passes all its tests, it must be right. > > So far as I know, that actually just means that the test suite is > insufficient. :) > > Based on my experience thus

Re: "Strong typing vs. strong testing"

2010-10-01 Thread Pascal J. Bourguignon
rustom writes: > Some points that seem to be missed (or Ive missed them?) > > 1. A dichotomy is being made between 'static' languages like C and > 'dynamic' languages like python/lisp. This dichotomy was valid 30 > years ago, not today. In Haskell for example > > - static checking is stronger th

Re: "Strong typing vs. strong testing"

2010-10-01 Thread Pascal J. Bourguignon
Seebs writes: > On 2010-10-01, Don Geddis wrote: >> in C I can have a function maximum(int a, int b) that will always >> work. Never blow up, and never give an invalid answer. If someone >> tries to call it incorrectly it is a compile error. > > I would agree that the thi

Re: "Strong typing vs. strong testing"

2010-10-01 Thread Pascal J. Bourguignon
Gene writes: > The FA or TM dichotomy is more painful to contemplate than you say. > Making appropriate simplifications for input, any modern computer is a > FA with 2^(a few trillion) states. Consequently, the gestalt of > computer science seems to be to take it on faith that at some very > lar

Re: "Strong typing vs. strong testing"

2010-09-30 Thread Pascal J. Bourguignon
Keith Thompson writes: > const double pi = 2.71828182845904523526; > > To a human reader, it's obviously either a mistake or deliberate > obfuscation, but I'm not sure I'd *want* my compiler to warn me > about it just because I named the object "pi" rather than "e". > (And if I called it "x",

Re: "Strong typing vs. strong testing"

2010-09-30 Thread Pascal J. Bourguignon
Ian Collins writes: > On 10/ 1/10 02:57 AM, Pascal Bourguignon wrote: >> Nick Keighley writes: >> >>> On 27 Sep, 20:29, p...@informatimago.com (Pascal J. Bourguignon) >>> wrote: >>>> If you start with the mindset of static type checking, you will con

Re: "Strong typing vs. strong testing"

2010-09-30 Thread Pascal J. Bourguignon
RG writes: >> The main example of a sensible program that can't be written in a >> non-complete language is an interpreter for a Turing-complete language. >> But presumably a high-assurance application should never contain such a >> thing, since the interpreted programs themselves then wouldn't ha

Re: "Strong typing vs. strong testing"

2010-09-30 Thread Pascal J. Bourguignon
TheFlyingDutchman writes: >> >> > "in C I can have a function maximum(int a, int b) that will always >> > work. Never blow up, and never give an invalid answer. " >> >> > Dynamic typed languages like Python fail in this case on "Never blows >> > up". >> >> How do you define "Never blows up"? > >

Re: "Strong typing vs. strong testing"

2010-09-30 Thread Pascal J. Bourguignon
RG writes: > In article , > Seebs wrote: > >> On 2010-09-30, RG wrote: >> > You can't have it both ways. Either I am calling it incorrectly, in >> > which case I should get a compiler error, >> >> You get a warning if you ask for it. If you choose to run without all >> the type checking on

Re: "Strong typing vs. strong testing"

2010-09-30 Thread Pascal J. Bourguignon
RG writes: > One might hypothesize that the best of both worlds would be a dynamic > language with a static analyzer layered on top. Such a thing does not > exist. It makes an instructive exercise to try to figure out why. (For > the record, I don't know the answer, but I've learned a lot t

Re: "Strong typing vs. strong testing"

2010-09-30 Thread Pascal Bourguignon
Nick Keighley writes: > On 27 Sep, 20:29, p...@informatimago.com (Pascal J. Bourguignon) > wrote: >> If you start with the mindset of static type checking, you will consider >> that your types are checked and if the types at the interface of two >> modules matches you&#x

Re: "Strong typing vs. strong testing"

2010-09-30 Thread Pascal Bourguignon
TheFlyingDutchman writes: > In this example RG is passing a long literal greater than INT_MAX to a > function that takes an int and the compiler apparently didn't give a > warning about the change in value as it created the cast to an int, > even with the option -Wall (all warnings). I think it's

Re: "Strong typing vs. strong testing"

2010-09-30 Thread Pascal Costanza
"blow up". They may throw an exception, on which you can act. You make it sound like a core dump, which it isn't. Pascal -- My website: http://p-cos.net Common Lisp Document Repository: http://cdr.eurolisp.org Closer to MOP & ContextL: http://common-lisp.net/project/closer/ -- http://mail.python.org/mailman/listinfo/python-list

Re: "Strong typing vs. strong testing"

2010-09-30 Thread Pascal J. Bourguignon
Ian Collins writes: > On 09/30/10 06:38 PM, Lie Ryan wrote: >> >> The /most/ correct version of maximum() function is probably one written >> in Haskell as: >> >> maximum :: Integer -> Integer -> Integer >> maximum a b = if a> b then a else b >> >> Integer in Haskell has infinite precision (li

Re: "Strong typing vs. strong testing"

2010-09-29 Thread Pascal J. Bourguignon
Squeamizh writes: > In short, static typing doesn't solve all conceivable problems. > > We are all aware that there is no perfect software development process > or tool set. I'm interested in minimizing the number of problems I > run into during development, and the number of bugs that are in th

Re: "Strong typing vs. strong testing"

2010-09-29 Thread Pascal J. Bourguignon
George Neuner writes: > On Tue, 28 Sep 2010 12:15:07 -0700, Keith Thompson > wrote: > >>George Neuner writes: >>> On 28 Sep 2010 12:42:40 GMT, Albert van der Horst >>> wrote: I would say the dimensional checking is underrated. It must be complemented with a hard and fast rule about onl

Re: "Strong typing vs. strong testing"

2010-09-27 Thread Pascal J. Bourguignon
"Scott L. Burson" writes: > Pascal J. Bourguignon wrote: >> >> On the other hand, with the dynamic typing mindset, you might even wrap >> your values (of whatever numerical type) in a symbolic expression >> mentionning the unit and perhaps other meta d

Re: "Strong typing vs. strong testing"

2010-09-27 Thread Pascal J. Bourguignon
namekuseijin writes: >> in C I can have a function maximum(int a, int b) that will always >> work. Never blow up, and never give an invalid answer. If someone >> tries to call it incorrectly it is a compile error. >> In a dynamic typed language maximum(a, b) can be called with incorrect >> dataty

Re: toy list processing problem: collect similar terms

2010-09-26 Thread Pascal J. Bourguignon
Xah Lee writes: > here's a interesting toy list processing problem. > > I have a list of lists, where each sublist is labelled by > a number. I need to collect together the contents of all sublists > sharing > the same label. So if I have the list > > ((0 a b) (1 c d) (2 e f) (3 g h) (1 i j) (2

Re: Fascinating interview by Richard Stallman at KTH on emacs history and internals

2010-07-19 Thread Pascal J. Bourguignon
Kenneth Tilton writes: > What we do not have is any interesting amount of "free as in speech" > software, because no one uses the GPL. I do. So far, I resist to calls to put my software in a less freedom-promoting license. Hey everybody! Switch from MIT or BSD to GPL! Now! -- __Pascal Bo

Re: C interpreter in Lisp/scheme/python

2010-07-08 Thread Pascal J. Bourguignon
Nick Keighley writes: > On 8 July, 08:08, Nick Keighley > wrote: >> On 7 July, 17:38, Rivka Miller wrote: > > >> > Anyone know what the first initial of L. Peter Deutsch stand for ? >> >> Laurence according to wikipedia (search time 2s) > > oops! He was born Laurence but changed it legally to "

Re: Jewish Pirates of the Caribbean

2010-06-16 Thread Pascal J. Bourguignon
Kryno Bosman writes: > Would you, please, be so nice to share *your* truth somewhere else? He has been long time ago kill-filed by everybody. Your quoting of his message puts you at risk of being kill-filed too. The only way to deal with this kind of post is the kill file and foremost not qu

Re: Which is the best implementation of LISP family of languages for real world programming ?

2010-06-14 Thread Pascal J. Bourguignon
"Antti \"Andy\" Ylikoski" writes: > 12.6.2010 22:54, Pascal J. Bourguignon kirjoitti: >> bolega writes: >>> >>>> [PAIP] >>> >>> Is there anything in this old norvig book that makes it worth >>> pursuing as a text ? &g

Re: Which is the best implementation of LISP family of languages for real world programming ?

2010-06-12 Thread Pascal J. Bourguignon
George Neuner writes: > On Sat, 12 Jun 2010 18:57:08 +0300, "Antti \"Andy\" Ylikoski" > wrote: > >>OT: (very Off Topic.) >>I would not trust dolphins to take care of my investments. > > Why not? Remember the chimpanzee that picked stocks and beat many > professional fund managers?

Re: Which is the best implementation of LISP family of languages for real world programming ?

2010-06-12 Thread Pascal J. Bourguignon
bolega writes: > > > [PAIP] > > Is there anything in this old norvig book that makes it worth > pursuing as a text ? Yes. -- __Pascal Bourguignon__ http://www.informatimago.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Which is the best implementation of LISP family of languages for real world programming ?

2010-06-12 Thread Pascal Costanza
hat is not covered elsewhere. If you are interested in some fundamental AI concepts at the same time, this is one of the best choices. Pascal -- My website: http://p-cos.net Common Lisp Document Repository: http://cdr.eurolisp.org Closer to MOP & ContextL: http://common-lisp.net/project/c

Re: Which is the best implementation of LISP family of languages for real world programming ?

2010-06-12 Thread Pascal Costanza
e. In fact, it seems to me that it's quite common that Common Lisp users do use several implementations on a regular basis, taking advantage of their various strengths depending on the task at hand. Just my €0.02. Pascal -- My website: http://p-cos.net Common Lisp Document Reposi

Re: Which is the best implementation of LISP family of languages for real world programming ?

2010-06-10 Thread Pascal J. Bourguignon
bolega writes: > On Jun 10, 2:51 pm, p...@informatimago.com (Pascal J. Bourguignon) > wrote: >> bolega writes: >> > Which is the best implementation of LISP family of languages for real >> > world programming ? >> >> What's the real world? >>

Re: Which is the best implementation of LISP family of languages for real world programming ?

2010-06-10 Thread Pascal J. Bourguignon
bolega writes: > Which is the best implementation of LISP family of languages for real > world programming ? What's the real world? What's real world programming? -- __Pascal Bourguignon__ http://www.informatimago.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Which is the best implementation of LISP family of languages for real world programming ?

2010-06-10 Thread Pascal Costanza
On 10/06/2010 23:51, Pascal J. Bourguignon wrote: bolega writes: Which is the best implementation of LISP family of languages for real world programming ? What's the real world? What's real world programming? I guess somebody's just enjoying flame wars too much. Pascal

Troubles with python internationalization

2010-05-25 Thread Pascal Chambon
#x27;t sound cool to me. Does anyone know tools/program flags which would list/extract translations that don't seem used anymore ? Thanks for you help, regards, Pascal -- http://mail.python.org/mailman/listinfo/python-list

[CfP] DLS'10

2010-04-19 Thread Pascal Costanza
Dynamic Languages Symposium 2010 October 18, 2010 Co-located with SPLASH (OOPSLA) 2010 In cooperation with ACM SIGPLAN John Ascuaga's Nugget, Reno/Tahoe, Nevada, USA http://www.dynamic-languages-symposium.org/dls-10/ * Call for papers * The 6th Dynamic Languages Symposium (DLS) at the

Re: Castrated traceback in sys.exc_info()

2010-03-23 Thread Pascal Chambon
Gabriel Genellina a écrit : En Mon, 22 Mar 2010 15:20:39 -0300, Pascal Chambon escribió: Allright, here is more concretely the problem : ERROR:root:An error Traceback (most recent call last): File "C:/Users/Pakal/Desktop/aaa.py", line 7, in c return d() File "C:/User

Re: Castrated traceback in sys.exc_info()

2010-03-22 Thread Pascal Chambon
Gabriel Genellina a écrit : En Wed, 17 Mar 2010 09:42:06 -0300, Pascal Chambon escribió: traceback functions indeed allow the manipulation of exception tracebacks, but the root problem is that anyway, since that traceback is incomplete, your "traceback.format_exc().splitlines()"

Precedence of py, pyd, so, egg, and folder modules/packages when importing

2010-03-20 Thread Pascal Chambon
dule types, when several of them are in the same path ? I have found nothing about it online. Thanks for the attention, regards, Pascal -- http://mail.python.org/mailman/listinfo/python-list

Re: Castrated traceback in sys.exc_info()

2010-03-17 Thread Pascal Chambon
rting from the exception catching frame. Regards, Pascal 2010/3/17 Michael Ricordeau > Hi, > > to log tracebacks, you can probably try traceback module. > > I use it like this : > > import traceback > # your code > > for line in traceback.format_exc().splitli

Intra-package C extensions with freeze.py

2010-01-13 Thread Pascal Chambon
, pyrex, cx_freeze...) do that ? I haven't seen such things so far in their docs. Thanks for the attention, Regards, Pascal -- http://mail.python.org/mailman/listinfo/python-list

Re: Feedback wanted on programming introduction (Python in Windows)

2009-11-01 Thread Pascal J. Bourguignon
Thad Smith writes: > Richard Heathfield wrote: > >> ... so I cheerfully installed it on the user's desktop machine >> (Windows ME, would you believe), and then set about configuring the >> reader, when... ouch! No PDF reader on the machine. Not even an >> ancient Adobe version. Oh dear. Program s

Re: Haskell's new logo, and the idiocy of tech geekers

2009-10-02 Thread Pascal J. Bourguignon
Kenneth Tilton writes: > Xah Lee wrote: >> Haskell has a new logo. A fantastic one. Beautiful. For creator, >> context, detail, see bottom of: >> • A Lambda Logo Tour >> http://xahlee.org/UnixResource_dir/lambda_logo.html Don't do that! If you want to watch the logo, just google for haskell

Re: If Scheme is so good why MIT drops it?

2009-07-21 Thread Pascal J. Bourguignon
Tim Bradshaw writes: > On 2009-07-19 19:31:36 +0100, Frank Buss said: > >> (e.g. I >> don't know of a free modern and stable Lisp implemenation with >> mulithreading support for Windows, with a licence with which you can use it >> in closed source commercial programs, like you can do with Python

Re: Direct interaction with subprocess - the curse of blocking I/O

2009-07-02 Thread Pascal Chambon
classes, I'll explore the opportunity for a higher level "file" object too whenever possible (a new filesystem api is in progress here at europython2009, it might be the occasion). regards, Pascal -- http://mail.python.org/mailman/listinfo/python-list

  1   2   3   >