Re: Linux users: please run gui tests

2015-08-27 Thread Petr Viktorin
On Fri, Aug 7, 2015 at 4:07 AM, Terry Reedy wrote: > Python has an extensive test suite run after each 'batch' of commits on a > variety of buildbots. However, the Linux buildbots all (AFAIK) run > 'headless', with gui's disabled. Hence the following > test_tk test_ttk_guionly test_idle > (and o

Re: [Python-Dev] Python 2.x and 3.x use survey, 2014 edition

2014-12-16 Thread Petr Viktorin
On Sun, Dec 14, 2014 at 1:14 AM, Nick Coghlan wrote: [...] > Barry, Petr, any of the other folks working on distro level C extension > ports, perhaps one of you would be willing to consider an update to the C > extension porting guide to be more in line with Brett's latest version o

Re: [Python-Dev] Python 2.x and 3.x use survey, 2014 edition

2014-12-12 Thread Petr Viktorin
Also keep in mind that not all Python libraries are on PyPI. For non-Python projects with Python bindings (think video players, OpenCV, systemd, Samba), distribution via PyPI doesn't make much sense. And since the Python bindings are usually second-class citizens, the porting doesn't have a high pr

mmap and bit wise twiddling - Raspberry Pi

2012-05-02 Thread Petr Jakes
= GPIO() LED01 = gpio.pin04 LED01 = 1 # led diode is shining (or gpio pin 4 is set) LED01 = 0 # led diode is off General suggestions, how to organise this work are more then welcome. Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

Re: How to convert simple B/W graphic to the dot matrix for the LED display/sign

2012-03-05 Thread Petr Jakes
> >>> import Image > >>> im=Image.new('L', (100,100)) > >>> im=im.convert('1') > >>> px=im.load() > >>> px[0,0] Thanks, load() method works great. One more question. Finally, I would like to store array in the datab

Re: How to convert simple B/W graphic to the dot matrix for the LED display/sign

2012-03-04 Thread Petr Jakes
om this file, so I can switch LEDs ON/OFF accordingly. -- Petr -- http://mail.python.org/mailman/listinfo/python-list

How to convert simple B/W graphic to the dot matrix for the LED display/sign

2012-03-04 Thread Petr Jakes
can show me the direction to go? Regards Petr -- http://mail.python.org/mailman/listinfo/python-list

Re: MySQLdb and ordering of column names in list returned by keys() w/ a DictCursor

2009-07-02 Thread Petr Messner
2009/7/2 Tim Chase : >> Will this order at least be the same for that same query every time the >> script is executed? > > I wouldn't count on it. The order is only defined for the one iteration > (result of the keys() call). If the order matters, I'd suggest a > double-dispatch with a non-dict (

Re: Passing parameters for a C program in Linux.

2009-06-30 Thread Petr Messner
2009/6/30 venutaurus...@gmail.com : ... > Can you give some more explanation about how exactly this can be > done.. Popen object enables you to run any program in a newly-created child process, write to its standard input and read from its standard and error outputs. There is an example how your

Re: Passing parameters for a C program in Linux.

2009-06-30 Thread Petr Messner
Hi, this can be done using module "subprocess"; there is also function popen() in module "os" and module popen2, but they are deprecated since Python 2.6. PM 2009/6/30 venutaurus...@gmail.com : > Hi all, > I have to write an automted script which will test my c > program. That program whe

Re: problems with mysql db

2009-06-29 Thread Petr Messner
Hi, use %s instead of %d in SQL statements, because (AFAIK) conversions (including SQL escaping) from Python values to SQL values are done before the % operator is called - that value is not a number by that point. I hope you understood it, sorry for my English :-) You can also check MySQLdb modu

Re: The Python Way for module configuration?

2009-06-27 Thread Petr Messner
ysql://me:topsec...@localhost/test?encoding=utf8". Is this what you want to know? Petr -- http://mail.python.org/mailman/listinfo/python-list

Re: Python simple web development

2009-06-26 Thread Petr Messner
What about Werkzeug? I like its simplicity (well, basically everything I need are WSGI request/response objects :) + some templating library). Petr 2009/6/25 Private Private : > Hi, > > I am looking for a python library which will allow me to do a simple > web development. I need t

Re: xml input sanitizing method in standard lib?

2009-03-09 Thread Petr Muller
id characters may occur - form feed (\x0c) character is one example. I don't know what else is illegal in xml, so I've searched if there's some method how to prepare strings for insertion to a xml doc before I start research on a xml spec and write such function on my own. Petr -- http://mail.python.org/mailman/listinfo/python-list

xml input sanitizing method in standard lib?

2009-03-09 Thread Petr Muller
I've just overlooked something in the docs to this (imo) important task... Petr -- http://mail.python.org/mailman/listinfo/python-list

fputs in tp_print crashes under Win32

2008-11-12 Thread Petr Gotthard
ux everything works fine. Do you have any idea what could be wrong? Thanks, Petr -- http://mail.python.org/mailman/listinfo/python-list

Re: do something in time interval

2008-10-06 Thread Petr Jakeš
oop and once in 5s period it has to trigger some other stuff(function, method, action) to do. Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

do something in time interval

2008-10-06 Thread Petr Jakes
(0.01) seconds = time.time() if not int(seconds % (5)): if eventFlag: print "5 seconds, hurray" eventFlag = False else: eventFlag = True Best regards Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

Re: Socket and cycle problem

2008-05-13 Thread petr . poupa
On 12 Kvě, 21:06, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > On Mon, 12 May 2008 11:16:08 -0700 (PDT), [EMAIL PROTECTED] wrote: > > [snip] > > >My script send me via 3883 port (VRPN) data, but only once. I need > >listening this port countinously. > >So I need make some loop to print data fr

Re: Socket and cycle problem

2008-05-12 Thread petr . poupa
On 12 Kvě, 19:16, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > On Mon, 12 May 2008 09:19:48 -0700 (PDT), [EMAIL PROTECTED] wrote: > > > [snip] > > >> >Where is the mistake? I dont know. > > >> You cannot reconnect a socket. You need to create a new one for each > >> connection. It's also almo

Re: Socket and cycle problem

2008-05-12 Thread petr . poupa
nteed that all > the bytes written to the socket by the peer will be returned by such > a call. Instead, you need a framing protocol to determine when all > data has been received. For example, you might length prefix the > data, or you might insert a delimiter (or a terminator) at the

Socket and cycle problem

2008-05-12 Thread petr . poupa
mmy raise error(EBADF, 'Bad file descriptor') error: (9, 'Bad file descriptor') Where is the mistake? I dont know. thaks for help Petr -- http://mail.python.org/mailman/listinfo/python-list

listen on TCP port

2008-05-08 Thread petr . poupa
Hello, is it possibble listening on TCP port by python and how? I am trying chilkat but poorly :(. Thanks -- http://mail.python.org/mailman/listinfo/python-list

listening on TCP port

2008-05-07 Thread petr . poupa
Hello, is there anybody who has experience with listening on TCP port with python? I am looking for anything codes, tutorials,... . Thanks for any information -- http://mail.python.org/mailman/listinfo/python-list

User-defined Exceptions: is self.args OK?

2008-04-17 Thread Petr Jakeš
#x27;, 'nextBar', 'this is foo bar message') except TransitionError, err: print err print err.args import traceback, sys print sys.exc_info() traceback.print_exc() = 8< snipp 8< Thanks for your replies. Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

User-defined Exceptions: is self.args OK?

2008-04-16 Thread petr . jakes . tpc
ck, sys print sys.exc_info() traceback.print_exc() Thanks for your replies. Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

Re: SQL problem in python

2008-03-08 Thread petr . jakes . tpc
ot; ) q = MyTable.select() for row in q: print row.album, row.filepath for row in MyTable.select(MyTable.q.album == "Pinkk Floyd"): print row.album, row.filepath HTH Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

Re: looking for a light weighted library/tool to write simple GUI above the text based application

2008-03-07 Thread petr . jakes . tpc
Finaly, after few experiments, I am using pygame. It comunicates directly with the framebuffer and the performance is excellent. Thanks for your help. Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

Re: Data aggregation

2008-03-06 Thread petr . jakes . tpc
ll let you put the result of a SELECT into a new > table. > > John Nagle I agree, maybe following can help http://tinyurl.com/32colp Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

property data-descriptor - how to pass additional constants to the get/set method

2008-02-25 Thread petr . jakes . tpc
t)) It works, but it does not look very nice to me. Is there some different/nicer/more pythonic way how to achieve above mentioned? regards Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

Re: looking for a light weighted library/tool to write simple GUI above the text based application

2008-01-25 Thread petr . jakes . tpc
's helpers. So you mean, Pygame can run without X? BTW I have nothing against X, I just have not experiences on the GUI field, so my feeling was it can run faster without X on the 500MHz AMD Geode CPU. Petr -- http://mail.python.org/mailman/listinfo/python-list

Re: looking for a light weighted library/tool to write simple GUI above the text based application

2008-01-25 Thread petr . jakes . tpc
irst posting. I know the curses library ( http://pyncurses.sourceforge.net ). It AFIK provides TUI (short for: Text User Interface or Textual User Interface). My needs are GUI, I mean "a nice VGA pictures" on the VGA LCD 10" display. Petr -- http://mail.python.org/mailman/listinfo/python-list

looking for a light weighted library/tool to write simple GUI above the text based application

2008-01-25 Thread petr . jakes . tpc
here for your opinions/experiences/advices. Best regards Petr Jakes http://www.libsdl.org/ http://pyfltk.sourceforge.net/ http://www.pygame.org/news.html http://pyui.sourceforge.net/ http://pyglet.org/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Pivot Table/Groupby/Sum question

2008-01-04 Thread petr . jakes . tpc
On Jan 4, 4:55 pm, [EMAIL PROTECTED] wrote: > Petr thanks so much for your input. I'll try to learnSQL, especially > if I'll do a lot of database work. > > I tried to do it John's way as en exercise and I'm happy to say I > understand a lot more. Basi

Re: Pivot Table/Groupby/Sum question

2008-01-03 Thread petr . jakes . tpc
can control Excel from Python using win32api, win32com ( http://tinyurl.com/2m3x3v ) HTH Petr Jakes #!/usr/bin/env python # -*- coding: cp1250 -*- import sqlite3 con = sqlite3.connect(":memory:") cur = con.cursor() normalizedInputData=[] subCategories=[] rawData = [['Italy

Re: Pivot Table/Groupby/Sum question

2008-01-02 Thread petr . jakes . tpc
> So the data comes in as a long list. I'm dealing with some > information on various countries with 6 pieces of information to > pivot. Just to make it simple it's like a video store database. The > data is like [Country, Category, Sub Category, Film Title, Director, > Number of Copies]. data

Re: Newbie: Why doesn't this work

2008-01-01 Thread petr . jakes . tpc
): for no in range(10): yield no myNo=property(getInfo) gen=GenExample() print gen.myNo.next() print gen.myNo.next() . . print gen.myNo.next() -- Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie: Why doesn't this work

2008-01-01 Thread petr . jakes . tpc
tside class definition). The meaning of my question was: Is it possible to define some general sort of set/get/del/doc rules for the attributes which are defined in the code AFTER the instantiation of an object. I am sending this question even I feel such a "on the fly" creation of th

Re: Newbie: Why doesn't this work

2008-01-01 Thread petr . jakes . tpc
et/del/doc function calls upon access to defined attribute). My question is: is it possible to set the "property" for any attribute when I do not know what will be the name of the attribute in the future? Thanks for your reply Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

Re: Pivot Table/Groupby/Sum question

2007-12-29 Thread petr . jakes . tpc
e this part of the task already)? Petr -- http://mail.python.org/mailman/listinfo/python-list

Re: Pivot Table/Groupby/Sum question

2007-12-29 Thread petr . jakes . tpc
to pivot tabel in Python? Petr -- http://mail.python.org/mailman/listinfo/python-list

Re: Pivot Table/Groupby/Sum question

2007-12-28 Thread petr . jakes . tpc
What about to let SQL to work for you. HTH Petr Jakes Tested on Python 2.5.1 8<-- #!/usr/bin/env python # -*- coding: utf-8 -*- import sqlite3 con = sqlite3.connect(":memory:") cur = con.cursor() inputData=( ('Bob', 'Morn', 240), ('

Re: how to generate html table from "table" data?

2007-12-26 Thread petr . jakes . tpc
n to offend somebody here and I am really grateful for all replies. Thank you Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

Re: how to generate html table from "table" data?

2007-12-26 Thread petr . jakes . tpc
. Such a "reports" can be read by user using web browser later on. I was just trying to find if somebody here can point me to the existing tool, which is suitable for such a task. Anyway thank you for trying me help. Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

how to generate html table from "table" data?

2007-12-25 Thread petr . jakes . tpc
ific cells. Googling for a while I have found only this tool: http://pasko.net/PyHtmlTable/ Your tips to some other tools or/and your suggestion how to solve above mentioned will be very helpful. Thanks and regards Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

Re: doctest + sqlobject (TDD)

2007-12-22 Thread petr . jakes . tpc
Thanks, it works. And thanks for your comments which are worth to think about :) Petr > This has nothing to do with your previous problem. Use > > from __main__ import myFunction, myOtherFunction, ... > > or > > from __main__ import * > > if you prefer "namespace

Re: doctest + sqlobject (TDD)

2007-12-22 Thread petr . jakes . tpc
thod calling. Do you think there is a way how to protect the text file contents against such a "assigning hell"? Petr -- http://mail.python.org/mailman/listinfo/python-list

doctest + sqlobject (TDD)

2007-12-22 Thread petr . jakes . tpc
s bellow). When I run "python displeje_pokus.py" I am getting an error (see below) which I am not able to eliminate. thanks for your reply Petr Jakes == displeje_pokus.py == from sqlobject import * class TextyDispleje(SQLObject): pass if __

Re: From D

2007-07-26 Thread Leo Petr
On Jul 24, 10:10 am, Stargaming <[EMAIL PROTECTED]> wrote: > On Tue, 24 Jul 2007 03:19:53 -0700, bearophileHUGS wrote: > > There are various things I like about the D language that I think Python > > too may enjoy. Here are few bits (mostly syntactical ones): > > > 1) (we have discussed part of thi

Re: datetime.time() class - How to pass it a time string?

2007-07-24 Thread Petr Jakes
ever, the __init__() > method only takes integers (which means I'd be forced to parse the > string myself). Does anyone know of a way I can make it use the > string? Thanks. http://pleac.sourceforge.net/pleac_python/datesandtimes.html the part "http://pleac.sourceforge.net

how to analyse music stream

2007-07-24 Thread Petr Jakes
lyse music stream form the PC radio card to get the signal: "first tones of Frozen were played after Sacrifice, call to the studio" :-) Of course, the calling can be made by PC as well, but this is the easiest part of the task :) Thanks for your tips and comments Petr Jakes PS: both, Linux

Re: Catching a key press

2007-07-23 Thread Petr Jakes
On 23 ec, 14:23, westymatt <[EMAIL PROTECTED]> wrote: > linux primarily still a little lost in how to implementent this, > however I understand what you are saying. maybe you can use this: http://tinyurl.com/2zyfmw HTH Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

Re: Help with PySMS

2007-05-27 Thread Petr Jakes
Maybe you can try python binding for gammu, which works great for me. HTH Petr Jakes http://cihar.com/gammu/python/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Python and GUI

2007-05-21 Thread Petr Muller
en't used Tkinter a lot, only looked at it. And I didn't like it much. I would really suggest PyQt. (with a big IMHO :) Petr -- http://mail.python.org/mailman/listinfo/python-list

Re: problem with str()

2007-03-15 Thread Petr Prikryl
"Alex Martelli" wrote > Steve Holden wrote: >... > > >> Get yourself a stuffed bear, and next time you have this kind of problem > > >> spend a few minutes explaining to the bear exactly how your program > > >> can't possibly be wrong. Works like a charm. > > > > > > A rubber ducky works muc

Sorry (was Re: Cteni unicode retezcu ze souboru UTF-8 s BOM?)

2007-03-15 Thread Petr Prikryl
Sorry for the mess, The message should have been sent to the Czech Python mailing list. My fault. pepr "Petr Prikryl" wrote... > Ahoj všeci, > Tak nějak prakticky poprvé se dostávám k tomu, > jak přečíst unicode řetězce ze souboru, který > je uložen ve formátu UTF-8 se s

Q: Cteni unicode retezcu ze souboru UTF-8 s BOM?

2007-03-14 Thread Petr Prikryl
Ahoj všeci, Tak nějak prakticky poprvé se dostávám k tomu, jak přečíst unicode řetězce ze souboru, který je uložen ve formátu UTF-8 se signaturou na začátku (BOM). Nějak se mi nedaří. Mám takovýto soubor.txt v UTF-8 s BOM = První řádek. Druhý řádek. Třetí řáde

Re: writing serial port data to the gzip file

2006-12-18 Thread Petr Jakes
ds to some of your looping... > > s = ... #somewhere you had to open the serial port > > g = gzip.GzipFile("/root/foofile.gz", "w") > while True: > data = s.readline() > if not data: break > g.write(data) > g.close() what I am trying to say is g.close() does not close the g file (try to add the line "print g" after g.close()) Petr -- http://mail.python.org/mailman/listinfo/python-list

Re: writing serial port data to the gzip file

2006-12-18 Thread Petr Jakes
Maybe I am missing something. Expect data is comming continually to the serial port for the period say 10min. (say form the GPS), than it stops for 1 minute and so on over and over. I would like to log such a data to the different gzip files. My example was written just for the simplicity (I was tr

writing serial port data to the gzip file

2006-12-17 Thread Petr Jakes
serial port. It looks like g.close() does not close the gz file. I was reading in the doc: Calling a GzipFile object's close() method does not close fileobj, since you might wish to append more material after the compressed data... so I am completely lost now... thanks for your comments.

Python language extension mechanism for Python 3000... Worth for PEP?

2006-11-30 Thread Petr Prikryl
Do you think that the following could became PEP (pre PEP). Please, read it, comment it, reformulate it,... Abstract Introduction of the mechanism for language extensions via modules written using other languages. Extensions of Python could be done via special interpreter extensions. F

Re[2]: unicode mystery/problem

2006-09-22 Thread Petr Jakeš
unicode object. >> I am trying to use ChartDirector for Python (charts for Python) and the >> method "layer.addDataSet()" needs above mentioned syntax otherwise it >> returns an Error. JM> Care to tell us which error??? you can see the Error description and author com

unicode mystery/problem

2006-09-20 Thread Petr Jakes
looks strange, I have to use str(a) syntax even I know the "a" variable is a string. I am trying to use ChartDirector for Python (charts for Python) and the method "layer.addDataSet()" needs above mentioned syntax otherwise it returns an Error. layer.addDataSet(data, colour,

import gtk RuntimeError: could not open display

2006-09-11 Thread Petr Jakes
Hi my script is working well when I am running it from the terminal window. While I am trying to start it as a Cron job, I am getting an Error described bellow: My configuration: Pentium III, Python 2.4.1, Fedora Core4 Thanks for your comments. Petr Jakes File "/root/eric/analyza_da

Re: technique to enter text using a mobile phone keypad (T9 dictionary-based disambiguation)

2006-08-09 Thread Petr Jakes
Thanks a lot. It works flawlessly and I have learned few new Python "tricks" as well. Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

technique to enter text using a mobile phone keypad (T9 dictionary-based disambiguation)

2006-08-08 Thread Petr Jakeš
comments Regards Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

Re: Python for Embedded Systems?

2006-07-17 Thread Petr Jakeš
J> Is there a Python packaging that is specifically for J> embedded systems? ie, very small and configurable so the J> user gets to select what modules to install? J> For Linux-based embedded systems in particular? J> I'm thinking of running it on the Linksys's Linux-based open J> source router W

Re: [noob question] References and copying

2006-07-04 Thread Petr Prikryl
"zefciu" wrote in message news:[EMAIL PROTECTED] > Where can I find a good explanation when does an interpreter copy the > value, and when does it create the reference. I thought I understand > it, but I have just typed in following commands: > > >>> a=[[1,2],[3,4]] > >>> b=a[1] > >>> b=[5,6] > >>

Re: a question about "return"

2006-07-04 Thread Petr Prikryl
"yaru22" wrote in message news:[EMAIL PROTECTED] > In one of the examples in the book I'm reading, it says: > > def __init__(self): > ... > return > > It has nothing after "return". I expected it to have some number like 0 > or 1. What does it mean to have nothing after return? Yes, it ha

Re[2]: Can I do it using python?? about xterm and telnet

2006-07-03 Thread Petr Jakeš
v> Thanks, v> But I need to to do complicated job in the xterm consoles for servers. what does it mean, complicated job? Can you be more specific, please? v> So I need v> to open many xterm consoles and I just want to save my time from v> telneting...usr/pwd... v> Network Ninja wrote: >> valpa wr

Re: I have 100 servers which need a new backup server added to a text file, and then the backup agent restarted.

2006-07-02 Thread Petr Jakeš
in.com/ You can manage cluster of servers at once. Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

Re[2]: delete first line in a file

2006-06-30 Thread Petr Jakeš
to solve some "problems" Petr Jakes JH>> that documentation i have already read, but it wouldn`t help me for my JH>> problem! JH>> i know, how i can read the first line an print them on the screen! JH>> but...how can i say python, delete the first line?! JH>> t

finding the last file created in a directory

2006-06-30 Thread Petr Man
for i in range(len(listing)): item = listing[i] numbers.append(item[len(dir) + len(new_file_name) + 1:]) return new_file_name + '.' + max(numbers) cheers Petr -- http://mail.python.org/mailman/listinfo/python-list

small inaccuracy in the logging module documentation (Python Library Reference)

2006-06-29 Thread Petr Jakeš
extension is (depending on the "when" value): "timestamp" or "date+hour+minutes" or "date+hours" or "date". Regards Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

Re: break the loop in one object and then return

2006-06-27 Thread Petr Jakes
t;debugging" purposes. Finally you will remove it. For example you can put: print "starting the strt function", "mynum = ", mynum, "yournum =", yournum on the first row of your strt function, so you will see the code is going through there. Finally: Try to thi

Re: break the loop in one object and then return

2006-06-26 Thread Petr Jakes
urnum < 101" you should test if the input is an integer as well.. http://tinyurl.com/j468c Other suggested here which way to go. Good luck :) Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

Re: Simple Char-I/O Dialogs for Win32 and DOS

2006-06-14 Thread Petr Jakes
o the > kit ? TIAMR You can try: Dialog http://invisible-island.net/dialog/ HTH Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

Re: Most elegant way to generate 3-char sequence

2006-06-11 Thread Petr Jakes
o my less elegant > co-workers can figure out what I was trying to accomplish. > > Sam Schulenburg +1 Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

Re: what are you using python language for?

2006-06-07 Thread Petr Jakes
hacker1017 wrote: > im just asking out of curiosity. a vending machine controlled from the PC (peripherals connected using I2C bus (SMBus) and the MDB coin change-giver and the bill acceptor connected to the serial port). Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

what is the reasonable (best?) Exception handling strategy?

2006-06-01 Thread Petr Jakes
specific answers to the above mentioned code example. Regards Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

Re: A critic of Guido's blog on Python's lambda

2006-05-11 Thread Petr Prikryl
"Chris Uppal" wrote: > Petr Prikryl wrote: > > > for element in aCollection: > > if element > 0: > > return True > > return False > > [I'm not sure whether this is supposed to be an example of

Re: A critic of Guido's blog on Python's lambda

2006-05-10 Thread Petr Prikryl
"Chris Uppal" wrote... > Alex Martelli wrote: > > > I think it's reasonable to make a name a part of functions, classes and > > modules because they may often be involved in tracebacks (in case of > > uncaught errors): to me, it makes sense to let an error-diagnosing > > tracebacks display package

Re: A critic of Guido's blog on Python's lambda

2006-05-09 Thread Petr Prikryl
"Alex Martelli" wrote... > Joe Marshall wrote: >... > > If you language allows unnamed integers, unnamed strings, unnamed > > characters, unnamed arrays or aggregates, unnamed floats, unnamed > > expressions, unnamed statements, unnamed argument lists, etc. why > > *require* a name for trivia

Re: do "some action" once a minute

2006-05-09 Thread Petr Jakes
s well, so it can not "sleep" for 60 seconds :). Regards Petr -- http://mail.python.org/mailman/listinfo/python-list

do "some action" once a minute

2006-05-08 Thread Petr Jakes
irst occur of sec==0 only!! polling 10x a second minutes=min print "Eureca" time.sleep(0.1) Regards Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: eric3 3.9.0 released

2006-05-06 Thread Petr Jakes
I think you can get the answer on http://www.die-offenbachs.de/detlev/eric3-mailinglist.html rather then here. HTH Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

Re: Can I use python for this .. ??

2006-05-04 Thread Petr Jakes
off). Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

Re: milliseconds are not stored in the timestamp KInterbasDB + Firebird

2006-05-03 Thread Petr Jakes
/kinterbasdb-3.2_pre_20060503.win32-FB-2.0-py2.4.exe Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

Re: Polling from keyboard

2006-05-02 Thread Petr Jakes
I am using following code which I have found on http://www.ibiblio.org/obp/py4fun/ few months ago. It works well for my purposes. Another way is to use Curses library. HTH Petr Jakes #!/usr/local/bin/python # # t t y L i n u x . p y # # getLookAhead reads lookahead chars from the keyboard

milliseconds are not stored in the timestamp KInterbasDB + Firebird

2006-05-02 Thread Petr Jakes
Firebird CS 1.5, Python 2.4.1, KInterbasDB 3.2b1 Thanks for your advices. Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

Re: Using Databases in Python

2006-04-29 Thread Petr Jakes
Thank you very much, Steve. Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

Re: Using Databases in Python

2006-04-28 Thread Petr Jakes
I have got Steven's book of course (it is excellent IMHO). I was just thinking some new approaches can be found in the tutorial. Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

Using Databases in Python

2006-04-28 Thread Petr Jakes
I would like to know if anybody can point me to the site, where it is possible to find the tutorial "Using Databases in Python" which is mentioned by Steve Holden here: http://tinyurl.com/ectj8 Thanks Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

Re: Coming from delphi - looking for an IDE - willing to spend money

2006-04-26 Thread Petr Jakes
Eric3 is great IMHO. http://www.die-offenbachs.de/detlev/eric3.html -- http://mail.python.org/mailman/listinfo/python-list

Re: how to append to a list twice?

2006-04-24 Thread Petr Prikryl
"Fredrik Lundh" wrote: > Alex Martelli wrote: > > > > But of course that only does it once, and I don't want to have to copy > > > and paste the append line. Perhaps there's a better way than this. > > > > def makeseries(N): > > series = [N] > > append = series.append > > for tailer in xrang

Re: Confused by Python and nested scoping (2.4.3)

2006-04-20 Thread Petr Prikryl
I have added some spaces guessing how the original was formatted. See the simplified example and the explanation below... "Sean Givan" wrote... > Hi. I'm new to Python [...] something strange. > This code: > > def outer(): > val = 10 > def inner(): > print val > inner() > outer() > > ..pr

Re: BIOCHIP --->>> NO GOOD !!

2006-04-19 Thread Petr Prikryl
rainbow.cougar wrote in message > okay wrote: > > To Archbishop Christodoulos Paraskevaides of the Greek Orthodox Church > > in Athens and Greece Archbishop, > > I talked with a Greek Orthodox believer in Australia and he told me two > > I'm thinking a list comprehension... Possibly some filter(m

Re: difference between class and static methods?

2006-04-18 Thread Petr Prikryl
"John Salerno" wrote... [...] > So a class method is specifically for using the class name itself as an > object in the method? If that's the case, then it makes some sense now. > I guess the reason I didn't get it before is that this is a feature of > dynamic languages, right? And something that

Re: Why new Python 2.5 feature "class C()" return old-style class ?

2006-04-12 Thread Petr Prikryl
"Aahz" wrote... > Bruno Desthuilliers wrote: > >Aahz a écrit : [...] > >>>Please repeat this 101 times each morning: > >>>"thou shall not use old-style classes for they are deprecated". > >> Classic classes are *NOT* deprecated. > >Perhaps not *officially* yet... > > Not even unofficially. The poi

Re: kinterbas and Python

2006-04-04 Thread Petr Jakes
Jarek, I am using it always like in the following example to connect to the remote host and it works for me flawlessly. Petr Jakes import kinterbasdb as k con = k.connect( host='router.maren.cz', database='/data/sysdat01.gdb', user='SYS

  1   2   >