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 scipy?
>
> Thanks in advance for any answer.
>
> Luca
>  --
>  Email.it, the professional e-mail, gratis per te:http://www.email.it/f
>
>  Sponsor:
>  Scopri i games pi scaricati su cellulare! Gioca la tua partita!
>  Clicca qui:http://adv.email.it/cgi-bin/foclick.cgi?mid=8272&d=20081002

numpy does not work with python 2.6 in general.
Windows AMD64 numpy 1.2.0 and python 2.6 reported a failed install:
http://www.mail-archive.com/[EMAIL PROTECTED]/msg13131.html

I attempted to install numpy 1.2.0 under Windows x86 and python 2.6
and the installation failed as well.

Let us know if you get it to work on Mac, but do not upgrade to Python
2.6 if you want your numpy code to work on a Windows machine at least
until there is a new numpy release.
--
http://mail.python.org/mailman/listinfo/python-list


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, **kwargs): print a, f(filter_rules(f, **kwargs))

so only {'x': 3} is passed to f?

I was hoping for a pythonic way of doing what in Mathematica is done
by FilterRules:

http://reference.wolfram.com/mathematica/ref/FilterRules.html

--
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: 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


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/python-list


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 configuration of
the cgi server and without running a cgi server on the other machine
where the script will actually run?

Perhaps someone wrote a simple server that provides the required
environment for the cgi script to run?

I'm looking for something simple that does not require root access.

Amir

-- 
http://mail.python.org/mailman/listinfo/python-list


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 wrote a simple server that provides the required
> > environment for the cgi script to run?
> >
> > I'm looking for something simple that does not require root access.
>
> you could of course use something like
>
> http://docs.python.org/lib/module-CGIHTTPServer.html
>
> or some other light-weight web server, but you should probably have in mind
> that doing things like this without coordinating with your server 
> administrators
> and security architects *before* you start tinkering can be a excellent way to
> get fired...
>
> 

I would like to do this to improve performance by avoiding nfs. (The
required data is not on the cgi server.)

The advice I got was to use something like MySQL with a client/server
architecture.

However, I thought it would be easier to simply run the core part of
the script off the cgi server, thereby avoiding nfs for data lookups.

So I guess the point is that such a solution is more likely to be a
security risk than MySQL?

Amir

-- 
http://mail.python.org/mailman/listinfo/python-list


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://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 reference
> until dosomestuff returns.  Simply getting rid of the name only frees
> a dictionary entry.

But dosomestuff can get rid of its reference before it returns (perhaps
it has a lot more to do before it returns and so you would want to
garbage collect the parameter object as soon as possible).

Amir

-- 
http://mail.python.org/mailman/listinfo/python-list


Make predictions about Python in a New Google Game

2005-01-08 Thread Amir Michail
Hi,

I have added over 50 Python related (Query, URL) pairs into the
Speculative Search Game -- a new Google game.

Just search for "python" to find them when making predictions:

http://www.cse.unsw.edu.au/~amichail/spec/

The Speculative Search Game allows you to predict which web pages will
rank more highly on Google in the future.  Your score will depend on
the actual ranking of those pages in the future.

The output of the game will be used to build a Speculative Search
Engine that ranks those web pages more highly today.

Note that such predictions can be helpful in managing a large project.
See for example this article:

http://www.time.com/time/insidebiz/article/0,9171,1101040712-660965-1,00.html

The python (Query, URL) pairs that I added have pretty general queries
such as "python" and "python bindings".  Feel free to add other sorts
of queries 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


Open Course on Software System Design and Implementation

2005-02-22 Thread Amir Michail
Hi,

I will be teaching a course on software system design and
implementation.

Like last year, the course will be open meaning that anyone can
participate in online discussions -- not only UNSW students.

You can find a mind map of topics covered last year here:

http://cs3141.web.cse.unsw.edu.au/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


A beginner's problem...

2004-12-15 Thread Amir Dekel
Hello everyone,
First, I have to say that Python is one of the coolest programing 
languages I have seen.
And now for the problem (must be a silly one):
When I import a module I have wrote, and then I find bugs, it seems that 
I can't import it again after a fix it. It always shows the 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


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

2004-12-16 Thread Amir Dekel
Hi everyone,
I have two problems:
1. How can I keep my changes in sys.path after closing the interpreter?
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, non helped. I really have to fix this somehow.

Thanks,
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:
Not only can one modify the environment variable PYTHONPATH, but one can 
also use a .pth file.  Under windows, when the interpreter starts up it 
will search its default sys.path for any files with extension .pth; if 
it finds any, then it will use each line of those files as a directory 
to add to sys.path.  Thus, if you drop a mymodule.pth file in 
site-packages, which contains a list of the directories you're 
interested in, sys.path will automatically be amended for you every time 
Python starts.

Works great! So simple, yet people get so confused...
Do you have a solution for my other problem?
Thanks,
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, non helped. I really have to fix this 
somehow.

Judging from this, I think that os.environ['USERPROFILE'] seems like it 
may do what you want, though os.environ['APPDATA'] might be useful as 
well.  Of course, if you're trying to get something to work 
cross-platform, things may be more difficult -- but that's because 
Windows doesn't normally use ~ so its use is not supported very well.  
You may be able to create a $HOME that's equivalent to $USERPROFILE...

Yet another reason not to use Windows and all it's silly system... 
Unfotunely, I am stuck with a USB ADSL modem on a family computer, which 
led to terrible headaches with my (quiet successful, actually) attempts 
to install Linux.

Well, so be it...
--
http://mail.python.org/mailman/listinfo/python-list


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

2004-12-17 Thread Amir Dekel
Jeff Shannon wrote:
Judging from this, I think that os.environ['USERPROFILE'] seems like it 
may do what you want, though os.environ['APPDATA'] might be useful as 
well.  Of course, if you're trying to get something to work 
cross-platform, things may be more difficult -- but that's because 
Windows doesn't normally use ~ so its use is not supported very well.  
You may be able to create a $HOME that's equivalent to $USERPROFILE...

Both problems solved! The .pth seems like the best solution for the 
first one, and for the expanduser("~") 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


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: A completely silly question

2004-12-17 Thread Amir Dekel
Harlin Seritt wrote:
Simple, Simple, Simple:
Var = raw_input("Some prompting text here: ")
Frans Englich wrote:
>
> See sys.stdin
>
What I need from the program is to wait for a single character input, 
something like while(getchar()) in C. All those Python modules don't 
make much sence to me...

Amir
--
http://mail.python.org/mailman/listinfo/python-list


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 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 couldn't find the right syntax...
--
http://mail.python.org/mailman/listinfo/python-list


ideal rankings for python related search engine queries

2005-04-09 Thread Amir Michail
Hi,

Google is good, but not perfect.

CollaborativeRank takes Google rankings as a starting point but allows
users to tweak them in a collaborative way to achieve something even
better.

Perhaps some people in this group might be interested in producing even
better rankings for python related 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/listinfo/python-list


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 ...
>
> >>> sys.version
> '3.4.2 (v3.4.2:ab2c023a9432, Oct  6 2014, 22:15:05) [MSC v.1600 32 bit
> (Intel)]'
> >>> 'b' in 'abc'
> True
> >>> b'b' in b'abc'
> True
> >>> 'b' in set('abc')
> True
> >>> b'b' in set(b'abc')
> False
>
> I was surprised by the last result. What happened?
> (Examples simplified; I was planning to manipulate the set)
>
> Patrick
>
> ---
> Dit e-mailbericht is gecontroleerd op virussen met Avast antivirussoftware.
> http://www.avast.com
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


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:
>
>> 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, or other informations.
>> I'm searching this informations for python3.
>>
>> adam
>> --
>> https://mail.python.org/mailman/listinfo/python-list
>>
>
-- 
https://mail.python.org/mailman/listinfo/python-list


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, or other informations.
> I'm searching this informations for python3.
>
> adam
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


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 function, it does
> not say multiple data results return situation. In C, it is possible.
> How about Python on a multiple data return requirement?
>
>
> Thanks,
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Can Python function return multiple data?

2015-06-06 Thread Amir Arsalan
yield structure can able to you that return list of return by nest in
function. for example you want send a value as enter value to function and
wanna after some calculate send value as return data. 2 way for this :

a) send data as a list
b) send data with yield


example:
a)
def func(a):
a2 = a*2
print "a*2"
a3 = a*3
print "a*3"
return a2,a3
--
b)
def func(a):
yield a*2
print "a*2"
yield a*3
print "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 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 function, it does
> >
> > not say multiple data results return situation. In C, it is possible.
> >
> > How about Python on a multiple data return requirement?
> >
> >
> >
> >
> >
> > Thanks,
> >
> > --
> >
> > https://mail.python.org/mailman/listinfo/python-list
>
> Excuse me. I input the following according to your idea, but I do not
> understand how to use it from the echo. It does not show how to use
> the multiple output results. I am a new Python user. Please give a little
> more explanation if you could.
>
>
> Thanks,
>
> >>> def func(a):
> yield a*2
> print "a*2"
> yield a*3
> print "a*3"
>
> >>> data=func(5)
> >>> data
> 
> >>> list(data)
> a*2
> a*3
> [10, 15]
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


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 return. ex:
> >
> > def func(a):
> > yield a*2
> > print "a*2"
> > yield a*3
> > print "a*3"
> > ...
> >
> > data = func(5) --> data = (10,15,... )
>
> That's actually wrong. If you run:
>
> data = func(5)
>
> data does NOT equal the tuple (10, 15, ...) but it is a generator object.
> Iterating over the generator will yield 10, 15 etc one item at a time.
>
>
> Please remember that the Original Poster is a beginner. He is having
> trouble
> with *basic* Python questions, like returning multiple items from a single
> function call. Showing him advanced techniques like generators, especially
> when the example you show is wrong, will just confuse him more.
>
>
>
> --
> Steven
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://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


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/python-list


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 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/python-list
> >
> Even if it could be strange, the OS usually allow you to open a file
> twice, that's up to the programmer to ensure the consistency of the
> operations.
>
> PAolo
>

But if this is usually a serious bug, shouldn't an exception be raised?

Amir

>
>
> --
> if you have a minute to spend please visit my photogrphy site:
> http://mypic.co.nr

-- 
http://mail.python.org/mailman/listinfo/python-list


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
> >>> 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/python-list
> >>>
> >> Even if it could be strange, the OS usually allow you to open a file
> >> twice, that's up to the programmer to ensure the consistency of the
> >> operations.
> >>
> >> PAolo
> >>
> >
> > But if this is usually a serious bug, shouldn't an exception be raised?
>
> executing "rm -rf /" via subprocess is usually also a bad idea. So? No
> language can prevent you from doing such mistake. And there is no way to
> know if a file is opened twice - it might that you open the same file
> twice via e.g. a network share. No way to know that it is the same file.
>
> Diez

The scenario I have in mind is something like this:

def f():
  db=shelve.open('test.db', 'c')
  # do some stuff with db
  g()
  db.close()

def g():
  db=shelve.open('test.db', 'c')
  # do some stuff with db
  db.close()

I think it would be easy for python to check for this problem in
scenarios like this.

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.  Trying to open a file and read it while somebody else
> has it open for writing causes an exception.  If I want to open
> a file and read it while it's being writtent to, that's my
> business.
>
> Likewise, if I want to have a file open for writing twice,
> that's my business as well.  I certainly don't want to be
> hobbled to prevent me from wandering off in the wrong direction.
>
> > 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.
>
> It's all to easy to delete the wrong element from a list.  It's
> all to easy to re-bind the wrong object to a name.  Should
> lists be immutable and names be permanently bound?
>

How often do you need to open a file multiple times for writing?

As a high-level language, Python should prevent people from corrupting
data as much as possible.

Amir

> --
> Grant Edwards   grante Yow!  I'm in a twist
>   at   contest!! I'm in a
>visi.combathtub! It's on Mars!! I'm
>in tip-top condition!

-- 
http://mail.python.org/mailman/listinfo/python-list


python vs java & eclipse

2006-12-01 Thread Amir Michail
Hi,

It seems to me that measuring productivity in a programming language
must take into account available tools and libraries.

Eclipse for example provides such an amazing IDE for java that it is no
longer obvious to me that one would be much more productive in python
for medium sized projects.

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


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.
> and all other things.
> so now how does it look from this end?
> python + productivity and eclipse + productivity = double productivity!
> only problem with the plugin is that I find it difficult to manage the
> script running.
> I open a command prompt and run the scripts manually.
> any suggestion for this.
> for example I had name = raw_input("please enter your name") and the
> moment I type the first letter on the keyboard the code execution
> moves over to the next statement.  should it not wait for the return
> key as it always does?
> Krishnakant.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: python vs java & eclipse

2006-12-01 Thread Amir Michail
[EMAIL PROTECTED] wrote:
> ...
>
> Is there anything _useful_ that it'll bring that a good editor doesn't?
>  e.g. in vim I do get
> * automatic syntax checking (if I type "if a=1:" and hit enter, it'll
> immediately highlight the syntax error)
> * omni-completion (because Intellisense is trademarked)
> * refactoring (with BicycleRepairMan integration)
> * folding (which is more important than the above 3 combined, IMO)
> * online help (typing cmp( gives me the docstring for cmp in the status
> line, F1 to view the whole thing)
>
> 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?

Here's one to start things off:

http://pag.csail.mit.edu/~akiezun/companion.pdf

Amir

-- 
http://mail.python.org/mailman/listinfo/python-list


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


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


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 must be strings, while the values can be arbitrary objects.
> An editor could handle the keys, but most likely not the values.
>
> If you have an editor for arbitrary objects, you could probably make
> an editor for shelfs easily enough :-)
>
> Do you have a specific use in mind? That would be easier to handle
> than the general case.

Such an editor could at least handle some basic types including nested
lists and dictionaries.

I've written an application that uses many shelve files.  Sometimes I
need to make a minor change to the data and don't really want to write
code just to make that change.

Amir

>
> --
> |>|\/|<
>
/--\
> |David M. Cooke
> |cookedm(at)physics(dot)mcmaster(dot)ca

-- 
http://mail.python.org/mailman/listinfo/python-list


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: 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, compilers, etc.)?
>
> Your question is vague. Define what you mean by "same results" in this 
> context.

In Python 2.5, if you use the same seed, will calls to randrange yield
the same numbers across all configurations?

Amir

>
> Cheers,
> Chris
>
> --
> I have a blog:http://blog.rebertia.com

--
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 give the same
> >>> results if given the same seed across all configurations (e.g.,
> >>> architectures, compilers, etc.)?
> >> Your question is vague. Define what you mean by "same results" in this 
> >> context.
>
> > In Python 2.5, if you use the same seed, will calls to randrange yield
> > the same numbers across all configurations?
>
> What do you mean with "configurations"?
>
> Random uses AFAIK rand/srand from the stdlib.h of your platform (*nix,
> no idea how that beast is called in redmond).
>
> So whatever the behaviour, it will be driven by that, and I guess it
> varies between platforms.
>
> Diez

So far I get the same results under Mac OS X, Windows, and Linux
(Google App Engine).  I'm particularly interested in getting the same
results under the Google App Engine even as Google upgrades its
servers over time.

Amir
--
http://mail.python.org/mailman/listinfo/python-list


python library for web discussions

2006-03-18 Thread Amir Michail
Hi,

I'm building something like digg/reddit and would like to allow people
to have discussions on various items.

Is there a simple lightweight python library that I can use (as opposed
to a heavyweight web framework)?  Although not necessary, some sort of
scoring/moderation mechanism would be good also (e.g., like
reddit/slashdot).

Amir

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: python library for web discussions

2006-03-19 Thread Amir Michail
Gregory Petrosyan wrote:
> reddit is written with webpy (webpy.org), maybe you should give it a
> try?

I'm looking for a library that provides commenting on items in a
similar way to reddit/digg/slashdot.  I would rather not write all that
code from scratch.

I don't think web.py 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