Re: IOError: [Errno 12] Not enough space

2017-04-11 Thread Irmen de Jong
On 11-4-2017 14:30, LnT wrote: > Hi, > > version information > > python 27 Please be more precise, there is no Python 27. (Yeah it is clear you meant 2.7 but still) > java version "1.8.0_111" That should not be relevant > OS -Win 10 , 64Bit , 8GB RAM , 60GB HD 60 GB is not a lot of space for

Re: IOError: [Errno 12] Not enough space

2017-04-12 Thread Irmen de Jong
On 12-4-2017 7:54, LnT wrote: > > Hi Irmen, > > you may please find full log @ https://pastebin.mozilla.org/9018753 I have no idea what I'm looking at. But my initial response was wrong, see the reply by eryk sun; your error has nothing to do with disk space but rather, a lack of system memory

Re: write arrays to disk

2017-04-16 Thread Irmen de Jong
On 16-4-2017 14:28, jorge.conr...@cptec.inpe.br wrote: > Hi, > > I'm new on Python software. I would like to write on disk arrays in binary or > ascii > format. Can someone please help me? > > Thanks, > > Conrado What kind of data is in the arrays? Who or what will be reading the files? And mo

Re: Install python via MS batch file

2017-05-06 Thread Irmen de Jong
On 6-5-2017 7:14, Mahmood Naderan wrote: > Hello, > I have downloaded python-3.6.1-amd64.exe and it is fine to install it through > GUI. However, I want to write a batch file to install it via command line. > Since the installation process is interactive, it seems that the auto-install > batch f

Re: Out of memory while reading excel file

2017-05-10 Thread Irmen de Jong
On 10-5-2017 17:12, Mahmood Naderan wrote: > So, I think numpy is unable to manage the memory. That assumption is very likely to be incorrect. >> np.array([[i.value for i in j] for j in p.rows]) I think the problem is in the way you feed your excel data into the numpy array constructor. The co

Re: How to install Python package from source on Windows

2017-05-18 Thread Irmen de Jong
On 18-5-2017 3:30, Dennis Lee Bieber wrote: > Late-comer... I'm pretty sure 1.4, if not 1.3 was the version > documented in the first books I bought on the language... > > And I bought because AmigaOS was listed as a viable candidate (thanks > Irmen) -- within a week I had written an o

Re: SSL certificate of a server on Windows

2017-05-23 Thread Irmen de Jong
On 23-5-2017 10:19, COPIN Mathieu. wrote: > Hi, > > I want to get a server certificate from the host-name. > > I know I could do something like : >> call(openssl, s_client, -showcerts, -connect, hostname:port) > > > But the thing is to do it without openssl because I want to run the script on

adding type hints to one of my projects, things learned

2017-05-24 Thread Irmen de Jong
ably will because it now has them everywhere already, but my other projects have to wait. As this is the first and only time so far that I have used type hints, it is very likely that I made some mistakes or missed a better solution to some of the issues I encountered. Please correct

Re: Bug or intended behavior?

2017-06-02 Thread Irmen de Jong
On 2-6-2017 19:17, sean.diza...@gmail.com wrote: > Can someone please explain this to me? Thanks in advance! > > ~Sean > > > Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 12:39:47) > [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin > Type "help", "copyright", "credits" or "license" fo

Re: Very Slow Disk Writes when Writing Large Data Blocks

2017-06-02 Thread Irmen de Jong
On 2-6-2017 20:14, remmm wrote: > These write speeds are in the range of 18 to 25 MBytes per second for > spinning disks and about 50 Mbytes/sec for SSDs. Keep in mind these numbers > should be more like 120 MBytes/sec for spinning disks and 300 MBytes/sec for > SSDs. You'll only reach thos

Re: Transitioning from Linux to Windows

2017-06-05 Thread Irmen de Jong
On 3-6-2017 15:44, chitt...@uah.edu wrote: > Ideally, I would like to set up the user on their Windows 7/10 system so that > they can "login" to the ubuntu system (say putty) - change working directory > (to where desired) - run the script (on the ubuntu system) - and scp the file > back to the

Re: Progress on the Gilectomy

2017-06-10 Thread Irmen de Jong
On 10-6-2017 14:54, Steve D'Aprano wrote: > Larry Hastings is working on removing the GIL from CPython: > > https://lwn.net/Articles/723949/ Here is Larry's "How's it going" presentation from Pycon 2017 on this subject https://www.youtube.com/watch?v=pLqv11ScGsQ -irmen -- https://mail.python.o

pythonhosted.org status?

2017-07-02 Thread Irmen de Jong
Hi, I'm using pythonhosted.org to host the docs for various projects but it has either been very slow or unavailable over the past week. Anyone else having the same problems? Should I perhaps consider putting my docs on readthedocs.org instead? Irmen -- https://mail.python.org/mailman/listinfo/

Re: pythonhosted.org status?

2017-07-03 Thread Irmen de Jong
On 02/07/2017 11:27, breamore...@gmail.com wrote: > On Sunday, July 2, 2017 at 10:03:34 AM UTC+1, Irmen de Jong wrote: >> Hi, >> I'm using pythonhosted.org to host the docs for various projects but it has >> either been >> very slow or unavailable over the past w

Re: JSON encoding PDF or Excel files in Python 2.7

2017-07-21 Thread Irmen de Jong
On 21/07/2017 20:52, Skip Montanaro wrote: > I would like to JSON encode some PDF and Excel files. I can read the content: > > pdf = open("somefile.pdf", "rb").read() > > but now what? json.dumps() insists on treating it as a string to be > interpreted as utf-8, and bytes == str in Python 2.x. I

zipapp should not include temporary files?

2017-07-26 Thread Irmen de Jong
Hi, when creating an executable zip file using the zipapp module, it's a little sad to see that no effort is done to filter out obvious temporary files: the resulting zipfile contains any *.pyc/pyo files and other things such as .git, .tox, .tmp folders. The documentation says "zip is created f

Re: Installation Python 3.6.x on Windows using command line installer (without GUI)

2017-07-28 Thread Irmen de Jong
On 27/07/2017 20:55, Andreas Jung wrote: > > I need to installed Python 3.6.x on Windows as part of an automated process > without user-interaction. Recently Python releases provided MSI files for > installation using the "msiexec" utility however there are no more MSI > release files available

Re: zipapp should not include temporary files?

2017-07-28 Thread Irmen de Jong
On 27/07/2017 00:03, Paul Moore wrote: > On Wednesday, 26 July 2017 18:37:15 UTC+1, Irmen de Jong wrote: >> What do you think? Should the zipapp module perhaps be improved to >> automatically skip >> obvious temporary files or perhaps allow to provide a filter function? &g

Re: zipapp should not include temporary files?

2017-07-28 Thread Irmen de Jong
On 28/07/2017 18:36, Irmen de Jong wrote: > On 27/07/2017 00:03, Paul Moore wrote: >> If you want to create a feature request for a filter function on >> bugs.python.org and assign it to me, I'll take a look at it. \ > > > I will do this, thanks in advance. Should

Re: Issues with Python

2017-07-30 Thread Irmen de Jong
On 30/07/2017 23:31, Ode Idoko wrote: > Hi, I am new to Python and though I have been able to download the 3.6 > version on my laptop , I still have issues with the syntax. While writing a > program to execute, it will display syntax error with different shades of > color usually green or yellow

SSL/TLS support in Pyro4

2017-08-03 Thread Irmen de Jong
' SSL certificate for testing purposes. I don't think letsencrypt can help here because it is only for web sites? (and their certs are only valid for a very short period) Cheers Irmen de Jong -- https://mail.python.org/mailman/listinfo/python-list

Re: SSL/TLS support in Pyro4

2017-08-04 Thread Irmen de Jong
On 04/08/2017 10:26, Robin Becker wrote: > On 03/08/2017 19:30, Irmen de Jong wrote: > . >> >> I wonder if any current (or new) users of Pyro4 want to check this out? The >> biggest >> concern I have is that I only have dummy (self-signed) certificates so I

Re: SSL/TLS support in Pyro4

2017-08-04 Thread Irmen de Jong
On 03/08/2017 20:30, Irmen de Jong wrote: > Alternatively, is there a cheap way to get an 'official' SSL certificate for > testing > purposes. I don't think letsencrypt can help here because it is only for web > sites? > (and their certs are only valid for a very

Re: SSL/TLS support in Pyro4

2017-08-04 Thread Irmen de Jong
On 04/08/2017 15:44, Robin Becker wrote: > .. >> >> Hi Robin >> >> I am not sure how this is any benefit over the self-signed root certs that I >> now use? >> >> Except for the fact that these are a root cert as well and don't use any CA >> trust chain. >> To be able to validate this cert

wrote a commodore-64 emulator using just Python

2017-08-13 Thread Irmen de Jong
Hi, As another experiment with using just tkinter for graphics, this time I created a Commodore-64 emulator. You can find it here https://github.com/irmen/pyc64 You only need the pillow library to be able to run this. I guess most people have that one already anyway. It works pretty well :) (

Re: wrote a commodore-64 emulator using just Python

2017-08-14 Thread Irmen de Jong
On 08/13/2017 03:50 PM, Irmen de Jong wrote: > Now, it's not a "true" emulator: obviously it doesn't simulate the C64 on a > hardware > level. It does however implement enough to load and run simple basic programs > that can > show interesting PETSCII pict

tkinter keypress events are a mess for numpad keys

2017-08-28 Thread Irmen de Jong
Hi, Using tkinter in python3, I was trying to intercept individual keypresses (and releases) of keys on the numeric keypad. I want to use this as a simple joystick simulation. While you can bind the event, actually doing something sensible with it in a cross platform way seems utterly impossib

Re: tkinter keypress events are a mess for numpad keys

2017-08-29 Thread Irmen de Jong
On 29/08/2017 06:32, Terry Reedy wrote: > *The* documentation (for 8.6) is the tcl.tk/man doc set: > https://www.tcl.tk/man/tcl8.6/TkCmd/contents.htm > For the level of detail you are looking at, they are essential. > > The nmt docs for 8.5 are neither complete (intentionally not) nor always > c

I just wrote my first Python program a guessing game and it exits with an error I get this.

2013-06-05 Thread Armando Montes De Oca
Traceback (most recent call last): File "Guessing_Game.py", line 32, in input (enter) File "", line 0 ^ SyntaxError: unexpected EOF while parsing -- (program exited with code: 1) This is the only place a string is used: else: print "Sorry you loose the game."

Re: I just wrote my first Python program a guessing game and it exits with an error I get this.

2013-06-05 Thread Armando Montes De Oca
On Wednesday, June 5, 2013 10:40:52 AM UTC-4, Armando Montes De Oca wrote: > Traceback (most recent call last): > > File "Guessing_Game.py", line 32, in > > input (enter) > > File "", line 0 > > ^ > > SyntaxError: unexpected EO

Re: I just wrote my first Python program a guessing game and it exits with an error I get this.

2013-06-05 Thread Armando Montes De Oca
I just post all my code I have for the guessing game. -- http://mail.python.org/mailman/listinfo/python-list

Re: I just wrote my first Python program a guessing game and it exits with an error I get this.

2013-06-05 Thread Armando Montes De Oca
import random import sys enter = "Please Press Enter To Continue..." print " Hello! Welcome to a Guessing game!" print " Please Guess a number between 1 - 100" computernum = random.randint (1, 100) Guess1 = input ( "My First Guess Is: ") if Guess1 == computernum: print "You Win !"

Re: I just wrote my first Python program a guessing game and it exits with an error I get this.

2013-06-05 Thread Armando Montes De Oca
Thank You now the program exits with: (program exited with code: 0) Press return to continue Is there a way to get the line (program exited with code: 0) to say something like: "The game will end now" Press return to contine -- http://mail.python.org/mailman/listinfo/python-list

Re: I just wrote my first Python program a guessing game and it exits with an error I get this.

2013-06-05 Thread Armando Montes De Oca
Thank You I will give it a try I am using Linux Mint 14 Nadia and my Python is with Geany 1.22 and I think it is python 2 -- http://mail.python.org/mailman/listinfo/python-list

Re: I just wrote my first Python program a guessing game and it exits with an error I get this.

2013-06-05 Thread Armando Montes De Oca
try: input = raw_input except NameError: pass This gave me the same output exited with code zero Same with or without. I am happy with the code 0 in it for now but if anyone knows with Geany in Linux Mint 14 Nadia what I can do to get it to say something nice and proper I would ap

Re: I just wrote my first Python program a guessing game and it exits with an error I get this.

2013-06-05 Thread Armando Montes De Oca
Well I am replying to To whom it may concern at this point I am a bit lost. I posted all my code. I am not taking classes on this nor do I have a book I followed a guy on You Tube. I am a student but I heard Python is a good language to learn in conjunction with C++ and Perl for example. I have

Re: I just wrote my first Python program a guessing game and it exits with an error I get this.

2013-06-05 Thread Armando Montes De Oca
Not to make excuses as to my forum etiquette I apologize. I am half Cuban and simple. I meant no disrespect I like Mr. Goldstick's name. Maybe I can find the answer somewhere else true. However a simple code to close the program like in Visual Basic "Me.close" seems like something that should c

Re: I just wrote my first Python program a guessing game and it exits with an error I get this.

2013-06-05 Thread Armando Montes De Oca
Well I am sure this will end up a simple solution which is not solved by the geniuses with no sense of humor. Programmers are known for being odd nerds and I just got two of them. Goldstick Jesus what a couple of lazy minded nonsense. Your an ass hole. -- http://mail.python.org/mailman/listinf

Re: I just wrote my first Python program a guessing game and it exits with an error I get this.

2013-06-06 Thread Armando Montes De Oca
Yes Steven a C book I am reading has a quote "Every programmer is fluent in swearing" After my blow ups and confusion I am happy with my program anyway. I will get better at it eventually. I did change things to "raw_input" and works fine. -- http://mail.python.org/mailman/listinfo/python-list

Re: [Neo4j] ANN: python-blueprints, printemps and printemps client

2012-10-16 Thread Javier de la Rosa
lueprints, you will be up and running in less than 5 minutes! > checkout the documentation and the code. > > The intention of the announcement is (1) I thought others may find it > useful, and (2) to get feedback. So, please let me know what you think. > > > Amirouche > > -- &

Running embedded python shell on a separate thread

2012-05-10 Thread Roel van de Kraats
e prevented when Python's own signal handler would forward the SIGINT signal (or any signal) to the 'python' thread. Kind regards, Roel van de Kraats typedef void (*sighandler_t)(int); // don't use PyOS_setsig() since we need the SA_NODEFER flag int set_sighandler(

Re: Lambda question

2011-06-04 Thread Vito 'ZeD' De Tullio
jyoun...@kc.rr.com wrote: > I was surfing around looking for a way to split a list into equal > sections. non-recursive, same-unreadeable (worse?) one liner alternative: def chunks(s, j): return [''.join(filter(None,c))for c in map(None,*(s[i::j]for i in range(j)))] -- By ZeD -- http:/

Re: What is this syntax ?

2011-06-19 Thread Vito 'ZeD' De Tullio
Roy Smith wrote: > There's something nice about building up strings in-line, as > opposed to having to look somewhere to see what's being interpolated. > To give a more complex example, consider: > > print "$scheme://$host:$port/$route#$fragment" > > That certainly seems easier to me to read tha

Re: What is this syntax ?

2011-06-19 Thread Vito 'ZeD' De Tullio
Steven D'Aprano wrote: >> and you can achieve php interpolation via locals() >> > a = 'b' > print("%(a)s" % locals()) >> b > > You can do that, but when reading code I consider any direct use of > locals() (and globals() for that matter) to be a code smell: well you're right, me neither

Python Bluetooth

2011-06-26 Thread Valentin de Pablo Fouce
Hi all, I'm looking for developing a bluetooth application in python, and I'm looking for the most suitable python library for it. Googling some time I found pyBluez (http://code.google.com/p/pybluez/), however, the library seems to be stopped since end 2009 (latest update Nov 2009) and not to man

Re: how to separate a list into two lists?

2011-08-06 Thread Vito 'ZeD' De Tullio
David Robinow wrote: > On Sat, Aug 6, 2011 at 1:23 PM, Kabie wrote: >> No. >> L1, L2 = zip(*L) > > Not quite. That makes L1 & L2 tuples. > > L1, L2 = zip(*L) > L1 = list(L1) > L2 = list(L2) > ??? L1, L2 = map(list, zip(*L)) -- By ZeD -- http://mail.python.org/mailman/listinfo/python-list

Re: allow line break at operators

2011-08-11 Thread Vito 'ZeD' De Tullio
Yingjie Lan wrote: > :The trouble of dealing with long lines can be avoided by a smart > :editor. It's called line wrap. > > Yeah, usually they just wrap it pretty arbitrarily, > and you don't have any control, isn't it? umm... besides "notepad" pretty much any other serious "programmer editor"

Re: OT: Code Examples

2011-03-01 Thread Erik de Castro Lopo
rom 1998 to 2004 and rejected it in favour of strict statically typed functional langauges like Ocaml and Haskell. Erik -- ------ Erik de Castro Lopo http://www.mega-nerd.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: OT: Code Examples

2011-03-01 Thread Erik de Castro Lopo
Paul Rubin wrote: > Erik de Castro Lopo writes: > > Why Python? I really can't understand the rush of every man and > > his dog to Python. > > Are you trolling? Definitely not. As I said I used Python for a number of years and ditched it in favour of Ocaml and Haskell

Re: OT: Code Examples

2011-03-01 Thread Erik de Castro Lopo
Paul Rubin wrote: > Erik de Castro Lopo writes: > > Why Python? I really can't understand the rush of every man and > > his dog to Python. > > Are you trolling? All my responses to this thread are really mean for comp.dsp, not f

Re: OT: Code Examples

2011-03-09 Thread Erik de Castro Lopo
Erik de Castro Lopo wrote: > Paul Rubin wrote: > > > Anyway, try googling "evil mangler" > > I know what the "evil mangler" is. It was called that because it > threw away all the principles of good software design in favour > of expediency. GHC now ha

Re: English Idiom in Unix: Directory Recursively

2011-05-20 Thread Jonathan de Boyne Pollard
〈English Idiom in Unix: Directory Recursively〉 http://xahlee.org/comp/idiom_directory_recursively.html -- English Idiom in Unix: Directory Recursively Xah Lee, 2011-05-17 Today, let's discuss something in the category of lingustics. You know how in unix

Re: English Idiom in Unix: Directory Recursively

2011-05-20 Thread Jonathan de Boyne Pollard
AFAICS what emacs calls "recursive delete" is what the ordinary person would simply call "delete". Presumably the non-recursive delete is called simply "delete" but is actually something more complicated than delete, and you're supposed to know what that is. The "non-recursive delete" would be

Re: English Idiom in Unix: Directory Recursively

2011-05-20 Thread Jonathan de Boyne Pollard
I think what happens is that the “recursive” has become a idiom associated with directory to such a degree that the unix people don't know what the fuck they are talking about. They just simply use the word to go with directory whever they mean the whole directory. In the emacs case: “Recursiv

Re: English Idiom in Unix: Directory Recursively

2011-05-21 Thread Jonathan de Boyne Pollard
The supposed inefficiency of recursive implementations is based largely on the properties of hardware that is now obsolete. With modern processors there's no great efficiency hit. In some of the smaller microcontrollers, it's true, you do have to worry about stack overflow; but the ARM processo

Can signal.alarm be safely cleared in python?

2016-11-17 Thread Pedro Franco de Carvalho
Assume a python program sets a handler function for the `signal.SIGALRM` signal, and then schedules an alarm in T seconds with `signal.alarm(T)`. Assume the program later cancels any scheduled alarm with `signal.alarm(0)`. Can the program safely assume that after the call to `signal.alarm(0)` com

Re: Parametric Polymorphism

2005-09-26 Thread Pierre Barbier de Reuille
Kay Schluehr a écrit : > Catalin Marinas wrote: > >>Hi, >> >>Sorry if this was previously discussed but it's something I miss in >>Python. I get around this using isinstance() but it would be cleaner >>to have separate functions with the same name but different argument >>types. I think the idea g

User-defined augmented assignment

2005-09-29 Thread Pierre Barbier de Reuille
Hello, a discussion began on python-dev about this. It began by a bug report, but is shifted and it now belongs to this discussion group. The problem I find with augmented assignment is it's too complex, it's badly explained, it's error-prone. And most of all, I don't see any use-case for it ! T

Re: User-defined augmented assignment

2005-09-29 Thread Pierre Barbier de Reuille
Reinhold Birkenfeld a écrit : > Pierre Barbier de Reuille wrote: > > >>So, what I would suggest is to drop the user-defined augmented >>assignment and to ensure this equivalence : >> >>a X= b <=> a = a X b >> >>with 'X' begin one of th

Re: how to debug when "Segmentation fault"

2005-10-04 Thread Pierre Barbier de Reuille
Maksim Kasimov a écrit : > > Hello, > > my programm sometime gives "Segmentation fault" message (no matter how > long the programm had run (1 day or 2 weeks). And there is nothing in > log-files that can points the problem. > My question is how it possible to find out where is the problem in the

Re: how to debug when "Segmentation fault"

2005-10-05 Thread Pierre Barbier de Reuille
Maksim Kasimov a écrit : > > yes, to generete core dump is the best way, > > but the command "$ ulimit -c 50" don't make python to generete core > dump in the time of crush. > > I would like to know how to run python script so if it crushes than core > dump will be genereted. > > Thanks >

Re: "no variable or argument declarations are necessary."

2005-10-06 Thread Pierre Barbier de Reuille
Mike Meyer a écrit : > Antoon Pardon <[EMAIL PROTECTED]> writes: > >>Op 2005-10-03, Steven D'Aprano schreef <[EMAIL PROTECTED]>: >> >>>On Mon, 03 Oct 2005 13:58:33 +, Antoon Pardon wrote: >> >>Declarations also allow easier writable closures. Since the declaration >>happens at a certain scope,

Hengelsportbeurs

2005-10-23 Thread Henk-Jan de Jong
http://www.drentorganisatiebureau.nl/beurs/indexfront.html Nog zin om te gaan? -- http://mail.python.org/mailman/listinfo/python-list

__slots__ and class attributes

2005-11-03 Thread Ewald R. de Wit
I'm running into a something unexpected for a new-style class that has both a class attribute and __slots__ defined. If the name of the class attribute also exists in __slots__, Python throws an AttributeError. Is this by design (if so, why)? class A( object ): __slots__ = ( 'value', )

Re: __slots__ and class attributes

2005-11-04 Thread Ewald R. de Wit
Steven Bethard wrote: > But why do you want a class level attribute with the same name as an > instance level attribute? I would have written your class as: > > class A(object): > __slots__ = ['value'] > def __init__(self, value=1): > self.value = value > > where the default va

What do you use as symbols for Python ?

2005-11-09 Thread Pierre Barbier de Reuille
When you need some symbols in your program, what do you use in Python ? For example, an object get a state. This state is more readable if expressed as a symbols, for example "opened", "closed", "error". Typically, in C or C++, I would use an enum for that: enum OBJECT_STATE { opened, closed, er

Re: What do you use as symbols for Python ?

2005-11-10 Thread Pierre Barbier de Reuille
Well, thank you all ! I still feel it could be good for Python to have some kind of symbols built in, and I will try to expose that to the python-dev list, to see their reaction. But in the different solutions proposed, the one I prefer is probably the definitions of contants in a class to group

Proposal for adding symbols within Python

2005-11-12 Thread Pierre Barbier de Reuille
Please, note that I am entirely open for every points on this proposal (which I do not dare yet to call PEP). Abstract This proposal suggests to add symbols into Python. Symbols are objects whose representation within the code is more important than their actual value. Two symbols needs

Re: Proposal for adding symbols within Python

2005-11-13 Thread Pierre Barbier de Reuille
Ben Finney a écrit : > Pierre Barbier de Reuille <[EMAIL PROTECTED]> wrote: > >>This proposal suggests to add symbols into Python. > > > I still don't think "symbol" is particularly descriptive as a name; > there are too many other things already

Re: Proposal for adding symbols within Python

2005-11-13 Thread Pierre Barbier de Reuille
Mike Meyer a écrit : > Pierre Barbier de Reuille <[EMAIL PROTECTED]> writes: > >>Please, note that I am entirely open for every points on this proposal >>(which I do not dare yet to call PEP). >> >>Abstract >> >> [...] > > >>

Re: Proposal for adding symbols within Python

2005-11-13 Thread Pierre Barbier de Reuille
Mike Meyer a écrit : > Pierre Barbier de Reuille <[EMAIL PROTECTED]> writes: > >>>While you don't make it clear, it seems obvious that you intend that >>>if $open occurs twice in the same scope, it should refer to the same >>>symbol. So you're usi

Re: Proposal for adding symbols within Python

2005-11-13 Thread Pierre Barbier de Reuille
Steven D'Aprano a écrit : > On Sun, 13 Nov 2005 10:11:04 +0100, Pierre Barbier de Reuille wrote: > > >>The problem, IMHO, is that way you need to declare "symbols" >>beforehands, that's what I was trying to avoid by requiring a new syntax. > > &g

Re: Proposal for adding symbols within Python

2005-11-13 Thread Pierre Barbier de Reuille
Ben Finney a écrit : > Pierre Barbier de Reuille <[EMAIL PROTECTED]> wrote: > >>Mike Meyer a écrit : >> >>>Hmm. You know, $symbol$ doesn't seem nearly as bad as $symbol. It >>>tickles TeX, not P***. I could live with that. >> >>Yep,

Re: Proposal for adding symbols within Python

2005-11-13 Thread Pierre Barbier de Reuille
Steven D'Aprano a écrit : > On Sun, 13 Nov 2005 12:33:48 +0100, Pierre Barbier de Reuille wrote: > > >>Steven D'Aprano a écrit : >>[...] > > > If you want to be technical, Python doesn't have variables. It has names > and objects. > > If

Re: Proposal for adding symbols within Python

2005-11-13 Thread Pierre Barbier de Reuille
Björn Lindström a écrit : > Ben Finney <[EMAIL PROTECTED]> writes: > > >>I've yet to see a convincing argument against simply assigning values >>to names, then using those names. > > > The problem with that is that you can't pass around the names of objects > that are used for other things. Obv

Pregunta sobre python

2005-11-14 Thread Andres de la Cuadra
Hola, me llamo Andres de la cuadra, soy un usuario de python en chile y me gustaría saber como puedo cerrer un programa a través de python. Yo se que con la librería os puedo ejecutar programas, pero no e encontrado una librería para poder cerrarlos Gracias -- http://mail.python.org/mailman

Re: Proposal for adding symbols within Python

2005-11-14 Thread Pierre Barbier de Reuille
Ben Finney a écrit : > Michael <[EMAIL PROTECTED]> wrote: > >>Ben Finney wrote: >> >>>I've yet to see a convincing argument against simply assigning >>>values to names, then using those names. >> >>If you have a name, you can redefine a name, therefore the value a >>name refers to is mutable. > >

Re: Not enough arguments for format string

2005-11-14 Thread Pierre Barbier de Reuille
Kevin Walzer a écrit : > I'm getting an error in a Python script I'm writing: "not enough > arguments for format string." The error comes at the end of the > os.system command, referenced below. Any ideas? > > --- > > import EasyDialogs > import os > import sys > > > password = EasyDialogs.AskP

Re: Proposal for adding symbols within Python

2005-11-16 Thread Pierre Barbier de Reuille
Rocco Moretti a écrit : [...] > > > I did, but I still don't see why it is an argument against using > strings. The point you may not appreciate is that (C)Python already uses > strings to represent names, as an important part of its introspective > abilities. > Well, I'm well aware of that, bu

tk the python way

2005-01-05 Thread Gabriel Cosentino de Barros
Title: tk the python way I'm strugling a little with TK, and the docs on the web aren't helping much. I've already rewritten about twelve times a basic class that was supposed to simply draw a window. It's not even close the final draft, but i tought "well, let's start with something easy t

RE: How to make executable file ?

2005-01-05 Thread Gabriel Cosentino de Barros
Title: RE: How to make executable file ? > Also, you can try with py2exe. It's very easy. > Catalin. > > You may want to try cx_freeze. I brief experience with both. may be helpful 1. I did a little program on python/TK. Some 100 lines or less 2. executed cx_freeze 3. executed py2exe In

Re: how to visualize symbol table?

2005-01-12 Thread Pierre Barbier de Reuille
Thomas Korimort a écrit : Hi, how can i visualize the content of the symbol table in Python? Sometimes i want to know which symbols are imported from apackage and such kind of things Greetings, THomas Korimort Do you mean something like : dir(module) ??? Pierre -- http://mail.python.org/mailman/l

Re: Unclear On Class Variables

2005-01-13 Thread Pierre Barbier de Reuille
Antoon Pardon a écrit : Well I find this a confusing behaviour on python's part. The fact that instance.field can mean something different, depending on where in a statement you find it, makes the behaviour inconsistent. I know people in general here are against declarations, but declarations could

Re: Unclear On Class Variables

2005-01-14 Thread Pierre Barbier de Reuille
Pierre Barbier de Reuille a écrit : Antoon Pardon a écrit : Well I find this a confusing behaviour on python's part. The fact that instance.field can mean something different, depending on where in a statement you find it, makes the behaviour inconsistent. I know people in general here are ag

Re: directory bug on linux; workaround?

2005-01-17 Thread Ewald R. de Wit
Russell E. Owen wrote: > It seems that the path was to a "fat" file partition and included a > directory name that was all uppercase. The directory was created, but > using lowercase. I'm not yet sure the version of python. > > The workaround for now is to not use fat file partitions. But I was

Re: extension module, thread safety?

2005-01-17 Thread Pierre Barbier de Reuille
David Bolen a écrit : If the threads under discussion are all Python threads, then by default yes, the extension module C functions will appear to be atomic from the perspective of the Python code. When the Python code calls into the extension module, the GIL (global interpreter lock) is still bei

Re: extension module, thread safety?

2005-01-18 Thread Pierre Barbier de Reuille
Nick Coghlan a écrit : Pierre Barbier de Reuille wrote: With the current CPython, it's very hard to mix Python and C in a multithreading application (with C-threads, not Python-threads). In fact I never really succeeded in that task because of that GIL ! I have a multi-thread applicatio

Re: extension module, thread safety?

2005-01-18 Thread Pierre Barbier de Reuille
Nick Coghlan a écrit : The Python 2.4 docs claim the functions were added in Python 2.3, even though they aren't documented in the 2.3.4 docs. The 2.3 release PEP (PEP 283) confirms that PEP 311 (which added these functions) went in. Indeed, I just tested it and now it works fine :) Thanks a lot

Re: extension module, thread safety?

2005-01-19 Thread Pierre Barbier de Reuille
David Bolen a écrit : Nick Coghlan <[EMAIL PROTECTED]> writes: And even before that it was certainly possible to call into the Python interpreter from a native thread using existing functions, albeit the newer functions are more convenient (and perhaps more robust, I don't know). My earliest intera

Re: map in Python

2005-01-21 Thread Pierre Barbier de Reuille
You have three ways to do what you want : First wayt is to use lambda. Then, you want to write : >>> map(lambda x: re.sub("[a-z]", "", x), test) Second is to use regular named function : >>> def remove_letters( s ): ... re.sub("[a-z]", "", s) >>> map(remove_letters, test) A third way would be to

Re: Help with Threading

2005-01-24 Thread Pierre Barbier de Reuille
Philip Smith a écrit : Hi I am fairly new to Python threading and my needs are simple(!) I want to establish a number of threads each of which work on the same computationally intensive problem in different ways. I am using the thread module rather than the threading module. My problem is I can't

RE: Point of Sale

2005-01-27 Thread Gabriel Cosentino de Barros
mailto:[EMAIL PROTECTED]] Sent: quinta-feira, 27 de janeiro de 2005 11:08 To: python-list@python.org Subject: Point of Sale Hi, My company has given me a rather cool project: I have to provide them with an open-source python-based point-of-sale / cash register system that can integrate with the

leo editor

2005-01-27 Thread Gabriel Cosentino de Barros
Title: leo editor A co-worker was trying to convince me that Leo[1] is the better editor of all since it outline the code and let you easily document algoritms and logic. He was writting php code with it. I use jEdit or vi to write my python and my php Then after a day of debates I ended up

RE: Tkinter vs wxPython

2005-01-27 Thread Gabriel Cosentino de Barros
Title: RE: Tkinter vs wxPython *warning* My very own opinions ahead. no flame intended. > Try them both out for an hour or two, and go with whichever > one "feels right".  You very likely won't be making a mistake. i did that for java+swing, python+tk, python+gtk, python+wxWindow and pytho

Re: type of simple object

2005-02-01 Thread Pierre Barbier de Reuille
[EMAIL PROTECTED] a écrit : Thank you guys. My function should multiply every element of a list, for example "something" and "something" can be an integer or another list. If it deals with integer than it is ok, but If it deals with list than it become false for example list*2 = listlist, and what

Re: Is this a contradiction in the docs ?

2005-02-02 Thread Pierre Barbier de Reuille
Fuzzyman a écrit : The following two passages from the python documentation *appear* to contradict each other. Equally possible (or more likely !) is that I misunderstand it : eval : This function can also be used to execute arbitrary code objects (such as those created by compile()). In this case

Re: type of simple object

2005-02-02 Thread Pierre Barbier de Reuille
Steve Holden a écrit : Pierre Barbier de Reuille wrote: [EMAIL PROTECTED] a écrit : Thank you guys. My function should multiply every element of a list, for example "something" and "something" can be an integer or another list. If it deals with integer than it is ok, but I

Re: Is this a contradiction in the docs ?

2005-02-02 Thread Pierre Barbier de Reuille
Fuzzyman a écrit : Yes.. but that would mean that eval could only run code objects that "consist[s] of a single expression".. which I doubt is the reality or the intention. Regards, Fuzzyman http://www.voidspace.org.uk/python/index.shtml [Sorry, I deleted the commented lines because they were comp

Re: Redirecting stdout/err under win32 platform

2005-02-02 Thread Pierre Barbier de Reuille
David Douard a écrit : Alan, I did search Google for this problem (not enough, thou). In fact, I found some kind of solution (by myself, not that much on Google), but it is not really satisfactory. I have used win32 pipes to do so (win32api.CreatePipe). I can redirect stdout/stderr to it from my py

Re: IDLE history, Python IDE, and Interactive Python with Vim

2005-02-03 Thread Pierre Barbier de Reuille
Fuzzyman a écrit : If you use IPython for your interactive mode stuff, you'll have a nice history... Regards, Fuzzy http://www.voidspace.org.uk/python/index.shtml Best event : if your "EDITOR" system variable in "vim", using the "ed" command in ipython will bring "vim" with (eventually) the code y

<    5   6   7   8   9   10   11   12   >