On Jan 24, 9:51 am, Peter Otten <__pete...@web.de> wrote:
> iu2 wrote:
> > I'm trying to convert functions - pass a few functions to a converting
> > function, which change their behaviour and return the changed
> > functions:
>
> > >>> def cfunc
Hi all,
I'm trying to convert functions - pass a few functions to a converting
function, which change their behaviour and return the changed
functions:
>>> def cfuncs(*funcs):
n = []
for f in funcs:
def ff(*args, **key):
print 'Start!', f.fu
Hi,
I have a SimpleXMLRPCServer running on one PC.
I need several ServerProxy-s talking to it, each one running on a
different PC. That is, I run on each PC a client application, that
talks to the one server using xml-rpc.
Is the xml-rpc designed to work like this? If not, is there something
I ca
On Nov 4, 3:10 am, "Gabriel Genellina" wrote:
> En Tue, 03 Nov 2009 17:36:08 -0300, iu2 escribió:
>
>
>
>
>
> > On Nov 3, 7:49 pm, Matt McCredie wrote:
> >> iu2 elbit.co.il> writes:
>
> >> > Having a file called funcs.py, I would li
On Nov 3, 7:49 pm, Matt McCredie wrote:
> iu2 elbit.co.il> writes:
>
>
>
> > Hi,
>
> > Having a file called funcs.py, I would like to read it into a string,
> > and then import from that string.
> > That is instead of importing from the fie system, I wo
On Nov 3, 5:58 pm, Jonathan Hartley wrote:
> Hi,
>
> Recently I put together this incomplete comparison chart in an attempt
> to choose between the different alternatives to py2exe:
>
> http://spreadsheets.google.com/pub?key=tZ42hjaRunvkObFq0bKxVdg&output...
>
> Columns represent methods of deploy
Hi,
Having a file called funcs.py, I would like to read it into a string,
and then import from that string.
That is instead of importing from the fie system, I wonder if it's
possible to eval the text in the string and treat it as a module.
For example
with file('funcs.py') as f: txt = r.read()
On Sep 14, 8:16 am, Chris Rebert wrote:
> On Sun, Sep 13, 2009 at 9:52 PM, iu2 wrote:
> > Hi,
>
> > I reached the chapter "Emulating numeric types" in the python
> > documentation and I tried this:
>
> >>>> class A:
> > def __m
On Sep 14, 7:52 am, iu2 wrote:
> Hi,
>
> I reached the chapter "Emulating numeric types" in the python
> documentation and I tried this:
>
> >>> class A:
>
> def __mul__(self, a):
> return 'A' * a
>
> Now, th
Hi,
I reached the chapter "Emulating numeric types" in the python
documentation and I tried this:
>>> class A:
def __mul__(self, a):
return 'A' * a
Now, this works as expected:
>>> a = A()
>>> a * 3
'AAA'
But this doesn't (also as expected):
>>> 3 * a
Traceback (most re
On Aug 20, 9:10 am, Peter Otten <__pete...@web.de> wrote:
> Jan Kaliszewski wrote:
> > 20-08-2009 o 02:05:57 Jan Kaliszewski wrote:
>
> >> Or probably better:
>
> >> from itertools import islice, izip
> >> dict(izip(islice(li, 0, None, 2), islice(li, 1, None, 2)))
>
> > Or similarly, per
On Aug 19, 11:39 pm, "Diez B. Roggisch" wrote:
> iu2 schrieb:
>
> > Hi all,
>
> > I need to create a dictionary out of a list.
>
> > Given the list [1, 2, 3, 4, 5, 6]
>
> > I need the dictionary: {1:2, 3:4, 5:6}
>
> dict(zip(l[::2], l[1:
Hi all,
I need to create a dictionary out of a list.
Given the list [1, 2, 3, 4, 5, 6]
I need the dictionary: {1:2, 3:4, 5:6}
I'll appreciate your help
Thanks
iu2
--
http://mail.python.org/mailman/listinfo/python-list
p = Process(target=my_process, args=())
> p.start()
>
> print 'Process started'
>
> the problem was solved.
> So my question is what actually happens when I call p.start()? Is the
> entry file reloaded under a different module name?
>
> Thanks
> iu2
Ok, I found it, it is nicely documented, I missed it before. Case
closed.
--
http://mail.python.org/mailman/listinfo/python-list
Hi all,
I try to placs widgets (button, static text labels) in a status bar,
wxPython.
>From the examples I could place them using exact positioning by the
status bar methof GetFieldRect.
In this case I need to add an EVT_SIZER handler to keep the widgets in
their propotional places
within the sta
On Mar 9, 4:18 am, David Bolen wrote:
> iu2 writes:
>
> Then even a time.sleep() or plain loop isn't sufficient since each may
> have additional latencies depending on load. You will probably need
> to query a system clock of some type to verify when your interval has
>
On Mar 9, 12:44 am, Scott David Daniels wrote:
> iu2 wrote:
> > Here is the timer version. It works even more slowly, even with
> > PyScripter active: ...
>
> > I actually tried this one first. Due to the slow speed I changed to
> > looping inside the event.
> >
On Mar 8, 1:42 pm, Carl Banks wrote:
> On Mar 8, 1:52 am, iu2 wrote:
>
>
>
> > On Mar 6, 6:52 pm, Mike Driscoll wrote:
>
> > > ...
> > > Can you post a sample application so we can try to figure out what's
> > > wrong? You might also cross-p
cripter.
When PyScripter is closed, the application runs much less quickly.
I experienced this on two PC-s.
Maybe this behavior is not even related to wxPython but to the sleep
command. I don't know...
Thanks
iu2
--
http://mail.python.org/mailman/listinfo/python-list
(Windows) for writing the application. While
PyScripter is active, the panels move quickly. But when I exit
PyScripter and execute the script from the explorer or the command
line, the panels move very slowly.
Do you have any idea of what is going wrong?
Thank you very much
iu2
--
http
On Dec 31, 1:48 pm, "Chris Rebert" wrote:
...
>
> Not really, or at the very least it'll be kludgey. Python uses
> call-by-object (http://effbot.org/zone/call-by-object.htm), not
> call-by-value or call-by-reference.
>
> Could you explain why you have to set so many variables to the same
> value (
Hi,
Is it possible somehow to change a varible by passing it to a
function?
I tried this:
def change_var(dict0, varname, val):
dict0[varname] = val
def test():
a = 100
change_var(locals(), 'a', 3)
print a
But test() didn't work, the value a remains 100.
I have several variables init
Hi guys
I do
os.system('ls &> e')
On one linux machine it emits ls output to the file e as expected.
On another linux machine it emits ls to the standard output, and
nothing to e!
Both machines run Fedora linux.
The command "ls &> e" entered at the shell (no python) behaves ok on
both machines.
Hi,
This is a little bit strange post, but I'm curious...
I learned Python from its tutorial step by step, and practicing
writing small scripts.
I haven't seen a Python program before knowing Python.
I'm curious, what did Python code look like to those of you who have
seen a bunch of Python code
On Jul 29, 9:36 am, Duncan Booth <[EMAIL PROTECTED]> wrote:
> iu2 <[EMAIL PROTECTED]> wrote:
> > Is it possible to grant Python another syntactic mark, similar to
> > triple quotes, that will actually make the enclosed code a compiled
> > code, or an anonymous func
On Jul 29, 2:26 am, John Krukoff <[EMAIL PROTECTED]> wrote:
> On Mon, 2008-07-28 at 16:00 -0700, iu2 wrote:
> > On Jul 29, 12:10 am, John Krukoff <[EMAIL PROTECTED]> wrote:
> > > On Mon, 2008-07-28 at 16:24 -0500, Ervan Ensis wrote:
> > > > My progra
On Jul 29, 3:59 am, John Machin <[EMAIL PROTECTED]> wrote:
> On Jul 29, 8:10 am, John Krukoff <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > On Mon, 2008-07-28 at 16:24 -0500, Ervan Ensis wrote:
> > > My programming skills are pretty rusty and I'm just learning Python so
> > > this problem is giving me t
On Jul 29, 12:10 am, John Krukoff <[EMAIL PROTECTED]> wrote:
> On Mon, 2008-07-28 at 16:24 -0500, Ervan Ensis wrote:
> > My programming skills are pretty rusty and I'm just learning Python so
> > this problem is giving me trouble.
>
> > I have a list like [108, 58, 68]. I want to return the sorted
On Jul 28, 10:06 pm, iu2 <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Playing with imitating lambdas and ruby blocks in Python, I came up
> with a very simple construct, for example:
>
> import compiler
>
> def dotimes(i, code):
> for i in range(i):
> exe
Hi,
Playing with imitating lambdas and ruby blocks in Python, I came up
with a very simple construct, for example:
import compiler
def dotimes(i, code):
for i in range(i):
exec code
dotimes(5, '''
for j in range(i):
print j,
print
''', '', 'exec')
This will print
0
0 1
0 1
On Jul 16, 2:21 am, Michael Torrie <[EMAIL PROTECTED]> wrote:
> iu2 wrote:
> > I still don't understand: In each recursive call to flatten, acc
> > should be bound to a new [], shouldn't it? Why does the binding happen
> > only on the first call to flatten?
On Jul 15, 9:30 pm, [EMAIL PROTECTED] wrote:
> On Jul 15, 2:59 pm, iu2 <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hi,
>
> > I wrote this wrong recursive function that flattens a list:
>
> > def flatten(lst, acc=[]):
> > #print 'a
Hi,
I wrote this wrong recursive function that flattens a list:
def flatten(lst, acc=[]):
#print 'acc =', acc, 'lst =', lst
if type(lst) != list:
acc.append(lst)
else:
for item in lst:
flatten(item)
return acc
a = [1, 2, [3, 4, 5], [6, [7, 8, [9, 10],
On 31 מרץ, 02:32, Bjoern Schliessmann wrote:
> iu2 wrote:
> > Due to Competitors... I don't want to expost the language I use
>
> A serious competitor that wants to find out _will_ find out, no
> matter what you try.
>
> Regards,
>
> Björn
>
> --
> BOFH
On 30 מרץ, 15:55, Lie <[EMAIL PROTECTED]> wrote:
> On Mar 30, 6:42 pm, iu2 <[EMAIL PROTECTED]> wrote:
>
> > Hi guys,
>
> > I'd like to use Python in a commercial application. In fact I would
> > like to write the application entirely in Python.
> >
understand is a must do, reveals that the appliation is based on
Python.
I'll appreciate your advices about this
Thanks
iu2
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I use tix NoteBook, and I need the tabs arranged right to left. Is it
possible?
Thanks
--
http://mail.python.org/mailman/listinfo/python-list
On Jan 29, 1:48 am, [EMAIL PROTECTED] wrote:
> Marc 'BlackJack' Rintsch:
>
> > Try calling the iterative one twice and measure the time of the second
> > call. IIRC psyco needs at least one call to analyze the function, so the
> > first call is not speed up.
>
> That's how Java HotSpot works, but
Hi guys,
I wrote two version of a fib functions, a recursive one and an
iterative one.
Psyco improved a lot the recursive function time, but didn't affect at
all the iterative function.
Why?
Here is the code:
import time, psyco
def mytime(code):
t = time.time()
res = eval(code)
del
On Jan 23, 11:17 am, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote:
> If you are claimaing that the program
>
> Apparently, they do the OEMtoANSI conversion when you run a console
> application (i.e. python.exe), whereas they don't convert when running
> a GUI application (pythonw.exe).
>
> I'm not
#x27;t know how IDLE guessed cp856, but it must have done it.
(perhaps because it uses tcl, and maybe tcl guesses the encoding
automatically?)
thanks
iu2
--
http://mail.python.org/mailman/listinfo/python-list
On Jan 17, 10:35 pm, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote:
> > import pymssql
>
> > con =
> > pymssql.connect(host='192.168.13.122',user='sa',password='',database='tempdb')
> > cur = con.cursor()
> > cur.execute('select firstname, lastname from [users]')
> > lines = cur.fetchall()
>
> > pri
On Jan 17, 6:59 am, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote:
> > What do I need to do run my app like IDLE does?
>
> Can you please show the fragment of your program that prints
> these strings?
>
> Regards,
> Martin
Hi,
I use pymssql to get the data from a database, just like this (this is
fr
laced with '8's:
\x88\x89\x85
The IDLE way is the way I need, since using Hebrew words in the
program text itself, as keys in a dict, for example, yield similar
strings (with 'e's). When running from eclipse I get KeyError for this
dict..
What do I need to do run my app l
On Jan 15, 12:44 pm, "Ben Fisher" <[EMAIL PROTECTED]> wrote:
> This might have something to do with the class being derived from file.
>
> I've written it so that it doesn't derive from file, and it works.
>
> class File_and_console():
> def __init__(self, *args):
> self.fil
o')
hello
>>> print >>f, 'world'
>>>
the 'write' method works, but 'print >>' doesn't, it writes only to
the file. It doesn't actually call File_and_console.write
Why? How can I fix it?
Thanks
iu2
--
http://mail.python.org/mailman/listinfo/python-list
mport a1
import a2
a2.init()
print a1.the_number, type(a1.the_number)
gives:
100
Why doesn't it work in the first version of a3.py?
Thanks,
iu2
--
http://mail.python.org/mailman/listinfo/python-list
it), perl, and Lisp (less) but Python is
the one that I enjoy the most. That's why I feel free to say what I
think is missing (and if you don't like it, I'll try not to do it, I
think Python's developers are doing a great work).
I missed new style classes though... Now I know ho
On Jan 1, 12:32 pm, Steven D'Aprano <[EMAIL PROTECTED]
cybersource.com.au> wrote:
>
> import read_my_mind_and_do_what_I_want
>
> first. (Module expected in Python 9.7, due out in 2058.)
That's because it seems to you like some esoteric feature.
To me it seems natural with OO.
> "Special cases ar
On Jan 1, 9:59 am, Michele Simionato <[EMAIL PROTECTED]>
wrote:
> No PEP, this would never pass. There would be no way
> to stop a method from calling its parent: you would
> lose control of your classes, so I think this is a
> bad idea.
Not all classes, only classes the programmer chooses to hav
ined
class System_A(Interface_system):
def get_name(self):
return 'System_A'
Now the programmer both overrides get_name, and calls get_name
directly in the application. And
no one has to remember to call the parent's get_name method. It's done
automatically.
(A PEP maybe? I sense you don't really like it.. ;-)
What do you think? Good? Too implicit?
iu2
--
http://mail.python.org/mailman/listinfo/python-list
wrong because I don't give the object instance to
super (I don't have it!) and I also get the error
TypeError: super() argument 1 must be type, not classobj
Can you please help me with this?
Thanks
iu2
--
http://mail.python.org/mailman/listinfo/python-list
On Oct 22, 12:47 pm, "J. Cliff Dyer" <[EMAIL PROTECTED]> wrote:
> iu2 wrote:
> > Hi all,
>
> > I've copied the example of RPC usage from the Python's doc.
> > When the client and server were on the same PC ("localhost") (I use
> > W
On Oct 22, 10:21 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> iu2 wrote:
>
> > Hi all,
>
> > I've copied the example of RPC usage from the Python's doc.
> > When the client and server were on the same PC ("localhost") (I
me.
Trying to remove the double-backslash from the PC's name raised the
error:
error: (10061, 'Connection refused')
I'll appreciate your help on this.
Thanks
iu2
--
http://mail.python.org/mailman/listinfo/python-list
55 matches
Mail list logo