[Tutor] How to open IE7 to a certain URL?

2008-02-29 Thread János Juhász
> > I've got this so far: > > > > #!/usr/bin/env python > > #coding=utf-8 > > import time > > b = '20:00:00' > > while True: > > a = time.strftime('%H:%M:%S') > > time.sleep(0.5) > > if a == b: > > print "TIME!" > > break > > It needn't to make this comparison in e

[Tutor] How to convert ogg to MP3

2008-01-03 Thread János Juhász
> "goldgod a" <[EMAIL PROTECTED]> wrote in > >I would like to convert ogg files to mp3 files. how can I do > > that. > > Is there any inbuilt package. > > I think Lame can do that. > You would need to access Lame via its command line (using the > subprocess module?) or maybe someone has a pyt

Re: [Tutor] Output of list

2007-12-23 Thread János Juhász
Dear Marty, >... Or, by extending Alan's solution ... > >def splitStringByN(s, n): >for m in range(0, len(s), n): >yield s[m:m+n] > >k = 'abcdefghi' >list(splitStringByN(k, 2)) It seems to be the most readable solution for me. >As it turns out, this is similar to an ASPN Cookbook r

Re: [Tutor] Output of list

2007-12-23 Thread János Juhász
Dear Emil, > I want to be capable of converting a string into a list where all > the items, in the list, have a fixed length not equal to 1 e.g i > have k = 'abcdefgh' and I want the fixed length for all the the > items to be 2 then the list would look like ['ab', 'cd', 'ef, 'gh']. > How do i

[Tutor] multithread question

2007-12-03 Thread János Juhász
Dear Tutors, I have a multithread python service on a windows server, that brekas down sometimes. It is a service, that runs on a server and listen on the 9100 tcp port on three IP addresses, just as three jetdirect devices. It listens as a virtual printer, captures the content of the print jobs

[Tutor] The name of the module

2007-10-17 Thread János Juhász
ut it ? Yours sincerely, __ János Juhász ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] using **kwargs in __init__() as attributes

2007-10-01 Thread János Juhász
Dear Tutors, I would like to make a new class instance, where the intance attributes coming from the kwargs hash. class ADUser: def __init__(self, **kwargs): for key in kwargs.keys(): self.key = kwargs[k] a = ADUser(name='papa') It isn't working :( Yours sincerely, _

[Tutor] OO triangulation with attacment

2007-09-20 Thread János Juhász
aming solutions. Yours sincerely, __ János Juhász triangle.py Description: Binary data ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] python and wmi interface

2007-09-19 Thread János Juhász
783b0f7d1178&DisplayLang=en Yours sincerely, __________ János Juhász ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] OO triangulation

2007-09-19 Thread János Juhász
m import time triang = Triangulation() triang.NewPointSet(1000) triang.Triangulate() app = App(0) app.MainLoop() ## Yours sincerely, __ János Juhász ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Unicode question

2007-09-12 Thread János Juhász
;\x8b','\x94') for line in content] pages = [] for page in BreakIntoPages(content): page = ''.join(page) pages.append(page.decode('cp852')) MakePdfInvoice('test.pdf', pages) Kent Johnson <[EMAIL PROTECTED]> wrote on

[Tutor] Unicode question

2007-09-11 Thread János Juhász
Dear All, I would like to convert my DOS txt file into pdf with reportlab. The file can be seen correctly in Central European (DOS) encoding in Explorer. My winxp uses cp852 as default codepage. When I open the txt file in notepad and set OEM/DOS script for terminal fonts, it shows the file co

[Tutor] Importing Excel sheet data

2007-09-05 Thread János Juhász
Dear Saradhi, I am using COM on Win32 for this, based on the sample of Mark Hammond & Andy Robinson in the "Programing Python on Win32" book. That is a fairly simple way to do that. The code itself can be downloaded from http://examples.oreilly.com/pythonwin32/ppw32_samples.zip You can find s

[Tutor] Triangle structure for triangulation

2007-08-30 Thread János Juhász
Dear Allan, thanks for your coments. > > ## I can translate it into python in this way > > class Triangle: > >def __init__(self, points, neighbours): > >self.points = points > >self.neighbours = neighbours > > > > def TOR(self, direction): > >return (self, (direct

[Tutor] Triangle structure for triangulation

2007-08-30 Thread János Juhász
Dear All, I have written a Delaunay triangulation 10 years ago in C based on triangle structure. It was 400 lines, so it seems to be a fine task to turn into python. My problem is the translation of the C structure and the OO thinking. I tried to draft it so. /* The triangle, its neighbours,

[Tutor] iterate list items as lvalue

2007-08-22 Thread János Juhász
Dear All, I would like to thanks for your responds. Ricardo Aráoz wrote: Kent Johnson wrote: > Dave Kuhlman wrote: >> Consider the following: >> >> >>> array = [1,2,3,4,5] >> >>> array2 = array >> >>> array = [i * 2 for i in array] >> >>> array >> [2, 4, 6,

[Tutor] iterate list items as lvalue

2007-08-20 Thread János Juhász
objects. But how can I iterate the iterate the items as mutable object, like the pointers in C ? Is the only way to manage the iteration with indexes ? Or is it any trick like >>> for item in array[:]: item *= 2 ... but isn't a trick :( >>> array [2, 4, 6, 8, 10] You

[Tutor] from netcat to socket

2007-08-08 Thread János Juhász
Dear All, I made a small script to emulate a jetdirect device and capture the data sent from SAP to three separate barcode printers. I need it to make backup for the SAP printing, as I can place the captured files onto a local server and place a small batch file beside them, that can be used

[Tutor] ADO problem

2007-07-16 Thread János Juhász
Hi Tim, thanks your help. It is clear for me now. > From: Tim Golden <[EMAIL PROTECTED]> > Subject: Re: [Tutor] ADO problem > J?nos Juh?sz wrote: > > while not rs.EOF: > > print rs.Fields[0].Value, rs.Fields[1].Value > > rs.MoveNext() > > > > It print the next result: > > IT (u'\xc1kos S

[Tutor] ADO problem

2007-07-16 Thread János Juhász
call last): File "D:\devel\python\admin\AD_ADO.py", line 13, in ? print rs.Fields[0].Value, rs.Fields[1][0].Value File "c:\Python24\Lib\site-packages\win32com\client\dynamic.py", line 228, in __getitem__ raise TypeError, "This objec

Re: [Tutor] Tutor Digest, Vol 41, Issue 47

2007-07-13 Thread János Juhász
Hi Linden, > Date: Fri, 13 Jul 2007 09:05:38 + (GMT) > From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > Subject: [Tutor] (no subject) > To: tutor@python.org > Message-ID: > <[EMAIL PROTECTED]> > Content-Type: text/plain; charset="utf-8" > The functionalities I am trying to implement for this

[Tutor] n.isalnum() is failing

2007-07-04 Thread János Juhász
Hi Terry > "According to the Gregorian calendar, which is the civil calendar in use > today, years evenly divisible by 4 are leap years, with the exception of > centurial years that are not evenly divisible by 400." > def isLeapYear(y): > if y % 4 == 0: return True As it always return True, if

Re: [Tutor] python port scanner

2007-06-25 Thread János Juhász
Dear dos, >>hello i am looking into writing a simple python port scanner but i cant find >>any good tutorials online if anyone can help or knows of any tutorials that >>could help it would be great. this would be my first program like this so i >>might need a little extra help I just recommend

Re: [Tutor] Tutor Digest, Vol 40, Issue 38

2007-06-15 Thread János Juhász
Hi Andy, > The code works great, Thanks for the speedy response. The only problem > which I can see is that the code scales very bad with the size of n. > So, as I want a small subsection of the data (i.e lines where there are > only 4 1s, number in the code below) for a system where n is large(

Re: [Tutor] MSSQL Connection

2007-05-22 Thread János Juhász
Hi Leon, > > Hi John, > > > > Here's the code (I do have permissions to truncate, works manually under > > the same user. > > > > > > import pymssql > > > > con = pymssql.connect > > (host='server',user='user',password='pwd',database='DB_QA') > > cur = con.cursor() > > > > > > query="truncate TA

Re: [Tutor] Questions of Maths

2007-04-18 Thread János Juhász
Hi Abu, > Question: how to determine whether point C is to the left or to the > right of the line AB? When the line given by A(Xa,Ya) and B(Xb, Yb), the area of the A-B-C triangle can be calculated with the value of next determinant / 2 | Xa, Ya, 1 | | Xb, Yb, 1 | | Xc, Yc, 1 | / 2 So: Area =

[Tutor] Movies from jpg files

2007-04-08 Thread János Juhász
Dear Greg, thanks the link to pymedia. > Maybe PyMedia is what you are looking for: http://www.pymedia.org I looked for it for a while. It is very cool. I made the next short script from one of the samples that make exactly what I wanted. ### import sys, os, glob, Image, time import

[Tutor] Movies from jpg files

2007-04-07 Thread János Juhász
rom a folder of jpg files? It could be any commandline tool anyway, that I can call with os.system(), but I wouldn't use GUI for it. Yours sincerely, ______ János Juhász ___ Tutor maillist - Tutor@python.org http://mail.py

[Tutor] Movies from jpg files

2007-04-07 Thread János Juhász
ng to build them easy ? Yours sincerely, __ János Juhász ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Should I use python for parsing text

2007-03-20 Thread János Juhász
Hy Jay, I just allways wonder how fine this book about text processing with python. Text Processing in Python at http://gnosis.cx/TPiP/ It shows that Python can be as effective as Perl. The question is the how. Take a look on it. Yours sincerely, __ János Juhász

Re: [Tutor] Making table

2007-03-20 Thread János Juhász
, 1000, 100.1230) ending_zero = re.compile('0(?=0*$)') # zero followed with only zeros for f in l: print re.sub(ending_zero, ' ', ('%10.4f' % f)) ### Yours sincerely, __ János Juhász ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Roman to digital (pseudocode)

2007-03-14 Thread János Juhász
Hi All, > - A dictionary will help you look up values, but not rules. It does > not retain its order and order is essential. Instead, create a tuple > of the roman numerals in ascending order (roman). Create a paired > tuple with the base 10 value (baseten). > Now get an element from the string

Re: [Tutor] howto call DOM with python

2007-02-28 Thread János Juhász
under activepython 2.3 anyway. Yours sincerely, __ János Juhász > Date: Wed, 28 Feb 2007 15:40:59 -0600 > From: Hugo Gonz?lez Monteverde <[EMAIL PROTECTED]> > Subject: Re: [Tutor] howto call DOM with python > To: tutor@python.org > Message-ID: <[EMA

Re: [Tutor] report service

2007-02-19 Thread János Juhász
partment. The distribution can be made by filesystem level (each report a separate file), or by application level (the report manager shows a tree with the accessible reports). The candidates are till now: crystal report server ms reporting services commercial reportlab Yo

[Tutor] report service

2007-02-18 Thread János Juhász
Dear All! May someone recommend any simple solution to distribute some dozen parametrizable sql reports for some dozen users with a minimal access controll. Some kind of charting possibilty needed, but I needn't web-based front end. Yours sincerely, __

Re: [Tutor] min max confusion

2007-02-07 Thread János Juhász
Hi Frank, > From: "frank h." <[EMAIL PROTECTED]> > Subject: [Tutor] min max confusion > >>> t = (952L, 945L, 941L, 939L, 949L, 972L, 956L, 965L, 973L, 965L) > >>> min(t) > 939L > >>> max(t) > exceptions.TypeError Traceback (most recent > call last) > TypeError: '

[Tutor] Printing txt files in landscape from python

2007-02-01 Thread János Juhász
e) Yours sincerely, __________ János Juhász ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] Cause-Effect, Isikawa, fishbone diagram

2007-01-24 Thread János Juhász
Dear All, does someone know any python based solution to draw a cause-effect diagram into PDF from a simple textfile ? It is also called a Fishbone Diagram, because of its shape, or an Ishikawa Chart, after its originator, Kaoru Ishikawa I feel, it can be converted from a structure like this.

Re: [Tutor] direction and draw

2007-01-22 Thread János Juhász
Dear Linda, > I have a segment (two ending points are A and B) which is 0 degree. > How to draw a segment with 10 degrees and 15 in length? It is very simple with complex numbers: import math class vect: ## begin and end are tuples (x, y) ## and represented as complex numbers def __i

Re: [Tutor] 'elp!!!!!!!1Totally Clueless Newbie In Distress

2007-01-21 Thread János Juhász
oblem is that the > > program window closes before we can get a glimpse of the answer...I use SPE > > under WinXP, and have seen this problem in every script i try...This is the > > script,as redone by a Smart Caring Dude on this list: Yours sincerely, __

[Tutor] import glob.glob('*.py')

2007-01-08 Thread János Juhász
Hi All, I am playing with reportlab and I would like to make a directory where I can place all of my projects as ___.py files. A project file should be like this: test.py title="Test project" duedate = '2007-02-28' description = "description _" detailed=""" detaileddetaileddetaile

Re: [Tutor] Find and test a device by MAC address

2007-01-05 Thread János Juhász
Dear Lumbricus, > From: [EMAIL PROTECTED] > Subject: Re: [Tutor] Find and test a device by MAC address > To: tutor@python.org > Message-ID: <[EMAIL PROTECTED]> > Content-Type: text/plain; charset="iso-8859-1" > Quick and dirty: > As root: > >>> from scapy import * > >>> arping("192.168.0.1/24")

[Tutor] Find and test a device by MAC address

2007-01-03 Thread János Juhász
Dear All, I got a device that uses DHCP on my network, I know just the MAC address of it. Is it possible to find out (not from the DHCP server), what IP address is given for it ? I just mean something like ping_by_MAC 00-19-E7-5C-D4-28 Yours sincerely, __ Janos J

[Tutor] 3D rendered bar chart (made of glass)

2006-11-06 Thread János Juhász
Dear Guys, I have downloaded CGkit and Aqsis and tried the examples from it. I run the samples, like the torus with grass. It is simple fantastic. I would like to make some artistic visualization with the power of python and the beauty of a professional renderer. I think about colored semitransl

Re: [Tutor] Trying to extract the last line of a text file

2006-10-20 Thread János Juhász
> Danny Yoo wrote: > > > > file('filename.txt').readlines()[-1] > Not to hijack the thread, but what stops you from just putting a > file.close() after your example line? > >>> Which file should file.close() close? The problem is that we don't > >>> have a handle on the particular fi

Re: [Tutor] regexp help needed

2006-10-18 Thread János Juhász
Hi Kent, thanks your respond. > > I have to remove the thousand separator by moving the numbers before it to > > right. > > So the number and char groups has to be left in their original position. > > > > I have to make this kind of changes on the problematic lines: > > MOATOT79 47.2

[Tutor] regexp help needed

2006-10-18 Thread János Juhász
it :( __ János Juhász ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Point in polygon intro please~!

2006-10-09 Thread János Juhász
gons, seems to be too difficult, and not needed. Take a look after the GL_SELECT mode http://www.google.hu/search?hl=hu&q=glRenderMode%28GL_SELECT%29&meta= Yours sincerely, __ János Juhász ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Help me with two dimensional arrays in Python

2006-10-09 Thread János Juhász
t; > 1 1 > > 1 2 1 > > 1 3 3 1 > > 1 4 6 4 1 Yours sincerely, __ János Juhász ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] pymssql or ODBC

2006-09-15 Thread János Juhász
ring I follow this simple method: -right click on the desktop and create a new text document -save it as connection.udl -double click on it, and it will be opened by windows to set up all the possible parameters -test the connection -open it with notepad and copy the string from it Yours sincerel

[Tutor] Clipboard manager for windows

2006-09-14 Thread János Juhász
It also could be interesting, to make the tab delimited clipboard content from the filenames. >>> w.OpenClipboard() >>> w.GetClipboardData(win32con.CF_HDROP) (u'D:\\devel\\tutor\\data.txt',) >>> w.CloseClipboard() Yours sincerely, _

[Tutor] Thread forever

2006-09-07 Thread János Juhász
Dear Kent, thanks your comment. >> > When this program leaves from the while loop, it doesn't terminate the >> > comreader thread. >>If you call self.setDaemon() here you will mark the thread as a daemon >>thread and it will not block the exit of the program. It works well. Yours sincerely,

[Tutor] Thread forever ?

2006-09-07 Thread János Juhász
Dear Tutors, ### from threading import Thread import sys import time # This thread would read lines from a # barcode scanner class ComThread(Thread):     def __init__(self):         Thread.__init__(self)             def run(self):         while 1:             ti

[Tutor] Python decorator

2006-08-31 Thread János Juhász
Hi, I have just started to play with TurboGears - it is really nice - and I couldn't understand the decorators used by it. I have tried to interpret the http://wiki.python.org/moin/PythonDecorators about decorators, but it is too difficult for me. May someone explain decorators in very sortly, w

[Tutor] Banner

2006-08-27 Thread János Juhász
Hi all, I just profiled a little my banner.py. # PIL_Banner import Image, ImageFont, ImageDraw ShowText = 'Python :)' font = ImageFont.load(r'courier-bold-12.pil') size = font.getsize(ShowText) image = Image.new('1', size, 1) draw = ImageDraw.Draw(image) draw.text((0, 0), ShowText, font=font)

Re: [Tutor] A list in list problem

2006-08-21 Thread János Juhász
Hi Dave, > From: dave s <[EMAIL PROTECTED]> > Subject: [Tutor] A list in list problem > To: python tutor > Message-ID: <[EMAIL PROTECTED]> > Content-Type: text/plain;  charset="us-ascii" > def CSV_Lines(self, csv, from_, to): > """Returns a list of cleaned up lines from csv 'from_' line > numbe

[Tutor] Build a simple ftp server in python

2006-08-16 Thread János Juhász
sincerely, __ János Juhász ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] os.system() with NO_WAIT

2006-08-08 Thread János Juhász
Thanks Wesley,  I lokked for subprocess.Popen. os.spawnlp(os.P_NOWAIT, "/bin/mycmd", "mycmd", "myarg") was to complicated for me based on the manual. Yours sincerely, ______ János Juhász VELUX Magyarország Fertődi Építőkomponens Kft.

[Tutor] os.system() with NO_WAIT

2006-08-07 Thread János Juhász
rk connection is broken. In that case, this program wait a user interaction to push a button. When the connection come back, it is just waiting to push the button and we are missing to send the EDI documents. Have you got any idea how I can strart this windows GUI program with not waiting its return.

Re: [Tutor] Tutor Digest, Vol 29, Issue 68

2006-07-27 Thread János Juhász
' will be appeared in the application menu. Probably its a bad habit, but it is just for trial. Yours sincerely, __ János Juhász ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Tutor Digest, Vol 29, Issue 68

2006-07-26 Thread János Juhász
Dear Alan, > I'm confused... > # > #This should be the complete file > def OnMenuFindMe(): > print 'You found me' > f = getattr(What_Should_It_Be???, 'OnMenuFindMe') > f() > # > You are trying to get a reference to a function in the same > file and whose name y

[Tutor] getattr()

2006-07-26 Thread János Juhász
x27; >> >>f = globals()['OnMenuFindMe'] >> >>f() >> >>import __main__ >> >>g = getattr(__main__, 'OnMenuFindMe') >>g() >> >>Kent Many thanks. Yours sincerely, __ János Juhász ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] getattr()

2006-07-26 Thread János Juhász
#x27;) f() #Till here It can use getattr() to get an object of a class or module, but not in this much simpler situation. Yours sincerely, ______ János Juhász ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] Help with strings and lists.

2006-07-14 Thread János Juhász
Dear Alan, Probably you will be interested about list comprehension and zip(), as it can simplify all the similar tasks. >>> s = ('Monday 7373 3663657 2272 547757699 reached 100%','Tuesday 7726347 552 766463 2253 under-achieved 0%','Wednesday 9899898 8488947 6472 77449 reached 100%','Thursday 63

[Tutor] I Give Up. - Follow up post

2006-07-05 Thread János Juhász
Dear Brian, The best parser is python itself :) let's make ports.py with your original content: http = 80 https = 443 http1 = 81 smtp = 25 smtp2 = 587 In this case, you can import ports.py with simple >>> import ports >>> ports.http 80 >>> You don't need to define a new file format, just use

[Tutor] Warehouse system in python

2006-06-20 Thread János Juhász
Dear All, have seen someone any simple warehouse management framework in python with receive, issue, inventory ? Yours sincerely, __ Janos Juhasz ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listi

[Tutor] 7bit - 8bit

2006-05-09 Thread János Juhász
Dear All, I have to convert a binary stream from a monitoring device to another format. The highets bit of data bytes is replaced by 0 and placed after every 7 bytes into a correction byte. I would like to decode it as simple as possible. May someone suggest an elegant solution for that ? Yo

Re: [Tutor] sockets

2006-05-04 Thread János Juhász
Hi Matt, the traceroute can be done from the client side or eigther from the server side. The two ones should give the same result with reverse order. In this case you can do the tracerouting from the server side when the client ask it. I am just thinking about a simple finger deamon, that can d

Re: [Tutor] Olle-Olla

2006-04-18 Thread János Juhász
o's call. Guido has intimated that he thinks this was one > of his (few) mistakes in building Python. It is funny, I tried to redefine the only function, that is not a function but a keyword :) Thanks for Alan, Danny, Gabriel, Kent János Juhász _

[Tutor] Olle-Olla

2006-04-18 Thread János Juhász
Hi All, Is it possible to replace the print statement with one of mine function ? Is it any extra reason why print isn't similar to the functions I can make with def ? >>> def olle(dummy): print 'olle:', dummy ... >>> def olla(dummy): print 'olla:', dummy ... >>> olle('Hopp') olle: Hopp >>> ol

Re: [Tutor] Space the final frontier!

2006-04-05 Thread János Juhász
ell on so small files. Yours sincerely, ______ János Juhász > Message: 2 > Date: Tue, 4 Apr 2006 22:33:18 +0100 > From: "John Corry" <[EMAIL PROTECTED]> > Subject: [Tutor] Space the final frontier! > To: > Message-ID: <[EMAIL PROTECTED]> > Content-Type: tex

Re: [Tutor] defined()

2006-04-03 Thread János Juhász
Dear Tim, Dear Alan, >> I can't find the defined() function in python, so I used >>'variable name' in dir() > >> Is it really missing, or I am just so simple ? > > It is really missing, just as it is for most programming languages. > Which language(s) do you know that has such a feature? I shou

[Tutor] defined()

2006-04-03 Thread János Juhász
missing, or I am just so simple ? Yours sincerely, __ János Juhász ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] Automatic software performance meter

2006-03-10 Thread János Juhász
would like to controll the time needed for a business procedure instead of the ping time :) Yours sincerely, __ János Juhász ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] saving .csv file as an xl worksheet

2006-03-07 Thread János Juhász
%s\n' % data) xml.write('\n') rownum += 1 ## Function with reference xml.write(xmlsum % (rownum-2)) ## Foot xml.write(xmlfoot % (rownum, colnum)) xml.close() os.execl(r'c:\Program Files\Microsoft Office\Office10\EXCEL.EXE', dest) #

Re: [Tutor] RDT server for excel

2006-02-28 Thread János Juhász
?stockcode=soap&date=today So the webquery seems to be more simple :) Yours sincerely, ______ János Juhász

[Tutor] RDT server for excel

2006-02-27 Thread János Juhász
Hi All, I would like to make a small RDT Server as COM Server in python that can be called from excel as =RDT("StockBalance.MyServer",,"17") I'v tried to use google, but with not too much success. I just would like a simple sample. Yours sincerely, ___

Re: [Tutor] sys.argv

2006-02-13 Thread János Juhász
slate the sort DOS filename to the long NTSF one with python ? But it would be fine to set up XP to call my script with the long filename. Yours sincerely, __ János Juhász VELUX Magyarország Fertődi Építőkomponens Kft. IT Department Malom Köz 1, H-9431 Fertőd Telepho

[Tutor] sys.argv

2006-02-13 Thread János Juhász
les\2006\06.02.2006-293753-gy" but I would see this: argv[0] D:\devel\home\devel\python\db\xlsxml.py argv[1] "K:\IT\admin\test\Flat Files\2006\06.02.2006-293753-gy" argv[2] '' Yours sincerely, __ János Juhász

[Tutor] [Re] Fwd: Strings backwards

2006-01-18 Thread János Juhász
would say: ', rev speaker.Speak(rev) except: if sys.exc_type is EOFError: sys.exit() It works on my xp :) Yours sincerely, __ János Juhász ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] rare matrix

2005-11-30 Thread János Juhász
Dear All, do you know any python solution to handle big big rare matrices effectively with python. I would make matrix multiplications with 3000x3000 matrices, but with 1-2% data in them. Could you recommend any starting point for that ? Yours sincerely, __ János

Re: [Tutor] reduce with comprehension

2005-11-21 Thread János Juhász
], [6], [7, 71, 72], [8], [9]] Yours sincerely, __ János Juhász [EMAIL PROTECTED] wrote on 2005.11.21 23:26:03: > On 21/11/05, János Juhász <[EMAIL PROTECTED]> wrote: > > I can't imagine how this could be made with list comprehension. > > &g

[Tutor] reduce with comprehension

2005-11-20 Thread János Juhász
>>> [(item, item) for item in a] # it is deeper with one level >>> Is it possible to substitute reduce with comprehension anyway ? Yours sincerely, __ János Juhász ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] split a tuple

2005-11-17 Thread János Juhász
; >>>>>> ['a']*3 #so you can see what the rhs multiply does >>>['a', 'a', 'a'] >>> >>>## >>> >>>Since tuples cannot be changed, you have to go through the tuple<->list conversion steps. If you can work with a >>>list instead, then these two steps could be eliminated: >>> >>>## >>>>>> l = [1,2,3,4,5,1,2,3,4,5,1,2,3,4,5] #using a list instead >>>>>> regrouped = [l[i:i+n] for i in range(0,len(l),n)] >>>>>> regrouped[-1].extend([default]*(n-len(regrouped[-1]))) >>>>>> regrouped >>>[[1, 2, 3, 4], [5, 1, 2, 3], [4, 5, 1, 2], [3, 4, 5, 'default']] >>>>>> >>>## >>> >>>/c Yours sincerely, __ János Juhász ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] split a tuple

2005-11-16 Thread János Juhász
e last element is missing here. Yours sincerely, __ János Juhász ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] is there any Python code for spatial tessellation?

2005-10-10 Thread János Juhász
:) ) Yours sincerely, __ János Juhász > Message: 7 > Date: Sun, 9 Oct 2005 22:22:29 -0700 > From: Shi Mu <[EMAIL PROTECTED]> > Subject: Re: [Tutor] is there any Python code for spatial > tessellation? > To: Danny Yoo <[EMAIL PROTECTED]

Re: [Tutor] OOP fundamentals

2005-09-19 Thread János Juhász
very natural is using wxPython. There is another recipe about portscanning with OOP and threading: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/286240 Yours sincerely, __ János Juhász > Message: 5 > Date: Mon, 19 Sep 2005 17:01:30 -0400 >

[Tutor] replace string in a sequentially read stream

2005-09-12 Thread János Juhász
Dear Guys, I have to run the next regexp change in a stream: import re wrongcode = re.compile(r'(.*)b24704T') f = open('testfile.txt') while 1: sequence = f.read(1024) sequence = wrongcode.sub(r'\1b24700T', sequence) print sequence My original solution was to keep the last p

[Tutor] Emulate jetdirect

2005-09-08 Thread János Juhász
Hi All, I just would make some kind of printer filter for an HP printer, that is connected to a jetdirect printserver. The functionality is something like this: netcat -l -p 9100 | filter.py | netcat 10.36.11.11 9100 I would like to make it as a simple socketserver in python for the port 9100, r

[Tutor] module with static global

2005-07-12 Thread János Juhász
Dear Guys! I am using a class for connecting to an sql database via odbc. It is like this: import dbi, odbc class scalaDB: def __init__(self): self.cn = odbc.odbc('DSN=scalaDB;UID=query;PWD=query;DATABASE=scalaDB') def closeDB(self): self.cn.close() de

Re: [Tutor] max(len(item)) for cols

2005-06-20 Thread János Juhász
m=' | ') It makes beautiful tables from sql queries into e-mail as warning. That I don't know is the asterisk in zip(*[labels] + rows) I wasn't ab

Re: [Tutor] max(len(item)) for cols

2005-06-17 Thread János Juhász
Thanks for jfouhy and Kent! Both the zip and the recipe are suit for me. I looked for these. Yours sincerely, __ János Juhász ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] max(len(item)) for cols

2005-06-17 Thread János Juhász
#x27;], [ 'longer','longer','sort'] ] it is len(item) for that: [[ 1, 2, 3], [ 10,10, 4] ] I would have that is the next: