Re: Can Python function return multiple data?

2015-06-06 Thread Amir Arsalan
Tnx Steven, You are right completly.I try more subtilize thanks for your hint. On Sun, Jun 7, 2015 at 10:03 AM, Steven D'Aprano wrote: > Hi Amir, and welcome! > > On Sun, 7 Jun 2015 02:38 am, Amir Arsalan wrote: > > > you can use yield structure in python for multiple

Re: Can Python function return multiple data?

2015-06-06 Thread Amir Arsalan
;a*3" if you dont understand tell me that i complete explain for u. or send pm on hangouts, Best, Amir Arsalan On Sat, Jun 6, 2015 at 10:27 PM, fl wrote: > On Saturday, June 6, 2015 at 9:39:19 AM UTC-7, Amir Arsalan wrote: > > you can use yield structure in pytho

Re: Can Python function return multiple data?

2015-06-06 Thread Amir Arsalan
you can use yield structure in python for multiple return. ex: def func(a): yield a*2 print "a*2" yield a*3 print "a*3" ... data = func(5) --> data = (10,15,... ) On Wed, Jun 3, 2015 at 1:57 AM, fl wrote: > Hi, > > I just see the tutorial says Python can return value in fun

Re: application console with window

2015-01-12 Thread Amir Arsalan
and u have another below choice http://docs.python.org/howto/curses.html http://urwid.org/ On Thu, Jan 8, 2015 at 12:54 AM, Amir Arsalan wrote: > Hi adam, > > U can use from npyscreen. > > Npyscreen.readthedocs.org > On Jan 8, 2015 12:50 AM, "adam" wrote: >

Re: application console with window

2015-01-12 Thread Amir Arsalan
Hi adam, U can use from npyscreen. Npyscreen.readthedocs.org On Jan 8, 2015 12:50 AM, "adam" wrote: > Is in here maybe someone who speak Polish? > > I would like to write application witch looks like this > http://linuxiarze.pl/obrazy/internet1/ceni1.png > > I'm looking for some libs, tutorials

Re: surprise - byte in set

2015-01-05 Thread Amir Arsalan
Hi my friends. On last result you have a , b , c binary. >> set('abc') {'a','b','c') >> set(b'abc') {97,98,99} On Jan 3, 2015 10:25 PM, "patrick vrijlandt" wrote: > Hello list, > > Let me first wish you all the best in 2015! > > Today I was trying to test for occurrence of a byte in a set ...

Re: Problem!!

2011-07-03 Thread amir chaouki
the problem is when i use the seek function on windows it gives me false results other then the results on *ux. the file that i work with are very large about 10mb. -- http://mail.python.org/mailman/listinfo/python-list

Problem!!

2011-07-03 Thread amir chaouki
i have written code on linux for parsing text files and it works great but when i try to run it on windows it goes crazy, do you have any idea??? -- http://mail.python.org/mailman/listinfo/python-list

Re: random module gives same results across all configurations?

2009-03-03 Thread Amir Michail
On Mar 4, 2:26 am, "Diez B. Roggisch" wrote: > Amir Michail schrieb: > > > On Mar 3, 10:05 pm, Chris Rebert wrote: > >> On Tue, Mar 3, 2009 at 6:59 PM, Amir Michail wrote: > >>> Hi, > >>> Is it the case that the random module will always gi

Re: random module gives same results across all configurations?

2009-03-03 Thread Amir Michail
On Mar 3, 10:05 pm, Chris Rebert wrote: > On Tue, Mar 3, 2009 at 6:59 PM, Amir Michail wrote: > > Hi, > > > Is it the case that the random module will always give the same > > results if given the same seed across all configurations (e.g., > > architectures, compi

random module gives same results across all configurations?

2009-03-03 Thread Amir Michail
Hi, Is it the case that the random module will always give the same results if given the same seed across all configurations (e.g., architectures, compilers, etc.)? Amir -- http://mail.python.org/mailman/listinfo/python-list

Re: python-2.6

2008-10-12 Thread amir
On Oct 2, 9:33 am, [EMAIL PROTECTED] wrote: > Hi all. > > I've installed on may MacOS X 10.4.11 (PPC) Python-2.5.2, numpy and scipy. > Now I'm interested to insall Python-2.6. My question is: What will happen to > may scientific modules if now I jump fro 2.5.2 to 2.6? I've to reinstall > numpy and

filtering keyword arguments

2008-07-12 Thread Amir
How do you filter keyword arguments before passing them to a function? For example: def f(x=1): return x def g(a, **kwargs): print a, f(**kwargs) In [5]: g(1, x=3) 1 3 In [6]: g(1, x=3, y=4) TypeError: f() got an unexpected keyword argument 'y' Is there a way to do something like: def g(a, *

Re: python vs java & eclipse

2006-12-02 Thread Amir Michail
Hi, Here's a blog post that is relevant to this discussion: http://sixthandredriver.typepad.com/river_of_code/2006/01/automated_refac.html Amir -- http://mail.python.org/mailman/listinfo/python-list

Re: python vs java & eclipse

2006-12-01 Thread Amir Michail
t; > As well as all the basics (tags/class browser/good regex support/syntax > highlighting/autoindent/source control integration/etc). > > I'm not trolling here, I'm looking for interesting new features I can > steal. How about we try to find some papers on the subject?

Re: python vs java & eclipse

2006-12-01 Thread Amir Michail
krishnakant Mane wrote: > just used the py dev plugin for eclipse. > it is great. But isn't support for java better because the eclipse ide can take advantage of explicit type declarations (e.g., for intellisense, refactoring, etc.)? Amir > auto indentation and intellisence. &

python vs java & eclipse

2006-12-01 Thread Amir Michail
. Sure, all that Java static typing can be painful, but Eclipse takes some of that pain away. Moreover, static typing can result in better on-the-fly error detection and refactoring support. Any thoughts on this? Amir -- http://mail.python.org/mailman/listinfo/python-list

unpickling Set as set

2006-11-07 Thread Amir Michail
Hi, Is there an easy way to unpickle the older Set as the newer set behind the scenes when using shelve? Amir -- http://mail.python.org/mailman/listinfo/python-list

Re: avoiding file corruption

2006-08-27 Thread Amir Michail
Grant Edwards wrote: > On 2006-08-27, Amir Michail <[EMAIL PROTECTED]> wrote: > > > Trying to open a file for writing that is already open for writing > > should result in an exception. > > MS Windows seems to do something similar, and it pisses me off > no end.

Re: avoiding file corruption

2006-08-27 Thread Amir Michail
Diez B. Roggisch wrote: > Amir Michail schrieb: > > Paolo Pantaleo wrote: > >> 27 Aug 2006 00:44:33 -0700, Amir Michail <[EMAIL PROTECTED]>: > >>> Hi, > >>> > >>> Trying to open a file for writing that is already open for writing > &

Re: avoiding file corruption

2006-08-27 Thread Amir Michail
Paolo Pantaleo wrote: > 27 Aug 2006 00:44:33 -0700, Amir Michail <[EMAIL PROTECTED]>: > > Hi, > > > > Trying to open a file for writing that is already open for writing > > should result in an exception. > > > > It's all too easy to accidentall

avoiding file corruption

2006-08-27 Thread Amir Michail
Hi, Trying to open a file for writing that is already open for writing should result in an exception. It's all too easy to accidentally open a shelve for writing twice and this can lead to hard to track down database corruption errors. Amir -- http://mail.python.org/mailman/listinfo/p

Re: python library for web discussions

2006-03-19 Thread Amir Michail
comes with that functionality, although of course, some free package may provide it on top of web.py. Amir -- http://mail.python.org/mailman/listinfo/python-list

python library for web discussions

2006-03-18 Thread Amir Michail
ld be good also (e.g., like reddit/slashdot). Amir -- http://mail.python.org/mailman/listinfo/python-list

Re: deleting a parameter's name as it is passed to a function

2005-10-14 Thread Amir Michail
Paul Rubin wrote: > "Amir Michail" <[EMAIL PROTECTED]> writes: > > The idea is to garbage collect the object as soon as possible, and this > > may be sooner than when dosomestuff returns. > > If it's a parameter to dosomestuff, then there's still a

deleting a parameter's name as it is passed to a function

2005-10-14 Thread Amir Michail
Hi, I think it would be useful to delete a name of a parameter object as the object is passed to a function: dosomestuff(del a) instead of dosomestuff(a) del a The idea is to garbage collect the object as soon as possible, and this may be sooner than when dosomestuff returns. Amir -- http

Re: cgi relay for python cgi script

2005-10-04 Thread Amir Michail
Fredrik Lundh wrote: > Amir Michail wrote: > > > Is there an easy way to do this without modifying the configuration of > > the cgi server and without running a cgi server on the other machine > > where the script will actually run? > > > > Perhaps someone wro

Re: cgi relay for python cgi script

2005-10-04 Thread Amir Michail
Fredrik Lundh wrote: > Amir Michail wrote: > > > Is there an easy way to execute a python cgi script on a different > > machine from the cgi server? > > http://www.google.com/search?q=reverse+proxy > > Is there an easy way to do this without modifying the confi

cgi relay for python cgi script

2005-10-04 Thread Amir Michail
Hi, Is there an easy way to execute a python cgi script on a different machine from the cgi server? I could write my own server, but I was wondering if something is available that would allow me to use a cgi script as is without modification. Amir -- http://mail.python.org/mailman/listinfo

Re: editor for shelve files

2005-05-01 Thread Amir Michail
David M. Cooke wrote: > "Amir Michail" <[EMAIL PROTECTED]> writes: > > > Hi, > > > > Is there a program for editing shelve databases? > > > > Amir > > I doubt it. A shelf is basically just a file-based dictionary, where > the keys mus

editor for shelve files

2005-05-01 Thread Amir Michail
Hi, Is there a program for editing shelve databases? Amir -- http://mail.python.org/mailman/listinfo/python-list

ideal rankings for python related search engine queries

2005-04-09 Thread Amir Michail
queries? http://www.cse.unsw.edu.au/~amichail/collabrank http://www.cse.unsw.edu.au/~amichail/collabrank/collabrank.pdf The system uses a hubs and authorities style analysis to encourage timely and helpful ranking suggestions. See the paper for details. Amir -- http://mail.python.org/mailman

Open Course on Software System Design and Implementation

2005-02-22 Thread Amir Michail
/mindmap.html (Java required) There is a significant python component. Feel free to register and participate in the online discussions. http://cs3141.web.cse.unsw.edu.au Amir -- http://mail.python.org/mailman/listinfo/python-list

Make predictions about Python in a New Google Game

2005-01-08 Thread Amir Michail
ries to those URLs (e.g., "gui framework", "scripting language", "programming", etc.) Of course, feel free to add other sites as well, including any of your python sites that I have missed. Amir -- http://mail.python.org/mailman/listinfo/python-list

Re: A beginner's problem...

2004-12-18 Thread Amir Dekel
Mike Meyer wrote: Doing a second import will find the module in sys.modules and not bother looking in the file system. The solution is to reload(module) instead of import module. What if I import using "from module import class"? It seems to me that I can't use reload then, or I just could

Re: A completely silly question

2004-12-17 Thread Amir Dekel
Mike Meyer wrote: Hmm. That tells me he's probably on a Windows box, so my unix solution wouldn't do him much good. Yes, Windows...too bad -- http://mail.python.org/mailman/listinfo/python-list

Re: A completely silly question

2004-12-17 Thread Amir Dekel
t make much sence to me... Amir -- http://mail.python.org/mailman/listinfo/python-list

A completely silly question

2004-12-17 Thread Amir Dekel
This must be the silliest question ever: What about user input in Python? (like stdin) Where can I find it? I can't find any references to it in the documentation. Amir -- http://mail.python.org/mailman/listinfo/python-list

Re: Adding paths to sys.path permanently, and another problem...

2004-12-17 Thread Amir Dekel
I just added a $HOME variable to the Environment variables of WinXP. Simple solutions. Thanks Jeff Amir -- http://mail.python.org/mailman/listinfo/python-list

Re: Adding paths to sys.path permanently, and another problem...

2004-12-16 Thread Amir Dekel
Jeff Shannon wrote: Amir Dekel wrote: 2. os.path.expanduser("~") always gives me "C:\\" instead of my homepath. I have tried to change my homepath in WinXP using set homepath(in command line), and alsaw using the "Environment Variables" in WinXP system properties

Re: Adding paths to sys.path permanently, and another problem...

2004-12-16 Thread Amir Dekel
ave a solution for my other problem? Thanks, Amir -- http://mail.python.org/mailman/listinfo/python-list

Adding paths to sys.path permanently, and another problem...

2004-12-16 Thread Amir Dekel
ing the "Environment Variables" in WinXP system properties, non helped. I really have to fix this somehow. Thanks, Amir -- http://mail.python.org/mailman/listinfo/python-list

A beginner's problem...

2004-12-15 Thread Amir Dekel
same problem. I try del module but it doesn't work. (I use Python 2.4 with the ActivePython pack (PythonWin IDE) Solution anyone? Amir -- http://mail.python.org/mailman/listinfo/python-list