I solve it. Just have to do another encoding:
http://www.python.org/dev/peps/pep-0263/
--
http://mail.python.org/mailman/listinfo/python-list
Leo Kislov wrote:
>
> On Oct 18, 11:50 am, Stens <[EMAIL PROTECTED]> wrote:
>> Stens wrote:
>>> Can python handle this characters: c,c,ž,d,š?
>>> If can how"I wanna to change some characters in text (in the file) to the
>> characters at this address:
>>
>> http://rapidshare.de/files/37244252/Untit
can someone explain me this code:
--
import thread
stdoutmutex = thread.allocate_lock()
exitmutexes = [0] * 10
def counter(myId, count):
for i in range(count):
stdoutmutex.acquire()
print '[%s] => %s' % (myId, i)
stdoutmutex.release()
Fredrik Lundh wrote:
> did you write that yourself, or did you find it in some book or article?
This is the example from programming python 2nd book, I use this just
for learning
--
http://mail.python.org/mailman/listinfo/python-list
i have created list x:
>>> x = [(12, 22, 11), (13, 22, 33)]
and want to print each number in tuple
>>> for i in x:
for j in i:
print j[0]
but I get this error. What does it means?
Traceback (most recent call last):
File "", line 3, in
print j[0]
T
Can someone explain me bitwise expression?
few examples for every expression will be nice
x << y Left shift
x >> y Right shift
x & y Bitwise AND
x | y Bitwise OR
x ^ y Bitwise XOR (exclusive OR)
~x Bitwise negation
thanks people
--
http://mail.python.org/mailman/listinfo/python-list
Hendrik van Rooyen wrote:
> "Gigs_" <[EMAIL PROTECTED]> wrote:
>
>
>> Can someone explain me bitwise expression?
>> few examples for every expression will be nice
>>
>> x << y Left shift
>> x >> y Right shift
>> x &
import fnmatch, os
def find(pattern, startdir=os.curdir):
matches = []
os.path.walk(startdir, findvisitor, (matches, pattern))
matches.sort()
return matches
def findvisitor((matches, pattern), thisdir, nameshere): #
for name in nameshere:
if fnmatch.fnmatch(name
how to write text on canvas. i know that i need to use canvas.create_text, but
how to write text than when i create_text?
or how to access object ID in canvas and change some options?
thanks in advance!
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> On Apr 18, 3:43 pm, Gigs_ <[EMAIL PROTECTED]> wrote:
>> how to write text on canvas. i know that i need to use canvas.create_text,
>> but
>> how to write text than when i create_text?
>> or how to access object ID in canvas and cha
I want to when create text box with
objid = self.canvas.create_text(x, y, width=event.x-x, text='')
how can i bind KeyPress to objid?
I want that text appear on canvas as i write it.
dont know do I need to use self.canvas.create_window, and put in that window
Tkinter Text widget.
Or I can do it
I'm working on tkinter paint program, mostly to learn tkinter canvas.
I have method which create buttons for oval, rectangle, line, polygon etc.
How to make oval button to be sunken when i click it and to remain sunken until
i click on another button (like rectangle and than is another button sunk
Wojciech Muła wrote:
> Gigs_ wrote:
>> I'm working on tkinter paint program, mostly to learn tkinter canvas.
>> I have method which create buttons for oval, rectangle, line, polygon
>> etc.
>> How to make oval button to be sunken when i click it and to remain
&g
Hi!
Im working on paint program with tkinter canvas.
I have two listbox and when i click on first listbox second become deselected.
I need to take one thing from first listbox and one thing from second at the
same time.
How to do that?
thx, apologies for bad english
--
http://mail.python.org/
I have two listbox on frame, and at same time i need to use one option from
both
listbox. But when I click on first than on second listbox first get deselected.
How to make this? Is it possiblE?
--
http://mail.python.org/mailman/listinfo/python-list
Gigs_ wrote:
> I have two listbox on frame, and at same time i need to use one option
> from both listbox. But when I click on first than on second listbox
> first get deselected.
>
> How to make this? Is it possiblE?
i found, just need to use exportselection=0
--
http://
Hi
I dont have idea how to write tkinter undo/redo function form my text editor
and
my paint program.
Could someone help? I'm not asking for code, just for some guidelines to get me
in the right way.
thanks
--
http://mail.python.org/mailman/listinfo/python-list
I have some problem with pyscripter.
Sometimes when I type pyscripter get to slow (i type 10 chars and pyscripter
needs 5 seconds to complete this). This happens mostly on deleting some chars.
It is very frustrating.
Does someone have same situation?
btw
My comp is
amd athlon x2 4000 2mb cache
Hi all!
I have text file (english-croatian dictionary) with words in it in alphabetical
order.
This file contains 17 words in this format:
english word: croatian word
I want to make instant search for my gui
Instant search, i mean that my program search words and show words to user as
user
does anyone know some good tutorial on pipes in python?
thx
--
http://mail.python.org/mailman/listinfo/python-list
i have this function.
def f(start):
stack = []
def f1(start):
for fname in os.listdir(startDir):
path = os.path.join(startDir, fname)
if os.path.isfile(path):
stack.append(path)
else:
f1(path)
return stack
def f(start):
stack = []
def f1(start):
for fname in os.listdir(start):
path = os.path.join(start, fname)
if os.path.isfile(path):
stack.append(path)
else:
f1(path)
f1(start)
return stack
i feel s stu
i have simple page and form that ask for name and color and cgi script that
print that name in another page and background in chosen color
all the time this error pop:
Error response
Error code 501.
Message: Can only POST to CGI scripts.
Error code explanation: 501 = Server does not support th
Fabio Z Tessitore wrote:
> Il Wed, 29 Aug 2007 19:24:54 +0200, Gigs_ ha scritto:
>
>> i have simple page and form that ask for name and color and cgi script
>> that print that name in another page and background in chosen color
>>
>> all the time this error pop:
>
Fabio Z Tessitore wrote:
> Are you sure your script is in the right dir?
>
> On my home computer, php script will work in /var/www but my python
> script need an other dir to work properly (i don't remember which now ;-))
>
> bye
>
i think that it is in right dir because other script in same di
Gigs_ wrote:
> Fabio Z Tessitore wrote:
>> Are you sure your script is in the right dir?
>>
>> On my home computer, php script will work in /var/www but my python
>> script need an other dir to work properly (i don't remember which now
>> ;-))
>>
Can someone explain me this
>>> def f(l):
if l == []:
return []
else:
return f(l[1:]) + l[:1] # <= cant figure this, how is all sum
at the end?
thanks!
--
http://mail.python.org/mailman/listinfo/python-list
list = Listbox()
list.insert('end', x)
list.insert(END, x)
what do you use 'end' or END?
--
http://mail.python.org/mailman/listinfo/python-list
hi i have create widget with menu bar and menus on it.
when i resize my widget to less than menubar is than from
right to left menus on menubar goes to second row.
who to disable that?
all I want is that when i resize my widget to less size, that menus on
menubar stays on default position .
thank
as I write my first gui program (text editor) I wanna ask you guys how
to separate code in classes.?
Should I put in one class my menu and in another class text and
scorllbars etc?
or something else?
thanks
--
http://mail.python.org/mailman/listinfo/python-list
Gigs_ wrote:
> I'm writing text editor.
>
> How to enable/disable (cut, copy etc.) when text is selected/not selected
Btw it is cut copy ... in edit menu
--
http://mail.python.org/mailman/listinfo/python-list
I'm writing text editor.
How to enable/disable (cut, copy etc.) when text is selected/not selected
--
http://mail.python.org/mailman/listinfo/python-list
jim-on-linux wrote:
> On Friday 09 March 2007 12:04, Gigs_ wrote:
>> Gigs_ wrote:
>>> I'm writing text editor.
>>>
>>> How to enable/disable (cut, copy etc.) when
>>> text is selected/not selected
>> Btw it is cut copy ... in ed
James Stroud wrote:
> Gigs_ wrote:
>> as I write my first gui program (text editor) I wanna ask you guys how
>> to separate code in classes.?
>> Should I put in one class my menu and in another class text and
>> scorllbars etc?
>>
>> or something else?
what is the best way to write tkinter menus? As toplevels or as frame
with Menubutton?
im doing like this
class MyWidget(Frame):
def __init__(self, master=None):""" should this master be
parent? Because my first tought was that this is toplevel master than i
found that its not"""
For what is grid better than pack, and otherwise?
thanks in advance
--
http://mail.python.org/mailman/listinfo/python-list
prodajem:
maticnu sapphire am2rd580adv, pola god stara, pod garancijom -> 700kn
graficku sapphire x1650 pro 256 mb pola god start pod garancijom -> 600kn
monitor philips 190p6es brilliance (kostao 4.100), star 1.5 godinu
garancija vrijedi jos 1.5 godinu -> 2000kn
--
http://mail.python.org/mail
Gigs_ wrote:
> prodajem:
>
> maticnu sapphire am2rd580adv, pola god stara, pod garancijom -> 700kn
>
> graficku sapphire x1650 pro 256 mb pola god start pod garancijom -> 600kn
>
> monitor philips 190p6es brilliance (kostao 4.100), star 1.5 godinu
> garancija vr
Hi all
I cant figure out how to disable resizing of my popup window?
How to put this popup window to show in the middle of my text editor?
It is writen with Toplevel.
thx
--
http://mail.python.org/mailman/listinfo/python-list
Can someone give me example how to write text editor in tkintter with
model-view-controler?
What goes to controler and what goes to model?
thanks in advance
--
http://mail.python.org/mailman/listinfo/python-list
Eric Brunel wrote:
> On Tue, 27 Mar 2007 12:05:07 +0200, Gigs_ <[EMAIL PROTECTED]> wrote:
>
>> Hi all
>>
>> I cant figure out how to disable resizing of my popup window?
>
> myPopupWindow.wm_resizable(0, 0)
>
> It may or may not make resize controls d
Hi all!
I have just finished my tkinter text editor, learning tkinter purpose.
Now I want to learn canvas so I want to make my paint program, I think that
this
will be the best to do over model-view-controler pattern which I need to learn
also.
Is there any good tutorial for mvc in python or
gigs wrote:
> I have made drawing area and few butons.
> How can I make when i click my fill button that later when i click on
> oval oval gets filled with chousen color?
when later click on my oval that is drawn in to change oval color, or to fill
color in oval if click in oval with mouse
--
ht
sorry i think that i express wrong. having problem with english
what i mean is how python knows to add all thing at the end of recursion
>>> def f(l):
if l == []:
return []
else:
return f(l[1:]) + l[:1]
f([1,2,3])
recursion1 f([2,3]) + [1]
recursion2 f([3]) +
Steve Holden wrote:
> Gigs_ wrote:
>> sorry i think that i express wrong. having problem with english
>>
>>
>> what i mean is how python knows to add all thing at the end of recursion
>>
>> >>> def f(l):
>> if l == []:
>>
does anyone know some good tutorial for unittest? (with examples how unit work)?
thank you
--
http://mail.python.org/mailman/listinfo/python-list
is os.mkfifo available on windows xp
thx
--
http://mail.python.org/mailman/listinfo/python-list
hi people
I have problem with this example, not actually the problem, but
[code]
class FileVisitor(object):
def __init__(self, data=None):
self.context = data
def run(self, startdir=os.curdir):
os.path.walk(startdir, self.visitor, None)
def visitor(self, data, dirn
Gabriel Genellina wrote:
> En Thu, 01 Feb 2007 21:33:03 -0300, Gigs_ <[EMAIL PROTECTED]> escribió:
>
>> class CVisitor(FileVisitor):
>> def __init__(self, fromdir, todir):
>> self.fromdirLen = len(fromdir) + 1# here is my problem
Gabriel Genellina wrote:
> En Thu, 01 Feb 2007 21:33:03 -0300, Gigs_ <[EMAIL PROTECTED]> escribió:
>
>> class CVisitor(FileVisitor):
>> def __init__(self, fromdir, todir):
>> self.fromdirLen = len(fromdir) + 1# here is my problem
Jussi Salmela wrote:
> Gigs_ kirjoitti:
>> hi people
>>
>> I have problem with this example, not actually the problem, but
>> [code]
>> class FileVisitor(object):
>> def __init__(self, data=None):
>> self.context = data
>> def run
[EMAIL PROTECTED] wrote:
> On Jan 29, 7:57 pm, "Drew" <[EMAIL PROTECTED]> wrote:
>> I'm looking to add an element to list of items, however I'd like to
>> add it at a specific index greater than the current size:
>>
>> list = [1,2,3]
>> list.insert(10,4)
>>
>> What I'd like to see is something like
I read that this is not the same:
if arg is None: arg = []
arg = arg or []
def functionF(argString="abc", argList = None):
if argList is None: argList = [] # < this
...
def functionF(argString="abc", argList=None):
argList = argList or [] # and this
can someone explain me this code?
from Tkinter import *
root = Tk()
def callback(event):
print "clicked at", event.x, event.y
frame = Frame(root, width=100, height=100)
frame.bind("", callback)
frame.pack()
root.mainloop()
well, my problem is at frame.bind(",Button-1>", callback)
callba
Matimus wrote:
>> How the callback function get this two number when it has only one
>> argument (event)?
>
> It has one argument, event, which is an instance of a class that has
> both x and y attributes.
>
>> print "clicked at", event.x, event.y
>
> It doesn't accept the coordinates as separat
jim-on-linux wrote:
> On Tuesday 13 February 2007 18:02, Gigs_ wrote:
>> can someone explain me this code?
>>
>> from Tkinter import *
>>
>> root = Tk()
>>
>> def callback(event):
>> print "clicked at", event.x, event.y
&
How to change syntax color in pyscripter for python interpreter?
I have change color in tools>options>editor options and everything is
fine till restart pyscripter.
After restart only in module is good syntax color, but in interpreter is
back to default.
thx
--
http://mail.python.org/mailman/l
Hi Im new to gui programming
from Tkinter import * # get widget classes
from tkMessageBox import askokcancel # get canned std dialog
class Quitter(Frame): # subclass our GUI
def __init__(self, parent=None): # constructor m
from Tkinter import *
from tkFileDialog import askopenfilename
from tkColorChooser import askcolor
from tkMessageBox import askquestion, showerror
from tkSimpleDialog import askfloat
demos = {
'Open': askopenfilename,
'Color': askcolor,
'Query': lambda: askquestion('Warning', '
John McMonagle wrote:
> Gigs_ wrote:
>> from Tkinter import *
>> from tkFileDialog import askopenfilename
>> from tkColorChooser import askcolor
>> from tkMessageBox import askquestion, showerror
>> from tkSimpleDialog import askfloat
>>
>&g
James Stroud wrote:
> Gigs_ wrote:
>> from Tkinter import *
>> from tkFileDialog import askopenfilename
>> from tkColorChooser import askcolor
>> from tkMessageBox import askquestion, showerror
>> from tkSimpleDialog import askfloat
>>
>&
James Stroud wrote:
> Gigs_ wrote:
>> James Stroud wrote:
>>> Gigs_ wrote:
>>>> def printit(self, name):
>>>> print name, 'returns =>', demos[name]()
>>>>
>>>>
>>>> I have tried but cant get
Is there any way to convert ocaml code to python? but not manually
thx
--
http://mail.python.org/mailman/listinfo/python-list
from Tkinter import *
states = []
def onpress(i):
states[i] = not states[i]
root = Tk()
for i in range(10):
chk = Checkbutton(root, text= str(i), command=lambda i=i:
onpress(i))
chk.pack(side=LEFT)
states.append(0)
root.mainloop()
print states
after exiting i get everythin
can someone tell me which is better for making 3d game in python.
something like tennis simulation
thx
--
http://mail.python.org/mailman/listinfo/python-list
im using pyscripter ide
it is all alright till the next def
class Checkbar(Frame):
def __init__(self, parent=None, picks=[], side=LEFT, anchor=W):
Frame.__init__(self, parent)
self.vars = []
for pick in picks:
var = IntVar()
chk = Checkbut
thanks
hey, is there any good tutorial for directpython?
or maybe you could suggest me the book
--
http://mail.python.org/mailman/listinfo/python-list
HI folks!
I want to learn to make web pages with django.
I dont know nothing about HTML.
How much of HTML I need to know to be able to learn django well?
Thanks!
--
http://mail.python.org/mailman/listinfo/python-list
class MenuDemo(Frame):
def __init__(self, parent=None):
Frame.__init__(self, parent)
self.pack(expand=YES, fill=BOTH)
self.createWidgets()
def createWidgets(self):
self.makeMenuBar()
self.makeToolBar()
L = Label(self, text='Menu and T
>> master is a reference to a Tk() or Toplevel(). Frames do not contain
>> menus, but the windows that contain them do.
>
> This is the main reason why I always rant about examples of Tkinter
> programming creating windows by sub-classing Frame: frames are not
> windows. If you want to create a
70 matches
Mail list logo