--
Note, for paths on windows you really want to use a rawstring. Ie,
r"D:\file.html".
--
Stephen Hansen
m e @ i x o k a i . i o
--
https://mail.python.org/mailman/listinfo/python-list
On Sat, Apr 30, 2016, at 09:48 AM, Christopher Reimer wrote:
> On 4/29/2016 11:43 PM, Stephen Hansen wrote:
> > The official documentation is accurate.
>
> That may be true on a technical level. But the identically worded text
> in the documentation implies otherwise.
That
On Fri, Apr 29, 2016, at 06:55 PM, Christopher Reimer wrote:
> On 4/29/2016 6:29 PM, Stephen Hansen wrote:
> > If isupper/islower were perfect opposites of each-other, there'd be no
> > need for both. But since characters can be upper, lower, or *neither*,
> > y
t x.isupper()" you'd get the whitespace in it too (along
with all the lower case characters).
If isupper/islower were perfect opposites of each-other, there'd be no
need for both. But since characters can be upper, lower, or *neither*,
you run into this situation.
--
Stephen Hansen
m e @ i x o k a i . i o
--
https://mail.python.org/mailman/listinfo/python-list
On Wed, Apr 27, 2016, at 11:55 PM, Ben Finney wrote:
> Stephen Hansen writes:
>
> > On Wed, Apr 27, 2016, at 10:32 PM, Ben Finney wrote:
> > > Better: when you have many semantically-different values, use named
> > > (not positional) parameters in the format stri
On Wed, Apr 27, 2016, at 10:32 PM, Ben Finney wrote:
> Stephen Hansen writes:
>
> > The error message means there's a mismatch between the number of
> > formatting instructions (ie, %s) and arguments passed to formatting. I
> > leave it to you to count and find wha
rmatting. I
leave it to you to count and find what's missing or extra, because I'm
seriously not going to do that :)
--
Stephen Hansen
m e @ i x o k a i . i o
--
https://mail.python.org/mailman/listinfo/python-list
)
Python is case-sensitive. "Adjective1" and "adjective1" are separate
things. In your code you're reading into "adjective1".
--
Stephen Hansen
m e @ i x o k a i . i o
--
https://mail.python.org/mailman/listinfo/python-list
e tracebacks.
Having a nice description of what you expect to happen is often nice
too, especially if its doing something "wrong" and not giving an obvious
traceback. Seeing specifically what the wrong behavior is, and you
explaining why you think its wrong, can be invaluable.
--
Stephen Hansen
m e @ i x o k a i . i o
--
https://mail.python.org/mailman/listinfo/python-list
ads which is the Anaconda scientific
distribution, which I know does offer 64-bit Python support.
---
Stephen Hansen
m e @ i x o k a i . i o
--
https://mail.python.org/mailman/listinfo/python-list
On Thu, Apr 21, 2016, at 08:33 PM, Christopher Reimer wrote:
> On 4/21/2016 7:20 PM, Stephen Hansen wrote:
> > I... that... what... I'd forget that link and pretend you never went
> > there. Its not helpful.
>
> I found it on the Internet, so it must be true -- and Pytho
at all. What's
the contents of this big dictionary that has everything in it for some
reason?
That said, dear god, 'piece' doesn't look like an english word to me
anymore. I've never suffered semantic satiation from text before.
--Stephen
m e @ i x o k a i . i o
--
https://mail.python.org/mailman/listinfo/python-list
On Thu, Apr 21, 2016, at 10:46 AM, Allan Leo wrote:
> I need help with this setup error.
> -- Forwarded message --
> From: "Allan Leo"
> Date: Apr 21, 2016 10:06 AM
> Subject: Re: Error 0*80070570
> To:
> Cc:
>
> When running the setup for your 3.5.1(32-bit version), the setup
>
mmandline = r"C:\windows\system32\lpr.exe -S 172.28.84.38 -P RAW
C:\john\myfile"
The r in front of the string makes it a raw string so you don't have to
double up the slashes.
---
Stephen Hansen
m e @ i x o k a i . i o
--
https://mail.python.org/mailman/listinfo/python-list
On Tue, Apr 19, 2016, at 11:09 PM, Ethan Furman wrote:
> On 04/19/2016 10:51 PM, Stephen Hansen wrote:
> > I use 1) more to be less 'nicer' and more, er, 'more specific'. Since I
> > don't like exceptions to rise to the user level where niceness is
> &g
n user error messages,
not exceptions.
Note, 1) doesn't mean I always raise a nicer message, it means if
"KeyError" is ambiguious or odd, I raise a better and more informative
one. But you're getting nothing swapping out KeyError for
Exception(lotsofwords).
I use 1) more to be less 'nicer' and more, er, 'more specific'. Since I
don't like exceptions to rise to the user level where niceness is
needed.
--Stephen
m e @ i x o k a i . i o
--
https://mail.python.org/mailman/listinfo/python-list
bian, it
should come pre-installed.
---
Stephen Hansen
m e @ i x o k a i . i o
--
https://mail.python.org/mailman/listinfo/python-list
the core devs
taste and particular needs, and it goes out of its way to say that it is
only a suggestion and other concerns (especially local consistency)
override its advice.
---
Stephen Hansen
m e @ i x o k a i . i o
--
https://mail.python.org/mailman/listinfo/python-list
> * You can use named constants from ‘os’ for the purpose of specifying
> exit status numbers.
Only on *nix.
Even then it varies from platform to platform which constants you can
use. I'd prefer to document the return status and use numbers/my own
constants directly, that way supporting any p
at which point its no longer bytes
(and before you did something to it besides displaying it, you'd want to
decode it back to bytes again, probably).
--Stephen
m e @ i x o k a i . i o
--
https://mail.python.org/mailman/listinfo/python-list
etch a RSS feed from Wunderground. But that was
awhile ago and I don't see the obvious RSS links banymore.
Did you see: https://www.wunderground.com/weather/api/d/docs
--
Stephen Hansen
m e @ i x o k a i . i o
--
https://mail.python.org/mailman/listinfo/python-list
folder.
If you can't use pip while in the same directory as pip.exe, I don't
even know what is wrong.
That said, you can access pip via 'python -m pip args' instead of using
the pip executable.
--
Stephen Hansen
m e @ i x o k a i . i o
--
https://mail.python.org/mailman/listinfo/python-list
On Sun, Apr 10, 2016, at 10:18 PM, Rustom Mody wrote:
> On Monday, April 11, 2016 at 10:17:13 AM UTC+5:30, Stephen Hansen wrote:
> > On Sun, Apr 10, 2016, at 09:03 PM, Fillmore wrote:
> > > and the (almost always to be avoided) use of eval()
> >
> > FWIW, there
th your words: code is
good, show code, don't get me wrong, but you need to express your
expectations and how the difference between what happened and what you
expected surprised you.
Both parts, the code and the expression of your thoughts, are really
important to getting help around here :)
ile multiples will return a tuple, but
how you're doing that (checking the type of the result) is fine.
--Stephen
m e @ i x o k a i . i o
--
https://mail.python.org/mailman/listinfo/python-list
en:
>>> a = '"string1",'
Note the trailing comma.
> I can tell you that it exists because it bit me in the butt today...
>
> and mind you, I am not saying that this is wrong. I'm just saying that it
> surprised me.
If the above doesn't explain it, then I still don't understand what
you're finding surprising and what you'd expect otherwise.
---Stephen
m e @ i x o k a i . i o
--
https://mail.python.org/mailman/listinfo/python-list
at I should
have mentioned the empty tuple exception that proves the rule. The only
time you need parens is to resolve ambiguity.
To suggest that parens do make tuples confuses the issue, given things
like this:
>>> a = 1,2,3
>>> b = (1, 2, 3)
--
Stephen Hansen
m e @ i x o k a
On Sun, Apr 10, 2016, at 05:17 PM, Fillmore wrote:
> On 04/10/2016 07:30 PM, Stephen Hansen wrote:
>
> > There's nothing inconsistent or surprising going on besides you doing
> > something vaguely weird and not really expressing what you find
> > surprising.
On Sun, Apr 10, 2016, at 05:22 PM, Fillmore wrote:
> Hold on a sec! it turns up that there is such thing as single-element
> tuples in python:
>
> >>> c = ('hello',)
> >>> c
> ('hello',)
> >>> c[0]
> 'hello'
> >>> c[1]
> Traceback (most recent call last):
>File "", line 1, in
> IndexError
On Sun, Apr 10, 2016, at 05:18 PM, Stephen Hansen wrote:
> The parens are optional, I always put them in because:
> >>> b = "hello",
Ahem, "because its easy to miss the trailing comma" is what I meant to
say here.
--
https://mail.python.org/mailman/listinfo/python-list
x27;t. Your mistake is again -- parens don't make tuples,
commas do.
A one element tuple is:
>>> b = ("hello,)
The parens are optional, I always put them in because:
>>> b = "hello",
The parens group an expression, they don't make a type.
--
Stephen Hansen
m e @ i x o k a i . i o
--
https://mail.python.org/mailman/listinfo/python-list
x27;re asking is why this returns a tuple, where in the
first eval you got a string. The answer is because commas create tuples
(not parens), so:
"String1", "String2"
is a tuple expression. Whereas:
"String1"
is a string expression.
> the ques
On Sat, Apr 9, 2016, at 12:25 PM, Mark Lawrence via Python-list wrote:
> Again, where is the relevance to Python in this discussion, as we're on
> the main Python mailing list? Please can the moderators take this stuff
> out, it is getting beyond the pale.
You need to come to grip with the fact
decisions against. Most code exists outside
the stdlib.
---
Stephen Hansen
m e @ i x o k a i . i o
--
https://mail.python.org/mailman/listinfo/python-list
On Wed, Mar 30, 2016, at 10:34 PM, tdspe...@gmail.com wrote:
> as you can see the option element was added third but is the first one
> displayed.
>
> Is this just standard - I am using Python 3.5
The order of items in dictionaries is based on the hash value -- which
while stable, should be consi
eing used in its
implementation.
Thanks,
Stephen.
--
https://mail.python.org/mailman/listinfo/python-list
be a strange case).
I can't see how to do this with os.scandir. I hope I am missing something?
Don't make me walk the entire contents of .git, tmp and build folders please.
Stephen.
--
https://mail.python.org/mailman/listinfo/python-list
On Fri, Jun 5, 2015, at 02:03 AM, Alexis Dubois wrote:
> Anyone else for an idea on that?
Sorry, I have no idea.
Have you tried asking on the PyQT mailing list where there is likely
more of a concentration of PyQT expertise?
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
--
Step
Dario Alpern has written a program that uses the Elliptic Curve Method
(ECM) for factorising a number. ECM is one of the _very_ fast methods for
finding the prime factors of a number. He has even offered the code for his
program. You could have a go at using or converting his code to do what you
ar
On Wednesday, January 28, 2015 at 10:07:25 AM UTC-6, Tim Golden wrote:
> On 28/01/2015 15:50, stephen...@gmail.com wrote wrote:
> > I am using the following to open a file in its default application in
> > Windows 7:
> >
> > from subprocess import call
> >
>
I am using the following to open a file in its default application in Windows 7:
from subprocess import call
filename = 'my file.csv'
call('"%s"' % filename, shell=True)
This still leaves a python process hanging around until the launched app is
closed. Any idea how to get around?
--
https://m
On Tue, Jan 20, 2015 at 1:45 AM, Marko Rauhamaa wrote:
> Terry Reedy :
>
> > Others have answered as to why other special-purpose
> > constrained-structure trees have not been added to the stdlib.
>
> Ordered O(log n) mappings are not special-purpose data structures. I'd
> say strings and floats
On Tuesday, January 13, 2015 at 8:30:13 PM UTC, André Roberge wrote:
> On Tuesday, 13 January 2015 08:23:30 UTC-4, stephen...@gmail.com wrote:
> > I found a solution that I'm happy with.
> >
> > from datetime import datetime
> > from easygui_qt import
I'm a bit confused why in the second case x is not [1,2,3]:
x = []
def y():
x.append(1)
def z():
x = [1,2,3]
y()
print(x)
z()
print(x)
Output:
[1]
[1]
--
https://mail.python.org/mailman/listinfo/python-list
I found a solution that I'm happy with.
from datetime import datetime
from easygui_qt import *
datestring = get_date()
mydate = datetime.strptime(datestring, '%b %d %Y')
On Saturday, January 10, 2015 at 1:02:30 AM UTC, André Roberge wrote:
> On Friday, 9 January 2015 19:09
On Friday, January 9, 2015 at 8:58:59 AM UTC-6, stephen...@gmail.com wrote:
> I've installed Microsoft Visual Studio 10.0. Here are the steps I've been
> taking.
>
> My python version is Python 3.4.2 (v3.4.2:ab2c023a9432, Oct 6 2014,
> 22:16:31) [MSC v.1600
On Wednesday, December 31, 2014 at 4:24:50 PM UTC-6, André Roberge wrote:
> EasyGUI_Qt version 0.9 has been released. This is the first announcement
> about EasyGUI_Qt on this list.
>
> Like the original EasyGUI (which used Tkinter),
> EasyGUI_Qt seeks to provide simple GUI widgets
> that can b
This page helped me sort everything out:
http://www.falatic.com/index.php/120/a-guide-to-building-python-2-x-and-3-x-extensions-for-windows.
--
https://mail.python.org/mailman/listinfo/python-list
I've installed Microsoft Visual Studio 10.0. Here are the steps I've been
taking.
My python version is Python 3.4.2 (v3.4.2:ab2c023a9432, Oct 6 2014, 22:16:31)
[MSC v.1600 64 bit (AMD64)] on win32.
(Sorry for the long output.)
>cd "c:\Program Files (x86)\Microsoft Visual Studio 10.0"\vc
>vcva
Another _possible_ performance improvement that is staring us in the face
is that 2*b could be replaced with b<<1. Given that b+b (an earlier
suggestion of mine) involves two table look-ups for b, whereas b<<1 only
involves one, it seems that the scope here for improvement is significant.
By the w
t be used in those
situations.
Stephen Tucker.
On Thu, Nov 20, 2014 at 6:00 PM, Serhiy Storchaka
wrote:
> On 01.11.14 03:29, Steven D'Aprano wrote:
>
>> There is an algorithm for calculating the integer square root of any
>> positive integer using only integer oper
You need to call python.exe path-to-script.py, I think, not just
path-to-script.py. See sys.executable (though that depends on if you're a
frozen app or not).
I can't be sure though because there's no code. Show code when asking
questions, it helps frame the discussion and get a better answer ;)
Can someone explain? Thanks.
Python 3.3.2 (v3.3.2:d047928ae3f6, May 16 2013, 00:06:53) [MSC v.1600 64 bit
(AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> x = input()
Hello there
>>> print(x)
Hello there
Python 2.7.5 (default, May 15 2013, 22:43:36) [M
e "non-geekiness" of a string is, itself, far too geeky for my liking.
The distinction seems to be an utterly spurious - even artificial or
arbitrary one to me. (Sorry about the rant.)
On Fri, Oct 11, 2013 at 10:22 AM, Ned Batchelder wrote:
> On 10/11/13 4:16 AM, Stephen Tucker wro
objects in tuples get their characters
sent to the file as escape sequences. Why is this the case?
4. As for question 1 above, I ask here also: What is the neatest way to get
round this?
Stephen Tucker.
--
https://mail.python.org/mailman/listinfo/python-list
Thanks to everyone for their help. Using everyone's suggestions, this seems to
work:
import win32clipboard, win32con
def getclipboard():
win32clipboard.OpenClipboard()
s = win32clipboard.GetClipboardData(win32con.CF_UNICODETEXT)
win32clipboard.CloseClipboard()
if '\0' in s:
On Thursday, September 12, 2013 6:01:20 PM UTC-5, stephen...@gmail.com wrote:
> I have an excel file. When I select cells, copy from excel, and then use
> win32clipboard to get the contents of the clipboard, I have a 131071
> character string.
>
>
>
> When I save the fil
On Friday, September 13, 2013 9:31:45 AM UTC-5, stephen...@gmail.com wrote:
> On Thursday, September 12, 2013 10:43:46 PM UTC-5, Neil Hodgson wrote:
>
> > Stephen Boulet:
>
> >
>
> >
>
> >
>
> > > From the clipboard contents copied f
On Thursday, September 12, 2013 10:43:46 PM UTC-5, Neil Hodgson wrote:
> Stephen Boulet:
>
>
>
> > From the clipboard contents copied from the spreadsheet, the characters
> > s[:80684] were the visible cell contents, and s[80684:] all started with
> > "
Hi Steven. Here is my code:
import win32clipboard, win32con
def getclipboard():
win32clipboard.OpenClipboard()
s = win32clipboard.GetClipboardData(win32con.CF_TEXT)
win32clipboard.CloseClipboard()
return s
I use this helper function to grab the text on the clipboard and do useful
I have an excel file. When I select cells, copy from excel, and then use
win32clipboard to get the contents of the clipboard, I have a 131071 character
string.
When I save the file as a text file, and use the python 3.3 open command to
read its contents, I only have 80684 characters.
Excel (an
t want to say all processes that
spawned from here $@%@$% DIE.
Thanks in advance for anybody that has some spare time to point me in
the right direction. I am grateful. Thanks.
Very Respectfully,
Stephen Bunn
scb...@sbunn.org
sqlimport.py
Description: Binary data
daemon.py
Description: Binary
I think the easiest thing to do would be to remove the python.org Python
entirely, kill it from the path (which I've already done), and install directly
a MacPorts version of Python.
Any caveats or warnings about getting rid of the /Library/Frameworks/Python
directory?
On Jul 7, 2012, at J
I installed py27-numpy / scipy / matplotlib using macports, and it ran without
failing.
When I run Python I get the following error:
$>> which python
/Library/Frameworks/Python.framework/Versions/2.7/bin/python
$>> python
Python 2.7.3 (v2.7.3:70274d53c1dd, Apr 9 2012, 20:52:43)
[GCC 4.2.1 (
but should use VS2008 instead, or are there other
workarounds?
Thanks for the help,
Stephen
--
http://mail.python.org/mailman/listinfo/python-list
e
it has nothing to do with 32 or 64-bitness at all and my guess is wrong.
Maybe your profile has gone wonky. But it doesn't matter. You can add
the Edit association yourself. Its a one-time fix.
--
Stephen Hansen
... Also: Ixokai
... Mail: me+list/python (AT) ixokai (DOT) io
.
ople can use to
accomplish simple, fairly common needs.
--
Stephen Hansen
... Also: Ixokai
... Mail: me+list/python (AT) ixokai (DOT) io
... Blog: http://meh.ixokai.io/
signature.asc
Description: OpenPGP digital signature
--
http://mail.python.org/mailman/listinfo/python-list
is single "sub" dictionary with all instances of your
A class.
If you want to define instance-specific attributes, define them in the
__init__ method, like so:
class A:
def __init__(self):
self.sub = dict()
def sub_add(self, cls):
obj = cls()
self.sub[o
ke it worth the complication.
--
Stephen Hansen
... Also: Ixokai
... Mail: me+list/python (AT) ixokai (DOT) io
... Blog: http://meh.ixokai.io/
* Obvious exaggeration :P
signature.asc
Description: OpenPGP digital signature
--
http://mail.python.org/mailman/listinfo/python-list
Yingjie Lan writes:
> Have you considered line continuation by indentation? It seems to
> meet the design principle. I think it is the most natural way to
> allow free line breaking in Python.
Briefly, yes, and I think it would need a lot of tuning and probably
complex rules. Unlike statement
Guido van Rossum writes:
> On Fri, Sep 2, 2011 at 12:28 AM, Stephen J. Turnbull
> wrote:
> > Sure, but IIRC one design principle of Python is that the keyword that
> > denotes the syntax should be the first thing on the line,
[...]
> That's true for *statement
Gabriel AHTUNE writes:
> So can be done with this syntax:
>
> > x = firstpart * secondpart + #line breaks here
> > anotherpart + #continue
> > stillanother #continue on.
>
> after a "+" operator the line is clearly not finished yet.
Sure, but IIRC one design principle of Python is that
ole point of that secure sequence is that the OS and
only the OS responds.
--
Stephen Hansen
... Also: Ixokai
... Mail: me+list/python (AT) ixokai (DOT) io
... Blog: http://meh.ixokai.io/
signature.asc
Description: OpenPGP digital signature
--
http://mail.python.org/mailman/listinfo/python-list
arty module; Twisted's asynch dispatching isn't really exactly
concurrency, but it does a better job then concurrency does for some
operations; someone's always working on coroutines in some fashion or
another, which is another kind of concurrency.)
Lots of different ways to go concurren
around that a long time ago, and now always keep the jobs of managing my
DNS record and hosting my sites /totally/ separate.
--
Stephen Hansen
... Also: Ixokai
... Mail: me+list/python (AT) ixokai (DOT) io
... Blog: http://meh.ixokai.io/
signature.asc
Description: OpenPGP digital
On 8/28/11 10:23 PM, Chris Angelico wrote:
> On Mon, Aug 29, 2011 at 3:09 PM, Stephen Hansen
> wrote:
>> Get a new webhost. ...
>>
>> But I don't know if they have a warehouse in Australia, if their latency
>> with any of their various data centers is suitable
and are fairly competitive.
--
Stephen Hansen
... Also: Ixokai
... Mail: me+list/python (AT) ixokai (DOT) io
... Blog: http://meh.ixokai.io/
signature.asc
Description: OpenPGP digital signature
--
http://mail.python.org/mailman/listinfo/python-list
event people from seeing the code*, they're just regular zip
files and can be unzipped fine.
I almost always install unzip my eggs on a developer machine, because I
inevitably want to go poke inside and see what's actually going on.
--
Stephen Hansen
... Also: Ixokai
... M
= max(ratios)
> owner = usernames[ratios.index(best)]
> print filename,":",owner
It amazes me that I can still find a surprising new tool in the stdlib
after all these years.
Neat.
/pinboards
--
Stephen Hansen
... Also: Ixokai
... Mail: me+list/python (
t.
The entire idea that its hard, time-consuming, effort-draining or
difficult to make code clean and "pretty" from the get-go is just wrong.
You don't need to do a major "prettying up" stage after the fact. Sure,
sometimes refactoring would greatly help a body of code as
t;? That's a kind of odd thing to do, I think. In Python at
least.
Why not just:
debug = defaults.get("debug", None)
(Strictly speaking, providing None to get is not needed, but I always
feel odd leaving it off.)
That's generally how I spell it when I need to do run tim
nience of customers who want to auto-install via
Group Policy).
In most situations, Python's good at "finding itself", i.e. where the
python.exe is actually located -- and it boostraps the location of
everything else based on that.
--
Stephen Hansen
... Also: Ixokai
On Mon, Aug 22, 2011 at 12:14 PM, Matthew Brett wrote:
> Yes, sorry, I should have mentioned that I explored these kind of
> variations.
>
> I think I see that there isn't an obvious way for del sys.modules['apkg']
> to know to delete or modify 'apkg.subpkg', because sys.modules is just a
> dict.
you'll be able to
re-import apkg.subpkg. I.e:
Python 2.7.1 (r271:86882M, Nov 30 2010, 10:35:34)
[GCC 4.2.1 (Apple Inc. build 5664)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>>
ject (but
NOT in the case of __*__ methods, usually, which are obtained internally
by a direct struct access, i.e., mytype->tp_new gets mytype.__new__).
If no such attribute exists, it goes along to do its default
attribute-resolution process, including the descriptor protocol and dict
checkin
On 8/21/11 9:37 PM, Stephen Hansen wrote:
> But, += is Python itself adding an unpredictable behavior into the core
> language, with its own base types behaving
... very differently to fundamental, basic appearing operators.
Editing fail on my part.
Similarly:
> But for Python, all
ecause my criticism isn't about one choosing to do crazy stuff with the
object model. I've never advocated Python be strict about rules.
But for Python, all by itself, with nothing but built-in and basic
types, to have a situation where:
a = a + b
a += b
... does two very dis
and generally thought of as merely syntactical
sugar for:
n = n + x
... lets one easily think that this should be entirely safe, even with
mutable objects, because if += were merely syntactical sugar, it would
be. But its not! Because += is wiggly. It can do more then one entirely
differe
lar bit of code must not,
under any circumstances, not ultimately work. Even going so far as to
start having hour long waits between retries until the other side is
finally up :P)
--
Stephen Hansen
... Also: Ixokai
... Mail: me+list/python (AT) ixokai (DOT) io
... Blog: http
ce" application we use in our company
instead. It runs as a service, and executes any random series of
programs beneath it, creating JOB's for each so any subprocesses of they
launch all get killed together cleanly, and handling dependencies via
between them through various means, and stuff
On Mon, Jun 20, 2011 at 11:19 PM, Florencio Cano
wrote:
> > import config_script obviously doesn't work and __import__(config_script)
> > works from the python interpreter but fails in the script (ImportError:
> > Import by filename is not supported.)
>
> You can use this:
>
> exec("import " + mod
On Mon, Jun 20, 2011 at 1:26 PM, Chris Angelico wrote:
> > I'd be inclined toward the second solution if I'm writing all the code
> > myself
>
On Mon, Jun 20, 2011 at 3:21 PM, Florencio Cano wrote:
> I'm with Chris, if the config_scripts are going to be implemented in
> Python always, the second
List,
First I'm very new to Python. I usually do this kind of thing with shell
scripts, however, I'm trying to move to using python primarily so I can
learn the language. I'm attempting to write a script that will check a
server for various configuration settings and report and/or change based
, Alexander and Paul McJones. 2009. Elements of Programming. Addison
Wesley. Pages 52-53
The code below demonstrates the issue. Using the total key gives the correct
result. Using the weak key returns the "incorrect" result. Tested with Python
2.7.1 and 3.1.2 (applies to 3.2)
Ste
t; classification. (That said, you'd run into problems with many
entirely non-Transcendental floating point numbers that have not yet
meditated enough to reach nirvana-- but still).
--
Stephen Hansen
... Also: Ixokai
... Mail: me+list/python (AT) ixokai (DOT) io
... Blog:
going WRONG with
your program. You said GUI, and perhaps that's the problem? If you are
calling a unix interactive command line program from within a GUI
context, things are quite likely to go wrong unless you do a lot of
extra work. Are you expecting a new console window to pop up for '
not years ago, Tyler. There's really nothing more to say about it.
He doesn't get it.
--
Stephen Hansen
... Also: Ixokai
... Mail: me+list/python (AT) ixokai (DOT) io
... Blog: http://meh.ixokai.io/
signature.asc
Description: OpenPGP digital signature
--
http://mail.python.org/mailman/listinfo/python-list
I'm saying (while
utterly proving his inability to read basic English), and righteous
indignation about how bad I am as one of the Evil Ones of python-list.
Doing... bad things. Badly.
Because, I, er, am, bad.
Bad.
BAD.
CUZ. RICK. SAYS. SO.
--
Stephen Hansen
... Also:
ajority, to declare you the
spokesman for all that is holy and proper and good, none of which can be
found here.
Now.. this? Lol.
Time to change your name. You're no longer Ranting Rick.
Congratulations! You're now Blabbering Rick.
--
Stephen Hansen
... Also: Ixokai
On 2/9/11 12:36 AM, Stephen Hansen wrote:
> .. yeah, no.
Okay, I actually have to apologize for the tone of this message.
It was late and I was a jerk. I could have just been helpful without
including the jerk, but something about it set me off. So the helpful
and the jerk got mixed in toget
101 - 200 of 1209 matches
Mail list logo