Re: [Tutor] DB design

2005-02-18 Thread Victor
to approach the database design process. Anybody have any other references or suggestions relating to the subject? About Python, I assume (experts please jump in) you will build a class for each entity, and any record of the entity or table becomes a class instance. I hope th

[Tutor] Need script help with concept

2011-06-17 Thread Victor
I am in the process of building a script but I do not know if what I am trying to do is possible. So, long story short, I need help.   The concept: I am want to be able to ask the user a series of questions in the program window.   But here is the action I want to appear on the screen.   0. Quest

[Tutor] Help on python file extension windows vista recognition

2009-10-12 Thread Victor Binns
Please, I need help. I installed python on my gateway windows vista laptop computer. This is with the latest version of python (Python 2.6.3 Windows installer) Python 2.6.3 Windows installer I have some python code files I placed on my desktop and tried placing it in a folder containing py

Re: [Tutor] carriage return on windows

2005-01-31 Thread Victor Rex
your example) and the a final line with the last value of the iterable. Do you happen to know how this in done? Thanks. Victor worked around this problem and I love the solution. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] carriage return on windows

2005-02-01 Thread Victor Rex
Michael Janssen wrote: On Mon, 31 Jan 2005 18:01:59 -0600, Victor Rex <[EMAIL PROTECTED]> wrote: I played around with this output issue and I love the way it works. Now, how do you do this in *nix? I tried the same approach and I get a blank line for 5 seconds (or whatever number of cycl

Re: [Tutor] Presentation

2005-02-01 Thread Victor Rex
This is a great series of links. I found the following on Pythology too: Python Spotting http://pythonology.org/spotting Best of luck. Kent Johnson wrote: Eric Raymond's "Why Python?" essay is a classic: http://pythonology.org/success&story=esr Bruce Eckel's "Why I love Python" presentation is her

[Tutor] MySQLdb error while inserting records

2005-03-06 Thread Victor Bouffier
Error, m) File "/usr/lib/python2.3/site-packages/MySQLdb/connections.py", line 33, in defaulterrorhandler raise errorclass, errorvalue TypeError: not all arguments converted during string formatting ------ I was getting this same error so I entered l

Re: [Tutor] MySQLdb error while inserting records

2005-03-06 Thread Victor Bouffier
Yes! That did it. I got confused since Programming Python mentions the '?' for arguments, although I failed to notice it was just used as an example. Actual identifiers could vary depending on the database. Thanks a lot Kent. Kent Johnson wrote: Victor Bouffier wrote: Hi all, I consi

[Tutor] Paradox database files

2005-03-07 Thread Victor Bouffier
le to connect to several database types, but I am not even sure how this would work with Paradox. Any OS solution you suggest works fine for me, since I have access to both a unix (linux) box and Python on Windows too. Thanks. -- Victor Bouffier Finance Manager www.grupoanderson

Re: [Tutor] Paradox database files

2005-03-08 Thread Victor Bouffier
sgroup. I've got a Fedora Core3 with both apt and yum installed, and both tell me I've got the latest libraries (bzip2-libs). If you believe I should post my question elsewhere, please let me know. Thanks. Victor apple_py wrote: ---Original Message--- From: "Danny Yo

Re: [Tutor] Paradox database files

2005-03-08 Thread Victor Bouffier
That did the trick. Thanks Ewald. FYI, I used the '--nodeps' directive once I realized there were really no major issues. I still needed to keep the added symlink since the px libraries couldn't find the libbz2.so.1.0 file. Thanks again to all. That was great help. Victor Ewald

[Tutor] visibility of variables

2005-08-01 Thread Victor Reijs
etland.org (Instant python: instant-python.php.htm ) seems not to speak the right language for me;-). Hope someone can help me. I have the idea this is essential to understand before continuing more in Python. All the best, Victor bmifrao1bmp=[(41, 37, 33), (63, 56, 53), (107, 97, 92), (228, 226,

Re: [Tutor] visibility of variables

2005-08-01 Thread Victor Reijs
THANKS Kent. It seems I used the wrong keywords to find answer to my question. This page is very very helpfull! I now works indeed. THANKS for your fast help. All the best, Victor Kent Johnson wrote: >>I have problems with the visibility of variables in python. I am >>used to

[Tutor] print a line in IDLE as bold, italics or a color

2005-08-02 Thread Victor Reijs
(in the mentioned format): This is bold, red, blue, italics How do I do this in python 2.2 and using IDLE? Thanks for your help. All the best, Victor ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] print a line in IDLE as bold, italics or a color

2005-08-02 Thread Victor Reijs
while typing and changes the color (to orange), so it is quite normal in IDLE... But now; how can user's python program use it? All the best, Victor ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] print a line in IDLE as bold, italics or a color

2005-08-03 Thread Victor Reijs
Hello Alan, Thanks for your feedback. I managed to get some color in my print in IDLE (or the Paint Shop Pro Script Output window): ### import sys print >> sys.stderr,'Hello world' ### All the best, Victor Alan G wrote: > Is there any reason why you want to change the

Re: [Tutor] print a line in IDLE as bold, italics or a color

2005-08-03 Thread Victor Reijs
ements user > myself...) It is python (I wonder even if the system itself is not python;-), because the calls to PSP routines are kind of Python calls... I am working on this: http://www.iol.ie/~geniet/eng/pspscripthelp.htm All the best, Victor __

[Tutor] dialog boxes

2005-09-06 Thread Victor Reijs
Hello all of you, I want to use yes/no-, text-, info-, checklist- dialog boxes in my image manipulation program (on a Windows XP Pro system using python 2.2 and 2.3). What is the best way to do this? Thanks for your feedback. All the best, Victor

[Tutor] dialog boxes for Windows

2005-09-21 Thread Victor Reijs
to get. Thanks for your feedback. All the best, Victor ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] Python debugger bummer

2006-01-16 Thread Victor Bouffier
ng vi/gvim and ipython (I have never really tried IDLE). Thanks in advance for any help. Victor ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Python debugger bummer

2006-01-16 Thread Victor Bouffier
Hi again, I was going through the Python library documentation and I found something I never saw before. $ python -m pdb myscript.py This is what I was looking for! Great help. Any further reference could of course help a lot. I never was able to get the hang of it until now. Victor On Mon

Re: [Tutor] Python debugger bummer

2006-01-16 Thread Victor Bouffier
Thanks Alan. As always, you are very helpful. Victor On Mon, 2006-01-16 at 23:35 +, Alan Gauld wrote: > > I was going through the Python library documentation and I found > > something I never saw before. > > > > $ python -m pdb myscript.py > > I was jus

Re: [Tutor] string object into reference

2006-01-17 Thread Victor Bouffier
tialize it \ to zero 6. add the surface area of the current line to the \ corresponding dictionary key 7. print the totals dictionary Kirk, I would write the program (would take me less time), but the idea is for yo uto learn to program in Python ;-) Post your code for review. Regards.

Re: [Tutor] string object into reference

2006-01-17 Thread Victor Bouffier
ce, look for working with files (I/O), string variable splitting (split function), and basic operations to add each new surface area. Try writing some code and posting it back. Would be glad to review it. Victor On Tue, 2006-01-17 at 11:50 -0600, Kirk Vander Meulen wrote: > Hi, just joined. I

Re: [Tutor] Dictionaries [Was: Re: string object into reference]

2006-01-17 Thread Victor Bouffier
o another object" takes us into a discussion over references, when we actually should be focusing on Perl's hashes (or references to hashes for that matter). Or better still, get away from Perl and start programming in Python and use dictionaries instead! ;-) > Best of wishes! > Thanks a lot. Victor ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] References and list aliasing in Perl and Python [Was: Re: Dictionaries]

2006-01-18 Thread Victor Bouffier
write some Perl code below. Probably bad, nonidiomatic Perl > code. I also have a high chance of saying something wrong. If I do so, > someone please correct me. *grin* > > Also, whenever I say "Perl", I'll mean Perl 5 --- I understand that Perl 6 > has a model that&#

Re: [Tutor] [Re] Fwd: Strings backwards

2006-01-19 Thread Victor Bouffier
t;> digits = (0,1,2,3,4,5,6,7,8,9) >>> print digits[::-1] (9, 8, 7, 6, 5, 4, 3, 2, 1, 0) Best of Luck Victor On Thu, 2006-01-19 at 08:26 +0100, János Juhász wrote: > Hi Ryan, > > I just extended Adam's code with a speech-to-text recepi from > http://aspn.activestate.co

Re: [Tutor] References and list aliasing in Perl and Python [Was: Re: Dictionaries]

2006-01-19 Thread Victor Bouffier
is not the > > functionality, but the convoluted scripts can get. One can hardly > > understand the code. > > Hi Victor, > > That might be an unfair judgement. > > One can write really convoluted and ugly programs in any programming > language. And although I do thi

Re: [Tutor] [Re] Fwd: Strings backwards

2006-01-21 Thread Victor Bouffier
On Thu, 2006-01-19 at 16:49 -0500, Orri Ganel wrote: > Victor Bouffier wrote: > > >I had to do the string-to-list-then-reverse-string-then-back-to-string > >process myself before knowing about this marvelous operand. > >It works on tuples (all immutable objects) too: &

Re: [Tutor] Linux Python install?

2006-01-23 Thread Victor Bouffier
I highly recommend you have a look into ipython. It is a breeze to work with. I usually have a couple of terminal screens open, one with the ipython interpreter, which helps me a lot when testing code snipplets. You can install it using yumex, or just run 'yum install ipython' from the root comma

Re: [Tutor] Dictionaries

2006-01-27 Thread Victor Bouffier
. Victor On Thu, 2006-01-26 at 13:43 +, Alan Gauld wrote: > > How would I modify this to just print either the values or keys? > > Just ask for the values or the keys! > > for value in pairs.values() > print value > > for key in pairs.keys() > p

Re: [Tutor] Dictionaries

2006-01-29 Thread Victor Bouffier
nce until you > have dicts with many thousands of elements. > > Kent > Hi Kent and Alan, Thanks to both for your response. Victor ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] Splitting long string into same len parts

2006-02-08 Thread Victor Bouffier
, 'tma', '', 'g3o', '', 'wzq', '', 'w0s', '', 'dq3', '', 'zjf', ''] Which gives me empty strings between each value. So to actually have this working I ended up filtering through

Re: [Tutor] Splitting long string into same len parts

2006-02-08 Thread Victor Bouffier
Hi Emile and John, Thanks a lot for your insight. There is always a better way, or at least a more pythonic one. Take care. Victor. On Wed, 2006-02-08 at 22:36 -0800, Emile van Sebille wrote: > "Andre Roberge" <[EMAIL PROTECTED]> wrote in message > > > There'

Re: [Tutor] Splitting long string into same len parts

2006-02-10 Thread Victor Bouffier
WOW!! This is really great. Thanks Ken. This first one is definitely going to my personal scripts directory ;-) Victor On Thu, 2006-02-09 at 05:56 -0500, Kent Johnson wrote: > Victor Bouffier wrote: > > Hi to all, > > > > I'd like to split a long string into equ

Re: [Tutor] Splitting long string into same len parts

2006-02-10 Thread Victor Bouffier
this lens. I faced this problem before and solved it using regexes but could not remember how. Your re.findall() suggestion is nice though. Very clean. Thanks Danny. On Wed, 2006-02-08 at 18:55 -0800, Danny Yoo wrote: > > On Wed, 8 Feb 2006, Victor Bouffier wrote: > > > Hi to all, &

Re: [Tutor] Splitting long string into same len parts

2006-02-10 Thread Victor Bouffier
in this particular case. Thanks for pointing it out though. Victor ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Iterating over a string: index and value

2006-02-10 Thread Victor Bouffier
sequence. > Hi Barry, Have a look at enumerate: >>> list(enumerate('abcdefghijk')) [(0, 'a'), (1, 'b'), (2, 'c'), (3, 'd'), (4, 'e'), (5, 'f'), (6, 'g'), (7, 

Re: [Tutor] Guessing a number with limited no. of tries game gone wrong.

2006-03-28 Thread Victor Bouffier
) You have to 'import sys' first though. Try it out and analyze the flow of the program. Use the debugger to try your code one step at a time to see what is going wrong. I would also change the initial guess to specify the range, like: guess = int(raw_input("Take a guess between

Re: [Tutor] Bigrams and nested dictionaries

2006-04-03 Thread Victor Bouffier
On Wed, 2006-03-29 at 00:15 -0500, Michael Broe wrote: > Aha! John wrote: > > "Are you sure you haven't mistakenly assigned something other than a > dict to D or D['d'] ?" > > Thanks for the tip! Yup that was it (and apologies for not reporting > the problem more precisely). I hadn't initiali

Re: [Tutor] Bigrams and nested dictionaries

2006-04-03 Thread Victor Bouffier
On Mon, 2006-04-03 at 11:39 -0700, Danny Yoo wrote: > > You can check if the dictionary key exists prior to assigning to it: > > > > >>> if not D.has_key('c'): > > ...D['c'] = {} > > >>> D['c']['a'] = 1

[Tutor] Extending a list within a list comprehension

2006-04-11 Thread Victor Bouffier
oral.append([x[1][1], lst]) temporal.sort() temporal.reverse() # sort descending elements = [ x[1] for x in temporal ] Is there a way to use list comprehensions to append or extend the array as needed by the second code listing? Thanks. Victor ___ Tutor

[Tutor] [Fwd: Re: Extending a list within a list comprehension]

2006-04-11 Thread Victor Bouffier
I sent this to John directly. Posting to the list. Forwarded Message From: Victor Bouffier <[EMAIL PROTECTED]> To: John Fouhy <[EMAIL PROTECTED]> Subject: Re: [Tutor] Extending a list within a list comprehension Date: Tue, 11 Apr 2006 18:03:41 -0500 On Wed, 2006-04

Re: [Tutor] Extending a list within a list comprehension

2006-04-11 Thread Victor Bouffier
On Tue, 2006-04-11 at 23:42 +0100, Alan Gauld wrote: > Hi Victor, > > I've gotta say that I much prefer the second version here. > > > temporal = [] > > temporal = [ [x[1][1], (x[0], description[x[0]], > >x[1][0], x[1][1], x[1][2] ) ] fo

Re: [Tutor] Decorators

2006-04-11 Thread Victor Bouffier
On Tue, 2006-04-11 at 21:08 +0100, Alan Gauld wrote: > What was an easy to learn and use, ideal language > for medium sized to fairly large scripting projects is trying to turn > into > an all encompassing general purpose language which will be > increasingly difficult to use without falling down s

Re: [Tutor] Extending a list within a list comprehension

2006-04-11 Thread Victor Bouffier
On Tue, 2006-04-11 at 22:17 -0400, Kent Johnson wrote: > Victor Bouffier wrote: > > > If the second element in each array passed as x is of variable length > > (that is, it has a different element count than three, in this case), > > the program needs to extend the li

Re: [Tutor] dictionary datatype

2006-04-11 Thread Victor Bouffier
x2018], or dict1[8216] you get a correct result, since the integer variable 'n' contains that value. Trying dict1['0x2016'] gives you the error because the key does not exist. define dict1 as: dict1 = { 0x2018:u'k', 0x2019:u'd'} and then display it whole: In [299]: print dict1 {8216: u'k', 8217: u'd'} Can you see your '0x2018' key anywhere? HTH Victor ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] Need Help in installing MySQLdb-Python

2011-01-31 Thread Victor Binns
call last): File "C:\Users\victor\Desktop\mysql-python\MySQL-python-1.2.3\setup.py", line 15, in metadata, options = get_config() File "C:\Users\victor\Desktop\mysql-python\MySQL-python-1.2.3\setup_windows.py", line 7, in get_config serverK

[Tutor] Need help on Setup.py

2011-01-31 Thread Victor Binns
I have been trying to add some of the extras with python such as pywin32 and others. when i click on setup.py it does not work. I need help on the problem. Victor___ Tutor maillist - Tutor@python.org To unsubscribe

[Tutor] scripts search

2011-02-25 Thread Victor Binns
Hello I am fairly new to python. I have a small business and I wanted to use python in my business. I have a need for an Employee Time and Attendance software. Is there any python scripts out there that can do the trick? Victor