Re: Data structure for plotting monotonically expanding data set

2021-06-05 Thread Martin Di Paola
the 'kb' values per each user 'name'. sns.violinplot(data=df, x="name", y="kb") plt.show() # plot the 'kb' per day for the 'alice' user sns.lineplot(data=df.query('name == "alice"'), x="date", y="kb") plt

Re: Recommendation for drawing graphs and creating tables, saving as PDF

2021-06-11 Thread Martin Di Paola
You could try https://plantuml.com and http://ditaa.sourceforge.net/. Plantuml may not sound as the right tool but it is quite flexible and after a few tweak you can create a block diagram as you shown. And the good thing is that you *write* which elements and relations are in your diagram an

Re: optimization of rule-based model on discrete variables

2021-06-14 Thread Martin Di Paola
() (the decision tree) is set by Z3 and not by you such f() leads to the optimum of g()) https://book-of-gehn.github.io/articles/2021/05/26/Casting-Broadcasting-LUT-and-Bitwise-Ops.html Happy hacking. Martin. On Mon, Jun 14, 2021 at 12:51:34PM +, Elena via Python-list wrote: Il Mon, 14 J

Re: [ANN] Austin -- CPython frame stack sampler v3.0.0 is now available

2021-07-02 Thread Martin Di Paola
Very nice. I used rbspy for Ruby programs https://rbspy.github.io/ and it can give you some insights about the running code that other profiling techniques may not give you. I'll use it in my next performance-bottleneck challenge. On Fri, Jul 02, 2021 at 04:04:24PM -0700, Gabriele Tornetta wro

Re: Empty list as a default param - the problem, and my suggested solution

2021-08-14 Thread Martin Di Paola
I don't know if it is useful but it is an interesting metaprogramming/reflection challenge. You used `inspect` but you didn't take its full potential. Try to see if you can simplify your code and see if you can come with a decorator that does not require special parameters. from new import N

Re: on perhaps unloading modules?

2021-08-17 Thread Martin Di Paola
This may not answer your question but it may provide an alternative solution. I had the same challenge that you an year ago so may be my solution will work for you too. Imagine that you have a Markdown file that *documents* the expected results. --8<---cut here---st

Re: basic auth request

2021-08-21 Thread Martin Di Paola
h are more "secure". Thanks, Martin On Wed, Aug 18, 2021 at 11:05:46PM -, Jon Ribbens via Python-list wrote: On 2021-08-18, Robin Becker wrote: On 17/08/2021 22:47, Jon Ribbens via Python-list wrote: ... That's only true if you're not using HTTPS - and you should *

Re: Select columns based on dates - Pandas

2021-09-03 Thread Martin Di Paola
uk 2019-01-01 20 2 it 2019-01-01 30 3 us 2019-02-01 12 4 uk 2019-02-01 22 5 it 2019-02-01 32 With that you could create three dataframes, one per month. Thanks, Martin. On Thu, Sep 02, 2021 at 12:28:31PM -0700, Richard Medina wrote: Hello, forum, I have

Re: The task is to invent names for things

2021-10-28 Thread Martin Di Paola
IMHO, I prefer really weird names. For example if I'm not sure how to name a class that I'm coding, I name it like XXXYYY (literally). Really ugly. This is a way to avoid the so called "naming paralysis". Once I finish coding the class I look back and it should be easy to see "what it does" and

Re: threading and multiprocessing deadlock

2021-12-06 Thread Martin Di Paola
threads that you spawned (background_thread functions). I hope that this can guide you to fix or at least narrow the issue. Thanks, Martin. On Mon, Dec 06, 2021 at 12:50:11AM +0100, Johannes Bauer wrote: Hi there, I'm a bit confused. In my scenario I a mixing threading with multiprocess

Re: Call julia from Python: which package?

2021-12-18 Thread Martin Di Paola
the dataset and ended up loading a lot of duplicated strings and blew up the memory a few times. I suggest you to write down what you need to speed up and see if it is implemented in Julia (do a proof of concept). Only then consider to do the switch. Good luck and share your results! Mart

Re: sharing data across Examples docstrings

2022-01-14 Thread Martin Di Paola
ural bias because I'm its author. If you want to go with byexample, you may want to try its "doctest compatibility mode" first so you don't have to rewrite any test. ( https://byexamples.github.io/byexample/recipes/python-doctest ) Let me know if it is useful for you. Thanks

Re: Waht do you think about my repeated_timer class

2022-02-04 Thread Martin Di Paola
e target function fn() takes longer than the self._interval time. See if it helps. Thanks, Martin. On Thu, Feb 03, 2022 at 11:41:42PM +0100, Cecil Westerhof via Python-list wrote: Barry writes: On 3 Feb 2022, at 04:45, Cecil Westerhof via Python-list wrote: Have to be careful that timin

Re: How do you log in your projects?

2022-02-09 Thread Martin Di Paola
- On a line per line basis? on a function/method basis? In general I prefer logging line by line instead per function. It is easy to add a bunch of decorators to the functions and get the logs of all the program but I most of the time I end up with very confusing logs. There are exceptions,

Re: How do you log in your projects?

2022-02-10 Thread Martin Di Paola
? Logs are not intended to be read by end users. Logs are primarily used to understand what the code is doing in a production environment. They could also be used to gather metrics data. Why should you log to give a message instead of simply using a print? You are assuming that logs and prints

Re: venv and executing other python programs

2022-02-15 Thread Martin Di Paola
ng the shebang "#!/usr/bin/env python") - ./foo.py (using the shebang "#!/usr/bin/env python3") Do you have a particular context where you are having troubles? May be there is something else going on... Thanks, Martin. On Tue, Feb 15, 2022 at 06:35:18AM +0100, Mirko via

Re: venv and executing other python programs

2022-02-15 Thread Martin Di Paola
ble of the venv, the program will have access to the libs installed in the environment. The same if I do: /home/user/venv/bin/python foo.py Thanks for the info! Barry Do you have a particular context where you are having troubles? May be there is something else going on... Thanks, Marti

Re: venv and executing other python programs

2022-02-17 Thread Martin Di Paola
That's correct. I tried to be systematic in the analysis so I tested all the possibilities. Your test results were unexpected for `python3 -m venv xxx`. By default, virtual environments exclude the system and user site packages. Including them should require the command-line argument `--system-

Re: library not initialized (pygame)

2022-02-19 Thread Martin Di Paola
Could you share the traceback / error that you are seeing? On Sun, May 02, 2021 at 03:23:21PM -0400, Quentin Bock wrote: Code: #imports and variables for game import pygame from pygame import mixer running = True #initializes pygame pygame.init() #creates the pygame window screen = pygame.dis

Execute in a multiprocessing child dynamic code loaded by the parent process

2022-03-06 Thread Martin Di Paola
_str,)) ch.start() The hack works but is this the correct way to do it? The following gist has the minimal example code that triggers the issue and its workaround: https://gist.github.com/eldipa/d9b02875a13537e72fbce4cdb8e3f282 Thanks! Martin. -- https://mail.python.org/mailman/listinfo/python-list

Re: Execute in a multiprocessing child dynamic code loaded by the parent process

2022-03-06 Thread Martin Di Paola
;m loading the code dynamically. [...] I won't say "the" correct way, as there are other valid ways, but there's certainly nothing wrong with this idea. Do you have some in mind? Or may be a project that I could read? Thanks! Martin -- https://mail.python.org/mailman/listinfo/python-list

Re: Execute in a multiprocessing child dynamic code loaded by the parent process

2022-03-06 Thread Martin Di Paola
Try to use `fork` as "start method" (instead of "spawn"). Yes but no. Indeed with `fork` there is no need to pickle anything. In particular the child process will be a copy of the parent so it will have all the modules loaded, including the dynamic ones. Perfect. The problem is that `fork` is t

Re: Execute in a multiprocessing child dynamic code loaded by the parent process

2022-03-06 Thread Martin Di Paola
I'm not so sure about that. The author of the plugin knows they're writing code that will be dynamically loaded, and can therefore expect the kind of problem they're having. It could be argued that it's their responsibility to ensure that all the needed code is loaded into the subprocess. Ye

Re: Execute in a multiprocessing child dynamic code loaded by the parent process

2022-03-06 Thread Martin Di Paola
e user, just trying to minimize the changes needed. And it will require some documentation for those caveats. And tests. Thanks for the brainstorming! Martin. -- https://mail.python.org/mailman/listinfo/python-list

Re: Execute in a multiprocessing child dynamic code loaded by the parent process

2022-03-07 Thread Martin Di Paola
7; in sys.modules True So the last check proves that pickle.loads imports any necessary module. Martin. On Mon, Mar 07, 2022 at 08:28:15AM +, Barry wrote: On 7 Mar 2022, at 02:33, Martin Di Paola wrote: Yes but I think that unpickle (pickle.loads()) does that plus importing any mod

Re: Execute in a multiprocessing child dynamic code loaded by the parent process

2022-03-08 Thread Martin Di Paola
Then, you must put the initialization (dynamically loading the modules) into the function executed in the foreign process. You could wrap the payload function into a class instances to achieve this. In the foreign process, you call the instance which first performs the initialization and then exe

Re: Could frozendict or frozenmap be of some use for PEP 683 (Immortal objects)?

2022-03-09 Thread Martin Di Paola
I perhaps didn't understand the PEP completely but I think that the goal of marking some objects as immortal is to remove the refcount from they. For immutable objects that would make them truly immutable. However I don't think that the immortality could be applied to any immutable object by def

Re: how to optimize the below code with a helper function

2016-04-04 Thread Martin A. Brown
#x27;test01'] = dict(cmd=['some_command', '--offset', '18', '--size', '4'], optype="set", object='inode') Then, in run_tool, something like this: subprocess.Popen(cmd, shell=False, stderr=logfile) But, th

Re: how to optimize the below code with a helper function

2016-04-04 Thread Martin A. Brown
t how to refer to that object for one of your tests. Anyway, this is just another way of answering the question of "how do I simplify this repetitive code". Good luck and enjoy, -Martin #! /usr/bin/python from __future__ import absolute_import, division, print_function impo

Re: Set type for datetime intervals

2016-04-04 Thread Martin A. Brown
It occurred to me this morning, after you posted your new library: https://pypi.python.org/pypi/intervaltree This handles overlapping ranges nicely and provides some tools for managing them. Before posting this, I checked that it works with datetime types, and, unsurprisingly, it does. Hap

Re: Set type for datetime intervals

2016-04-06 Thread Martin A. Brown
surprisingly, it does. > >Thank you! It is so much better than the one I have created. >Possibly I'll delete my own module from pypi. :-) I'm glad to have been able to help, László. And, even if you don't delete your new module, you have certainly stimulated quite a discus

Re: one-element tuples

2016-04-10 Thread Martin A. Brown
string. >>> a = '"string1",' >>> ea = eval(a) >>> len(ea), type(ea) (1, ) >>> b = '"string1","string2",' >>> eb = eval(b) >>> len(eb), type(eb) (2, ) >>> c = '"string1","string2","string3",' >>> ec = eval(c) >>> len(ec), type(ec) (3, ) Good luck in your continuing Python explorations, -Martin P.S. Where do your double-quoted strings come from, anyway? -- Martin A. Brown http://linux-ip.net/ -- https://mail.python.org/mailman/listinfo/python-list

Re: sys.exit(1) vs raise SystemExit vs raise

2016-04-12 Thread Martin A. Brown
UCCESS in every program. Clearly, in my above example the contents of the run() function look strange. Usually it has more different kinds of stuff in it. Anyway, best of luck! -Martin -- Martin A. Brown http://linux-ip.net/ -- https://mail.python.org/mailman/listinfo/python-list

Re: Looking for feedback on weighted voting algorithm

2016-04-14 Thread Martin A. Brown
tion: votes = [72, 72, 72, 72, 96, 96, 96, 48, 48, 53, 26, 26, 26, 26, 31, 31, 31, 68, 68, 91] But, don't bother! Your function can handle votes that have a float weight: >>> weight([(4, 1.3), (1, 1),]) 2.695652173913044 Have fun! -Martin -- Martin A. Brow

Re: How to track files processed

2016-04-18 Thread Martin A. Brown
es or just be intimidated by them; scary hashes!). There are lots of options, but without some more context, we can only make generic suggestions. So, I'll stop with my generic suggestions now. Have fun and good luck! -Martin #! /usr/bin/python from __future__ import print_functio

manpage writing [rst, asciidoc, pod] was [Re: What should Python apps do when asked to show help?]

2016-04-29 Thread Martin A. Brown
mentParser instances, And, of course, make sure to use version control for your documentation. These git manpages may be helpful for the uninitiated (joke, joke): https://git-man-page-generator.lokaltog.net/ # -- humour! Good luck, -Martin [0] http://docutils.sourceforge.net/docs/user/rst/quick

Re: redirecting stdout and stderr to /dev/null

2016-05-07 Thread Martin A. Brown
en(cmd, stdout=devnull, stderr=devnull) retcode = proc.wait() if retcode != 0: raise FlamingHorribleDeath You will have to define FlamingHorribleDeath or figure out what you want to do in the event of the various different types of failureif you don't then, you'll just see this: NameError: name 'FlamingHorribleDeath' is not defined Good luck, -Martin -- Martin A. Brown http://linux-ip.net/ -- https://mail.python.org/mailman/listinfo/python-list

Re: Average calculation Program *need help*

2016-05-12 Thread Martin A. Brown
gestion #3: -- Break the problem down even smaller (Rustom Mody appears to have beat me to the punch on that suggestion, so I'll just point to his email.) Hint #1: What is the value of your variable totalScores each time through the loop? Does it ever get reset? Good luck with your degubbing! -Martin -- Martin A. Brown http://linux-ip.net/ -- https://mail.python.org/mailman/listinfo/python-list

Best way to (re)load test data in Mongo DB

2019-02-23 Thread Martin Sand Christensen
ntil now.) Am I being too difficult? I haven't been able to find much written about this topic: discussions about mocking drown out everything else the moment you mention 'mongo' and 'test' in the same search. Martin -- https://mail.python.org/mailman/listinfo/python-list

Re: Best way to (re)load test data in Mongo DB

2019-02-24 Thread Martin Sand Christensen
e is to eventually release it as a sort of example project of how to build a complex web application. Testing is particularly important to me since it's too often being overlooked in tutorials, or it only deals with trivial examples. Martin -- https://mail.python.org/mailman/listinfo/python-list

Re: Best way to (re)load test data in Mongo DB

2019-02-25 Thread Martin Sand Christensen
n given that I only have about a handful entries for each collection. > Regarding question #2, you can always directly give an _id for documents > if you want: > > https://api.mongodb.com/python/current/api/bson/objectid.html#bson.objectid.ObjectId Cheers. I'll give it another go. Martin -- https://mail.python.org/mailman/listinfo/python-list

subprocess svn checkout password issue

2019-03-15 Thread Martin De Kauwe
Hi, I'm trying to write a script that will make a checkout from a svn repo and build the result for the user. However, when I attempt to interface with the shell it asks the user for their filename and I don't know how to capture this with my implementation. user = "XXX578" root="https://trac

Re: subprocess svn checkout password issue

2019-03-15 Thread Martin De Kauwe
On Saturday, 16 March 2019 16:50:23 UTC+11, dieter wrote: > Martin De Kauwe writes: > > > I'm trying to write a script that will make a checkout from a svn repo and > > build the result for the user. However, when I attempt to interface with > > the shell it ask

Re: Small python24.dll / how to strip off asian codecs to separate package(s) ?

2005-09-23 Thread Martin v. Löwis
Robert wrote: > Or how to build one? Just download the source, and follow the instructions in PCBuild/readme.txt. Then, edit the pythoncore project to remove the files you don't want to include, and edit config.c to remove the dangling references. Regards, Martin -- http://mail.py

Re: Small python24.dll / how to strip off asian codecs to separate package(s) ?

2005-09-24 Thread Martin v. Löwis
ntenance if there are only few external .pyd files in the standard distribution. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Memory stats

2005-09-26 Thread Martin v. Löwis
l objects (container or not), you have to compile a debug build of Python. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Fixes since 2.4.2c1?

2005-09-29 Thread Martin v. Löwis
piler you used would be essential. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: RELEASED Python 2.4.2 (final)

2005-09-29 Thread Martin v. Löwis
version number of python24.dll in the pydotorg installer be higher than the one in the ActivePython installer, and shouldn't then Windows Installer overwrite the DLL? The version in the pydotorg installer is 2.4.2150.1012. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: RELEASED Python 2.4.2 (final)

2005-09-30 Thread Martin v. Löwis
Trent Mick wrote: > I suppose that is possible. Martin, does python-2.4.2.msi install > python24.dll to the Python install dir for a "per-user" installation? Yes, that is supported. It would be good if Bugs could confirm that he only deleted the wrong python24.dll, with the

Re: What encoding is used when initializing sys.argv?

2005-09-30 Thread Martin v. Löwis
or is it the MS VC runtime?) converts them to characters using the CP_ACP code page. Kind regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: RELEASED Python 2.4.2 (final)

2005-10-02 Thread Martin v. Löwis
though, since the installer should have noticed that the 2.4.2 version is newer than the 2.4.1 one (and indeed, in a test installation, it did so correctly). It is probably too late to recreate all details, so we should just watch whether it happens again. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Unicode charmap decoders slow

2005-10-03 Thread Martin v. Löwis
Tony Nelson wrote: > Is there a faster way to decode from charmaps to utf-8 than unicode()? You could try the iconv codec, if your system supports iconv: http://cvs.sourceforge.net/viewcvs.py/python-codecs/practicecodecs/iconv/ Regards, Martin -- http://mail.python.org/mailman/listinfo/pyt

Re: Unicode charmap decoders slow

2005-10-03 Thread Martin v. Löwis
uot;".translate(). Well, did you try a pure-Python version yourself? table = [chr(i).decode("mac-roman","replace") for i in range(256)] def decode_mac_roman(s): result = [table[ord(c)] for c in s] return u"".join(result) How much faster than the stand

Re: Idle

2005-10-04 Thread Philippe C. Martin
Hi, I remember having that when the wrong version of TCL/TK was installed on my system. Regards, Philippe Hrvoje Blazevic wrote: > How do I get Idle to work on Linux? > > I've tried to compile 2.4.2 on Fedora core 4, and Suse 9.3, but Idle is > after make install either missing (Fedora), or

Re: Call C functions from Python

2005-10-04 Thread Martin v. Löwis
eds to release, you need to do so before returning from Py_DoSomeStuff. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Replacing utf-8 characters

2005-10-05 Thread Martin v. Löwis
w or care whether any of its parameters is encoded in UTF-8. Also not sure where you got the impression UTF-8 could have to do anything with this. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Compile as static

2005-10-06 Thread Martin v. Löwis
[EMAIL PROTECTED] wrote: > However the executable size is always the same :/ Please assist. At a minimum, you should edit Modules/Setup to compile all extension modules in. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: PyObject_New

2005-10-07 Thread Martin v. Löwis
plete: none of the state of the new object gets initialized in the fragment you are showing. So it likely crashes because the members of the object are stray pointers or some such, and accessing them causes a crash. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Daisy Daisy, give me your answer do

2005-10-09 Thread Martin P. Hellwig
Michael Goettsche wrote: > You're asking "tech geekers" and "morons" to do this job? Isn't that a task > for somebody more professional like you? I think he's doing a shot to the position of open-source leader, judging on the replies he has got till so far, that shot was not really effective.

Re: [regex] case-splitting strings in unicode

2005-10-09 Thread Martin v. Löwis
"+u"".join(uni_upper)+u"]" On my machine, this takes approximately one second to compute, which may or may not be too much as a startup cost. To speed this up, you could dump the resulting uni_re into a Python source file. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: how to capture key pressing

2005-10-10 Thread Philippe C. Martin
Hi, Look at curses. Philippe billie wrote: > Hi all. I'm searching for a module that permit me to costantly log every > key pressed on the keyboard and eventually assign it a function (e.g. when > "esc" is pressed: exit program"). -- http://mail.python.org/mailman/listinfo/python-list

Re: Looking for info on Python's memory allocation

2005-10-11 Thread Martin v. Löwis
Fredrik Lundh wrote: >>>>I = iter(L) >>>>I > > > >>>>len(I) > > 3 [...] > (it's probably not a good idea to rely on this behaviour...) I believe this has been classified as a bug in Python 2.4, which will be undone in Python 2.5.

Re: Python name lookups / Interning strings

2005-10-11 Thread Martin v. Löwis
esentative for all strings equalling "close"). If a and b are variables referring to interned strings, 'a==b' implies 'a is b' (whereas usually only the reverse is true). HTH, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Why asci-only symbols?

2005-10-12 Thread Martin v. Löwis
bjects should support Unicode getattr/setattr (potentially raising AttributeError, of course) - open issue: what to do on the C API (perhaps nothing, perhaps allowing UTF-8) Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: C Extension - return an array of longs or pointer?

2005-10-12 Thread Martin v. Löwis
Brandon K wrote: > PyTuple_SET_ITEM(py, i, Py_BuildValue("l",*result[i]); Using Py_BuildValue is overkill here. PyInt_FromLong will do just as well. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: installer for amd64 build of python?

2005-10-13 Thread Martin v. Löwis
compatible (namely, processing of unsupported signal numbers in signal(3)). Because of that, Python will raise an assertion failure in the debug build. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Microsoft Hatred FAQ

2005-10-15 Thread Martin P. Hellwig
Jeroen Wenting wrote: > > Without Microsoft 90% of us would never have seen a computer more powerful > than a ZX-81 and 90% of the rest of us would never have used only dumb > mainframe terminals. At the time you "PC" guys where hacking around monochrome green and a bit lighter green screens

Re: Microsoft Hatred FAQ

2005-10-15 Thread Martin P. Hellwig
John Bokma wrote: > You mean like the lamp that keeps burning forever, like Philips has? > No more like all the hydrogen technologies that shell has in their possession for the last decades and only recently has begun to restart those projects. >> Although Commodore where never serious compet

Re: Why asci-only symbols?

2005-10-16 Thread Martin v. Löwis
stem default encoding (i.e. ASCII) is assumed. This only really works if the default encoding really *is* ASCII. Otherwise, equal strings might not hash equal, in which case you wouldn't find them properly in a dictionary. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Why asci-only symbols?

2005-10-17 Thread Martin v. Löwis
Bengt Richter wrote: > Well, what will be assumed about name after the lines > > #-*- coding: latin1 -*- > name = 'Martin Löwis' > > ? Are you asking what is assumed about the identifier 'name', or the value bound to that identifier? Currently, the identif

A Logging System for Python

2005-10-17 Thread Philippe C. Martin
Dear all, I have been looking for a logging system and have come across http://www.red-dove.com/python_logging.html. As the site refers to PEP 282, I assume this package is a potential contender for integration in the Python distribution. Am I correct and if so is there any trend to include it i

Re: A Logging System for Python

2005-10-17 Thread Philippe C. Martin
Even better ! Thanks, Philippe Robert Kern wrote: > Philippe C. Martin wrote: >> Dear all, >> >> I have been looking for a logging system and have come across >> http://www.red-dove.com/python_logging.html. >> >> As the site refers to PEP 28

Re: wxPython + pyPlot

2005-10-18 Thread Philippe C. Martin
I think wxWidget comes with a sample Philippe Robert wrote: > Maebe, does anyone have some examples with wxPython and pyplot? > > Thanks again, > Robert -- http://mail.python.org/mailman/listinfo/python-list

Re: Vim capable IDE?

2005-10-18 Thread Philippe C. Martin
True and I had to give up emacs when I went to eclipse, but it was well worth it. I seem to recall that sourcenavigator allowed to configure an external editor (or maybe was it sniff+ ?) Regards, Philippe Chris Lasher wrote: > Thanks for your responses, guys. I can't get the PIDA page to come

Re: wxPython + pyPlot

2005-10-18 Thread Philippe C. Martin
My mistake, I understood plot (as in "from wx.lib.plot import *" that comes with wxwidgets and which does have a demo) Sorry, Philippe Robert wrote: > Philippe C. Martin wrote: > >> I think wxWidget comes with a sample >> >> Philippe > Yes I use it,

Re: Why asci-only symbols?

2005-10-18 Thread Martin v. Löwis
do. This is indeed what you should do. In Python 3, you can omit the u, as the string type will go away (and be replaced with the Unicode type). > (Please excuse the use of your name, which has a handy non-ascii letter ;-) No problem with that :-) Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Extention Module/ list of chars-> string

2005-10-19 Thread Martin v. Löwis
Tuvas wrote: > A. Change a list of chars to a single string or > B. Read a list of chars in an extention module Either is possible, but I recommend to do A: data = ''.join(data) Then pass the modified data to the extension module. Regards, Martin -- http://mail.python.org/

http/urlib pos/get question (newbie)

2005-10-20 Thread Philippe C. Martin
Hi, (I am _very_ new to web programming) I am writing a client module (browser plugin) and server module (Python CGI) that need to exchange information. I want the transaction to be intiated when the client accesses the link. I need data to go back and forth between the client and the server (c

Looking for client+server sample code (httplib and/or urlib)

2005-10-21 Thread Philippe C. Martin
Hi, Are there such samples/tutorial out there ? Regards, Philippe -- http://mail.python.org/mailman/listinfo/python-list

Re: http/urlib pos/get question (newbie)

2005-10-21 Thread Philippe C. Martin
I have found what I needed ... in one of my books :E) regards, Philippe Philippe C. Martin wrote: > Hi, > (I am _very_ new to web programming) > > I am writing a client module (browser plugin) and server module (Python > CGI) that need to exchange information. > > I wa

Re: Looking for client+server sample code (httplib and/or urlib)

2005-10-21 Thread Philippe C. Martin
I have found what I needed ... in one of my books :E) Philippe Philippe C. Martin wrote: > Hi, > > Are there such samples/tutorial out there ? > > Regards, > > Philippe -- http://mail.python.org/mailman/listinfo/python-list

how to modify text in html form from python

2005-10-21 Thread Philippe C. Martin
Hi, I am trying to change the data in a form field from python. The following code does not crash but has no effect as if "form" is just a copy of the original html form. Must I recreate the form order to do that ? My point is for the client to be able to re-read the modified data. Thanks, P

Re: how to modify text in html form from python

2005-10-21 Thread Philippe C. Martin
ion, sorry. Philippe Philippe C. Martin wrote: > Hi, > > I am trying to change the data in a form field from python. The following > code does not crash but has no effect as if "form" is just a copy of the > original html form. > > Must I recreate the form order to

Re: how to modify text in html form from python

2005-10-21 Thread Philippe C. Martin
have not yet found an easier way. Regards, Philippe Paul McNett wrote: > Philippe C. Martin wrote: >> PS: If my question is not clear, I am trying to "share" the form between >> the client and server. >> >> just as many sites out there allow you to m

Re: how to modify text in html form from python

2005-10-21 Thread Philippe C. Martin
the form field and gives it to its local smart card ... (this a couple of time) -) the cgi script gets the final verdict from the server smart card and acts accordingly. I hope that is clearer. Regards, Philippe Mike Meyer wrote: > "Philippe C. Martin" <[EMAIL PROTECTED

Re: how to modify text in html form from python

2005-10-21 Thread Philippe C. Martin
Mike Meyer wrote: > "Philippe C. Martin" <[EMAIL PROTECTED]> writes: > > > > Some. To continue clarifying: > > The phrase "cgi script" refers to a server-side script that is run in > response to the user clicking something on the client. Tha

Re: how to modify text in html form from python

2005-10-21 Thread Philippe C. Martin
I don't want to open another socket/port but stick to http:80 Regards, Philippe Mike Meyer wrote: > "Philippe C. Martin" <[EMAIL PROTECTED]> writes: > >> Mike, >> >> Here is what I am trying to do: >> >> WHAT >> -)

Re: how to modify text in html form from python

2005-10-21 Thread Philippe C. Martin
). Thanks anyway. Regards, Philippe Paul Rubin wrote: > "Philippe C. Martin" <[EMAIL PROTECTED]> writes: >> * HOW (if there's a better way let me know please) ** >> As I have not found any better solution yet, I am trying to do the >> foll

Re: how to modify text in html form from python

2005-10-21 Thread Philippe C. Martin
Mike Meyer wrote: > "Philippe C. Martin" <[EMAIL PROTECTED]> writes: > >> I feel fairly stupid ... but to my defense in the past 17 years of >> coding, i've only spent 3 days looking at web stuff: >> >> I now can understand how "writing&q

Re: how to modify text in html form from python

2005-10-21 Thread Philippe C. Martin
Mike Meyer wrote: > > I don't know much about plugins. I believe they get started when the > page loads, which gives you a chance to do the authentication when you > want it done. Well not in this case actually: the user triggers the plugin which in turn open the url, so the connection is "owne

Re: how to modify text in html form from python

2005-10-21 Thread Philippe C. Martin
some thinking before I ask more questions. Regards, Philippe Mike Meyer wrote: > "Philippe C. Martin" <[EMAIL PROTECTED]> writes: >> Mike Meyer wrote: >>> I don't know much about plugins. I believe they get started when the >>> page loads, w

pyHook example.py brakes windows dead keys mechanisme

2005-10-22 Thread Martin P. Hellwig
Hi all, I noticed that the "dead keys"* mechanism (XPSP2 NL, keyboard map US, input language Dutch) doesn't work when running the pyHooks (python 241) example. Instead of ö ("o) I immediately get ""o. If I close the pyHooks example the expected behavior returns. Is there a way how I can get bot

python cgi script not understood as html

2005-10-24 Thread Philippe C. Martin
Hi, The following code outputs the actual HTML text to the browser, not the interpreted text. Any idea ? Regards, Philippe import cgi import logging import auth #this is the one you must implement (or use SCF ;-) html_ok = """ Content-Type: text/html\n http://www.w3.org/TR/html4/loose.dtd";>\n

Re: python cgi script not understood as html

2005-10-24 Thread Philippe C. Martin
the title should say "python cgi script html output not understood as html" Philippe C. Martin wrote: > Hi, > > The following code outputs the actual HTML text to the browser, not the > interpreted text. > > Any idea ? > > Regards, > > Philippe >

Re: python cgi script not understood as html

2005-10-24 Thread Philippe C. Martin
Many thanks !! Regards, Philippe Mitja Trampus wrote: > Philippe C. Martin wrote: >> Hi, >> >> The following code outputs the actual HTML text to the browser, not the >> interpreted text. >> >> Any idea ? >> >> html_ok = ""&quo

Re: python cgi script not understood as html

2005-10-24 Thread Philippe C. Martin
It is, thanks. Philippe Peter Hansen wrote: > Philippe C. Martin wrote: >> The following code outputs the actual HTML text to the browser, not the >> interpreted text. >> >> html_ok = """ >> Content-Type: text/html\n >> > "http://

pyxpcom and firefox

2005-10-25 Thread Philippe C. Martin
Hi, I write this post here because I do not manage to get in touch with mozilla dev people: *** [EVAL-IN] irc.mozilla.org [ERROR] ReferenceError: irc is not defined *** I have two questions: 1) has anyone compiled/installed pyxpcom with firefox 1.5xx ? 2) is there a plan to make it

SCWEB 0.1 to be released

2005-10-25 Thread Philippe C. Martin
quite welcome: www.snakecard.com/WordPress Regards, Philippe Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Microsoft Hatred FAQ

2005-10-25 Thread Martin P. Hellwig
Not Bill Gates wrote: > [EMAIL PROTECTED] wrote... >> On Tue, 25 Oct 2005 15:35:47 +, Not Bill Gates wrote: >> >>> Heck, I dunno. Like you, I don't even really care all that much. >> You don't care that innovation in desktop software has been crippled by >> the actions of the monopoly player

Re: How to statically link Python with ncurses and readline?

2005-10-25 Thread Martin v. Löwis
y, libreadline.so and libncurses.so are in the dependencies > Any clue as to what's going on here would be much appreciated. Instead of linking with -lncurses, link explicitly with /usr/lib/libncurses.a; or else using -static as a linker flag. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

<    10   11   12   13   14   15   16   17   18   19   >