Re: who moved reload?

2011-04-20 Thread mark
On Tue, 2011-04-19 at 12:41 -0400, Calvin Spealman wrote: > I have a great solution : stop using reload. It often dangerous and > more often silly. > Yeah, I'm there. Some of this is just learning a new way of thinking about the language. I can see that not using reload at all makes more sense (

Can anyone tell me where the old MacPython "16 ton" logo came from?

2018-07-15 Thread Mark
I'm curious to understand how come the original MacPython logo is of a 16 ton weight (rather than, say the word 'python' or a picture of a snake)? You can see the logo here: https://homepages.cwi.nl/~jack/macpython/ -- https://mail.python.org/mailman/listinfo/python-list

Re: Can anyone tell me where the old MacPython "16 ton" logo came from?

2018-07-15 Thread Mark
On Sunday, July 15, 2018 at 1:49:22 PM UTC+1, Christian Heimes wrote: > On 2018-07-15 14:05, Mark wrote: > > I'm curious to understand how come the original MacPython logo is of a 16 > > ton weight (rather than, say the word 'python' or a picture of a snake)? > &

pyz and concurrent.futures

2019-03-04 Thread Mark
I have two apps, one GUI one console, both using PySide2 bindings to Qt 5. Both use concurrent.futures and a processing pool to spread their work over multiple CPUs. I've written my own deployment script (since I can't get a successfull deploy with cx-freeze, py2exe, or pyinstaller) which create

Re: pyz and concurrent.futures

2019-03-04 Thread Mark
I've now just tried with Python 3.7.1 and the same problem persists, so I'll now try to use a second thread for the console app. PS For these CPU-intensive apps which use multiprocessing to use all the CPUs, compared with Python 3.4, 3.6 is 13% faster, and 3.7 is 33% faster! -- https://mail.pyt

Why is "if fileitem.file:" (almost) never false?

2005-11-17 Thread mark
.value) evaluates to false. When I upload a real file, both fileitem.filename and len(fileitem.value) evaluate to true. If I upload a real file that's empty then fileitem.value is an empty string so len(fileitem.value) evaluates to false which is not quite right (an empty file is an obscure

Moinmoin config

2005-08-17 Thread Mark
Hi, I have Moinmoin 1.3.4 installed and working on Linux RHEL3.0. However, all screen elements are lined up on the left hand side. How can I get it displayed like the wiki at: http://moinmoin.wikiwikiweb.de/HelpOnConfiguration instead of this ? -> LANShieldOS Release Notes Search: * Mar

Re: Moinmoin config

2005-08-17 Thread Mark
one subdir, called pages, which has a huge set of subdirs. Do you know where else I can turn? Thanks Mark -- http://mail.python.org/mailman/listinfo/python-list

Re: Moinmoin config

2005-08-19 Thread Mark
one know how to make the borders disappear? Thanks Mark -- http://mail.python.org/mailman/listinfo/python-list

Yet another logo design...

2005-02-25 Thread Mark
Hi, I'm relatively new to python and have been reading some of the topics on the Python logo and marketing issues etc. Long story short here is a contemporary logo design by myself: http://www.imagezilla.com/img.php?im=1182129642_logo.png Any comments welcome... *runs* -- http://mail.python.org

good IIS 6.0(win2k3) python CGI web ext. setup instructions

2005-03-28 Thread mark
Here is a good set of instructions for setting up web extenstions for python CGI on windows 2003 server... Not sure why anyone would want to use IIS but here they are none the less... http://python.markrowsoft.com/iiswse.asp Cheers, Mark -- http://mail.python.org/mailman/listinfo/python

Cannot import mod_python modules

2005-04-12 Thread Mark
Hi, I've just installed the Win32 build of mod_python 3.1.4 for Python 2.4 and have setup my Apache config file with the LoadModule and PythonHandler directives and then copied "mod_python.so" to my Apache modules directory. I restarted Apache and decided to do a quick cgi.test() and it shows that

Re: Cannot import mod_python modules

2005-04-12 Thread Mark
Thanks for the reply Steve, I have re-installed mod_python and re-configured Apache and it works now. I'm not exactly sure what I done differently, but oh well at least it works now :) Regards, Mark. -- http://mail.python.org/mailman/listinfo/python-list

New to Python, Help to get script working?

2013-12-14 Thread Mark
code is located here https://gist.github.com/Xeroday/6468146/raw/1b7fb468551a4ba5b73ea3c0b7bc47591c3a8c51/Twitch.py If anybody could provide some incite on how to get it to work, how the variables work, and such, I would be so grateful! Mark -- https://mail.python.org/mailman/listinfo/python

Re: New to Python, Help to get script working?

2013-12-15 Thread Mark
worried about getting it to work then knowing whats wrong, but it could also be helpful haha Thanks Mark -- https://mail.python.org/mailman/listinfo/python-list

Re: New to Python, Help to get script working?

2013-12-15 Thread Mark
On Sunday, December 15, 2013 4:19:47 PM UTC-5, Mark wrote: > Thanks for the replies, I was hoping that one of you guys could actually try > it for me, as it might be easier to correct? In the meantime i will install > 2.7 instead of 3.3 and give it a try. > > > > On

Re: New to Python, Help to get script working?

2013-12-15 Thread Mark
On Sunday, December 15, 2013 9:33:17 PM UTC-5, Chris Angelico wrote: > On Mon, Dec 16, 2013 at 12:37 PM, Steven D'Aprano > > wrote: > > > Step 1: replace the modified version of the script with a known good copy. > > > > > > > Actually, this might be where the problem is, unfortunately. Not

Re: New to Python, Help to get script working?

2013-12-15 Thread Mark
On Monday, December 16, 2013 2:09:38 AM UTC-5, Mark wrote: > On Sunday, December 15, 2013 9:33:17 PM UTC-5, Chris Angelico wrote: > > > On Mon, Dec 16, 2013 at 12:37 PM, Steven D'Aprano > > > > > > wrote: > > > > > > > Step 1: repl

Re: New to Python, Help to get script working?

2013-12-15 Thread Mark
On Monday, December 16, 2013 2:43:45 AM UTC-5, Mark wrote: > On Monday, December 16, 2013 2:09:38 AM UTC-5, Mark wrote: > > > On Sunday, December 15, 2013 9:33:17 PM UTC-5, Chris Angelico wrote: > > > > > > > On Mon, Dec 16,

Re: New to Python, Help to get script working?

2013-12-15 Thread Mark
On Monday, December 16, 2013 2:48:56 AM UTC-5, Mark wrote: > On Monday, December 16, 2013 2:43:45 AM UTC-5, Mark wrote: > > > On Monday, December 16, 2013 2:09:38 AM UTC-5, Mark wrote: > > > > > > > On Sunday, December 15, 2013 9:33:

Re: New to Python, Help to get script working?

2013-12-16 Thread Mark
On Monday, December 16, 2013 2:52:05 AM UTC-5, Mark wrote: > On Monday, December 16, 2013 2:48:56 AM UTC-5, Mark wrote: > > > On Monday, December 16, 2013 2:43:45 AM UTC-5, Mark wrote: > > > > > > > On Monday, December 16,

Re: New to Python, Help to get script working?

2013-12-16 Thread Mark
On Monday, December 16, 2013 2:55:23 AM UTC-5, Mark wrote: > On Monday, December 16, 2013 2:52:05 AM UTC-5, Mark wrote: > > > On Monday, December 16, 2013 2:48:56 AM UTC-5, Mark wrote: > > > > > > > On Monday, December 16,

Re: New to Python, Help to get script working?

2013-12-16 Thread Mark
s actually running now, just some im possibly missing? Once again I do have pip and livestreamer installed and the exact py file i have is located here: http://www.mediafire.com/view/3m10s9rwvatxd96/twitch.py Once again thanks for help, Mark -- https://mail.python.org/mailman/listinfo/python-list

Re: New to Python, Help to get script working?

2013-12-17 Thread Mark
posted where i am having trouble and got 2 replies talking about spacing... and not fixing any issues or giving advice. Either that or somebody who thinks they might be able to help, can you plz reply? Thanks again Mark -- https://mail.python.org/mailman/listinfo/python-list

Re: New to Python, Help to get script working?

2013-12-18 Thread Mark
/twitch.py Yes i do want it to work, and i would offer money to somebody who would actually help me, if it helped me to make it work faster. Is there not one person that can help a guy out? Mark -- https://mail.python.org/mailman/listinfo/python-list

Complete beginner, any help appreciated :) - For Loops

2011-12-01 Thread Mark
Hi there, I'm a complete beginner to Python and, aside from HTML and CSS, to coding in general. I've spent a few hours on it and think I understand most of the syntax. However, I'm wondering a bit about For Loops. I know that the basic syntax for them is to define a list, and then to use someth

Re: Complete beginner, any help appreciated :) - For Loops

2011-12-01 Thread Mark
Thanks a lot for the answers everyone, I really appreciate you getting back to me so quickly. I think that I understand where I am with this now :) -- http://mail.python.org/mailman/listinfo/python-list

Re: Threads vs Processes

2006-07-27 Thread mark
On Wed, 26 Jul 2006 10:54:48 -0700, Carl J. Van Arsdall wrote: > Alright, based a on discussion on this mailing list, I've started to > wonder, why use threads vs processes. The debate should not be about "threads vs processes", it should be about "threads vs events". Dr. John Ousterhout (creator

Re: Threads vs Processes

2006-07-28 Thread mark
On Thu, 27 Jul 2006 20:53:54 -0700, Nick Vatamaniuc wrote: > Debugging all those threads should be a project in an of itself. Ahh, debugging - I forgot to bring that one up in my argument! Thanks Nick ;) Certainly I agree of course that there are many applications which suit a threaded design. I

Using cElementTree and elementtree.ElementInclude

2006-10-20 Thread Mark
, not instance' The type of included_child is 'instance'. The type of the cElementTree children is 'Element'. How do I resolve this conflict? I am using cElementTree version 1.0.3 and elementtree version 1.2.6 and python version 2.3.4. Will later versions correct the p

[Fwd: Using cElementTree and elementtree.ElementInclude]

2006-10-27 Thread Mark
Original Message Subject: Using cElementTree and elementtree.ElementInclude Date: Mon, 23 Oct 2006 09:40:24 -0500 From: Mark E. Smith <[EMAIL PROTECTED]> Organization: AEDC To: python-list@python.org > cElementTree cannot hold ElementTree instances. > > can y

Re: ftputil upload error

2006-12-03 Thread Mark
On Sat, 02 Dec 2006 04:03:53 -0800, Croteam wrote: > FTPIOError: 550 popravak.txt: Access is denied. Seems pretty self-explanatory to me. M -- http://mail.python.org/mailman/listinfo/python-list

Client side COM and Python Problem

2006-12-14 Thread Mark
unction call Sorry if its blindingly obvious but i just cant work out what is going on. Cheers, Mark -- http://mail.python.org/mailman/listinfo/python-list

Re: pwinauto to remote automate a GUI ?

2006-12-14 Thread Mark
on a port? - You send over code that you want executed - and you get the data returned by the code. But other then that - I don't really know - I am no python Guru (especially not networking!) Glad that you are looking at pywinauto though :-) Mark -- http://mail.python.org/mailman/listinfo/python-list

Stani's Python Editor is looking for a new webhost

2006-12-27 Thread mark
Dear Stani, Very much wishing you a new and great web host for the new year. I feel and read also from so many that you are doing a great service for Python users an d being an example of the Free software movement. i thank you very much and hope you will be back on the web soon. What help do yo

Re: Jesus said, "I am the way, the truth and the life: no one can come to the Father(God)(in Heaven), but by me." (John 14:6) This means that if you die without trusting in Jesus Christ as your Lord and Saviour you will die in your sins and be forever sepa

2005-05-11 Thread mark
I,too,gave semen from the mount. mark "don freeman" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >> >> I suppose he could point at what he saw and wither it. >> > > Jesus would then give a sermon from the mount: > > Let the Puritans

Python + Cairo widget examples.. where can i get them?

2007-05-16 Thread Mark
Hey, a while ago i found a widget somewhere that was written in python with the cairo extension. that widget wasn't just a window.. it was a window without decorations and a red round thing in it. now i was trying to find that thing again and i`ve searched over a million blogs (oke not that much

Newbie help understanding...

2007-05-26 Thread mark
Hi I am trying to get a piece of code to work based on an exercise in a book. Any help appreciated. Can someone please explain what is going on here. I am trying to read from a text file a list of cards with the following format and sort firstly by suit and then by rank h 1 d 2 c 5 s 9 h2 d3 etc

totally lost newbie

2007-05-27 Thread mark
Hi all I posted earlier on this but have changed my approach so here is my latest attempt at solving a problem. I have been working on this for around 12 hours straight and am still struggling with it. Write a program that reads the values for a random list of cards from a file, where each line i

Eval and raw string ??

2007-08-22 Thread Mark
:\tklll\ndfd\bll'") File "", line 1 r'C:klll ^ SyntaxError: EOL while scanning single-quoted string The same principle applies for exec. Thanks in advance, Mark -- http://mail.python.org/mailman/listinfo/python-list

Re: Using Regular Expresions to change .htm to .php in files

2007-08-26 Thread Mark
On Thu, 23 Aug 2007 12:27:10 -0700, Tobiah wrote: > sed "s/.htm/.php/g" < $each > /tmp/$$ This line should be: sed "s/\.htm$/.php/g" < $each > /tmp/$$ -- http://mail.python.org/mailman/listinfo/python-list

i can`t get python working on the command line (linux)

2007-03-13 Thread Mark
Hey, first of all: sorry for the 100% n00b question i`m brand new to python and i seem to start off with the biggest problem of all.. not even getting python to work. i`m running Fedora core 7 test 2 and all the python based applications are working fine (like pirut, pipet, and some other yum rel

Idiom for running compiled python scripts?

2007-03-20 Thread Mark
Hi, I'm new to python and looking for a better idiom to use for the manner I have been organising my python scripts. I've googled all over the place about this but found absolutely nothing. I'm a linux/unix command line guy quite experienced in shell scripts etc. I have a heap of command line util

Re: Idiom for running compiled python scripts?

2007-03-22 Thread Mark
So given the lack of response it seems that there is probably no such idiom and that I should not be concerned by the inefficiency inherent in running .py scripts directly? I did some time tests and sure, the speed gain is slight, but it is a gain none the less. -- http://mail.python.org/mailman

Re: Idiom for running compiled python scripts?

2007-03-22 Thread Mark
On Fri, 23 Mar 2007 14:03:12 +1100, Steven D'Aprano wrote: > Since you've done these tests already, perhaps you can tell us what gain > you actually got? About the same as you, ~20 msecs for my small script samples. > Of course you have to type the "c". You're not deleting the source files > away

Re: Idiom for running compiled python scripts?

2007-03-23 Thread mark
On Fri, 23 Mar 2007 22:24:07 +1100, Steven D'Aprano wrote: > if not os.path.exists(compiledname) or \ os.stat(compiledname)[MT] < > os.stat(scriptname)[MT]: > # compiled file doesn't exist, or is too old Surely the validity check done by Python is more sophisticated than this? Does

Re: Idiom for running compiled python scripts?

2007-03-23 Thread Mark
On Fri, 23 Mar 2007 07:47:04 -0700, Alex Martelli wrote: > You can use > > python -c 'import myscript; myscript.main()' > > and variations thereon. Hmmm, after all that, this seems to be close to what I was looking for. Thanks Alex. Didn't find anything about this in your cookbook! (I'm just st

Re: Idiom for running compiled python scripts?

2007-03-24 Thread Mark
On Sat, 24 Mar 2007 07:21:21 -0700, irstas wrote: > Also, rstrip doesn't work like you think it does. > 'pyxyypp.py'.rstrip('.py') == 'pyx' Well there is embarrassing confirmation that I am a python newbie :( > I timed it against running plain .py and running .pyc directly. It > seemed to be roug

Re: Idiom for running compiled python scripts?

2007-03-24 Thread Mark
ck on termination when run with the above: Error in atexit._run_exitfuncs: Traceback (most recent call last): File "atexit.py", line 24, in _run_exitfuncs func(*targs, **kargs) File "/home/mark/bin/myscript.py", line 523, in delete if files.tempdir: AttributeError: 

Re: Idiom for running compiled python scripts?

2007-03-24 Thread Mark
On Sun, 25 Mar 2007 13:40:33 +1000, Steven D'Aprano wrote: > Because this is entirely a trivial saving. Who cares? Sheesh. > ... > Saving 18ms on a script that takes 50ms to execute *might* be > worthwhile, ... I don't understand your attitude. Sure, we are talking slight savings in machine effici

How to find to HTML strings and 'save' them?

2007-03-25 Thread mark
eems. don't even get me started on python docs.. ayaa ;] Please feel free to teach me to suck eggs because it's all new to me :) Thanks in advance, Mark. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to find to HTML strings and 'save' them?

2007-03-25 Thread mark
",") [",".extract() for "," in comments] But if I'm doing 'import beautifulSoup' this give me a "soup = BeautifulSoup("you are a banana, banana, banana") TypeError: 'module' object is not callable" error, "import beautifu

Need better run/edit method. I have to restart the shell after every script change.

2007-01-11 Thread Mark
method. Maybe there is some better sofware available, or maybe I'm just not utilizing the tools at my disposal. Either way I would greatly appreciate any insight into this problem. Thanks in advance, Mark -- http://mail.python.org/mailman/listinfo/python-list

Re: Need better run/edit method. I have to restart the shell after every script change.

2007-01-12 Thread Mark
Thanks guys. I'll give it a try. Brian Blais wrote: > Mark wrote: > > I'm currently running the IDLE shell under Python 2.5, on Windows XP. > > > > Every time I edit my .txt or .py file, I have to restart the IDLE shell > > for the changes to take effect. I

dynamic argument name for functions

2007-01-12 Thread mark
I want to pass a value to an argument of a function. The argument name is dynamic and is stored in a variable. How do I call the function using with arg_name and value as the parameters. thanks mark For ex: def function(arg1='None', arg2='None', arg3='None'):

Re: dynamic argument name for functions

2007-01-12 Thread mark
On 1/12/07, Carsten Haese <[EMAIL PROTECTED]> wrote: On Fri, 2007-01-12 at 20:22 +, Simon Brunning wrote: > On 1/12/07, mark <[EMAIL PROTECTED]> wrote: > > I want to pass a value to an argument of a function. The argument name is > > dynamic and is stored in a &

Re: How to write code to get focuse the application which is open from server

2007-01-18 Thread Mark
ck() app.window_(title_re = "Print - .*").Ok.CloseClick() Someone also was wondering why they do not have to call Application.Start() or Application.Connect() explicitly - that is because the first call to app.window_() will initialize the application appropriately. The rea

creating a dictionary

2007-01-29 Thread mark
i have few variables and i want to create a dictionary with these variables such that the keys are the variable names and the corresponding values are the variable values.how do i do this easily? for ex: var1='mark' var2=['1','2','3'] my_dict = create_m

.pth configuration method not working

2007-02-03 Thread Mark
MyPaths.pth contains one line that reads: C:\Python25\MyModules. For some reason sys.path won't ever recognize that C:\Python25\MyModules exists. This is very frustrating because I know that this method is supposed to work. ANY help would be appreciated. Thanks in advance, Mark -- http://mail.python.org/mailman/listinfo/python-list

Re: CTypes

2007-02-04 Thread Mark
look into might be Unicows.dll (which gives some Unicode functions to W98) Mark -- http://mail.python.org/mailman/listinfo/python-list

standardized us address

2007-02-11 Thread mark
Hi Is there any python module that will convert address to standard US address format: for ex: 314 south chauncey avenue should be: 314 s chauncey ave thanks mark -- http://mail.python.org/mailman/listinfo/python-list

python mms library

2007-02-12 Thread mark
Hi Is there a library for creating mms message in python? thanks mark -- http://mail.python.org/mailman/listinfo/python-list

calling php function from python

2007-02-13 Thread mark
is it possible to call a php function from python and use a class from php in python? i want to use mmslib which creates mms messages and the only implementation is a php mmslib implementation. thanks a lot! mark -- http://mail.python.org/mailman/listinfo/python-list

Re: PyDev on Mac

2007-02-19 Thread Mark
On Sun, 18 Feb 2007 10:50:37 +0100, Diez B. Roggisch wrote: > Just wait until my crystal ball comes back from the cleaners, and I > will start looking at your problem. > > As you can lay back and do nothing while that happens, I suggest you > take this highly entertaining read: Now that is an ente

getting a thread out of sleep

2007-02-20 Thread mark
Right now I have a thread that sleeps for sometime and check if an event has happened and go back to sleep. Now instead I want the thread to sleep until the event has occured process the event and go back to sleep. How to do this? thanks mark class eventhndler(threading.Thread): def

Re: getting a thread out of sleep

2007-02-20 Thread mark
On 20 Feb 2007 20:47:57 -0800, placid <[EMAIL PROTECTED]> wrote: > On Feb 21, 3:08 pm, mark <[EMAIL PROTECTED]> wrote: > > Right now I have a thread that sleeps for sometime and check if an > > event has happened and go back to sleep. Now instead I want the thread >

Re: getting a thread out of sleep

2007-02-21 Thread mark
On 20 Feb 2007 21:26:18 -0800, placid <[EMAIL PROTECTED]> wrote: > On Feb 21, 4:21 pm, "placid" <[EMAIL PROTECTED]> wrote: > > On Feb 21, 4:12 pm, mark <[EMAIL PROTECTED]> wrote: > > > On 20 Feb 2007 20:47:57 -0800, placid <[EMAIL PROTECTED]

Re: getting a thread out of sleep

2007-02-21 Thread mark
On 21 Feb 2007 14:47:50 -0800, placid <[EMAIL PROTECTED]> wrote: > On Feb 22, 3:23 am, mark <[EMAIL PROTECTED]> wrote: > > On 20 Feb 2007 21:26:18 -0800, placid <[EMAIL PROTECTED]> wrote: > > > > > > > > > On Feb 21, 4:21 pm, "placid&q

Re: getting a thread out of sleep

2007-02-21 Thread mark
On 21 Feb 2007 16:10:51 -0800, placid <[EMAIL PROTECTED]> wrote: > On Feb 22, 10:20 am, mark <[EMAIL PROTECTED]> wrote: > > On 21 Feb 2007 14:47:50 -0800, placid <[EMAIL PROTECTED]> wrote: > > > > > > > > > On Feb 22, 3:23 am, mark <[EMAIL

guess file type in python

2007-02-21 Thread mark
Is there any way to guess the file type using python? thanks mark For example in unix: file code.py code.py: a python script text executable file Eccentric.gif Eccentric.gif: GIF image data, version 89a, 237 x 277 -- http://mail.python.org/mailman/listinfo/python-list

Pyflakes pre-commit hook in subversion

2008-01-08 Thread Mark
http://tarekziade.wordpress.com/2006/11/01/protecting-a-python-svn-code-base-with-the-pre-commit-hook/ Is it possible to check code in python before committing to svn   using pyflakes, pythontidy Pyflakes and Subversion Pyflakes is a nice little utility that checks your Python code for err

Traversing python datatypes via http

2008-02-05 Thread Mark
Is it possible to traverse say python lists via http:// say there is a list in the memory can we traverse the list using list/next list/prev list/first list/last is there a pythonic library to do that? thanks -- http://mail.python.org/mailman/listinfo/python-list

urllib slow on Leopard

2008-02-24 Thread mark
I've recently switched from Ubuntu to OS X Leopard. I have some python scripts which download info from the web. The scripts were working fine before on Ubuntu, but urllib seems to work really slowly on Leopard. I tried an example from the docs: >>> import urllib2 >>> f = urllib2.urlopen('htt

Re: urllib slow on Leopard

2008-02-25 Thread mark
mark wrote: > I've recently switched from Ubuntu to OS X Leopard. I have some python > scripts which download info from the web. The scripts were working fine > before on Ubuntu, but urllib seems to work really slowly on Leopard. > > I tried an example from the docs: >

Re: Python 3 and my Mac (Leopard)

2008-12-24 Thread Mark
On Wed, Dec 24, 2008 at 5:11 PM, Dan wrote: > > Wanted to learn python, got Mark Summerfield's new book "Programming in > Python 3". Having a hard time getting python 3 and IDLE working on my Mac > with Leopard. The mac "resources" on the python.org site

looking for tips on how to implement "ruby-style" Domain Specific Language in Python

2009-01-06 Thread mark
I want to implement a internal DSL in Python. I would like the syntax as human readable as possible. This means no disturbing '.;()\' characters. I like to have the power of the hosting language as well. Thats why I want to build it as an internal DSL and NOT as a external DSL. I want the DSL as h

Re: looking for tips on how to implement "ruby-style" Domain Specific Language in Python

2009-01-08 Thread mark
peps/pep-0302/ > > Python's standard importer looks for files with *.py, *.pyc, *.pyd, or > *.so extensions.  You could write an importer that looks for *.dsl > files, and, instead of loading it as a Python file, invokes your DSL > parser. This is really helpful. Thanks for giving me directions. Mark -- http://mail.python.org/mailman/listinfo/python-list

Unpacking byte strings from a file of unknown size

2008-10-27 Thread Mark
Hi; I'm trying to use the struct.unpack to extract an int, int, char struct info from a file. I'm more accustomed to the file.readlines which works well in a 'for' construct (ending loop after reaching EOF). # This does OK at fetching one 10-byte string at a time: # (4, 4, 2 ascii chars represen

Re: Unpacking byte strings from a file of unknown size

2008-10-28 Thread Mark
Thanks I tested your solution and that works. One of the things that didn't work was for chunk in myfile.read(10): info1, info2, info3 = struct.unpack('http://mail.python.org/mailman/listinfo/python-list

Re: Unpacking byte strings from a file of unknown size

2008-10-28 Thread Mark
> this code python interprets as: > > data = myfile.read(10) > for chunk in data: > . > Aha - now that you put it that way it makes sense. And thanks to all who replied - I'll try out the other suggestions too. Mark -- http://mail.python.org/mailman/listinfo/python-list

compressed serialization module

2008-11-17 Thread Mark
have been looking around. I found a serialize.py but it seems like overkill. Mark -- http://mail.python.org/mailman/listinfo/python-list

Re: compressed serialization module

2008-11-17 Thread Mark
_PROTOCOL) f.close() I'm glad to see that "encode()" is not one of the string ops on the deprecate list (using Python 2.5). Thx, Mark -- http://mail.python.org/mailman/listinfo/python-list

Re: compressed serialization module

2008-11-17 Thread Mark
On Nov 17, 3:08 pm, [EMAIL PROTECTED] wrote: >     Mark> def saveOjb(self, dataObj): >     Mark>     fName = self.version + '_' + self.modname + '.dat' >     Mark>     f = open(fName, 'w') >     Mark>     dStr = pickle.dumps(data

django model problem

2009-04-03 Thread Mark
Hi, Say I have these simple models: class Musician(models.Model): first_name = models.CharField(max_length=50) last_name = models.CharField(max_length=50) class Album(models.Model): artist = models.ForeignKey(Musician) name = models.CharField(max_length=100) Now in `Musician` I

Re: django model problem

2009-04-03 Thread Mark
> I think the first thing you need to do is decide if there is going to be > more than one Musician object. and more than one Album object. > Presently you are giving all musicians the same first_name and > last_name. I suggest you look up the documentation for the special > method __init__()

Re: django model problem

2009-04-04 Thread Mark
> > Anyway, since I don't have time to actually install and configure Django > to experiment, I'd suggest you post a query on the django-users mailing > list, at http://groups.google.com/group/django-users Yes, that's what I did - it seems my problem is either a tough one, or it's just impossi

New fonts for python docs site

2009-04-23 Thread Mark
e.g. see http://docs.python.org/library/index.html Please tell me this is a mistake? 3.X docs are the same. -- http://mail.python.org/mailman/listinfo/python-list

Re: New fonts for python docs site

2009-04-23 Thread Mark
On Thu, 23 Apr 2009 11:41:45 +0200, Marco Mariani wrote: > Looks ok. What do you see? Hmm, I was seeing a ugly jagged bit-mapped font, but only on the docs.python.org site. So I cleared out my firefox cache and restarted and it now looks fine. Never seen that one before. Sorry for the now silly

Re: What IDE support python 3.0.1 ?

2009-05-04 Thread Mark
On Wed, 15 Apr 2009 22:45:35 +, Benjamin Peterson wrote: > Why do you think you're wasting time with 2.x? I'm a relative newbie to python as well but I'd agree that there is at least a small degree of time "wasted" learning python 2.x simply because the standard library of python 3.x has been

Help with setting local variables of class

2008-05-14 Thread Mark
im trying to create a class user so that i can do r=User(1) r._user.keys() ['rating', 'last_name', 'pageviews', 'ip', 'number_polls', 'site', 'myrand', 'hotmail', 'number_activities', 'skype', 'id', 'city', 'rawpassword', 'number_useraudios', 'zip', 'number_votes', 'last_login', 'number_u

Re: Compare 2 files and discard common lines

2008-06-03 Thread Mark
On Thu, 29 May 2008 01:36:44 -0700, loial wrote: > I have a requirement to compare 2 text files and write to a 3rd file > only those lines that appear in the 2nd file but not in the 1st file. > > Rather than re-invent the wheel I am wondering if anyone has written > anything already? Of course yo

Re: how should i use this function?

2008-06-04 Thread Mark
o. (it uses ctypes to access what it needs). You might find that there are more people who can help you at http://clearspace.openqa.org/community/pywinauto/pywinauto_users (though I do not give the best support in the world - so messages have sat there for a while unanswered!) Thanks Mark -- h

Summing a 2D list

2008-06-12 Thread Mark
each user to get something like this: UserScore 1 6 2 4 3 2 4 8 Is this possible? If so, how can I do it? I've tried looping through the arrays and not had much luck so far. Any help much appreciated, Mark --

Re: Summing a 2D list

2008-06-12 Thread Mark
On Jun 12, 3:02 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > Mark wrote: > > Hi all, > > > I have a scenario where I have a list like this: > > > User            Score > > 1                 0 > > 1                 1 > > 1    

Re: Summing a 2D list

2008-06-12 Thread Mark
John, it's a QuerySet coming from a database in Django. I don't know enough about the structure of this object to go into detail I'm afraid. Aidan, I got an error trying your suggestion: 'zip argument #2 must support iteration', I don't know what this means! Thanks to all who have answered! Sorry

Re: Summing a 2D list

2008-06-12 Thread Mark
On Jun 12, 3:45 pm, Aidan <[EMAIL PROTECTED]> wrote: > Aidan wrote: > > Mark wrote: > >> John, it's a QuerySet coming from a database in Django. I don't know > >> enough about the structure of this object to go into detail I'm > >> afraid.

Re: Different times between Python and System

2008-04-15 Thread Mark
On Mon, 14 Apr 2008 00:31:34 -0700, Josh wrote: > Hmm... That didn't work out so well that time. I feel like an idiot. > Previously there has been an hour difference between the system time and > the time that python reports. Thanks for the laugh though Josh. That was funny! :) -- http://mail.

eggy IDE

2008-04-19 Thread mark
n source (GPL). Regards, Mark PS: if anyone is interested in helping out with the project, feel free to write and submit a plugin (in python), its really easy and some ideas are posted on the website. -- http://mail.python.org/mailman/listinfo/python-list

(in memory) database

2008-08-31 Thread mark
but they are difficult to compare for a beginner. Cheers, Mark -- http://mail.python.org/mailman/listinfo/python-list

standalone buildbot possible/ don't have a remote

2008-09-28 Thread mark
:-(( I did run the buildbot testsuite without errors. Here is one problem the buildbot writes out on console: 2008-09-28 20:43:10+0200 [-] maybeStartBuild : [] [] 2008-09-28 20:43:10+0200 [-] : want to start build, but we don't have a remote Another thing I can think of is to set up two

  1   2   3   4   5   6   7   8   9   10   >