Re: Force Python ast to emit lines no longer than $length

2021-01-21 Thread Samuel Marks
I ended up adding word-wrap support directly to my code-generation: https://github.com/SamuelMarks/doctrans/commit/6147b21e168b66623aa1be95cb38b1969daa5147 Samuel Marks Charity <https://sydneyscientific.org> | consultancy <https://offscale.io> | open-source <https://gith

Force Python ast to emit lines no longer than $length

2021-01-19 Thread Samuel Marks
I've written a library that works at the ast level. Sometimes the generated output goes over the linter line length limit. "foo_bar_can_haz_foo_bar_can_haz_foo_bar_can_haz_foo_bar_can_haz_foo_bar_can_haz_foo_bar_can_haz" How do I generate this kind of code instead? "foo_bar_can_haz_foo_bar_can_h

Static typing—with annotations—function name & arguments, or result of call, or string

2020-10-22 Thread Samuel Marks
lopped on for further analysis down the line? - So it can easily generate into `choices` for argparse? [which will need to be subclassed in order to enable that "--optimizer 'Adam' 'learning_rate = True'" syntax] * https://github.com/SamuelMarks/ml-params-tensorflow

Re: CLI parsing—with `--help` text—`--foo bar`, how to give additional parameters to `bar`?

2020-10-16 Thread Samuel Marks
t; need to play on the command line. > > > > And yea, I’ve written a command line parsing function in C a long time > ago. I thought that really cool at the time. I wouldn’t want to do it now. > > > > Karen. > > > >> On Oct 15, 2020, at 9:58 PM, Samuel M

Re: Re: CLI parsing—with `--help` text—`--foo bar`, how to give additional parameters to `bar`?

2020-10-15 Thread Samuel Marks
amuelMarks/ml-params/blob/d1fb184/ml_params/__main__.py#L89 [I didn't know `getopt` was exposed otherwise I'd use that , but there has to be a solution just using argparse?] Samuel Marks Charity <https://sydneyscientific.org> | consultancy <https://offscale.io> | open-sou

Re: CLI parsing—with `--help` text—`--foo bar`, how to give additional parameters to `bar`?

2020-10-15 Thread Samuel Marks
to expose this as CLI options. `--optimizer Adam` is a good first step, but it should error if I try and give it `momentum`. The comma syntax is my favourite so far. I guess I'll just have to write a validator outside the CLI parser to handle this… Samuel Marks Charity <https://sy

Re: CLI parsing—with `--help` text—`--foo bar`, how to give additional parameters to `bar`?

2020-10-15 Thread Samuel Marks
Simpson wrote: > One other thing: > > On 15Oct2020 20:53, Samuel Marks wrote: > >Idea: preprocess `sys.argv` so that this syntax would work > >`--optimizer Adam[learning_rate=0.01]`* > > > >*square rather than round so as not to require escape characters or >

Re: CLI parsing—with `--help` text—`--foo bar`, how to give additional parameters to `bar`?

2020-10-15 Thread Samuel Marks
Maurer wrote: > Samuel Marks wrote at 2020-10-15 20:53 +1100: > > ... > >To illustrate the issue, using `ml-params` and ml-params-tensorflow: > > ... > >What's the right solution here? > > While Python provides several modules in its standard library > to pr

CLI parsing—with `--help` text—`--foo bar`, how to give additional parameters to `bar`?

2020-10-15 Thread Samuel Marks
oach wouldn't give nice `--help` text. What's the right solution here? Thanks, Samuel Marks Charity <https://sydneyscientific.org> | consultancy <https://offscale.io> | open-source <https://github.com/offscale> | LinkedIn <https://linkedin.com/in/samuelmarks> -- https://mail.python.org/mailman/listinfo/python-list

Re: ABC with abstractmethod: kwargs on Base, explicit names on implementation

2020-08-29 Thread Samuel Marks
ole `Animal` [duck type] trick where `Animal` could actually be `Dog` or `Horse` [making the obvious Base `ABC` & `abstractmethod` approach 'wrong'] 1. Each implementer framework can maintain wildly different internal APIs, making more hardcore integrations—in a multi-ML sense—far

Re: ABC with abstractmethod: kwargs on Base, explicit names on implementation

2020-08-29 Thread Samuel Marks
I really am looking for handling both interfaces in a straightforward manner. Thanks for your suggestions, Samuel Marks Charity <https://sydneyscientific.org> | consultancy <https://offscale.io> | open-source <https://github.com/offscale> | LinkedIn <https://linkedin.com/i

Re: ABC with abstractmethod: kwargs on Base, explicit names on implementation

2020-08-26 Thread Samuel Marks
lso a little project I wrote that `import ast`). What are my options here? - It doesn't seem like the metaclass or decorator approaches will help here… Samuel Marks Charity <https://sydneyscientific.org> | consultancy <https://offscale.io> | open-source <https://github.com/of

ABC with abstractmethod: kwargs on Base, explicit names on implementation

2020-08-24 Thread Samuel Marks
: def foo(self, a, b): """ :param a: var :type a: ```int``` :param b: var :type b: ```int``` """ super(Pharm, self).foo(a=a) Thanks, Samuel Marks Charity <https://sydneyscientific.org> | consultancy &

Re: [poliastro-dev] ANN: poliastro 0.13.0 released 🚀

2019-08-10 Thread Samuel Lelièvre
Le mar. 6 août 2019 à 08:33, Samuel Dupree a écrit : > Juan Luis Cano, > > When will poliastro ver. 0.13.0 become available from Anaconda? At the > time of this note, only ver. 0.12.0 is available. > > Lastly what is the recommended procedure to update poliastro from vers.

Re: Running python from pty without prompt

2016-12-14 Thread Samuel Williams
Here are some examples of different languages: https://github.com/ioquatix/script-runner/blob/master/examples/python-eot.py -- https://mail.python.org/mailman/listinfo/python-list

Re: Running python from pty without prompt

2016-12-13 Thread Samuel Williams
Michael, yes. FYI, I found out why this works. Pressing Ctrl-D flushes the input buffer. If you do this on an empty line, it causes read(...) to return 0 which Ruby considers end of input for the script, but the pipe is not closed. -- https://mail.python.org/mailman/listinfo/python-list

Re: Running python from pty without prompt

2016-12-09 Thread Samuel Williams
Just in case it's not clear, this is running on a (virtual) PTY. -- https://mail.python.org/mailman/listinfo/python-list

Using SSML in Python script/program

2016-04-14 Thread Samuel M.
I need to use SSML (Synthesized Speech Markup Language) to play an audio file with the tag in my Alexa Skill (as per Amazon's instructions). Problem is, I don't know how to use SSML with Python. I know I can use it with Java but I want to build my skills with Python. I've looked all over, but

Dependencies from git aren't being installed? (setuptools, pip)

2015-02-18 Thread Samuel Marks
I'm sure I've just misconfigured my setup.py, requirements.txt and/or project structure, but I've tried: * install_requires * requirements.txt * install_requires + dependency_links With (for install_requires): * bettertutors_sql_models==dev * bettertutors_sql_models For requirements.txt, depende

OOP no Python

2014-06-26 Thread Samuel David
não é suportado pelo Delphi? A pergunta pode parecer um pouco capciosa, mas temos uma vertente forte de Delphi na empresa e preciso de argumentos sólidos para expor a área de desenvolvimento antes de decidirmos qual linguagem iremos adotar para este novo projeto. Obrigado, Samuel Costa

Re: How to read a directory path from a txt file

2014-06-02 Thread Samuel Kamau
On Monday, June 2, 2014 12:24:59 PM UTC-4, Denis McMahon wrote: > On Mon, 02 Jun 2014 08:13:23 -0700, Samuel Kamau wrote: > > > > > I have permission issues with my web server. > > > > Hacks to fix permissions problems are dangerous. There is probably a >

Re: How to read a directory path from a txt file

2014-06-02 Thread Samuel Kamau
On Monday, June 2, 2014 10:18:25 AM UTC-4, Samuel Kamau wrote: > I have created a txt file with various paths to directories. The paths look > like this > > /home/wachkama/Desktop/api/genshi > > /home/wachkama/Desktop/www/portal/schedule > > /home/wachkama/

How to read a directory path from a txt file

2014-06-02 Thread Samuel Kamau
I have created a txt file with various paths to directories. The paths look like this /home/wachkama/Desktop/api/genshi /home/wachkama/Desktop/www/portal/schedule /home/wachkama/Desktop/show/help.genshi How do i read this paths in python ? -- https://mail.python.org/mailman/listinfo/python-list

Re: 2 + 2 = 5

2012-07-15 Thread samuel . marks
On Friday, July 6, 2012 8:39:58 AM UTC+10, Andrew Cooper wrote: > On 05/07/2012 22:46, Evan Driscoll wrote: > > On 01/-10/-28163 01:59 PM, Alexander Blinne wrote: > >> 5+0 is actually 4+0, because 5 == 4, so 5+0 gives 4. > >> 5+1 is actually 4+1, which is 5, but 5 is again 4. > >> 5+2 is 4+2 which

subprocess and gvfs-mount

2010-05-18 Thread Samuel Bancal
ch the output from keyboard is inhibited... (like while typing password) - When the user runs this script by "double-click > Run" (not "Run in terminal") ... there is no interaction with the user. I also did some try with subprocess.Popen ... with no success yet... Thanks for any c

Re: Is Python a functional programming language?

2010-05-10 Thread Samuel Williams
Thanks to everyone for their great feedback, it is highly appreciated. Kind regards, Samuel -- http://mail.python.org/mailman/listinfo/python-list

Is Python a functional programming language?

2010-05-10 Thread Samuel Williams
... is this the case or have I been misinformed? Finally, even if Python supports functional features, is this a model that is used often in client/application code? Kind regards, Samuel -- http://mail.python.org/mailman/listinfo/python-list

Re: Teaching Programming

2010-05-04 Thread Samuel Williams
I personally like indentation. I just wonder whether it is an issue that some people will dislike. But anyway, I updated the language comparison to remove this critique. Kind regards, Samuel On 4/05/2010, at 9:22 PM, Jean-Michel Pichavant wrote: > André wrote: >> To Samuel Williams

Re: new extension generator for C++

2010-05-04 Thread Samuel Williams
Dear Rouslan, It looks interesting. I say go for it. You will learn something and might make some improvements on existing ideas. I recommend putting the code on www.github.com Kind regards, Samuel On 4/05/2010, at 8:44 AM, Rouslan Korneychuk wrote: > Hi, I'm new here. I'm

Re: Teaching Programming

2010-05-03 Thread Samuel Williams
Dear Chris, I will take your feedback into consideration and let you know the outcome when I have time to think about it. Again, I appreciate your thoughts. Thanks for taking the time to think about the comparison chart. Kind regards, Samuel On 4/05/2010, at 1:58 AM, Chris Rebert wrote

Re: Teaching Programming

2010-05-03 Thread Samuel Williams
e up on the Perl mailing list in order to get advice. Would you recommend changing Perl to orange? Thanks for your well thought out response, it is very helpful. Kind regards, Samuel On 4/05/2010, at 1:06 AM, Chris Rebert wrote: > On Mon, May 3, 2010 at 5:29 AM, Chris Rebert wrote: >>

Teaching Programming

2010-05-03 Thread Samuel Williams
Any other suggestions or ideas for the Python page would be fantastic, and any suggestions to other pages in general is also very helpful. http://programming.dojo.net.nz/ Kind regards, Samuel -- http://mail.python.org/mailman/listinfo/python-list

Re: generator expression works in shell, NameError in script

2009-06-17 Thread Steven Samuel Cole
Both zip and enumerate do the trick. Thanks for the pointers, that's 2 more built-ins under my belt :-) Still don't really understand why my initial code didn't work, though... Thanks everyone! :-) -- http://mail.python.org/mailman/listinfo/python-list

Re: "Exploding" (**myvariable) a dict with unicode keys

2009-06-02 Thread Samuel Wan
I started using python last week and ran into exceptions thrown when unicode dictionary keys are exploded into function arguments. In my case, decoded json dictionaries did not work as function arguments. There was a thread from Oct 2008 (http://www.gossamer-threads.com/lists/python/python/684379)

Apache/mod_python: Registering a request handler dynamically

2008-12-28 Thread Samuel
d') RequestHandler(index) --- So at the time at which RequestHandler() is created, I need a way to make sure that mod_python calls to the RequestHandler instead of the normal handler, whenever a new request is made. Any idea? -Samuel -- http://mail.python.org/mailman/listinfo/python-list

Re: Python / Debian package dependencies

2008-11-21 Thread Steven Samuel Cole
ls (if it is really a dependancy) in the Depends field. If it not the case, do it manually. Do not forget to check and notify the version of this dependancies. Regards. Stephane 2008/11/21 Steven Samuel Cole <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> Hey Paul thanks

Re: Python / Debian package dependencies

2008-11-20 Thread Steven Samuel Cole
ror I found out that I seem to have to use the package name without the python- bit, because then stdeb does run without error. If the name was really the issue, I would at least expect stdeb to report an error about an unknown package or so... Cheers, Stefan 2008/11/21 Steven Samuel Cole <[E

Re: Python / Debian package dependencies

2008-11-20 Thread Steven Samuel Cole
ancies, it will notify only and will not install the > package. Dependancies installations are managed by the front-end to dpkg > (aptitude or apt). This is not a python issue that you are facing to. > Cheers > Stephbul > > 2008/11/20 Steven Samuel Cole <[EMAIL PROTECTED]> >>

Python / Debian package dependencies

2008-11-19 Thread Steven Samuel Cole
Hi all, I am trying to build a debian package for my python modules using stdeb and dpkg-buildpackage. The package building itself works, I also managed to have an entry point created and I can use my python modules on the Ubuntu virtual machine I use to test the package. The problem is that my m

Eric IDE Autocomplete

2008-11-19 Thread Samuel Morhaim
If anyone is familiar with this editor, can you tell me how to enable autocomplete and tooltips, IDLE-style?I add the API thing, and everything but it display a lot of methods that dont make sense in the context.. for example if i do import sys sys. <-- Ctrl Space.. I get a list of about 10

wxPython Crashes with basic example

2008-11-19 Thread Samuel Morhaim
Hi, I am trying to run the basic wxpython example as seen here http://www.zetcode.com/wxpython/firststeps/ and everytime i run it, it crashes python/wxpython .. meaning it doesnt close gracefully. The error I get is Problem signature: Problem Event Name: APPCRASH Application Name: pythonw.exe

Re: Resizing Tif's to smaller gifs adds pixels

2008-10-21 Thread Samuel
Scott, I appreciate the quick response, but I need this in a GIF format. Samuel On Oct 21, 3:46 pm, Scott David Daniels <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > ...I need to scale a TIFF image from 1925x588 px to a GIF of 600xnnn px. > > I've tried

Re: Using subprocess module to launch a shell shell script that itself forks a process

2008-10-08 Thread Samuel A. Falvo II
On Oct 8, 11:31 am, "Samuel A. Falvo II" <[EMAIL PROTECTED]> wrote: > I removed the stdin=PIPE argument, and this works.  Many thanks for > bringing this to my attention. OK, I am confused. After observing a bug where the code works "every other time", like clock

Re: Using subprocess module to launch a shell shell script that itself forks a process

2008-10-08 Thread Samuel A. Falvo II
On Oct 8, 11:24 am, "Samuel A. Falvo II" <[EMAIL PROTECTED]> wrote: > It does not expect input from stdin.  However, this does not affect > any OTHER scripts or commands I run. OK, so, I'm very confused as to why this would matter. I removed the stdin=PIPE argument, a

Re: Using subprocess module to launch a shell shell script that itself forks a process

2008-10-08 Thread Samuel A. Falvo II
On Oct 7, 6:23 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > Is your shell script doing something else, apart from invoking the java   > process? Obviously, yes. The script is some 150 lines long. But the hang-up occurs because of the forked Java process, not the other lines. > If not, y

Re: Quality control in open source development

2008-10-08 Thread Samuel A. Falvo II
On Oct 8, 8:43 am, Dave <[EMAIL PROTECTED]> wrote: > With the open source licenses that allow redistribution of modified > code, how do you keep someone unaffiliated with the Python community > from creating his or her own version of python, and declaring it to be > Python 2.6, or maybe Python 2.7

Using subprocess module to launch a shell shell script that itself forks a process

2008-10-07 Thread Samuel A. Falvo II
I have a shell script script.sh that launches a Java process in the background using the &-operator, like so: #!/bin/bash java ... arguments here ... & In my Python code, I want to invoke this shell script using the Subprocess module. Here is my code: def resultFromRunning_(command): """I

SPE restore defaults

2008-09-23 Thread Samuel Morhaim
Hi, I am sorry if this is a bit off topic... I downloaded SPE, but i changed the config option by mistake to a Skin only for Mac... so everytime i start SPE it crashes. I tried uninstalling, but it didnt work, it seems the value is in the registry, but i couldnt find it. Can anyone help? (Spe fo

generate methods at runtime, but the wrong one gets called

2008-08-25 Thread Steven Samuel Cole
Hello, I am writing an application that controls robots. Different robots can do different kinds of movements, such as e.g. open gripper, rotate gripper, etc. My RobotControl class should support all kinds of robots. I therefore delegate the actual control work to extra control-specific classes, o

Re: Can't use DB name with dashes using pymssql ???

2008-08-13 Thread Samuel Morhaim
eport this as a bug? Can somebody point me in the right direction? Thank you. On Wed, Aug 13, 2008 at 6:30 PM, Samuel Morhaim <[EMAIL PROTECTED]>wrote: > I believe there is a bug in Python.. _mssql ...I am not too familiar > with Python yet, but after adding several breakpoin

Re: Can't use DB name with dashes using pymssql ???

2008-08-13 Thread Samuel Morhaim
(of course because the DB without the - doesnt exist... ) please help... thanks. On Wed, Aug 13, 2008 at 4:54 PM, Samuel Morhaim <[EMAIL PROTECTED]>wrote: > I tried: > > import sys > import pymssql > > db = 'Gcare4UI-B6_3_dev' > > conn = pymssql.conne

Can't use DB name with dashes using pymssql ???

2008-08-13 Thread Samuel Morhaim
I tried: import sys import pymssql db = 'Gcare4UI-B6_3_dev' conn = pymssql.connect (host = "localhost", user = "myname", password = "mypassword", database = db) And this returns an error saying Could not locate entry i

Python + Some sort of Propel + Creole

2008-08-12 Thread Samuel Morhaim
Hi, I come from an extensive background developing webapps with Symfony... Symfony uses Propel/Creole a lot. Is there something similar to Propel/Creole for Python? I found a few DB abstraction layers (Creole) but I am not sure which one is the best.. can somebody point me to a good one? Also ca

wxPython IDE question

2008-08-09 Thread Samuel Morhaim
Hi, I know this has been asked many times, but I can't seem to find a real good IDE for wxPython. I look at an application such as testuff.com and I am sure it was written using wxPython, however the GUI is so clean and robust that I can't imagine them not using an IDE with those characteristics.

Re: Why does python not have a mechanism for data hiding?

2008-06-10 Thread Samuel Bayer
Jonathan Gardner wrote: Let me share my personal insight. I used Python for a mission-critical application that needed, in effect, almost 100% uptime with superior throughput. In other words, it was a very fine piece of art that needed to be precise and correct. In the end, Python delivered, und

select.poll in MacOS Leopard?

2008-06-05 Thread Samuel Bayer
All - The Python that comes with MacOS 10.5 doesn't have select.poll. The MacOS X build from python.org does, and works fine in 10.5. Any idea why the Apple build is broken? Anybody come across this before? Thanks in advance - Sam Bayer The MITRE Corporation [EMAIL PROTECTED] -- http://mail.p

Re: Protocol for thread communication

2008-03-04 Thread Samuel
a status to each job is by adding a status attribute to the Job class, in addition, a Job may emit a signal (using a simple signal/event mechanism such as this one: http://code.google.com/p/exscript/source/browse/trunk/lib/Exscript/ Trackable.py ) whenever a status changes, and have the MainLoo

get process running time

2008-02-22 Thread Samuel Lipp
Hi, I'm looking for a way to get a processes running time. I know that operating systems keep track of it, but I didn't find any python class, function,... that would give me that information :( Any idea how I can get this information ? regards, Sam ___

Re: ANN:proxysocket(socks4,socks5)v0.1

2008-01-19 Thread Samuel
v0.2 http://proxysocket.googlecode.com/files/ProxySocket.py On 1月18日, 下午3时04分, Tim Roberts <[EMAIL PROTECTED]> wrote: > Samuel <[EMAIL PROTECTED]> wrote: > > >http://code.google.com/p/proxysocket/downloads/list > > Allow me to introduce you to the concept of c

Re: ANN:proxysocket(socks4,socks5)v0.1

2008-01-18 Thread Samuel
On 1月18日, 下午3时04分, Tim Roberts <[EMAIL PROTECTED]> wrote: > Samuel <[EMAIL PROTECTED]> wrote: > > >http://code.google.com/p/proxysocket/downloads/list > > Allow me to introduce you to the concept of comments. Python allows you to > include descriptive sentences

ANN:proxysocket(socks4,socks5)v0.1

2008-01-17 Thread Samuel
http://code.google.com/p/proxysocket/downloads/list -- http://mail.python.org/mailman/listinfo/python-list

Re: Choosing a new language

2007-12-29 Thread Samuel Tardieu
> "Brad" == byte8bits <[EMAIL PROTECTED]> writes: Brad> Best of luck in finding skilled, affordable Ada programmers Brad> outside of major cities. Which is why it may be a good idea to learn it and earn a lot of $$$ :) -- http://mail.python.org/mailman/listinfo/python-list

ANNOUNCE: Spiff Integrator 0.1

2007-12-27 Thread Samuel
/libs/Integrator/ If you have any questions, please do not hesitate to ask or file a bug. -Samuel -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem untaring python2.5

2007-12-18 Thread samuel . progin
Hello, It is not possible to give sharp hints without more relevant information like: - What is your platform? - Which version of python? - What is the version of: $ tar --version (GNU tar, other proprietary tar, according to my personal experience, AIX tar may fail) - Is your disk full or do you

Re: a strange SyntaxError

2007-12-09 Thread Samuel
On Sun, 09 Dec 2007 12:35:46 -0800, CoolGenie wrote: > OK, sorry, this was about indents. Stupid VIM! $ mkdir -p $HOME/.vim/ftplugin/ $ echo "setlocal sw=4 setlocal ts=4 noremap py o/**/ " >> ~/.vim/ftplugin/python.vim $ echo "syntax on set sw=2 set ts=2 set nu set nuw=3 set autoin

Re: Ruby's Template Engine for Python

2007-12-08 Thread Samuel
at, now I just have to find the piece of code that provides those callbacks. Ah, here it is: > http://pylonshq.com/WebHelpers/module-webhelpers.html And there I go, easily adding the same functionality to any template system of my choice. That was easier than I expected. Thanks for your h

Re: highscores list

2007-12-08 Thread Samuel
; arising when it goes to read in the high scores from the file when I > play again. Not your original problem, but you should want to look at this instead of creating yet another parser: http://docs.python.org/lib/RawConfigParser-objects.html -Samuel -- http://mail.python.org/mailman/listinfo/python-list

Ruby's Template Engine for Python

2007-12-08 Thread Samuel
es with AJAX like that looks inherently cool. Is there anything like that for Python, optimally a stand-alone library? Django seems to handle this differently, from what I can see. -Samuel -- http://mail.python.org/mailman/listinfo/python-list

Re: Generating API documentation as a textfile

2007-12-03 Thread Samuel
On Mon, 03 Dec 2007 06:45:45 -0800, Giampaolo Rodola' wrote: > dir.__doc__ This contains only the docstring one object (module, class, function, ...). I was thinking more of the complete API documentation that can be found in a file, and formatted in a readable way. -Samuel

Generating API documentation as a textfile

2007-12-03 Thread Samuel
Does anyone know an easy way to extract the API documentation that is embedded into a Python file as a text file? -Samuel -- http://mail.python.org/mailman/listinfo/python-list

ANNOUNCE: Spiff Guard 1.9.0

2007-12-02 Thread Samuel
le.com/p/spiff/ Mailing list: http://groups.google.com/group/spiff-devel Bug tracker: http://code.google.com/p/spiff/issues/list Browse the source: http://spiff.googlecode.com/svn/trunk/libs/Guard/ If you have any questions, please do not hesitate to ask or file a bug. -Samuel -- http://mail.python.org/mailman/listinfo/python-list

Detecting mod_rewrite via CGI

2007-11-29 Thread Samuel
return False for line in file: if line.startswith('RewriteEngine on'): file.close() return True file.close() return False Unfortunately, not using .htaccess isn't an option. -Samuel -- http://mail.python.org/mailman/listinfo/python-list

Re: Listing subtypes

2007-11-28 Thread Samuel
On Nov 29, 1:54 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > print A.__subclasses__() Ah, I knew I had seen this before. Thanks! -Samuel -- http://mail.python.org/mailman/listinfo/python-list

Listing subtypes

2007-11-28 Thread Samuel
Hi, I remember seeing an easy way to list all subtypes of a specific type but I haven't been able to find it anymore. What I am trying to do is this: Given a class, get a list of all classes that derive from it. Pretty much like __mro__ but downwards rather then upwards. Any ideas? -S

Re: How to make a standalone Python/Tk program?

2007-11-20 Thread samuel . progin
> How to make a standalone Python/Tk program(e.g. exe file on Windows)? > Any suggestions are welcome! Hello! Here are a few pointers, try to google: - pyinstaller - python freeze - py2exe or more generally "python to exe" You may have a search on this mailing list, in my mind this topic was di

ANNOUNCE: Exscript 0.9.11

2007-11-20 Thread Samuel
Introduction - Exscript is a scripting language for automating Telnet or SSH sessions. It supports a wide range of features, such as parallelization, AAA authentication methods, TACACS, and a very simple template language. Please refer to the project page for updated documentation (se

Re: Help ctypes on arm linux not compile

2007-10-30 Thread Samuel M. Smith
Sorry, thats a typo. Its python 2.5.1. as the error messages indicate. On 30 Oct 2007, at 02:55 , Thomas Heller wrote: > Samuel M. Smith schrieb: >> I have built python 1.5.1 from source for an embedded ARM9 debian >> linux Sarge distribution but >> ctypes doesn't bui

Help ctypes on arm linux not compile

2007-10-29 Thread Samuel M. Smith
r/local/src/Python-2.5.1/Modules/_ctypes/_ctypes.c:3433: error: `self' undeclared (first use in this function) /usr/local/src/Python-2.5.1/Modules/_ctypes/_ctypes.c: At top level: /usr/local/src/Python-2.5.1/Modules/_ctypes/_ctypes.c:3438: error: syntax error befo

ctypes on arm linux

2007-10-26 Thread Samuel M. Smith
r/local/src/Python-2.5.1/Modules/_ctypes/_ctypes.c:3433: error: `self' undeclared (first use in this function) /usr/local/src/Python-2.5.1/Modules/_ctypes/_ctypes.c: At top level: /usr/local/src/Python-2.5.1/Modules/_ctypes/_ctypes.c:3438: error: syntax error befo

ANNOUNCE: Exscript 0.9.9

2007-09-25 Thread Samuel
Introduction - Exscript is a scripting language for automating Telnet or SSH sessions. It supports a wide range of features, such as parallelization, AAA authentication methods, TACACS, and a very simple template language. This release comes with many new features, and the documentatio

ANNOUNCE: Exscript 0.9.8

2007-09-10 Thread Samuel
Introduction - Exscript is a scripting language for automating Telnet or SSH sessions. It supports a wide range of features, such as parallelization, AAA authentication methods, TACACS, and a very simple template language. Python developers can easily extend Exscript templates using

Re: ImportError depending on the calling module

2007-09-06 Thread Samuel
On Sep 6, 6:44 pm, Gabriel Genellina <[EMAIL PROTECTED]> wrote: > On 6 sep, 13:13, Samuel <[EMAIL PROTECTED]> wrote: > > > On Sep 6, 5:44 pm, Gabriel Genellina <[EMAIL PROTECTED]> wrote: > > > They should import the package as any other > > >

Re: ImportError depending on the calling module

2007-09-06 Thread Samuel
On Sep 6, 6:13 pm, Samuel <[EMAIL PROTECTED]> wrote: > Why does it matter whether I install it in sys.path or whether > sys.path is modified? What's the difference? > > What I am doing is I ship two modules in one tarball with my software. > The software is only unpack

Re: ImportError depending on the calling module

2007-09-06 Thread Samuel
On Sep 6, 5:44 pm, Gabriel Genellina <[EMAIL PROTECTED]> wrote: > On 6 sep, 08:47, Samuel <[EMAIL PROTECTED]> wrote: > > Given the following directory structure: > > > - > > |-- Obj.py > > |-- __init__.py > > |-- foo > > | |-

ImportError depending on the calling module

2007-09-06 Thread Samuel
last): File "start2.py", line 4, in import test.foo File "/home/sab/test/foo/__init__.py", line 1, in from FooTest import FooTest File "/home/sab/test/foo/FooTest.py", line 1, in from Obj import Obj ImportError: No module named Obj - How would y

Re: Python object <-> XML

2007-09-03 Thread Samuel
where a list is required, but an existing mapper will surely have a solution implemented.) I guess what I am looking for is pretty much an ORM that also works with XML. -Samuel -- http://mail.python.org/mailman/listinfo/python-list

Python object <-> XML

2007-09-03 Thread Samuel
Hi, Say you have the following XML: item 1 item 2 my group Is there an easy way (i.e. without writing a sax/dom parser) to load this into a (number of) Python object(s), manipulate the instance, and save the result back to XML? -Samuel -- http://mail.python.org/mailman

ANNOUNCE: Spiff Workflow 0.0.2

2007-08-29 Thread Samuel
er: http://code.google.com/p/spiff/issues/list Documentation: http://spiff.googlecode.com/svn/trunk/libs/Workflow/README Browse the source: http://spiff.googlecode.com/svn/trunk/libs/Workflow/ If you have any questions, please do not hesitate to ask. -Samuel -- http://mail.python.org/mailman/listinf

Re: Hot subject: a good python editor and/or IDE?

2007-08-19 Thread Samuel
On Sun, 19 Aug 2007 13:08:35 +, Samuel wrote: > $ sudo apt-get install vim I just realized, this should be $ sudo apt-get install vim-python or $ sudo apt-get install vim-full -Samuel -- http://mail.python.org/mailman/listinfo/python-list

Re: Hot subject: a good python editor and/or IDE?

2007-08-19 Thread Samuel
n.vim $ wget http://code.google.com/p/snippetsemu/issues/attachment?aid=-6063627743376712928&name=python_snippets.vim $ cp python_snippets.vim $HOME/.vim/after/ftplugin/ $ echo "syntax on set sw=2 set ts=2 set nu set nuw=3 set autoindent set expandtab" >> $HOME/.vimrc -

Re: python video editing libs

2007-08-18 Thread Samuel
On Sat, 18 Aug 2007 12:55:47 +1200, DavidM wrote: > Does anything like this exist? GStreamer/GNonLin might possibly support what you are looking for, though I have not tested this. http://docs.programmers.ch/index.php/Using_Gnonlin_with_GStreamer_and_Python -Samuel -- http://mail.python.

ANNOUNCE: Spiff Workflow 0.0.1 (Initial Release)

2007-08-03 Thread Samuel
ttp://code.google.com/p/spiff/issues/list Documentation: http://spiff.googlecode.com/svn/trunk/libs/Workflow/README Browse the source: http://spiff.googlecode.com/svn/trunk/libs/Workflow/ If you have any questions, please do not hesitate to ask. -Samuel -- http://mail.python.org/mailman/listinfo/python-list

Re: Debugging "broken pipe" (in telnetlib)

2007-07-04 Thread Samuel
Thanks for your comments, Jean-Paul. -- http://mail.python.org/mailman/listinfo/python-list

Re: Debugging "broken pipe" (in telnetlib)

2007-07-03 Thread Samuel
non-shared) instance of telnetlib and connects to a remote host. Are there any special conditions that must be taken care of when opening a number of sockets in threads? (The code runs on AIX 4.1, where Python supports native OS threads.) -Samuel -- http://mail.python.org/mailman/listinfo/python-list

Debugging "broken pipe" (in telnetlib)

2007-07-03 Thread Samuel
how to debug such a problem? How can I find out what broke the pipe? -Samuel -- http://mail.python.org/mailman/listinfo/python-list

ANNOUNCE: Exscript 0.9 (Initial Release)

2007-06-29 Thread Samuel
Introduction - Exscript is a scripting language for automating Telnet or SSH sessions. It supports a wide range of features, such as parallelization, AAA authentication methods, TACACS, and a very simple template language. Exscript itself is written in Python, and it should run on a

Re: Retrieving a stacktrace from an exception object / forwarding an exception

2007-06-22 Thread Samuel
Thanks, Guys, this works as expected. -Samuel -- http://mail.python.org/mailman/listinfo/python-list

Retrieving a stacktrace from an exception object / forwarding an exception

2007-06-22 Thread Samuel
except Exception, e: f = open("logfile", 'a') f.write(e.stacktrace()) raise e wrapper() # should throw the exception with a stacktrace showing my_func() --- Any idea if and how this can be done? -Samuel -- http://mail.python.org/mailman/listinfo/python-list

Re: Trivial string substitution/parser

2007-06-17 Thread Samuel
me = match.group(2) value = get_variable(varname) return prepend + value string_re = re.compile(r'(^|[^\\])\$([a-z][\w_]+\b)', re.I) input = r'In this string $variable1 is substituted,' input += 'while \$variable2 is not.' print str

Trivial string substitution/parser

2007-06-17 Thread Samuel
Hi, How would you implement a simple parser for the following string: --- In this string $variable1 is substituted, while \$variable2 is not. --- I know how to write a parser, but I am looking for an elegant (and lazy) way. Any idea? -Samuel -- http://mail.python.org/mailman/listinfo/python

  1   2   >