Re: deepcopy questions

2012-11-28 Thread lars van gemerden
On Wednesday, November 28, 2012 12:59:38 AM UTC+1, lars van gemerden wrote: > Hi, > > > > I get a very strange result when using deepcopy. The following code: > > > > def __deepcopy__(self, memo): > > independent = self.independent() > > if independent is self: > >

Re: Python-list Digest, Vol 108, Issue 248

2012-11-28 Thread support
Message ignored: Did not match any rules -Original Message- Subject: Python-list Digest, Vol 108, Issue 248 To: python-list@python.org From: python-list-requ...@python.org Send Python-list mailing list submissions to python-list@python.org To subscribe or unsubscribe via the Wor

Re: How to create an executable from python script in windows

2012-11-28 Thread Ulrich Eckhardt
Am 28.11.2012 07:43, schrieb Prakash: copying C:\Python24\lib\site-packages\py2exe\run_w.exe Python 2.4 was released 8 years ago and shouldn't be used for new development or learning any longer. The first step I would take is to upgrade to 2.7, which is the last in the 2

ANN: eGenix mx Base Distribution 3.2.5 (mxDateTime, mxTextTools, etc.)

2012-11-28 Thread M.-A. Lemburg
ANNOUNCING eGenix.com mx Base Distribution Version 3.2.5 for Python 2.4 - 2.7 Open Source Python extensions providing important and useful services

Re: please help me to debud my local chat network program

2012-11-28 Thread Minh Dang
but, how can I fix it? -- http://mail.python.org/mailman/listinfo/python-list

Re: please help me to debud my local chat network program

2012-11-28 Thread Minh Dang
ok, in client.py, i change broadcastIP = "broadcast" to broadcastIP = "127.0.0.1" but there are some bugs sys.exit(main()) rQueue, wQueue, xQueue = select.select(inputs, [], []) -- http://mail.python.org/mailman/listinfo/python-list

Re: please help me to debud my local chat network program

2012-11-28 Thread Chris Angelico
On Wed, Nov 28, 2012 at 9:52 PM, Minh Dang wrote: > but, how can I fix it? I can't say that for sure, but did you read the bit at the end of my last post beginning "I think you probably want"? Try doing that, see what happens. ChrisA -- http://mail.python.org/mailman/listinfo/python-list

Re: please help me to debud my local chat network program

2012-11-28 Thread Minh Dang
ok, in client.py, i change broadcastIP = "broadcast" to broadcastIP = "127.0.0.1",it's ok, but there are some bugs sys.exit(main()) rQueue, wQueue, xQueue = select.select(inputs, [], []) -- http://mail.python.org/mailman/listinfo/python-list

Re: please help me to debud my local chat network program

2012-11-28 Thread Chris Angelico
On Wed, Nov 28, 2012 at 10:10 PM, Minh Dang wrote: > ok, in client.py, i change broadcastIP = "broadcast" to broadcastIP = > "127.0.0.1" but there are some bugs I doubt that that will work either. And you may need to be a little clearer on what you mean by "there are some bugs" - is it doing wha

Re: please help me to debud my local chat network program

2012-11-28 Thread Minh Dang
yes, still have 2 bugs: sys.exit(main()) rQueue, wQueue, xQueue = select.select(inputs, [], []) -- http://mail.python.org/mailman/listinfo/python-list

Re: please help me to debud my local chat network program

2012-11-28 Thread Minh Dang
please help me, after changing broadcast, there are 2 bugs: if __name__ == "__main__": sys.exit(main()) and rQueue, wQueue, xQueue = select.select(inputs, [], []) please help me -- http://mail.python.org/mailman/listinfo/python-list

Re: please help me to debud my local chat network program

2012-11-28 Thread Chris Angelico
On Wed, Nov 28, 2012 at 10:57 PM, Minh Dang wrote: > please help me, after changing broadcast, there are 2 bugs: > if __name__ == "__main__": > sys.exit(main()) > and > > rQueue, wQueue, xQueue = select.select(inputs, [], []) > please help me By "bug", I'm guessing you mean one of two things:

Imaging libraries in active development?

2012-11-28 Thread Alasdair McAndrew
I'm investigating Python for image processing (having used Matlab, then Octave for some years). And I'm spoiled for choice: PIL and its fork pillow, scipy.ndimage, scikits-image, mahotas, the Python interface to openCV... However, PIL doesn't seem to be in active development. What I want to kn

Re: how to pass "echo t | " input to subprocess.check_output() method

2012-11-28 Thread dachakku
On Monday, 26 November 2012 21:10:02 UTC+5:30, Miki Tebeka wrote: > > But i dont know how to pass the "echo t | " in subprocess.check_output > > while calling a process. > > You need to create two subprocess and connect the stdout of the first to the > stdin of the 2'nd. > > > > See http://p

How to show and parse rsync progress in Python/Django?

2012-11-28 Thread sachit . technerves
I am using the development version of rsync with --info-progress option. I am writing a python program which transfer files from server to local computer using rsync: finalresult = subprocess.Popen(['sshpass', '-p', password, 'rsync', '-avz', '--info=progress2', 'hostname:/filename', '/home/nfs/

Re: please help me to debud my local chat network program

2012-11-28 Thread Minh Dang
yes, it's run but appear: in server: Server is ready. Accepted connection from ('127.0.0.1', 5000) End connection from ('127.0.0.1', 5000) after connected, server close. in client: Connected to server at 127.0.0.1 : 4000 Traceback (most recent call last): File "C:\Users\MINH_IT\workspace\proje

Re: please help me to debud my local chat network program

2012-11-28 Thread Chris Angelico
On Thu, Nov 29, 2012 at 1:10 AM, Minh Dang wrote: > File "C:\Users\MINH_IT\workspace\project\src\project\client.py", line 60, > in main > rQueue, wQueue, xQueue = select.select(inputs, [], []) > OSError: [WinError 10038] An operation was attempted on something that is not > a socket Have

Re: how to pass "echo t | " input to subprocess.check_output() method

2012-11-28 Thread Miki Tebeka
On Wednesday, November 28, 2012 4:38:35 AM UTC-8, dach...@gmail.com wrote: > Thanks.. Creating two subprocesses worked for me. I did the code as below, Glad it worked. -- http://mail.python.org/mailman/listinfo/python-list

Re: "non central" package management

2012-11-28 Thread Miki Tebeka
On Tuesday, November 27, 2012 8:45:56 PM UTC-8, Roy Smith wrote: > In the future, the plan is to build a complete fresh virtualenv for > every deployment. But we're not there yet. Maybe a repository of virtualenvs, then when deploying you can see if there's one the matches what you need and use

Re: please help me to debud my local chat network program

2012-11-28 Thread Minh Dang
there are still these 2 problems and i don't know how to solve it -- http://mail.python.org/mailman/listinfo/python-list

Re: Imaging libraries in active development?

2012-11-28 Thread Ritchie Flick
This may be of some interest to you: http://www.youtube.com/watch?v=Wvvxazwi2IY&feature=plcp On Wed, Nov 28, 2012 at 1:30 PM, Alasdair McAndrew wrote: > I'm investigating Python for image processing (having used Matlab, then > Octave for some years). And I'm spoiled for choice: PIL and its for

Re: Imaging libraries in active development?

2012-11-28 Thread Michael Torrie
On 11/28/2012 05:30 AM, Alasdair McAndrew wrote: > I'm investigating Python for image processing (having used Matlab, > then Octave for some years). And I'm spoiled for choice: PIL and its > fork pillow, scipy.ndimage, scikits-image, mahotas, the Python > interface to openCV... > > However, PIL d

How to ship eggs with pyo files only

2012-11-28 Thread Andriy Kornatskyy
There is sometimes a need to ship python egg distribution with pyo files only. There is confusion using bdist_egg command since it doesn't have any options to do that; you can read more about solution here: http://mindref.blogspot.com/2012/11/python-egg-pyo.html Thanks. Andriy Kornatskyy

Re: Imaging libraries in active development?

2012-11-28 Thread Christian Heimes
Am 28.11.2012 19:14, schrieb Michael Torrie: > I'm curious. What features do you need that pil doesn't have? Other > than updating pil to fix bugs, support new image types or new versions > of Python, what kind of active development do you think it needs to > have? Maybe pil has all the features

Re: re.search when used within an if/else fails

2012-11-28 Thread Kevin T
I agree. Being relatively new to python, i was not sure of quirks so i posted the original code. I did find the real issue, as I found another loop that was not being executed properly. It turns out that if the indent started with spaces and ended with tabs, neither eclipse or command line e

Re: re.search when used within an if/else fails

2012-11-28 Thread Ian Kelly
On Wed, Nov 28, 2012 at 12:39 PM, Kevin T wrote: > with other languages i always expand tabs to spaces. the vi plugin does do this properly. if i change all indents to be spaces only will python behave? i inherited a good deal of the code that i am using, which is tab based. Yes, it's best to

Re: Re: re.search when used within an if/else fails

2012-11-28 Thread Evan Driscoll
On 11/28/2012 01:57 PM, Ian Kelly wrote: > Yes, it's best to use either tabs-only or spaces-only. Quoting from PEP > 8 on the subject: > > Never mix tabs and spaces. > > The most popular way of indenting Python is with spaces only. The > second-most popular way is with tabs only. Cod

Re: re.search when used within an if/else fails

2012-11-28 Thread Steven D'Aprano
On Wed, 28 Nov 2012 11:39:48 -0800, Kevin T wrote: > with other languages i always expand tabs to spaces. the vi plugin does > do this properly. if i change all indents to be spaces only will python > behave? i inherited a good deal of the code that i am using, which is > tab based. Python wil

Re: Modules or Package for my application

2012-11-28 Thread goon12
On Tuesday, November 27, 2012 3:04:03 AM UTC-5, Stone wrote: > Dear developers, > > > > I am creating application (originally written in perl) > > which will take care about replication from one system to the another system > over command rsync. It will simulate High-availability solution. >

Re: Imaging libraries in active development?

2012-11-28 Thread Jorgen Grahn
On Wed, 2012-11-28, Christian Heimes wrote: > Am 28.11.2012 19:14, schrieb Michael Torrie: >> I'm curious. What features do you need that pil doesn't have? Other >> than updating pil to fix bugs, support new image types or new versions >> of Python, what kind of active development do you think it

Re: please help me to debud my local chat network program

2012-11-28 Thread Jorgen Grahn
On Wed, 2012-11-28, Chris Angelico wrote: > On Wed, Nov 28, 2012 at 1:50 PM, Minh Dang wrote: >> Hello everybody, i am doing my project: local network chat using python >> here is my file >> http://www.mediafire.com/?cc2g9tmsju0ba2m > > Hmm. Might I recommend some other means of sharing your code?

Exponential arrival distribution in Python

2012-11-28 Thread Ricky
Hi all, I am doing a project on traffic simulation. I want to introduce exponential arrival distribution to precede this task. Therefore I want write a code in python for exponential arrival distribution. I am very new for programming and if anybody can help me on this that would be great. Ch

Re: re.search when used within an if/else fails

2012-11-28 Thread Steven D'Aprano
On Wed, 28 Nov 2012 14:08:15 -0600, Evan Driscoll wrote: > I'm only entering this thread now so I'm not really in context, but > you're correct; in Python 3, -tt is set by default, which makes illegal > mixing an error. > > However, not all mixing is illegal: what it means by "code that > illegal

Re: Exponential arrival distribution in Python

2012-11-28 Thread Ian Kelly
On Wed, Nov 28, 2012 at 2:34 PM, Ricky wrote: > > Hi all, > > I am doing a project on traffic simulation. I want to introduce > exponential arrival distribution to precede this task. Therefore I want > write a code in python for exponential arrival distribution. I am very new > for programming an

Re: Exponential arrival distribution in Python

2012-11-28 Thread David Hutto
>> I am doing a project on traffic simulation. I want to introduce >> exponential arrival distribution to precede this task. Therefore I want >> write a code in python for exponential arrival distribution. I am very new >> for programming and if anybody can help me on this that would be great. Fi

Re: Exponential arrival distribution in Python

2012-11-28 Thread David Hutto
I mean this one: for i in range(0,4): print "%i = %i" % (i * 10 **i) -- Best Regards, David Hutto CEO: http://www.hitwebdevelopment.com -- http://mail.python.org/mailman/listinfo/python-list

Tabs/spaces for indentation (was Re: re.search when used within an if/else fails)

2012-11-28 Thread Chris Angelico
On Thu, Nov 29, 2012 at 8:39 AM, Steven D'Aprano wrote: > Perhaps it would be nice if Python honoured a directive setting indent > style to spaces or indents, as it honours source code encoding lines: > > # -*- indent: -*- > > Where could be one of: > > space[s]Only accept spaces in inde

Re: Exponential arrival distribution in Python

2012-11-28 Thread Albert Chun-Chieh Huang
Hi, Ricky, Traffic simulation sounds like a good topic to use SimPy, which is a discrete-event simulation library in Python, c.f. http://simpy.sourceforge.net Professor Norm Matloff wrote a very good tutorial on SimPy, and you can download it here: http://heather.cs.ucdavis.edu/~matloff/simcourse

Re: Exponential arrival distribution in Python

2012-11-28 Thread Paul Rubin
Ricky writes: > I am doing a project on traffic simulation. I want to introduce > exponential arrival distribution to precede this task. Therefore I > want write a code in python for exponential arrival distribution. I've never heard of an "exponential arrival distribution" and googling fails. D

Re: re.search when used within an if/else fails

2012-11-28 Thread Ian Kelly
On Wed, Nov 28, 2012 at 5:20 PM, Dennis Lee Bieber wrote: > On 28 Nov 2012 21:39:03 GMT, Steven D'Aprano > declaimed the following in > gmane.comp.python.general:> py> if True: > > ... if True: # tab > > ... pass # tab, then four spaces > > ... pass # two spaces, tab, four s

Re: please help me to debud my local chat network program

2012-11-28 Thread Minh Dang
ok, here is my code, zip http://www.mediafire.com/?ob4kokda81fj6xc -- http://mail.python.org/mailman/listinfo/python-list

Weird import failure with "nosetests --processes=1"

2012-11-28 Thread Roy Smith
I've got a minimal test script: - $ cat test_foo.py import pyza.models print pyza.models def test_foo(): pass - pyza.models is a package. Under normal conditions, I can import it fine: $ python Python 2.7.3 (default, Aug 1 2012, 05:1

Re: os.popen and the subprocess module

2012-11-28 Thread Tim Roberts
Andrew wrote: > >I'm working on a script that will run an executable obtaine the output > from the executable >and do some analysis on the output. Essentially the script runs the >executable analyses >the data. >I'm looking into os.popen and the subprocess module, implementing os.popen >is e

Re: Imaging libraries in active development?

2012-11-28 Thread Alasdair McAndrew
I take your point that not being actively developed doesn't necessarily mean that the software is bad - but in general healthy software is continuously updated and expanded to meet the needs of its users, or to take advantage of new algorithms or hardware. And in its current form PIL has a numb

Re: deepcopy questions

2012-11-28 Thread Dieter Maurer
lars van gemerden writes: > ... "deepcopy" dropping some items ... > Any ideas are still more then welcome, "deepcopy" is implemented in Python (rather than "C"). Thus, if necessary, you can debug what it is doing and thereby determine where the items have been dropped. -- http://mail.python.or