Re: An error when i switched from python v2.6.6 => v3.2.3

2013-03-09 Thread Νίκος Γκρ33κ
Τη Σάββατο, 9 Μαρτίου 2013 7:05:08 π.μ. UTC+2, ο χρήστης Steven D'Aprano έγραψε: > On Fri, 08 Mar 2013 19:18:50 -0800, Νίκος Γκρ33κ wrote: > > > > > I agree with you but i wonder why the world would want to dedicate hours > > > for fiddling with my script? Why anyone should mess with my website

Re: Running external module and accessing the created objects

2013-03-09 Thread Steven D'Aprano
On Fri, 08 Mar 2013 22:06:28 -0500, Kene Meniru wrote: > Program summary: > > I have a module called user.py that imports another module called > app.py. Functions in app.py are used in user.py to describe 3D objects. > These objects are saved in another object described in doc.py. What do you m

RE: Set x to to None and del x doesn't release memory in python 2.7.1 (HPUX 11.23, ia64)

2013-03-09 Thread Wong Wah Meng-R32813
If the memory usage is continually growing, you have something else that is a problem -- something is holding onto objects. Even if Python is not returning memory to the OS, it should be reusing the memory it has if objects are being freed. -- [] Yes I have verified my python applicat

Re: Apparent magic number problem

2013-03-09 Thread Peter Otten
Colin J. Williams wrote: > The program runs correctly under each version, but it runs more slowly > under 3.2. > This is probably due to the fact that the .pyc file is created for the > Python 2.7 execution. > When Python 3.2 is run it fails to create a new .pyc file and if the 2.7 > .pyc is of

Trelby (was: Any other screenwriters?)

2013-03-09 Thread W. Martin Borgert
On 2013-03-08 13:07, Rick Dooling wrote: > However, most of these programs are "apps" with closed GUIs, and of course > I'm looking for a way to do the same thing with Python and call it from the > command-line or from within Vim You should consider taking a look at Trelby. It is free software (

Re: Set x to to None and del x doesn't release memory in python 2.7.1 (HPUX 11.23, ia64)

2013-03-09 Thread Dave Angel
On 03/09/2013 03:07 AM, Wong Wah Meng-R32813 wrote: Yes I have verified my python application is reusing the memory (just that it doesn't reduce once it has grown) and my python process doesn't have any issue to run even though it is seen taking up more than 2G in footprint. My problem is c

Re: Running external module and accessing the created objects

2013-03-09 Thread Kene Meniru
Steven D'Aprano wrote: > What do you mean, "objects are saved in another object"? > doc.py has a dictionary. When the user describes a wall, it is passed to the doc object to be saved in the dictionary. > > What happens if the user launches appwin with a different argument? > > If appwin c

Re: Running external module and accessing the created objects

2013-03-09 Thread Chris Angelico
On Sat, Mar 9, 2013 at 10:05 PM, Kene Meniru wrote: > I have tried importing "user.py" and/or "app.py". However there is no > single command to call. I haven't followed the thread in detail, but I gather you're trying to import a file with a variable name? Instead of 'import user', try: user = _

Re: Running external module and accessing the created objects

2013-03-09 Thread Dave Angel
On 03/09/2013 06:05 AM, Kene Meniru wrote: (lots of stuff that was more confusing to me than helpful) You use the words launch, encountered, execute, and others in ways that do not make sense to me, or are at least ambiguous. You have an explicitly named user.py, which apparently is *not*

Re: An error when i switched from python v2.6.6 => v3.2.3

2013-03-09 Thread Mark Lawrence
On 09/03/2013 07:56, Νίκος Γκρ33κ wrote: Τη Σάββατο, 9 Μαρτίου 2013 7:05:08 π.μ. UTC+2, ο χρήστης Steven D'Aprano έγραψε: On Fri, 08 Mar 2013 19:18:50 -0800, Νίκος Γκρ33κ wrote: I agree with you but i wonder why the world would want to dedicate hours for fiddling with my script? Why anyon

Re: An error when i switched from python v2.6.6 => v3.2.3

2013-03-09 Thread Νίκος Γκρ33κ
Is there a way to see anserws to my posts via ThunderBird that doesn't hve this formatting issue? -- http://mail.python.org/mailman/listinfo/python-list

Re: Set x to to None and del x doesn't release memory in python 2.7.1 (HPUX 11.23, ia64)

2013-03-09 Thread Isaac To
In general, it is hard for any process to return the memory the OS allocate to it back to the OS, short of exiting the whole process. The only case that this works reliably is when the process allocates a chunk of memory by mmap (which is chosen by libc if it malloc or calloc a large chunk of memo

Re: Apparent magic number problem

2013-03-09 Thread Colin J. Williams
On 09/03/2013 3:51 AM, Peter Otten wrote: Colin J. Williams wrote: The program runs correctly under each version, but it runs more slowly under 3.2. This is probably due to the fact that the .pyc file is created for the Python 2.7 execution. When Python 3.2 is run it fails to create a new

Re: An error when i switched from python v2.6.6 => v3.2.3

2013-03-09 Thread rusi
On Mar 9, 7:16 pm, Νίκος Γκρ33κ wrote: > Is there a way to see anserws to my posts via ThunderBird that doesn't hve > this formatting issue? I had posted a suggestion to get back to 'old google groups' here. Usually if you (can) switch to the old these problems vanish http://mail.python.org/pip

http://stackoverflow.com/questions/15311450/my-chat-client-freezes-up-after-beginning-threads

2013-03-09 Thread Owatch
I made a better chat client following help from people: They told me that if I didn't want to be blocked on .recv when waiting for messages, I would need to use threads, classes, functions, and queues to do so. So I followed some help a specific person gave me where I created a thread

Re: Running external module and accessing the created objects

2013-03-09 Thread Kene Meniru
OK. Sorry to have caused all the confusion. Let me try this again. To use my program the user needs a script file I will call user.py. Functions from my program must be imported into this file with something like "from myapp import *". myapp.py is a module in my program that has all the functio

read and write the same text file

2013-03-09 Thread iMath
read and write the same text file Open a text file ,read the content ,then make some change on it ,then write it back to the file ,now the modified text should only has the modified content but not the initial content ,so can we implement this by only set the mode parameter with open() functio

Re: read and write the same text file

2013-03-09 Thread Roy Smith
In article , iMath wrote: > read and write the same text file > Open a text file ,read the content ,then make some change on it ,then write > it back to the file ,now the modified text should only has the modified > content but not the initial content ,so can we implement this by only set th

Re: Running external module and accessing the created objects

2013-03-09 Thread Dave Angel
On 03/09/2013 10:34 AM, Kene Meniru wrote: OK. Sorry to have caused all the confusion. Let me try this again. Thank you very much. This is much clearer, though it's not all here. To use my program the user needs a script file I will call user.py. Functions from my program must be imported i

RFD: comp.sys.raspberry-pi

2013-03-09 Thread James Harris
REQUEST FOR DISCUSSION (RFD) unmoderated group comp.sys.raspberry-pi This is a formal Request for Discussion (RFD) for the creation of the unmoderated newsgroup comp.sys.raspberry-pi. NEWSGROUPS LINE: comp.sys.raspberry-pi Raspberry Pi computers & related

Re: http://stackoverflow.com/questions/15311450/my-chat-client-freezes-up-after-beginning-threads

2013-03-09 Thread Andrew Berg
On 2013.03.09 09:26, Owatch wrote: > Thing is, when I run the program. Nothing happens. > > Can somebody help point out what is wrong? (I've asked questions and > researched for 3 days, without getting anywhere, so I did try) You defined a thread, but never created or started it. Also, why did y

Re: Running external module and accessing the created objects

2013-03-09 Thread Rick Johnson
On Saturday, March 9, 2013 9:34:53 AM UTC-6, Kene Meniru wrote: > OK. Sorry to have caused all the confusion. Let me try > this again. Sounds to me like you should solve this problem in two manners: Interactive Input ==

Re: Running external module and accessing the created objects

2013-03-09 Thread Kene Meniru
Dave Angel wrote: > On 03/09/2013 10:34 AM, Kene Meniru wrote: >> To use my program the user needs a script file I will call user.py. >> Functions from my program must be imported into this file with >> something like "from myapp import *". > > And does the user run this script by doing > p

Re: Running external module and accessing the created objects

2013-03-09 Thread Dave Angel
On 03/09/2013 11:56 AM, Kene Meniru wrote: Dave Angel wrote: On 03/09/2013 10:34 AM, Kene Meniru wrote: To use my program the user needs a script file I will call user.py. Functions from my program must be imported into this file with something like "from myapp import *". And does the user

Re: Running external module and accessing the created objects

2013-03-09 Thread Kene Meniru
Rick Johnson wrote: > On Saturday, March 9, 2013 9:34:53 AM UTC-6, Kene Meniru wrote: > > Interactive Input > > > Create an interactive environment where the user can enter

Re: Running external module and accessing the created objects

2013-03-09 Thread Kene Meniru
Dave Angel wrote: >>> >>> So the solution I am looking for is to have a graphic window open that >>> watches user.py for changes. > > It would then have to be a separate executable. This is my thinking too. > Are you really saying > you want this window to keep "running" after the script ends

Re: Running external module and accessing the created objects

2013-03-09 Thread Kene Meniru
Kene Meniru wrote: > Dave Angel wrote: >> If you really want two processes, then you should consider having the >> user run the the graphic app, with a commandline parameter of user.py, >> and have it create the user.py process. The user.py process runs till >> it has created all the data, then

Re: Running external module and accessing the created objects

2013-03-09 Thread Rick Johnson
On Saturday, March 9, 2013 11:21:20 AM UTC-6, Kene Meniru wrote: > Please see my last response to Dave Angel. I think it is > possible for a program to watch a file. I am not > interested in menus which is why I am going this route. I > could easily use PyQt to make this but I am not interested >

Re: Calling J from Python

2013-03-09 Thread gosinn
Den måndagen den 5:e februari 2007 kl. 14:48:49 UTC skrev Gosi: > It is quite easy to call J from Python > > http://groups.google.com/group/J-Programming/browse_thread/thread/5e84b75667f5f64e http://www.jsoftware.com/jwiki/Scripts/qjide -- http://mail.python.org/mailman/listinfo/python-list

Re: Why are timezone aware and naive datetimes not distinct classes?

2013-03-09 Thread Nobody
On Sat, 09 Mar 2013 09:01:17 +1100, Chris Angelico wrote: > As I see it, a naive datetime simply does not have a timezone. The distinction between aware and naive isn't whether the .tzinfo member is None, but whether self.utcoffset() returns None (which can occur either if self.tzinfo is None or

Re: Set x to to None and del x doesn't release memory in python 2.7.1 (HPUX 11.23, ia64)

2013-03-09 Thread Grant Edwards
On 2013-03-09, Wong Wah Meng-R32813 wrote: Your entire post is in your signature block. Don't do that. Many people have newsreaders or e-mail clinets configured to hide or ignore signature blocks. >Yes I have verified my python application is reusing the memory (just >that it doesn't reduce once

Re: Calling J from Python

2013-03-09 Thread Mark Lawrence
On 09/03/2013 18:49, gos...@gmail.com wrote: Den måndagen den 5:e februari 2007 kl. 14:48:49 UTC skrev Gosi: It is quite easy to call J from Python http://groups.google.com/group/J-Programming/browse_thread/thread/5e84b75667f5f64e http://www.jsoftware.com/jwiki/Scripts/qjide Got a right sl

Re: Why are timezone aware and naive datetimes not distinct classes?

2013-03-09 Thread Roy Smith
In article , Nobody wrote: > The distinction may actually matter for times in the far future, as you > can't reliably predict how or when timezone defintions will change. Sadly, this is true. > For this reason, "appointments" should always be > kept in local time, so that you don't get errors

how to déplace a circle in canvas python?

2013-03-09 Thread olsr . kamal
how to diplace a circle in canvas tkinter python from position to an auther position by a mouse click 'press' 'relase' or by delete the déplicated objects in canvas?? -- http://mail.python.org/mailman/listinfo/python-list

Re: Set x to to None and del x doesn't release memory in python 2.7.1 (HPUX 11.23, ia64)

2013-03-09 Thread Roy Smith
In article , Grant Edwards wrote: > In Unix there is no way to release heap memory (which is what you're > talking about) back to the OS except for terminating the process. That's not quite true. The man page for BRK(2) (at least on the Linux box I happen to have handy) says: "brk() and sbrk

Re: itertools.filterfalse - what is it good for

2013-03-09 Thread Miki Tebeka
> can anybody point out a situation where you really need > itertools.filterfalse() ? Sometimes you get the predicate as a parameter to another function. This way if you want to filter out things you can easily do it. Other language (such as Clojure) have a "complement" function that removes th

Re: Set x to to None and del x doesn't release memory in python 2.7.1 (HPUX 11.23, ia64)

2013-03-09 Thread Grant Edwards
On 2013-03-09, Roy Smith wrote: > In article , > Grant Edwards wrote: > >> In Unix there is no way to release heap memory (which is what you're >> talking about) back to the OS except for terminating the process. > > That's not quite true. The man page for BRK(2) (at least on the Linux > box I

Re: how to déplace a circle in canvas python?

2013-03-09 Thread Rick Johnson
On Saturday, March 9, 2013 1:47:43 PM UTC-6, olsr@gmail.com wrote: > how to [translate] a circle in canvas tkinter python from > [one] position to an [another] position Well "translation" is by definition: "changing an objects position" > by a mouse click 'press' ['release'] or by delete the

Re: http://stackoverflow.com/questions/15311450/my-chat-client-freezes-up-after-beginning-threads

2013-03-09 Thread Owatch
On Mar 9, 6:35 pm, Andrew Berg wrote: > On 2013.03.09 09:26, Owatch wrote:> Thing is, when I run the program. Nothing > happens. > > > Can somebody help point out what is wrong? (I've asked questions and > > researched for 3 days, without getting anywhere, so I did try) > > You defined a thread,

Re: This mail never gets delivered. Any ideas why?

2013-03-09 Thread Νίκος Γκρ33κ
mail = form.getvalue('mail') id what the user types in an html form and click submits. this can be a non valid email of course i just check if there is a '@' in the mail address. But will the mail, gets delivered even if mail's value is invalid? -- http://mail.python.org/mailman/listinfo/python

Re: Set x to to None and del x doesn't release memory in python 2.7.1 (HPUX 11.23, ia64)

2013-03-09 Thread Roy Smith
In article , Grant Edwards wrote: > What I should have said was that there's no way to return to the OS > memory obtained via calls to malloc() et al. That's true (for certain values of "et al"). > and those are the calls that "good" C programmers (like the > maintainers of CPython) use. Well

pexpect on windows - child process of another child process - quick question

2013-03-09 Thread Z W
Hi All We have a windows application to install on console mode typing on cygwin shell "app.exe -i console" On Windows process window, we could see this kicks a process named ia which in turn kicks off ia_launcher to kick off another java.exe process. ie app.exe -- kick off --> ia --> kicks off -

Re: Why are timezone aware and naive datetimes not distinct classes?

2013-03-09 Thread Chris Angelico
On Sun, Mar 10, 2013 at 6:14 AM, Nobody wrote: > On Sat, 09 Mar 2013 09:01:17 +1100, Chris Angelico wrote: > >> As I see it, a naive datetime simply does not have a timezone. > > The distinction between aware and naive isn't whether the .tzinfo member > is None, but whether self.utcoffset() return

how to get id of a line from his coordonée in tkinter python?

2013-03-09 Thread olsr . kamal
how to get id of a line from his coordonée in tkinter python? -- http://mail.python.org/mailman/listinfo/python-list

Re: Any other screenwriters?

2013-03-09 Thread Rick Johnson
On Friday, March 8, 2013 11:36:05 PM UTC-6, richard...@gmail.com wrote: > Noted. But it seems to be the syntax the screenwriters and > their programmers have settled on for now. It's all > working pretty well. Just no Python or command-line > implementations yet. I didn't post seeking help to make

Re: Why are timezone aware and naive datetimes not distinct classes?

2013-03-09 Thread Nobody
On Sat, 09 Mar 2013 14:40:14 -0500, Roy Smith wrote: > Future scheduled activities (which I assume is what you > mean by "appointments") should be kept in whatever timezone makes sense > for that activity. For example, I'm on NASA's mailing list to receive > alerts when the ISS is going to be

Re: how to get id of a line from his coordonée in tkinter python?

2013-03-09 Thread Rick Johnson
On Saturday, March 9, 2013 4:46:40 PM UTC-6, olsr@gmail.com wrote: > how to get id of a line from his coordonée in tkinter python? Each time you create a "canvas item", be it a rectangle, line, circle, or whatever..., the id of that object is returned as an integer. All you have to do is sav

Re: Pygame mouse cursor load/unload

2013-03-09 Thread Alex Gardner
On Saturday, March 2, 2013 7:56:31 PM UTC-6, Alex Gardner wrote: > I am in the process of making a pong game in python using the pygame library. > My current problem is that when I move the mouse, it turns off as soon as > the mouse stops moving. The way I am doing this is by making the default

Re: Pygame mouse cursor load/unload

2013-03-09 Thread Alex Gardner
On Saturday, March 2, 2013 7:56:31 PM UTC-6, Alex Gardner wrote: > I am in the process of making a pong game in python using the pygame library. > My current problem is that when I move the mouse, it turns off as soon as > the mouse stops moving. The way I am doing this is by making the default

Building importable _tkinter on Windows

2013-03-09 Thread Terry Reedy
If you have tried to build _tkinter on Windows from the cpython repository, and have 'import tkinter' work, please share your experience, successful or not. I and another person have both failed. Following the directions in the devguide (and for one step, PCBuild/readme), I did essentially the

gmreader - a terminal app for listening to your emails

2013-03-09 Thread Jared Wright
Gmail message test-to-speech reader I used imaplib along with BeautifulSoup to make this run. It uses system calls to run the tts functions. It's all a work in progress, and if you see a bug, you are welcome to to make a pull request or open an issue. https://github.com/jawerty/gmreader -- htt

pyqt4 & qt license

2013-03-09 Thread pitsakis
i want to develop a GUI application that will be sold. i want to use pyqt4. can i download and use the GML version during the development and then buy the commercial verion beofore i distribute the application ? commercial version means LGPL? i think i am comfused so please someone clarify on ve

pyqt4 & qt license

2013-03-09 Thread pitsakis
hello, i want to develop a GUI application that will be sold. i want to use pyqt4. can i download and use the GPL version during the development and then buy the commercial verion beofore i distribute the application ? commercial version means LGPL? i think i am comfused so please someone cla

Re: pyqt4 & qt license

2013-03-09 Thread Ioakeim Tellidis
On Sat, Mar 9, 2013 at 9:08 PM, wrote: > hello, > > i want to develop a GUI application that will be sold. > i want to use pyqt4. > can i download and use the GPL version during the development and then buy > the commercial verion beofore i distribute the application ? > > commercial version mean

Re: pyqt4 & qt license

2013-03-09 Thread CM
On Mar 9, 9:08 pm, pitsa...@gmail.com wrote: > hello, > > i want to develop a GUI application that will be sold. > i want to use pyqt4. > can i download and use the GPL version during the development and then buy > the commercial verion beofore i distribute the application ? Arguably, yes. From

Re: read and write the same text file

2013-03-09 Thread Steven D'Aprano
On Sat, 09 Mar 2013 10:47:34 -0500, Roy Smith wrote: > In article , > iMath wrote: >> def text_process(file): >> with open(file,'r') as f: >> text = f.read() >> with open(file,'w') as f: >> f.write(replace_pattern.sub('',text)) > > At a minimum, you need to close the fi

Re: pyqt4 & qt license

2013-03-09 Thread Michael Torrie
On 03/09/2013 07:08 PM, pitsa...@gmail.com wrote: > hello, > > i want to develop a GUI application that will be sold. i want to use > pyqt4. can i download and use the GPL version during the development > and then buy the commercial verion beofore i distribute the > application ? > > commercial v

Re: pyqt4 & qt license

2013-03-09 Thread D. Xenakis
Please correct me if im wrong.. PySide is LGPL and is free and by using that someone can develop commercial (and non commercial) software, while being able at the same to choose between both close and open Source. PyQT4 Commercial Licence costs more than 300 Euro and by using that someone can

Re: This mail never gets delivered. Any ideas why?

2013-03-09 Thread Νίκος Γκρ33κ
Any ideas why the mail never gets delivered? -- http://mail.python.org/mailman/listinfo/python-list

Re: pyqt4 & qt license

2013-03-09 Thread Vito De Tullio
D. Xenakis wrote: > Can someone develop a closed source but NON-commercial software, by using > PyQT4 GPL license? no, by definition of GPL: if you are using a GPL library, you must distribute your software as GPL. (the GPL does not care about commercial / non commercial) http://www.gnu.org/li

Re: pyqt4 & qt license

2013-03-09 Thread Michael Torrie
On 03/09/2013 09:45 PM, Vito De Tullio wrote: > D. Xenakis wrote: > >> Can someone develop a closed source but NON-commercial software, by using >> PyQT4 GPL license? > > no, by definition of GPL: if you are using a GPL library, you must > distribute your software as GPL. > > (the GPL does not

Re: This mail never gets delivered. Any ideas why?

2013-03-09 Thread Michael Torrie
On 03/09/2013 02:25 PM, Νίκος Γκρ33κ wrote: > mail = form.getvalue('mail') > > id what the user types in an html form and click submits. this can be > a non valid email of course i just check if there is a '@' in the > mail address. > > But will the mail, gets delivered even if mail's value is in

Re: This mail never gets delivered. Any ideas why?

2013-03-09 Thread Νίκος Γκρ33κ
Τη Κυριακή, 10 Μαρτίου 2013 7:07:25 π.μ. UTC+2, ο χρήστης Michael Torrie έγραψε: > On 03/09/2013 02:25 PM, Νίκος Γκρ33κ wrote: > > > mail = form.getvalue('mail') > > > > > > id what the user types in an html form and click submits. this can be > > > a non valid email of course i just check if

Re: This mail never gets delivered. Any ideas why?

2013-03-09 Thread Steven D'Aprano
On Sat, 09 Mar 2013 20:42:03 -0800, Νίκος Γκρ33κ wrote: > Any ideas why the mail never gets delivered? What do the mail logs say? Can you send email using this mail server from Thunderbird, or does it fail there too? My wild guess is that the mail server is properly rejecting mail because you

Re: This mail never gets delivered. Any ideas why?

2013-03-09 Thread Νίκος Γκρ33κ
Τη Κυριακή, 10 Μαρτίου 2013 7:56:45 π.μ. UTC+2, ο χρήστης Steven D'Aprano έγραψε: > My wild guess is that the mail server is properly rejecting mail because > you are trying to send to it without an account. Account 'support(-at-)hostgator.com' exists. It's the recipient mail address which is