I wish you best of luck, on top of everything else it looks like the
neopython namespace has already been eaten up by some crypto project
On Wed, May 5, 2021 at 11:18 AM Benjamin Schollnick <
bscholln...@schollnick.net> wrote:
> > Why? The currently extant Python implementations contribute to cli
This is my whack at it, I can't wait to hear about it being the wrong big o
notation!
numbers=[]
while len(numbers) < 10:
try:
chip = int(input('please enter an integer: '))
except ValueError:
print('that is not a number, try again')
else:
numbers.append(chip)
text = "The best day of my life!"
output = ''
for i in text:
if i == ' ':
output +='\n'
else:
output += i
print(output)
throwing my hat in the ring, not only is it .replace free it is entirely
method free
On Thu, Jan 31, 2019 at 3:41 AM ^Bart wrote:
> [Solved by myself and I'm happy!!!
looking for a Space heater? sorry, not the Java mailing list
On Wed, Jan 30, 2019 at 3:11 PM jkn wrote:
> Hi all
> I'm looking at changing a radiator in a bedroom shortly and wondering
> about
> my options re. sizing.
>
> The current radiator is 900mm W x 600mm H, and is single panel, no
> c
according to https://pypi.org/project/discord.py/ Discord.py only supports
3.4 and 3.5
On Tue, Jan 29, 2019 at 4:52 PM Hamish Allen <101929...@gmail.com> wrote:
> Hi,
>
> Recently I’ve been trying to code a Discord bot in Python 3.6.2, then I
> realised that some features of discord.py were only
which version of Python? I get Syntax error on 3.7.1
On Tue, Jan 29, 2019 at 12:37 PM Adrian Ordona
wrote:
> The code actually works just the way i copy and pasted
>
> Sent from my iPhone
>
> On Jan 29, 2019, at 12:34, Ian Clark wrote:
>
> just the pure number of letter
just the pure number of letters next to parenthesis would cause the Parser
to error out
On Tue, Jan 29, 2019 at 12:32 PM Schachner, Joseph <
joseph.schach...@teledyne.com> wrote:
> Yes, that works. Assuming it was correctly formatted when you ran it.
> The formatting could not possibly be run in
back in my day we had to show our professors errors on punchcard! and we
liked it
On Sun, Jan 27, 2019 at 11:51 AM Terry Reedy wrote:
> On 1/26/2019 6:24 AM, Vrinda Bansal wrote:
> > Dear Sir/Madam,
> >
> > After Installation of the version 3.7.2(64 bit) in Windows 8 when I run
> the
> > program
threw this together, let me know what you think
num_list=[]
name_list =
['first','second','third','fourth','fifth','sixth','seventh','eighth','ninth','tenth']
name_it = name_list.pop(0)
while len(num_list) < 3:
try:
num_list.append( int( input(f"Insert the {name_it} number: ")))
except Valu
Like this?
num_max = 0
num_index = 0
name_list =
['first','second','third','fourth','fifth','sixth','seventh','eighth','ninth','tenth']
name_it = name_list.pop(0)
while num_index <3:
try:
num_list = int( input(f"Insert the {name_it} number: "))
except ValueError:
print('Not a number, try
On 2008-02-28, Gabriel Genellina <[EMAIL PROTECTED]> wrote:
> I hope it's more clear now. Python objects are only meaningful *inside* a
> Python program, but an *external* program can't use them directly.
Yes, sorry. This is what I was getting hung up on. My thinking was that
subprocess was orch
On 2008-02-28, Gabriel Genellina <[EMAIL PROTECTED]> wrote:
> En Thu, 28 Feb 2008 14:29:04 -0200, Ian Clark <[EMAIL PROTECTED]>
> escribió:
>
>> On 2008-02-27, Gabriel Genellina <[EMAIL PROTECTED]> wrote:
>>> En Wed, 27 Feb 2008 15:06:36 -0200, Ian
On 2008-02-27, Gabriel Genellina <[EMAIL PROTECTED]> wrote:
> En Wed, 27 Feb 2008 15:06:36 -0200, Ian Clark <[EMAIL PROTECTED]>
> escribi�:
>
>> On 2008-02-27, Michael Goerz <[EMAIL PROTECTED]> wrote:
>>> Hi,
>>>
>>> I would li
On 2008-02-27, Michael Goerz <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I would like to raise an exception any time a subprocess tries to read
> from STDIN:
>
> latexprocess = subprocess.Popen( \
> 'pdflatex' + " " \
> + 'test' + " 2>&1", \
> shell=True, \
> cwd=os.g
On 2008-02-25, A. Joseph <[EMAIL PROTECTED]> wrote:
> Please i`m trying to create a process using the os.fork() but it keep
If you're not trying to clone your current process, just make a new one,
you should look at the subprocess module.
http://docs.python.org/lib/module-subprocess.html
Ian
--
On 2008-02-25, Russell Warren <[EMAIL PROTECTED]> wrote:
>
>> the threading.local class seems defined for that purpose, not that I've ever
>> used it ;)
>
> I hadn't heard of that... it seems very useful, but in this case I
> think it just saves me the trouble of making a stash dictionary...
> unle
On 2008-01-22, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>> In fact you have *two* threads: the main thread, and the one you create
>> explicitly.
>
>> After you start the clock thread, the main thread continues executing,
>> immediately entering the finally clause.
>> If you want to wait for th
On 2008-01-16, yhvh <[EMAIL PROTECTED]> wrote:
> Is it possible to output error messages in a different color?
> I'm using Terminal on Gnome.
>>> print "\033[1;31mHello\033[0m There!"
Some reading:
http://en.wikipedia.org/wiki/ANSI_escape_code
http://www.ioncannon.net/ruby/101/fun-with-ansi-escap
On 2007-12-27, SMALLp <[EMAIL PROTECTED]> wrote:
> connectionString = {"host":"localhost", "user":"root",
> "passwd":"pofuck", "db":"fileshare"}
> dataTable = "files"
> conn = mysql.connect(host=connectionString["host"],
> user=connectionString["user"], passwd=connectionString["passwd"],
> db=conn
Jim B. Wilson wrote:
> ... My fondest wish is to play the role of the child at the
> good old ">>>" prompt. ...
>
> Jim
Okay, I misunderstood the direction you wanted to go. I thought that you
wanted to play the part of the mother, giving commands to the child and
not the other way around.
As
Jim B. Wilson wrote:
> Ian Clark wrote:
>> Jim B. Wilson wrote:
>> ...
>>> The child/client sends requests on its stdout and receives responses
>>> on stdin.
>> So, why can't you just run this client on the command line and let the
>> shel
Jim B. Wilson wrote:
...
> The child/client sends requests on its stdout and receives responses on
> stdin.
So, why can't you just run this client on the command line and let the
shell handle stdin/stdout for you?
Ian Clark
--
http://mail.python.org/mailman/listinfo/python-list
recipe?
>
> Jim Wilson
> Gainesville, FL
You're looking for the cmd module.
<http://docs.python.org/lib/module-cmd.html>
Ian Clark
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> Hello,
>
> I'm trying to pass array as an argument into PL/SQL procedure.
> According to cursor manual (http://cx-oracle.sourceforge.net/html/
> cursorobj.html) arrayvar() should be use to do it. I've created my
> array type in PL/SQL:
>
> CREATE OR REPLACE TYPE cx_arra
thebjorn wrote:
> On Nov 2, 6:32 am, praddy <[EMAIL PROTECTED]> wrote:
>> On Nov 1, 5:03 pm, [EMAIL PROTECTED] wrote:
>>
>>> Pradeep Jindal:
Any comments?
>>> Something with similar functionality (plus another 20 utility
>>> functions/classes or so) has probably to go into the std lib... :-)
>
Abandoned wrote:
> On 1 Ekim, 20:41, Carsten Haese <[EMAIL PROTECTED]> wrote:
>> On Mon, 2007-10-01 at 10:24 -0700, Abandoned wrote:
>>> Hi..
>>> dict1={1: 4, 3: 5}... and 2 millions element
>>> dict2={3: 3, 8: 6}... and 3 millions element
>>> I want to combine dict1 and dict2 and i don't want to
crybaby wrote:
> import re
>
> s1 =' 25000 '
> s2 = ' 5.5910 '
>
> mypat = re.compile('[0-9]*(\.[0-9]*|$)')
> rate= mypat.search(s1)
> print rate.group()
>
> rate=mypat.search(s2)
> print rate.group()
> rate = mypat.search(s1)
> price = float(rate.group())
> print price
>
> I get an error when
Shawn Minisall wrote:
> I'm trying to write a program that gets the first letter of every word
> of a phrase and prints it on screen. I'm having problems with it. I'm
> thinking a for loop would be good since I don't know the exact number of
> words the user is going to enter, but after that I
[EMAIL PROTECTED] wrote:
> h = httplib.HTTP('http://Google.com',80)
This should be:
h = httplib.HTTP('Google.com',80)
And I certainly agree with the others, check out urllib*.
Ian
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> On Sep 20, 5:46 pm, Paul Hankin <[EMAIL PROTECTED]> wrote:
>> On Sep 20, 10:59 pm, Python Maniac <[EMAIL PROTECTED]> wrote:
>>
>>> I am new to Python however I would like some feedback from those who
>>> know more about Python than I do at this time.
>>> def scrambleLine(
7stud wrote:
> However, now I am having a problem trying to set the color of the text
> that is output:
import curses
def example(screen):
if curses.has_colors():
curses.init_pair(1, curses.COLOR_GREEN, curses.COLOR_BLACK)
curses.init_pair(2, curses.COLOR_YELLOW, curses.COL
Gabriel Genellina wrote:
> En Fri, 14 Sep 2007 01:57:43 -0300, Gavin Tomlins <[EMAIL PROTECTED]>
> escribi�:
>
>> I'm trying to work out when using a format specifier I get spaces in the
>> resulting string. Eg. Looking at the outputted string you can see that
>> there are spaces after T5LAT,
Ian Clark wrote:
> Mark Morss wrote:
>> I would like to construct a class that includes both the integers and
>> None. I desire that if x and y are elements of this class, and both
>> are integers, then arithmetic operations between them, such as x+y,
>> return the same
Mark Morss wrote:
> I would like to construct a class that includes both the integers and
> None. I desire that if x and y are elements of this class, and both
> are integers, then arithmetic operations between them, such as x+y,
> return the same result as integer addition. However if either x o
Brian McCann wrote:
> init.sh
>
> #!/bin/sh
> WORKSPACE_ROOT="$1";
>
> export
> JAVA_OPTIONS="-Djava.library.path=$WORKSPACE_ROOT/:$WORKSPACE_ROOT/:$WORKSPACE_ROOT/"
> echo "JAVA_OPTIONS="$JAVA_OPTIONS;
>
> set
> PATH="$WORKSPACE_ROOT/vendor/basistech/rlp5.4/rlp/bin/ia32-glibc23-gcc32:$WORKSP
Neil Cerutti wrote:
> On 2007-09-13, Gigs_ <[EMAIL PROTECTED]> wrote:
>> Can someone explain me this
>>
> def f(l):
>> if l == []:
>> return []
>> else:
>> return f(l[1:]) + l[:1] # <= cant figure this, how is all sum
>> at the end?
>
> In plain English, t
Carsten Haese wrote:
> On Thu, 2007-09-06 at 11:24 -0700, Ian Clark wrote:
>> Carsten Haese wrote:
>>> def d6(count):
>>> return sum(random.randint(1, 6) for die in range(count))
>>>
>> My stab at it:
>>
>> >>> def roll
rave247 rave247 wrote:
> "..the *original* directory location *after* os.chdir() is
> performed.." os.getcwd() is not helping much as it returns the location
> that was set up in os.chdir() call
>
> Thanks
Your question is akin to having a name X that is bound to some value,
setting it
Carsten Haese wrote:
> On Thu, 2007-09-06 at 11:00 -0700, Scott David Daniels wrote:
>> def d6(count):
>> result = 0
>> for die in range(count):
>> result += random.randint(1, 6)
>> return result
>
> This, of course, can be further improved into:
>
> def d6(count):
> r
Hyuga wrote:
> On Aug 19, 4:29 pm, mosscliffe <[EMAIL PROTECTED]> wrote:
>> The source file is in an area which python can see, but not the
>> browser. I am trying to make a link in a browser friendly area so I
>> can use it to display an image file.
>
> You might want to try using an .htaccess f
Gerry wrote:
>... but the OS wasn't migrated ...
There's your problem right there. It's hard to run most software these
days without an OS.
Ian
--
http://mail.python.org/mailman/listinfo/python-list
Ian Clark wrote:
> Torsten Bronger wrote:
>> Hallöchen!
>>
>> How can I get a list with all classes defined in the current module?
>> Thank you!
>>
>> Tschö,
>> Torsten.
>>
>
> Assuming you want to see all classes in the re module:
>
Torsten Bronger wrote:
> Hallöchen!
>
> How can I get a list with all classes defined in the current module?
> Thank you!
>
> Tschö,
> Torsten.
>
Assuming you want to see all classes in the re module:
>>> import re
>>> help(re) #best way
>>>
>>> def isclass(cls):
... try:
...
[EMAIL PROTECTED] wrote:
> I am trying to get JPype to pass a String into a Java class main
> function. Demonstration code below:
>
> =JAVA
> package com;
>
> public class JPypeTest {
>
>public static void main(String args[]) {
> System.out.println(args[0]);
Disclaimer: I have never used (or even heard of) JPype before...
porter wrote:
(snip)
>
> "Package myclass.HelloWorld is not Callable"
>
(snip)
>
> from jpype import *
>
> startJVM(getDefaultJVMPath(), "-ea", "-Djava.class.path=D:/tmp/jpype-
> reli/test/dist/test.jar'' )
>
> package = JPackag
Lee Sander wrote:
> Hi,
>
> I would like to define a new variable which is not predefined by me.
> For example,
> I want to create an array called "X%s" where "%s" is to be determined
> based on the data I am processing. So, for example, if I the file
> I'm reading has
> g 99
> on the first line,
Stef Mientki wrote:
> hello,
>
> I discovered that boolean evaluation in Python is done "fast"
> (as soon as the condition is ok, the rest of the expression is ignored).
>
> Is this standard behavior or is there a compiler switch to turn it on/off ?
>
> thanks,
> Stef Mientki
It's called short
Fernando Perez wrote:
> Hi all,
>
> (snip)
>
> I'm really, really puzzled by this. From reading the execfile() docs, I had
> the hunch to change the call to:
>
> execfile(fname,{})
>
> and now the problem disappears, so I can keep on working.
>
> But I'm still very bothered by the fact th
lazy wrote:
> I have a berkely db and Im using the bsddb module to access it. The Db
> is quite huge (anywhere from 2-30GB). I want to iterate over the keys
> serially.
> I tried using something basic like
>
> for key in db.keys()
>
> but this takes lot of time. I guess Python is trying to get th
krishnakant Mane wrote:
> On 02/08/07, Ian Clark <[EMAIL PROTECTED]> wrote:
>
>> http://docs.python.org/lib/node85.html
>>
> I looked there even before.
> but could not figure out what the code did.
> I know in that variable called s there was a string i
krishnakant Mane wrote:
> hello,
> I have a very strange problem and I can't find any solution for that.
> I am working on an accounting package which I wish to develop in python.
> the simple problem is that I want to knoe how I can know if the given
> date is the nth day of a month.
> for example
Gerard Flanagan wrote:
> (snip)
>
> def tostring(data):
> return tuple(strftime(x) for x in data[:2]) + data[2:]
>
Hrmm, not sure that having a function named tostring() that returns a
tuple is the best idea. ;)
Ian
--
http://mail.python.org/mailman/listinfo/python-list
beginner wrote:
> Hi,
>
> In order to print out the contents of a list, sometimes I have to use
> very awkward constructions. For example, I have to convert the
> datetime.datetime type to string first, construct a new list, and then
> send it to print. The following is an example.
>
> x=(e
On 5/20/07, Michael Hoffman <[EMAIL PROTECTED]> wrote:
> [snip]
> That's not what I get:
>
> Python 2.5 (r25:51908, Mar 13 2007, 08:13:14)
> [GCC 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)] on cygwin
> Type "help", "copyright", "credits" or "license" for more information.
> >>> class A: p
On 11 May 2007 18:47:27 -0700, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> ya so im pretty much a newb to this whole python thing... its pretty
> cool but i just started today and im already having trouble. i
> started to use a tutorial that i found somewhere and i followed the
> instructions a
On 5/8/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Thanks.
> That does help. When teh script sends a mail of the list item(all_data), the
> data shows up like this:
>
> [(' Ham\n', ' eggs \n'),
> (' chicken \n', ' thighs
On 5/8/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> I have a script which has a method which returns multiple strings at once
> using the yield. I would like to send an e-mail of these values in a single
> e-mail instead of a mail for each string. How would I be able to do that?
>
> Thank
Yeah, having an elegant_solution() function would solve soo many of my
problems. ;)
Ian
--
http://mail.python.org/mailman/listinfo/python-list
On 5/2/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> I have a fairly simple curses app which is giving me this error:
>
> addstr() returned ERR
>
> I'm trapping it and continuing. I can see that *some* of my addstring calls
> succeed. This one happens to be
>
> screen.addstr(row, 39,
On 1 May 2007 16:03:28 -0700, JonathanB <[EMAIL PROTECTED]> wrote:
> Ok, so this is the scenario. I need to create a simple, no-frills XML
> editor for non-technical users. It doesn't have to do anything fancy,
> what I want is a series of text boxes with the text contents of the
> elements pre-pri
On 1 May 2007 14:30:12 -0700, mobil <[EMAIL PROTECTED]> wrote:
> Hi guys i m trying out newline characters and to clean them up
> a\n\n\n\n\n\n\n\n\nsss\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvsa\n\n\n\nasf
> \n\nafs
>
> hello guys
>
> im trying to replace
> \n\n\n\n\n\n\n\n\n with \n
>
> thanks for help
On 4/28/07, James <[EMAIL PROTECTED]> wrote:
[snip]
> username = getuser()
> string.strip
> (username)
> print "username is %s" % username
[snip]
>
>
> The autoconf.txt contains two lines, which first has an ip address and
> second a username. The problem I'm having is that the string.strip() do
Quote iogilvy:
> i wish to have some extended functionality added to sockets
>
> i can create my own socket class class mysocket(socket.socket):
>
> and all should be fine. Except, the sockets are created for me by the
> accept method, listening on port. So how can i take the standard
> socket cr
Both cursor.execute() and cursor.executemany() return the number of rows
affected.
Here is a link to the documentation:
http://mysql-python.sourceforge.net/MySQLdb-1.2.2/public/MySQLdb.cursors.BaseCursor-class.html#execute
Ian
On 4/26/07, Carl K <[EMAIL PROTECTED]> wrote:
using MySQLdb, I do
64 matches
Mail list logo