pyvm 1.1

2006-01-28 Thread stelios xanthakis
WHAT IS IT -- pyvm is an experimental python virtual machine with a compiler written in python. pyvm is very incomplete and does not care about backwards compatibility so you shouldn't use it unless: - you are interested in vm hacking. - you want to build another big program based on a

Re: Checking free disk space on Win32 ?

2006-01-28 Thread Ravi Teja
http://mail.python.org/pipermail/python-list/2001-January/025344.html -- http://mail.python.org/mailman/listinfo/python-list

Re: How do I dynamically create functions without lambda?

2006-01-28 Thread Kay Schluehr
Steven D'Aprano wrote: On Fri, 27 Jan 2006 11:41:56 -0800, Kay Schluehr wrote: Russell wrote: I want my code to be Python 3000 compliant, and hear that lambda is being eliminated. The problem is that I want to partially bind an existing function with a value foo that isn't known

Re: Python vs C for a mail server

2006-01-28 Thread al pacino
but i am not able to choose the language.Should i go for C(socket API) Ravi is right (using sockets is more or less the same from any language.) ..try JSP(java server pages), some guys in nit warangal implemented a mail server (foa LAN though)for their minor project. my contention is that

Re: VB to Python migration

2006-01-28 Thread Luis M. González
I second the suggestion of using Boo for this case. Why use Delphi or VB when you have a more pythonic first class .NET language? You already have a very good IDE for creating your project (SharpDevelop), which is free, open source and already has the Boo bindings included (download here the

Re: Python vs C for a mail server

2006-01-28 Thread Jim Segrave
In article [EMAIL PROTECTED], Ravi Teja [EMAIL PROTECTED] wrote: Why don't you use an existing mail server? Probably because that was his homework assignment for a networking class. Not uncommon to be told to implement a server from the scratch from the RFC. Although that does not explain his

Re: Python vs C for a mail server

2006-01-28 Thread al pacino
jim you are probably right. i have had exp. with this. i had to create a server(multipurpose such as file sharing, games (pretty simple tho like tic tac toe..) we were in 6th sem with learning OS and comp. n/w for the first time. it seems like these jack ass jerks (proffs/instuctors) like to

Re: Python vs C for a mail server

2006-01-28 Thread abhinav
ya its supposed to be some stupid 6 month project which my friend has to do.I am just helping him out.he may not be implementing a full fledged rfc compliance mail server but may support some of the major functionalities.so basically its an extra ordinary need.I just wanted to know which language

Re: How do I tell if I'm running in the PyWin interpreter?

2006-01-28 Thread Peter Otten
Charles Krug wrote: Is there a way to detect that I'm running the the PyWin interpreter so that I can bypass its raw_input behavior? You could test if pywin_specific_module in sys.modules: # use workaraound Or maybe you can get away with always using sys.stdin.readline() instead of

Re: Returning a value from code string

2006-01-28 Thread Kirk McDonald
Fredrik Lundh wrote: executing the code in a custom namespace is a lot cleaner: ns = {} ns[os] = os # insert preimported values ns[app] = app # insert preloaded objects exec self.code in ns try: func = ns[std_func_name] except KeyError: pass

Re: Fast generation of permutations

2006-01-28 Thread Anton Vredegoor
Paul Rubin wrote: def deals(): for i in xrange(13**5): cards = [(i//p) % 13 for p in (1, 13, 169, 2197, 28561)] yield cards This gives hands like [0,0,0,0,1] and [0,0,0,1,0] which are permutations of one another. Below is a piece of code that avoids this.

Re: writing large files quickly

2006-01-28 Thread Jens Theisen
Donn wrote: How the heck does that make a 400 MB file that fast? It literally takes a second or two while every other solution takes at least 2 - 5 minutes. Awesome... thanks for the tip!!! Because it isn't really writing the zeros. You can make these files all day long and not run out of

Re: Intro to Pyparsing Article at ONLamp

2006-01-28 Thread Anton Vredegoor
Paul McGuire wrote: I just published my first article on ONLamp, a beginner's walkthrough for pyparsing. Please check it out at http://www.onlamp.com/pub/a/python/2006/01/26/pyparsing.html, and be sure to post any questions or comments. I like your article and pyparsing. But since you ask

Re: writing large files quickly

2006-01-28 Thread Jens Theisen
Ivan wrote: Steven D'Aprano wrote: Isn't this a file system specific solution though? Won't your file system need to have support for sparse files, or else it won't work? Yes, but AFAIK the only modern (meaning: in wide use today) file system that doesn't have this support is FAT/FAT32. I

Re: writing large files quickly

2006-01-28 Thread Jens Theisen
Donn wrote: Because it isn't really writing the zeros. You can make these files all day long and not run out of disk space, because this kind of file doesn't take very many blocks. The blocks that were never written are virtual blocks, inasmuch as read() at that location will cause the

Re: Python vs C for a mail server

2006-01-28 Thread Nicolas Lehuen
If your friend is proficient in C/C++ then learning Python should not be a pain. Quite the contrary, it should be an enlightnement. Being good in C/C++ AND Python is a killer combination, as you can promptly and efficiently code big chunks of your application in Python and interface with C/C++

Re: beta.python.org content

2006-01-28 Thread Ron Rogers Jr.
Steve Holden wrote: How does http://beta.python.org/about/beginners/ look? regards Steve Hi, I'm an actualy Python beginner, decided recently to play with Python. I'm a user, not a professional programmer or developer of any sort, so I guess the beginner's page would be aimed at

Re: How do I dynamically create functions without lambda?

2006-01-28 Thread Steven D'Aprano
On Sat, 28 Jan 2006 00:13:28 -0800, Kay Schluehr wrote: [snip lambda calculus stuff] In Python you can write: Y = lambda g: (lambda f: g(lambda arg: f(f)(arg))) (lambda f: g(lambda arg: f(f)(arg))) This serves the purpose. Try Y(F) and see. Is any of this stuff maintainable in the real

File date attribute

2006-01-28 Thread Bruce R Graham
Hi: am a Newbie and this is my first script: We were recently burgled and had our computers stolen. Easy to replace, but the data that was lost is years and years of work. I've investigated offsite data backup but it seems expensive. In any case, the data we have is not volumous. Rather, would

Re: Python vs C for a mail server

2006-01-28 Thread Jens Theisen
Nicolas wrote: If it's just a way to throw a programming challenge at your friend's face, then you should check whether it's okay to use Python rather than C/C++, otherwise he could be charged of cheating by using a more productive language :). Though this comment of mine is likely to start

Re: File date attribute

2006-01-28 Thread Sybren Stuvel
Bruce R Graham enlightened us with: Run a script in cron.daily. The script should check a timestamp placed by the last occurrence of that script. Then check my home folder for files modified between that timestamp and now. Then send those files off to gmail. I have most of the pieces in

Re: Python vs C for a mail server

2006-01-28 Thread Sybren Stuvel
Jim Segrave enlightened us with: Any lecturer assigning write a mail server as a class project is doing his/her students a true dis-service. At one time, I got an assignment Write a robust, user friendly SMTP client. That was just after we learned how to user 'for' loops and 'if' statements.

Re: beta.python.org content

2006-01-28 Thread Bruce Cropley
I'd like to see the use of Python grow as dramatically as it deserves to. As I see it, there are at least three major categories of web visitors that we need to cater to: - Existing python users - Potential python users - Managers The current site's front page seems to be aimed mainly at existing

Re: Efficient Find and Replace

2006-01-28 Thread Raymond Hettinger
for i,v in enumerate(L): if v == X: L[i] = Y Here's an alternate solution using a replacement dictionary: M = {X:Y} for i, v in enumerate(L): L[i] = M.get(v, v) [Fredrik Lundh] but that's 2-3 times slower than the OP's corrected code for his use case,

Re: How do I tell if I'm running in the PyWin interpreter?

2006-01-28 Thread vincent wehren
Charles Krug [EMAIL PROTECTED] schrieb im Newsbeitrag news:[EMAIL PROTECTED] | On 2006-01-28, Steven D'Aprano [EMAIL PROTECTED] wrote: | | As the comment says, when I run this under Python Win, I get an (pretty | sure) Tkinter interface, not a command line, and I don't get my | EOFError when

Re: Returning a value from code string

2006-01-28 Thread Max
Kirk McDonald wrote: Another kind of node (I'm still deciding whether to call them Codenodes or Opcodes or maybe Pynodes) is a chunk of code that can be asked to run itself, and which can be edited, on the fly, from within the website. Thus, one can both alter the functionality of the site,

Re: How do I dynamically create functions without lambda?

2006-01-28 Thread Kay Schluehr
Steven D'Aprano wrote: On Sat, 28 Jan 2006 00:13:28 -0800, Kay Schluehr wrote: [snip lambda calculus stuff] In Python you can write: Y = lambda g: (lambda f: g(lambda arg: f(f)(arg))) (lambda f: g(lambda arg: f(f)(arg))) This serves the purpose. Try Y(F) and see. Is any of this

Re: writing large files quickly

2006-01-28 Thread Ivan Voras
Jens Theisen wrote: Ivan wrote: Yes, but AFAIK the only modern (meaning: in wide use today) file system that doesn't have this support is FAT/FAT32. I don't think ext2fs does this either. At least the du and df commands tell something different. ext2 is a reimplementation of BSD UFS, so

SLUT distibution mangled?

2006-01-28 Thread Ido Yehieli
Hi, I was trying to download and install the latest SLUT (0.9.0) from http://slut.sourceforge.net/download/index.html and it seems both the zip and the tar.gz files are corrupted - the directory aux and the files within can not be extracted (using windows BTW). This happened with both the zip

Re: SLUT distibution mangled?

2006-01-28 Thread Ido Yehieli
OKl, sorry this seems to have nothing to do with SLUT it self, for some reason a directory names 'aux' can not be created... most bizzare. mkdir aux just returns The directory name is invalid. -- http://mail.python.org/mailman/listinfo/python-list

Re: Using non-ascii symbols

2006-01-28 Thread Ivan Voras
Rocco Moretti wrote: Could it be APL? No, it was much newer... someone did it as a hobby language. -- http://mail.python.org/mailman/listinfo/python-list

Re: SLUT distibution mangled?

2006-01-28 Thread Fredrik Lundh
Ido Yehieli wrote: OKl, sorry this seems to have nothing to do with SLUT it self, for some reason a directory names 'aux' can not be created... most bizzare. mkdir aux just returns The directory name is invalid. on windows ? win32 reserves the file names CON, PRN, AUX, CLOCK$, NUL, COM1,

Re: Python code written in 1998, how to improve/change it?

2006-01-28 Thread Petr Jakes
To provide some feedback I vould like to show the code which works fine for me as a FSM machine. As speed is not the crucial issue for my application, I have decided to use an approach showed in the Skip Montanaro's code. http://orca.mojam.com/~skip/python/fsm.py (it is using dictionary to store

textvariable help

2006-01-28 Thread swisscheese
I must be missing something basic. Can anyone explain why 'A' does not show on the entry widget? import Tkinter root = Tkinter.Tk() class Col: Rows = [0] def __init__(self): Frame = Tkinter.Frame(root); Frame.pack (side='left') self.Rows[0] = Tkinter.StringVar();

Re: Python Drive Name is the search, what is the question?

2006-01-28 Thread Gregory Piñero
On 1/28/06, Dennis Lee Bieber [EMAIL PROTECTED] wrote: However, you do have an entry that covers Python and Drive, with your URL at the bottom... Look Familiar??? -=-=-=-=-=-=- Gregory Piñero | 3 Dec 01:23 Picon Re: Detect Blank DVD or CD in CDROM Drive From: Gregory

Re: How do I tell if I'm running in the PyWin interpreter?

2006-01-28 Thread Charles Krug
On 2006-01-28, Peter Otten [EMAIL PROTECTED] wrote: Charles Krug wrote: Is there a way to detect that I'm running the the PyWin interpreter so that I can bypass its raw_input behavior? You could test if pywin_specific_module in sys.modules: # use workaraound Or maybe you can get away

Re: writing large files quickly

2006-01-28 Thread Jens Theisen
Ivan wrote: ext2 is a reimplementation of BSD UFS, so it does. Here: f = file('bigfile', 'w') f.seek(1024*1024) f.write('a') $ l afile -rw-r--r-- 1 ivoras wheel 1048577 Jan 28 14:57 afile $ du afile 8 afile Interesting: cp bigfile bigfile2 cat bigfile bigfile3 du bigfile* 8

Re: textvariable help

2006-01-28 Thread Fredrik Lundh
swisscheese wrote: I must be missing something basic. Can anyone explain why 'A' does not show on the entry widget? import Tkinter root = Tkinter.Tk() class Col: Rows = [0] def __init__(self): Frame = Tkinter.Frame(root); Frame.pack (side='left')

Re: Checking free disk space on Win32 ?

2006-01-28 Thread M�ta-MCI
Hi ! Another method : import os print str(os.popen4('dir C:\ /AD |find octets|find libre')[1].readlines()[0].split()[2]) Warning ! It's French version. For english, perhaps (depend of DIR return format) : import os print str(os.popen4('dir C:\ /AD |find bytes|find

General Type Checks (int, str, tuple, etc.)

2006-01-28 Thread Fabian Steiner
Hello! So far, I am using something like »if isinstance(var, int):« to determine, whether var's value is an integer. Now I would like to know if there is any better possibility to do such general checks or may a construct with isinstance() even fail in certain cases? Cheers, Fabian --

Re: textvariable help

2006-01-28 Thread swisscheese
Thanks for the quick reply. With your reply and another tutorial I get it now. I needed self.Rows = ... in the constructor. I find myself wasting a lot of time with poor python docs. Whatever time Python is supposed to save I'm losing so far in looking up things. I suppose that will change as I

curses won't refresh screen

2006-01-28 Thread Casey Bralla
For some reason, I can't get curses to refresh the screen. Can someone offer a suggestion to try to debug this? Here is my python code snippet: stdscr=curses.initscr() curses.noecho() curses.cbreak() stdscr.keypad(1) global screen screen = stdscr.subwin(23, 79, 0, 0) screen.border() while 1 ==

Re: Intro to Pyparsing Article at ONLamp

2006-01-28 Thread Paul McGuire
Anton Vredegoor [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I like your article and pyparsing. But since you ask for comments I'll give some. For unchanging datafile formats pyparsing seems to be OK. But for highly volatile data like videotext pages or maybe some html tables one

Re: Match First Sequence in Regular Expression?

2006-01-28 Thread Armin Steinhoff
Alex Martelli wrote: Christoph Conrad [EMAIL PROTECTED] wrote: Hello Roger, since the length of the first sequence of the letter 'a' is 2. Yours accepts it, right? Yes, i misunderstood your requirements. So it must be modified essentially to that what Tim Chase wrote: m =

MYSql, CGI web page search code not working

2006-01-28 Thread Fred
OK, I can now successfully enter data into my MySQL database through my CGI web page. I can click a button and retrieve all the records, but I can not seem to get the search code to work. Below is the web page code and then my Python script. When I click my search button it just gives me all the

Re: Using non-ascii symbols

2006-01-28 Thread Jorge Godoy
Runsun Pan [EMAIL PROTECTED] writes: Can you guys figure out the details ? Here is the decoded version: It looks that with all my 26 years I'm too old to understand something like that... All I can say is OMG... :-) IMO, a language is a living organism, it has its own life and often

Re: problems with documentation

2006-01-28 Thread Ron Rogers Jr.
BartlebyScrivener wrote: Specifically it's the TOPICS that I can't seem to get to work. The keywords and modules etc do work. But if I type, e.g., help(functions) it says, No documentation found If I type help(os) I get help on the os module. rpd The TOPICS seem to be case sensitve so

Re: textvariable help

2006-01-28 Thread Fredrik Lundh
swisscheese wrote: Thanks for the quick reply. With your reply and another tutorial I get it now. I needed self.Rows = ... in the constructor. I find myself wasting a lot of time with poor python docs. Whatever time Python is supposed to save I'm losing so far in looking up things. I suppose

Re: Fast generation of permutations

2006-01-28 Thread Paul Rubin
Anton Vredegoor [EMAIL PROTECTED] writes: def deals(): for i in xrange(13**5): cards = [(i//p) % 13 for p in (1, 13, 169, 2197, 28561)] yield cards This gives hands like [0,0,0,0,1] and [0,0,0,1,0] which are permutations of one another. Yes, that's

Curses won't update screen - Solved!

2006-01-28 Thread Casey Bralla
My problem was caused by a getch() function which paused, waiting for the character. Live and learn. sigh For some reason, I can't get curses to refresh the screen. Can someone offer a suggestion to try to debug this? Here is my python code snippet: stdscr=curses.initscr() curses.noecho()

Re: VB to Python migration

2006-01-28 Thread DH
see vb2py to help the conversion http://vb2py.sourceforge.net/ or if you want to convert vb6 to vb.net instead, there are tools from microsoft and others to help with that, such as: http://www.microsoft.com/downloads/details.aspx?FamilyId=10C491A2-FC67-4509-BC10-60C5C039A272displaylang=en or if

Re: MYSql, CGI web page search code not working

2006-01-28 Thread Diez B. Roggisch
db=MySQLdb.connect(host = 'localhost', db = 'phone') cursor=db.cursor() cursor.execute(Select * from phone where name = name order by name) You don't parametrize the query. The where-clause thus is a tautology, as the name is always the name. Do something like this: cursor.execute(Select

Re: textvariable help

2006-01-28 Thread swisscheese
None - it was a false impression I got somehow. -- http://mail.python.org/mailman/listinfo/python-list

Re: [IDE] - The Dynamic Opportunity - ActiveState Komodo IDE / Open Source

2006-01-28 Thread Scott David Daniels
Ilias Lazaridis wrote: As a first step, a free personal edition (non-commercial and academic use) would help to spread the Komodo IDE within the communities. Yeah, and ActiveState makes up the loss in income on volume, eh? I've got no problem paying for good work. -- -Scott David Daniels

Re: MYSql, CGI web page search code not working

2006-01-28 Thread Fred
print MySQLdb.paramstyle returns: format I found one example like this: cursor.execute('''Select * from phone where name=%s order by name''',(name)) But I get this in my Apache error log: NameError: name 'name' is not defined Like my last problem I posted, I am sure it is something very simple

Re: writing large files quickly

2006-01-28 Thread Scott David Daniels
Jens Theisen wrote: Ivan wrote: I read somewhere that it has a use in database software, but the only thing I can imagine for this is when using heap queues (http://python.active-venture.com/lib/node162.html). I've used this feature eons ago where the file was essentially a single large

Re: Python vs C for a mail server

2006-01-28 Thread Alex Martelli
Jens Theisen [EMAIL PROTECTED] wrote: ... Please don't be offended, but if anyone could make a point of how Python's disadvantages in these regards could be alleviated, I'd be very interested. http://www.artima.com/weblogs/viewpost.jsp?thread=4639 http://www.mindview.net/WebLog/log-0025

Re: Python vs C for a mail server

2006-01-28 Thread Nicolas Lehuen
Jens Theisen wrote: Please don't be offended, but if anyone could make a point of how Python's disadvantages in these regards could be alleviated, I'd be very interested. Jens Well, I write Java, C++ and Python code, and I have posted a few thoughts about this on my blog :

Re: Efficient Find and Replace

2006-01-28 Thread Scott David Daniels
Murali wrote: Given: L = list of integers. X and Y are integers. Problem: find every occurrence of X and replace with Y Problem with both solutions is the efficiency. As everyone else says, you are hallucinating efficiency problems probably brought on by an overdose of Lisp or ML. Here

Re: writing large files quickly

2006-01-28 Thread Tim Peters
[Jens Theisen] ... Actually I'm not sure what this optimisation should give you anyway. The only circumstance under which files with only zeroes are meaningful is testing, and that's exactly when you don't want that optimisation. In most cases, a guarantee that reading uninitialized file data

Re: General Type Checks (int, str, tuple, etc.)

2006-01-28 Thread Scott David Daniels
Fabian Steiner wrote: Hello! So far, I am using something like »if isinstance(var, int):« to determine, whether var's value is an integer. Now I would like to know if there is any better possibility to do such general checks or may a construct with isinstance() even fail in certain

Re: writing large files quickly

2006-01-28 Thread Ivan Voras
Jens Theisen wrote: cp bigfile bigfile2 cat bigfile bigfile3 du bigfile* 8 bigfile2 1032bigfile3 So it's not consumings 0's. It's just doesn't store unwritten data. And I Very possibly cp understands sparse file and cat (doint what it's meant to do) doesn't :) I read

Re: Efficient Find and Replace

2006-01-28 Thread Murali
Thanks for the replies. I always thought that Python lists were actually lists under the hood. If they are implemented as arrays of pointers things should be a lot more efficient. In particular what I thought was a Linear-time operation is actually an O(1) operation. Since python allows you to

Re: beta.python.org content

2006-01-28 Thread Scott David Daniels
Terry Hancock wrote: On Fri, 27 Jan 2006 13:44:19 -0800 Scott David Daniels [EMAIL PROTECTED] wrote: Paragraph 3 in Why Python: and later in that paragraph, I'd change: ... extensions that provide compact numerical solutions to: ... extensions that provide compact high-speed

Re: We have zipimport, how about dllimport?

2006-01-28 Thread M�ta-MCI
ctypes ? -- http://mail.python.org/mailman/listinfo/python-list

Re: MYSql, CGI web page search code not working

2006-01-28 Thread Kirk McDonald
Fred wrote: No matter what I type in the form text box (or even if I leave it blank) I get all the records. Try this: #!/usr/local/bin/python print Content-Type: text/html\n import MySQLdb import cgi db=MySQLdb.connect(host = 'localhost', db = 'phone') cursor=db.cursor() cursor.execute(Select

Re: MYSql, CGI web page search code not working

2006-01-28 Thread Fred
Yeah, I already tried that (except you have a , after name. Your code produces the same error: NameError: name 'name' is not defined I know I am close!! Just missing some small thing... -- http://mail.python.org/mailman/listinfo/python-list

Re: MYSql, CGI web page search code not working

2006-01-28 Thread Kirk McDonald
Fred wrote: Yeah, I already tried that (except you have a , after name. Your code produces the same error: NameError: name 'name' is not defined I know I am close!! Just missing some small thing... Oh, duh. I forgot something: #!/usr/local/bin/python print Content-Type: text/html\n

Re: Returning a value from code string

2006-01-28 Thread Kirk McDonald
Max wrote: Kirk McDonald wrote: Another kind of node (I'm still deciding whether to call them Codenodes or Opcodes or maybe Pynodes) is a chunk of code that can be asked to run itself, and which can be edited, on the fly, from within the website. Thus, one can both alter the

Re: writing large files quickly

2006-01-28 Thread Bengt Richter
On Fri, 27 Jan 2006 12:30:49 -0800, Donn Cave [EMAIL PROTECTED] wrote: In article [EMAIL PROTECTED], rbt [EMAIL PROTECTED] wrote: Won't work!? It's absolutely fabulous! I just need something big, quick and zeros work great. How the heck does that make a 400 MB file that fast? It literally

Re: MYSql, CGI web page search code not working

2006-01-28 Thread Fred
Thanks Kirk! That worked perfect! And makes perfect since now that I see it... Now that I have the main pieces working I can start expanding from here! Fred -- http://mail.python.org/mailman/listinfo/python-list

Calling DLL with several data fields in output params

2006-01-28 Thread Java script Dude
Hi, I basically need to write a script that will make calls to a DLL and parse the return result for API calls that consist of several data fields in the input and output parameters. [Questions] [q1] Is ctypes the right Python library to use for this interaction. . . . . . I know about calldll

Re: We have zipimport, how about dllimport?

2006-01-28 Thread Martin v. Löwis
[EMAIL PROTECTED] wrote: I may be on particularly potent crack, but I was wondering whether it would make sense to distribute python code in DLLs so that the memory occupied by the bytecode would be consumed only once even if there were multiple processes using the same bytecode. Or is there

Re: MYSql, CGI web page search code not working

2006-01-28 Thread Fred
OK one more... how would I do a LIKE instead of a = in this code? cursor.execute(Select * from phone where name=%s order by name, (form['name'].value,)) Right off I think: cursor.execute(Select * from phone where name like %%s% order by name, (form['name'].value,)) But it blows

Re: MYSql, CGI web page search code not working

2006-01-28 Thread Fred
Perfect again Kirk! Now I will study all this so I actually understand what is happening.. Thanks! Fred -- http://mail.python.org/mailman/listinfo/python-list

User login system

2006-01-28 Thread sophie_newbie
Can anyone recommend an open source user login system already written in Python that I could use with my site? Simplicity is the most important factor, but the ability to track users using cookies would be helpful. Hopefully somebody knows one? --

Re: User login system

2006-01-28 Thread Jorge Godoy
sophie_newbie [EMAIL PROTECTED] writes: Can anyone recommend an open source user login system already written in Python that I could use with my site? Simplicity is the most important factor, but the ability to track users using cookies would be helpful. Hopefully somebody knows one? Take

Re: indentation messing up my tuple?

2006-01-28 Thread localpricemaps
sorry i forgot to add in the code for my tuple which is at the very end tuple = (food+ drink + \n) data.append(tuple) f = open(froogle.sql, 'a') f.write ( ''.join( tuple ) -- http://mail.python.org/mailman/listinfo/python-list

Re: indentation messing up my tuple?

2006-01-28 Thread localpricemaps
sorry i left out my tuple which is at the end of my code tuple = (food + drink + \n) data.append(tuple) f = open(froogle.sql, 'a') f.write ( ''.join( tuple ) -- http://mail.python.org/mailman/listinfo/python-list

Re: VB to Python migration

2006-01-28 Thread Thomas Ganss
Josh schrieb: You haven't specified where your main pains are. Do you have at least rudimentary architecture ? How often do you have code reviews / refactored your code ? Have you been striving for good code ? Is it a total mess ? Guessing only from the number of screens, you probably have more

Re: Checking free disk space on Win32 ?

2006-01-28 Thread [EMAIL PROTECTED]
You might find the following interesting too http://unpythonic.net/jeff/tkdu/ Cheers, Davy Mitchell Mood News - BBC News Headlines Auto-Classified as Good, Bad or Neutral. http://www.latedecember.com/sites/moodnews/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Python vs C for a mail server

2006-01-28 Thread Grant Edwards
On 2006-01-28, Steven D'Aprano [EMAIL PROTECTED] wrote: I am a novice in python.I have to implement a full fledged mail server Because that's just what the world needs, yet another mail server. :) C can be faster. And can be is the key. It's easy to write slow programs in C if you don't

Re: textvariable help

2006-01-28 Thread James Stroud
swisscheese wrote: Thanks for the quick reply. With your reply and another tutorial I get it now. I needed self.Rows = ... in the constructor. I find myself wasting a lot of time with poor python docs. I have found the standard library documentation amazingly well written:

String Manipulation Help!

2006-01-28 Thread Dave
OK, I'm stumped. I'm trying to find newline characters (\n, specifically) that are NOT in comments. So, for example (where - = a newline character): == 1: - 2: /*- 3: --- 4: comment- 5: --- 6: */- 7: - 8: CODE

Re: MYSql, CGI web page search code not working

2006-01-28 Thread Kirk McDonald
Dennis Lee Bieber wrote: On Sat, 28 Jan 2006 10:14:44 -0800, Kirk McDonald [EMAIL PROTECTED] declaimed the following in comp.lang.python: The comma is intentional: the MySQLdb wants the argument(s) as a tuple. The DB-API wants tuples... But my last perusal of the MySQLdb Python

Re: [IDE] - The Dynamic Opportunity - ActiveState Komodo IDE / Open Source

2006-01-28 Thread Ilias Lazaridis
Scott David Daniels wrote: Ilias Lazaridis wrote: As a first step, a free personal edition (non-commercial and academic use) would help to spread the Komodo IDE within the communities. Yeah, and ActiveState makes up the loss in income on volume, eh? The personal edition costs currently

Re: String Manipulation Help!

2006-01-28 Thread Kirk McDonald
Dave wrote: OK, I'm stumped. I'm trying to find newline characters (\n, specifically) that are NOT in comments. So, for example (where - = a newline character): == 1: - 2: /*- 3: --- 4: comment- 5:

Re: - The Dynamic Opportunity - ActiveState Komodo IDE / Open Source

2006-01-28 Thread tclguy
*Weakness* * Komodo Free Edition Not Available o Could have e.g. negative influence on Open-Source-Communities o Reduces distribution You logic is badly flawed. -- http://mail.python.org/mailman/listinfo/python-list

Calling C++ function from python script

2006-01-28 Thread Pankaj
The module which i am creating is like Part A: 1. It does some processing by using python code. 2. The result of this python code execution is written to a text file. [This part is already compelete]] Part B: 1. I read a text file which is outputted by above python script in a C++ program 2. and

Re: Checking free disk space on Win32 ?

2006-01-28 Thread M�ta-MCI
Hi! Fun. Slow, but fun. Thanks. @-salutations Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

Re: String Manipulation Help!

2006-01-28 Thread Dave
This is great, thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: User login system

2006-01-28 Thread Alex Martelli
Jorge Godoy [EMAIL PROTECTED] wrote: sophie_newbie [EMAIL PROTECTED] writes: Can anyone recommend an open source user login system already written in Python that I could use with my site? Simplicity is the most important factor, but the ability to track users using cookies would be

Re: - The Dynamic Opportunity - ActiveState Komodo IDE / Open Source

2006-01-28 Thread Ilias Lazaridis
[EMAIL PROTECTED] wrote: *Weakness* * Komodo Free Edition Not Available o Could have e.g. negative influence on Open-Source-Communities My apologies for the inconvenience. The corrected sentence: Could have negative influence on image (e.g. within Open-Source-Communities )

Re: String Manipulation Help!

2006-01-28 Thread Paul McGuire
Dave [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] OK, I'm stumped. I'm trying to find newline characters (\n, specifically) that are NOT in comments. So, for example (where - = a newline character): == 1: - 2: /*- 3:

Decoupling the version of the file from the name of the module.

2006-01-28 Thread bobueland
I'm a newbie experimenting with Python. I want to incrementally develop a module called 'circle'. The problem is now that the file name is used for two purposes. To keep track of the version number and as the name for the module. So when I develop the first version of my file I have to call it

Re: Decoupling the version of the file from the name of the module.

2006-01-28 Thread Xavier Morel
[EMAIL PROTECTED] wrote: I'm a newbie experimenting with Python. I want to incrementally develop a module called 'circle'. The problem is now that the file name is used for two purposes. To keep track of the version number and as the name for the module. So when I develop the first version of

Re: Decoupling the version of the file from the name of the module.

2006-01-28 Thread Kirk McDonald
[EMAIL PROTECTED] wrote: I'm a newbie experimenting with Python. I want to incrementally develop a module called 'circle'. The problem is now that the file name is used for two purposes. To keep track of the version number and as the name for the module. So when I develop the first version of

Re: Decoupling the version of the file from the name of the module.

2006-01-28 Thread Paul Rubin
[EMAIL PROTECTED] writes: Basically I want to decouple the version of my file from the name of the module. Is there a *simple* way out of this dilemma. Really, you should use a source control system. That's a program that tracks the different versions of the files in your program. When one

Re: SLUT distibution mangled?

2006-01-28 Thread Ido Yehieli
So I can't run SLUT on windows then? -- http://mail.python.org/mailman/listinfo/python-list

Python loading library containing embedded python...

2006-01-28 Thread Brennus
I have a dll/so which embeds python. I can verify it works by compiling it as an executable and adding an appropriate main. I tried to write unit tests for this library with ctypes and a simple python script. Access violations and other strange things result. I suspect this is because I am

  1   2   >