Why is augmented assignment of a tuple with iterable unpacking invalid syntax?

2019-05-19 Thread Eugene Alterman
a = 1, 2, 3 b = *a, # assignment - OK b += *a, # augmented assignment - syntax error Need to enclose in parenthesis: b += (*a,) Why isn't it allowed with an augmented assignment, while it is OK with a regular assignment? -- https://mail.python.org/mailman/listinfo/python-

Re: Regex substitution trouble

2014-11-05 Thread Eugene
massi_...@msn.com wrote: > Hi everyone, > > I'm not really sure if this is the right place to ask about regular > expressions, but since I'm usin python I thought I could give a try :-) > Here is the problem, I'm trying to write a regex in order to substitute > all the occurences in the form $"

Development infrastructure - need python packaging gurus help, please

2014-01-28 Thread Eugene Sajine
s fully (pip install --egg is having the disclaimer that it s not working ok sometimes) wheel is pretty much unusable for anything other then installing into the virtualenv. Am i missing something? Thanks in advance, Eugene -- https://mail.python.org/mailman/listinfo/python-list

Re: regex alternation problem

2009-04-17 Thread Eugene Perederey
n an " > > for s in [s1, s2]: >    print re.findall(" (am|an) ", s) > > # Results: > # ['am'] > # ['am', 'an'] > > --- > > I want the results to be the same for each string.  What am I doing > wrong? > -- > h

Re: a newbie question

2009-04-12 Thread Eugene Perederey
quot;urlopen" > > > What's wrong with this code? Do i need to place my code in some > specific directory? Thanks a lot. ' > -- > http://mail.python.org/mailman/listinfo/python-list > -- Sincerely yours, Eugene Perederey -- http://mail.python.org/mailman/listinfo/python-list

cross platform ping module

2009-04-07 Thread Eugene Yunak
Hi all! I'm interested in developing a cross platform module that will allow a simple 'ping' functionality, i mean sending icmp type 8 code 0 and receiving appropriate answers. This sound like a simple work, but i ask for your help with architectural decision. I can implement icmp communications

Re: List of paths

2009-04-01 Thread Eugene Perederey
Sure, generators rock! :-) 2009/4/1 andrew cooke : > Nico Grubert wrote: >>> May be not so much pythonic, but works >>> >>> for i in range(len(q)): >>>     for x in q[i:]: >>>        if x.startswith(q[i]) and x!=q[i]: >>>            q.r

Setting an exclusive lock on a file

2009-03-29 Thread Eugene Perederey
7;t write anything to file whereas other processes do. What's wrong in my code? -- Sincerely yours, Eugene Perederey -- http://mail.python.org/mailman/listinfo/python-list

python sqlite THREADSAFE?

2007-09-08 Thread EuGeNe Van den Bulke
Hi, Is the sqlite distributed with Python 2.5 compiled with the -DTHREADSAFE=1 flag? My gutt feeling is Windows (yes) MacOS/Linux (no) but ... If it is not on MacOS/Linux, how do I go about replacing the sqlite so file with a threadsafe sqlite? Thanks, EuGeNe -- http://www.3kwa.com -- http

Re: ActiveRecord for Python/MySQL

2007-08-26 Thread EuGeNe Van den Bulke
Devraj wrote: > My application uses MySQL as a backend and am using the MySQL/Python > bindings. Are there any libraries that provide a database abstraction > layer like Activerecords for Python?' SQLObject SQLAclhemy DejaVu Storm Google for Python ORM you may find more! EuGeNe

Re: ORM layer

2007-06-29 Thread EuGeNe Van den Bulke
David wrote: > I am looking for an ORM for Python that fulfills a few simple needs. * SQLObject * SQLAlchemy (+Elixir) * DejaVu There are probably others but these are the most commonly used AFAIK. EuGeNe -- http://www.3kwa.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Indenting in Emacs

2007-06-21 Thread Eugene Morozov
se tell me where to find the latest? > It's from Emacs 22. Eugene -- http://mail.python.org/mailman/listinfo/python-list

Re: poplib.retr doens't flag message as read

2007-06-20 Thread EuGeNe Van den Bulke
n flag. Result is in form (response, ['line', ...], octets). What is the seen flag? Nothing it seems http://mail.python.org/pipermail/python-list/2005-July/329888.html Thanks for your help, EuGeNe -- http://www.3kwa.com -- http://mail.python.org/mailman/listinfo/python-list

poplib.retr doens't flag message as read

2007-06-19 Thread EuGeNe Van den Bulke
lines, octets = pop.retr(msg_number) msg = email.message_from_string('\n'.join(lines)) if not msg.is_multipart() and msg.get_content_type() == 'text/plain': print msg.get('Subject') print msg.get_payload() pop.quit() Why aren't the message flagged as

Re: file / module / package - import problem

2007-05-31 Thread EuGeNe Van den Bulke
aspineux wrote: > import os.path > > file=open(os.path.join(os.path.dirname(__file__), 'hauteur.yaml')) Thanks that worked ;) -- http://mail.python.org/mailman/listinfo/python-list

file / module / package - import problem

2007-05-30 Thread EuGeNe Van den Bulke
n a package to look for a file in a specific place i.e. a within package location? Thanks, EuGeNe -- http://www.3kwa.com -- http://mail.python.org/mailman/listinfo/python-list

Re: preferred windows text editor?

2007-05-09 Thread EuGeNe Van den Bulke
T. Crane wrote: > Right now I'm using Notepad++. What are other people using? > > trevis > > VIM here as well ... here we go again :P EuGeNe -- http://www.3kwa.com -- http://mail.python.org/mailman/listinfo/python-list

Re: base64 and unicode

2007-05-04 Thread EuGeNe Van den Bulke
hard to track problems. It is much > better to either call the close method explicitly or to use Python 2.5's > 'with' statement. Yes I had shortened my example but thanks for the 'with' statement tip ... I never think about using it and I should ;) Thanks, EuGeNe -- http://www.3kwa.com -- http://mail.python.org/mailman/listinfo/python-list

base64 and unicode

2007-05-04 Thread EuGeNe Van den Bulke
109:בחר את השפה המועדפת עליך : 110:שינויים בשפה יופיעו בהפעלה הבאה של Internet Explorer Could someone enlighten me on how to go from hebrew.b64 to hebrew.expected.lang? Thanks a lot, EuGeNe -- http://www.3kwa.com -- http://mail.python.org/mailman/listinfo/python-list

Re: EuroPython vs PyconUK

2007-04-26 Thread EuGeNe Van den Bulke
t; - known use : European constitution :P (but I am digressing :D). > BTW, this year I will go both to PyCon It and EuroPython, last year I > went both to > PyUK and EuroPython. The more, the better ;) The more the merrier indeed in that respect! I learnt a lot from your "Using de

Re: EuroPython vs PyconUK

2007-04-26 Thread EuGeNe Van den Bulke
then, for two years running I've also missed > PyCon, _despite_ living in the US, sigh). I was just using your possible travel plans as an example to express my "concerns" :P Re your effective travel plans, thanks God for Google Video then :D Cheers, EuGeNe -- http://www.3kwa.co

Re: EuroPython vs PyconUK

2007-04-26 Thread EuGeNe Van den Bulke
1/2 months in Europe so he can do Italy in June (he is listed as an organizer), Lithuania in July and UK in September... I don't know how the EuroPython guys see it. Cheers, EuGeNe -- http://www.3kwa.com -- http://mail.python.org/mailman/listinfo/python-list

Re: EuroPython vs PyconUK

2007-04-26 Thread EuGeNe Van den Bulke
to my post, I must be wrong. I didn't mean to offend anyone if I did. I'll go to Vilnius because I have never seen the city and try to go to Birmingham if the program looks interesting (not very rational or is it?). Cheers, EuGeNe -- http://www.3kwa.com -- http://mail.python.org/mailman/listinfo/python-list

EuroPython vs PyconUK

2007-04-26 Thread EuGeNe Van den Bulke
age and give as much information out as possible as early as possible (early bird early) for people to make the best decision? I know marketing matters but ... EuGeNe -- http://www.3kwa.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Access to file dropped on .exe/.app icon

2007-04-22 Thread EuGeNe Van den Bulke
ndows ... check it out http://www.3kwa.com/Tutorial/PumpItUp EuGeNe -- http://www.3kwa.com -- http://mail.python.org/mailman/listinfo/python-list

pyosd question

2007-03-19 Thread Eugene Antimirov
uot;Yeah!" while 1: display() time.sleep(interval) -- Sincerely, Eugene Antimirov PortaOne, Inc., SIP Engineer [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: another newbie question: why should you use "*args" ?

2007-01-31 Thread Eugene Antimirov
stef wrote: > # method 2 > def chunk_plot(self, list): > for i in range ( len(list) ): > do something And one note more. Just to be more pythonic you shouldn't use form range(len(blabla)). Instead use: for i in list: blabla... --

Re: Working with shared folders

2007-01-23 Thread Eugene Antimirov
Marcpp wrote: > Any idea to work with windows shared folders? > Which library is needed to execute console comands? > Don't you want to look at fusesmb first and then work with windows files and dirs as well as with any others. -- Sincerely, Eugene Antimirov PortaOne, Inc

Re: newbie question

2007-01-22 Thread Eugene Antimirov
Eugene Antimirov wrote: > You've probably missed cursor.commit() ;) Sorry, my bad: conn.commit() is correct one AFAIR. -- Sincerely, Eugene Antimirov PortaOne, Inc., SIP Support Engineer [EMAIL PROTECTED] * For further Billing and Technical information: => Please visit our w

Re: newbie question

2007-01-22 Thread Eugene Antimirov
("insert into animals values('lion','cub')") > cursor.execute("insert into animals values('goat','lamb')") > cursor.execute("select * from animals") > print cursor.fetchall() > > > Rgds > Kavitha > &

Re: Cross-platform issue with wxRadioBox

2006-12-05 Thread eugene . gokhvat
I have updated my script to use wx.RadioButton instead, which works perfectly on my mac again, but now the submit button doesn't show up on the pc and I can't click in the netid field on the pc either. any ideas? # BEGIN CODE import wx; SUBMIT_BUTTON = wx.ID_HIGHEST + 10; class regFrame(wx.Fram

Re: drawline

2005-11-22 Thread Eugene Druker
e[3] ClickNum = (ClickNum+1) % ClickMax ClickNum = ClickNum or 1 canvas = Canvas(Tk(), bg="white", bd=0, highlightthickness=0) canvas.pack(fill=BOTH, expand=YES) drawline(0) canvas.bind("<1>", drawline) canvas.mainloop() Eugene "Ben Bush" <[EMAIL PROTECTE

Re: Obtaining an member function by name

2005-11-19 Thread EuGeNe
guy lateur wrote: > Hi all, > > Suppose you have this class: > > class foo: > def bar(): > > Suppose you also have the strings "foo" and "bar". How can you obtain the > function foo.bar()? > > Surely somebody knows.. > > TIA, > g > > Would that do? >>> class foo: @staticmeth

Re: Tkinter or Python issue?

2005-10-18 Thread Eugene Druker
ss instance, while you need font description. Try: t.tag.config( 'TBU', font=('times', 12, 'bold','underline') ) t.tag_config( 'AB', font=('arial',24,'bold') ) Eugene -- http://mail.python.org/mailman/listinfo/python-list

Re: Book "Python and Tkinter Programming"

2005-10-07 Thread EuGeNe
It is available as PDF from the editor ... Manning. In my recollection for 25 USD projecktzero wrote: > striker wrote: > >>Does anyone who has this book willing to sell it. Please e-mail me the >>condition and any other details if you are interested. >>Thanks, >>Kevin > > > half.com has a cou

calling command line programs?

2005-09-10 Thread Yevgeniy (Eugene) Medynskiy
y of doing this? And if so, how does the environment get treated (I have some variables in my env that the programs I'd be calling need to see). Thanks much! Eugene -- http://mail.python.org/mailman/listinfo/python-list

Grayson's Tkinter Programming

2005-08-07 Thread EuGeNe
Just noticed that it is now availabe as an ebook from Manning : http://www.manning.com/books/grayson I bought an edition on abebooks for a little fortune a few months ago ... -- http://mail.python.org/mailman/listinfo/python-list

Re: tkFileDialog.askopenfilename filetypes problem

2005-07-13 Thread Eugene Druker
("TXT Files", "*.txt"), ], initialdir=InputDir) print z works fine. Eugene "Justin Straube" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hopefully someone can catch what im missing here. Ive googled this and I think > Ive got the f

Re: Tough Scrolling question with Tkinter

2005-06-14 Thread Eugene Druker
rst change keeps the scrollregion entirely in the window. Eugene <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Please take a look at and run the code snippet shown below. > > It creates a canvas with vertical & Horizontal scroll-bars. > If you shrink the window

Re: Make Tkinter child window active

2005-06-08 Thread Eugene Druker
Try: > > Label(c, text="Child window").grid() c.focus_set() > root = Tk() "Svennglenn" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > How do i make a child window "active" like the root window? > > from Tkinter import * > > def open_child(): > c = Toplevel(root) >

Re: Python instances

2005-04-20 Thread EuGeNe
class member not an instance member (not sure about the vocabulary) if in __init__ you set self.list=[] you'll get the result you want! By declaring list=[] in the class it is shared between all instances! -- EuGeNe [ www.boardkulture.com www.actiphot.com www.xsbar.com ] -- http:

Re: PyParsing module or HTMLParser

2005-03-28 Thread EuGeNe
HTMLparser? Thanks for suggestions. La. Check BeautifulSoup (http://www.crummy.com/software/BeautifulSoup/)it did the job for me! -- EuGeNe [ www.boardkulture.com www.actiphot.com www.xsbar.com ] -- http://mail.python.org/mailman/listinfo/python-list

Re: bicyclerepairman python24 windows idle :(

2005-02-06 Thread EuGeNe
Kim Changjune wrote: EuGeNe wrote: Hi there, I am no expert but wanted to give bicyclerepairman 0.9 a go just to see what a refactoring browser is and does. Followed every step of the install, I think, but idle doesn't start with the RepairMan section in config-extensions.def ...

Re: bicyclerepairman python24 windows idle :(

2005-02-06 Thread EuGeNe
Kim Changjune wrote: EuGeNe wrote: Hi there, I am no expert but wanted to give bicyclerepairman 0.9 a go just to see what a refactoring browser is and does. Followed every step of the install, I think, but idle doesn't start with the RepairMan section in config-extensions.def ...

bicyclerepairman python24 windows idle :(

2005-02-04 Thread EuGeNe
your help. -- EuGeNe [ www.boardkulture.com www.actiphot.com www.xsbar.com ] -- http://mail.python.org/mailman/listinfo/python-list

Re: An mysql-python tutorial?

2005-01-29 Thread EuGeNe
com/c/a/Python/MySQL-Connectivity-With-Python/ that one put me on the right track (I think ;) -- EuGeNe [ www.boardkulture.com www.actiphot.com www.xsbar.com ] -- http://mail.python.org/mailman/listinfo/python-list

Re: Any affordable Python-based CRM & ERP solutions?

2004-12-06 Thread EuGeNe
Will wrote: Hi all, Please excuse the longish post. I'm new to Python (and programming), but love what I see and believe it to be an important language. I have (at least) one retail client (with single outlet at present) that requires a total business solution for their operation, preferably open s

What to use for installation?

2004-12-02 Thread Eugene Morozov
nt to know other opinions before going with scons. What is the best tool for installing python applications? Eugene -- http://mail.python.org/mailman/listinfo/python-list