; a = 2
> > b = 3
> > print( a * b )
>
> I guess the operator "*" can be imported from any module... :-)
>
> bye,
>
> --
>
> piergiorgio
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>>> a = 3
>>> b = 5
>>> print(a*b)
15
>>>
No import is necessary.
--
Joel Goldstick
--
https://mail.python.org/mailman/listinfo/python-list
rsion_info) and executable:
> >> > > Unable to initialize device PRN
> >> >
> >> > That's the command-line "print" program. You need to first start the
> >> > Python shell via python.exe. The prompt should change to ">>> ". Then
> >> > run print(sys.version) and print(sys.executable).
> >> >
> >> --
> >> https://mail.python.org/mailman/listinfo/python-list
> >>
> >
> --
> https://mail.python.org/mailman/listinfo/python-list
sys is a module that is part of 'batteries included' in python. Since
it is not part of the language per se, you need to import it
--
Joel Goldstick
--
https://mail.python.org/mailman/listinfo/python-list
27;string with starting smart quote"
>>> repr(str1)
"'’string with starting smart quote'"
>>> repr(new_str)
'"\'string with starting smart quote"'
>>>
As you can see, str1 doesn't change, but when you 'replace' on it, the
result you want is returned to new_str
--
Joel Goldstick
--
https://mail.python.org/mailman/listinfo/python-list
oon Pardon.
> --
> https://mail.python.org/mailman/listinfo/python-list
I'm not sure I understand what you are trying to do, but if your data
has no order, you can use set to remove the duplicates
--
Joel Goldstick
--
https://mail.python.org/mailman/listinfo/python-list
.
> >
> > Alternatively, if you expect an empty list to imply some single default
> > the the experession:
> >
> > the_list or (the_default,)
> >
> > might be of use.
>
> I've solved the issue.
> --
> https://mail.python.org/mailman/listinfo/python-list
Would you be so kind as to show the results of your solution?
--
Joel Goldstick
--
https://mail.python.org/mailman/listinfo/python-list
On Wed, Mar 2, 2022 at 9:01 AM Larry Martell wrote:
>
> On Wed, Mar 2, 2022 at 8:54 AM Joel Goldstick
> wrote:
> >
> > On Wed, Mar 2, 2022 at 8:46 AM Larry Martell
> > wrote:
> > >
> > > On Wed, Mar 2, 2022 at 8:37 AM Antoon Pardon wrote:
> >
he result seems to be an empty list,
> > which IMO is a perfectly valid result.
> >
> > All possible permutations over two collections where one collection is
> > empty, should IMO give you an empty collection.
>
> If one list is empty I want just the other list. Wha
^
> SyntaxError: invalid syntax
> >>>
> [/code]
>
> What is the proper way to fix this?
>
> Thank you.
> --
> https://mail.python.org/mailman/listinfo/python-list
--
Joel Goldstick
--
https://mail.python.org/mailman/listinfo/python-list
ot me curious, and I found this article. The code is
very similar to the pyaudio version a few responses back.
https://thehackerdiary.wordpress.com/2017/06/09/it-is-ridiculously-easy-to-generate-any-audio-signal-using-python/
except it doesn't need pyaudio
I run Ubuntu 20.04, and I had problems getting pyaudio on my machine.
--
Joel Goldstick
--
https://mail.python.org/mailman/listinfo/python-list
picture of my laptop screen too.
> > Waiting for your reply
> > Regards Osmany
> > --
> > https://mail.python.org/mailman/listinfo/python-list
> >
> --
> https://mail.python.org/mailman/listinfo/python-list
Better yet, cut and paste your relevant text in your email
On Tue, Mar 9, 2021 at 10:36 PM S Monzur wrote:
>
> Thanks! I ended up using beautiful soup to remove the html tags and create
> three lists (titles of article, publications dates, main body) but am still
> facing a problem where the list is not properly storing the main body.
> There is something
le, or the default python interactive
console? If you did, please do that again, and copy and paste your
code and the results here. There is something amiss.
--
Joel Goldstick
http://joelgoldstick.com/blog
http://cc-baseballstats.info/stats/birthdays
--
https://mail.python.org/mailman/listinfo/python-list
iteTimeDate POSIX
> Samplea.py", line 38, in
> dto = datetime.datetime.strptime(d1, '%Y-%m-%d %H:%M:%S.%f')
> AttributeError: type object 'datetime.datetime' has no attribute 'datetime'
> """
> This code will be copied into another program as a function and the presence
&g
hon works fine, the variable name is used
> outside of the if block even it has been declared inside.
>
> This does not look right to me. Can we change this behavior or is there
> any point to keep it this way ?
> --
> https://mail.python.org/mailman/listinfo/python-list
gt;[2][IMG] Virus-free. [3]www.avg.com
>
> References
>
>Visible links
>1. https://go.microsoft.com/fwlink/?LinkId=550986
>2.
> http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient
>
rings contain ' (single quote) characters.
>
> [snip]
>
> --
> https://mail.python.org/mailman/listinfo/python-list
I'm assuming that you don't want the string to start with single
quote, doublequote, or the other way around. If you have that
situation, strip the first and
want to learn python, how can i or where can i study python?
> > --
> > https://mail.python.org/mailman/listinfo/python-list
> >
> --
> https://mail.python.org/mailman/listinfo/python-list
start with python.org
--
Joel Goldstick
http://joelgoldstick.com/blog
http://cc
ht triple quotes are for docstrings?
> ChrisA
> --
> https://mail.python.org/mailman/listinfo/python-list
--
Joel Goldstick
http://joelgoldstick.com/blog
http://cc-baseballstats.info/stats/birthdays
--
https://mail.python.org/mailman/listinfo/python-list
ROJ4_VERSION,
> ImportError: libproj.so.19: cannot open shared object file: No such file
> or directory
>
>
> Thank you,
>
>
> Conrado
>
> --
> https://mail.python.org/mailman/listinfo/python-list
--
Joel Goldstick
http://joelgoldstick.com/blog
http://cc-baseballstats.info/stats/birthdays
--
https://mail.python.org/mailman/listinfo/python-list
sticated algorithm for free will in robots. If you have no robot and
> you are building a creature of pure reason, nevertheless include a Volition
> stub for the sake of AI-Complete design patterns.
>
>
> 33. The SeCurity module.
>
> The SeCurity module is not a natural com
python-list
> >
> --
> https://mail.python.org/mailman/listinfo/python-list
I found this article for using a raspberry pi and a gps card. It
might give you some ideas:
https://tutorials-raspberrypi.com/build-raspberry-pi-gps-location-navigation-device/
--
Joel Goldstick
http://joelgoldsti
) = '/content/gdrive/My
> Drive/3_Classes/'.loads_data()
> 3 trainX = trainX.astype("float") / 255.0
> 4 testX = testX.astype("float") / 255.0
> 5
> --
> https://mail.python.org/mailman/listinfo/python-list
--
Joel Goldstick
http://joelgoldstick.com/blog
http://cc-baseballstats.info/stats/birthdays
--
https://mail.python.org/mailman/listinfo/python-list
ities.
>
> Regards,
> Sandesh Kamble
>
>
> Sent from Mail for Windows 10
>
> --
> https://mail.python.org/mailman/listinfo/python-list
if you are typing something like this:
cd /mydir
but you are in the python shell, and not to linux shell
copy and paste your screen display
PROC SQL:"
This will find the starting index point. It returns and index
3. DO the same for each of the three possible ending strings. Use if/else
4. This will give you your ending index.
5 slice the included string, taking into account the start is start +
len("PROC SQL;") an
explanation there, and I have placed the cursor at the
> beginning of the first indented line. Moving down 1 line at a time ,
> each line is at the same position upto line 157 in the authors code .
> Then it is closer in to the edge upto line 190, where it goes back out
> again.
>
> What i
> --
> https://mail.python.org/mailman/listinfo/python-list
I'm thinking this is a troll or a turing machine experiment?
--
Joel Goldstick
http://joelgoldstick.com/blog
http://cc-baseballstats.info/stats/birthdays
--
https://mail.python.org/mailman/listinfo/python-list
em! This is a mailing list where people
will help you solve python problems. You need to do your part as
well. Photos, or any attachments are removed before your message is
sent to list members. Please copy and paste your traceback from when
you run your code, and describe the problems you ar
), pattern, flags]
> TypeError: unhashable type: 'list'
>
> Thanks for any insigths --
> --
> Regards,
> Joseph Pareti - Artificial Intelligence consultant
> Joseph Pareti's AI Consulting Services
> https://www.joepareti54-ai.com/
> cell +49 1520 1600 209
> cell +39 339 797 0644
> --
> https://mail.python.org/mailman/listinfo/python-list
--
Joel Goldstick
http://joelgoldstick.com/blog
http://cc-baseballstats.info/stats/birthdays
--
https://mail.python.org/mailman/listinfo/python-list
gt; [image: image.png]
>
>
> Thanks and Regards,
> S.V.Bhargava Reddy.
> --
> https://mail.python.org/mailman/listinfo/python-list
Images don't make it through on this mailing list. Try to cut and
paste complete error message. What OS
--
Joel Goldstick
http://joelgoldstick
> with it.
> >
>
> This is JUST a default display representation. Nothing more. If you
> care about how something is displayed, just use a formatting tool.
> That's all you need to do.
>
> ChrisA
> --
> https://mail.python.org/mailman/listinfo/python-list
fronts daily -- No one
really knows how anything works under the hood. Think: car, toaster,
microwave oven, Facebook algorithms, light bulbs, and on and on
--
Joel Goldstick
http://joelgoldstick.com/blog
http://cc-baseballstats.info/stats/birthdays
--
https://mail.python.org/mailman/listinfo/python-list
On Fri, Oct 4, 2019 at 5:01 AM Hongyi Zhao wrote:
>
> Hi,
>
> Could you please give me some more hints on:
>
> a &= b
>
> It's very difficult for me to understand.
> --
> https://mail.python.org/mailman/listinfo/python-list
& is bitwise And. a
>
> def add_vat(amount, vat_rate):
> berekening = amount * (1+vat_rate)
> return round(berekening,2)
>
> print(add_vat(101, 'high'))
> --
> https://mail.python.org/mailman/listinfo/python-list
These code snippets don't run Can you paste your complete code that
runs, with the output you get?
--
Joel Goldstick
http://joelgoldstick.com/blog
http://cc-baseballstats.info/stats/birthdays
--
https://mail.python.org/mailman/listinfo/python-list
On Sat, Sep 7, 2019 at 8:28 PM Joel Goldstick wrote:
>
> On Sat, Sep 7, 2019 at 8:21 PM Sharan Basappa
> wrote:
> >
> > I am trying to read a log file that is in CSV format.
> >
> > The code snippet is below:
> >
> > ###
&
Numpy's astype function. At this stage, I get an error.
>
> This is the error:
> my_data_3 = my_data_2.astype(np.float)
> could not convert string to float: " "81
>
> As you can see, the string "\t"81 is causing the error.
> It seems to be due to char "\t".
>
> I don't know how to resolve this.
>
> Thanks for your help.
>
> --
> https://mail.python.org/mailman/listinfo/python-list
how about (strip(my_data_2).astype(np.float))
I haven't used numpy, but if your theory is correct, this will clean
up the string
--
Joel Goldstick
http://joelgoldstick.com/blog
http://cc-baseballstats.info/stats/birthdays
--
https://mail.python.org/mailman/listinfo/python-list
ader to get a list of words between comma. Print the one you
like and join the values on each side of the text you are looking for.
Write that to a file
Lather, rinse and repeat
--
Joel Goldstick
http://joelgoldstick.com/blog
http://cc-baseballstats.info/stats/birthdays
--
https://mail.python.org/mailman/listinfo/python-list
od idea. However, you can just import
all of the modules you might expect to need, and ignore if they aren't
present with a suitable try/except block. Try explaining the bigger
picture of what you are trying to do, and maybe you can gain some
incite into a better way of proceeding. I'm afraid it looks like you
have been cutting and pasting without understanding what your code's
design is all about. I could be totally wrong. good luck
--
Joel Goldstick
http://joelgoldstick.com/blog
http://cc-baseballstats.info/stats/birthdays
--
https://mail.python.org/mailman/listinfo/python-list
copy and pasted traceback.
That said I found this:.. versionadded:: 1.14.0
max_rows : int, optional
Check your version of loadtxt()?
> --
> https://mail.python.org/mailman/listinfo/python-list
--
Joel Goldstick
http://joelgoldstick.com/blog
http://cc-baseballstats.info/stats/birthdays
--
https://mail.python.org/mailman/listinfo/python-list
On Mon, Sep 2, 2019 at 9:21 AM Spencer Du wrote:
>
> On Monday, 2 September 2019 15:03:52 UTC+2, Joel Goldstick wrote:
> > On Mon, Sep 2, 2019 at 8:46 AM Spencer Du wrote:
> > >
> > > On Monday, 2 September 2019 13:36:06 UTC+2, Pankaj Jangid wro
compiles it in order. Since
you don't know what you want to import until after you run your
program, you can't import those modules. You may be able to run a
program to read the module list, then have it output to a new file the
code you eventually want to run based on the modules you discovered.
That sounds cute in a way, but probably not in a good way. You could
also surround import statements with try/except code that will import
what it can, and alert you when it can't
Can you give us the bigger picture of what you want to accomplish?
This might lead to a better solution than the one you are thinking of
now
--
Joel Goldstick
http://joelgoldstick.com/blog
http://cc-baseballstats.info/stats/birthdays
--
https://mail.python.org/mailman/listinfo/python-list
here is
> only one function can change its value?
>
> Cameron Simpson 于2019年8月23日周五 下午3:15写道:
>
The problem with deciding that only one function can change the value,
is that someone else can change the other functions. So, if you are
working alone, it won't be a problem, but once
its own set of features and applications I know well, if a
> customer wants a dynamic website with a lot of logic (dynamic pages).
>
> -Morten
>
> Blogging at http://blogologue.com
> Tweeting at https://twitter.com/blogologue
> On Instagram https://instagram.com/morphexx
>
er makers didn't like it. HTML5 seemed to be
a big step forward. I used a program called Citydesk a long time ago
that I think could do what the op might like. But its long gone. I
think django could be used to make static pages quite easily. Its not
hard to learn, and in the event your
On Mon, Jun 24, 2019 at 4:13 AM Sagar Jape wrote:
>
> I'm not able to install pip in my pc it gives following error. what should
> I do?
> --
> https://mail.python.org/mailman/listinfo/python-list
Copy and paste your session info. The list doesn't show images.
>
> >
> --
> https://mail.python.org/mailman/listinfo/python-list
It appears you are trying to execute a linux shell command while in
the python repl. exit python, and try again
--
Joel Goldstick
http://joelgoldstick.com/blog
http://cc-baseballstats.info/stats/birthdays
--
https://mail.python.org/mailman/listinfo/python-list
raries, you will find that using virtualenv keeps the
right things in the right places. So after you get started with
Django, look into what your problems are with virtualenv. Copy and
paste the commands you use to install it, and include the resulting
error messages. You will get help here
> >
>
> Nah mate,
>
> def text():
> mess = input("> ")
> s.send(bytes("PRIVMSG " + " "+ channel + " " + mess + "\n", "UTF-8"))
>
> text()
>
Is this a typo or are you calling text() from w
Beautiful soup is your friend here. It can analyze the data within
the html tags on your scraped page. But often javascript is used on
'modern' web pages so the page is actually not just html, but
javascript that changes the html. For this you need another tool -- i
think one is calle
in the python-tutor
mailing list. You should also use print function in your loops to
learn what is really going on.
> --
> https://mail.python.org/mailman/listinfo/python-list
--
Joel Goldstick
http://joelgoldstick.com/blog
http://cc-baseballstats.info/stats/birthdays
--
https://mail.python.org/mailman/listinfo/python-list
me to fix it?! :\
> >
> > ^Bart
> --
> https://mail.python.org/mailman/listinfo/python-list
This looks like homework. What you are asking could be solved a
number of ways. I'm guessing your homework wants you to learn about
if/else and comparison operators. A
; special type of variable, the "stem".
>
> ChrisA
> --
> https://mail.python.org/mailman/listinfo/python-list
I don't normally comment on this type of thread, but I believe the OP
is showing an example of the dunning-kruger effect
https://en.wikipedia.org/wiki/Dunning%E2%80%93
On Sun, Nov 25, 2018 at 11:51 AM Muhammad Rizwan
wrote:
>
> On Sunday, 25 November 2018 11:41:56 UTC-5, Joel Goldstick wrote:
> > On Sun, Nov 25, 2018 at 11:36 AM Muhammad Rizwan
> > <> wrote:
> > >
> > > IF YOU CAN'T HELP BETTER
e that
people here are often very knowledgeable to help with python problems,
but as a rule, doing someone's homework isn't something people like
to do.
On to your problem. You should understand lists and sets, and for
loops. Try some code and come back with what you have. Then you will
get
vely monitor and help out on the Tutor list.
> --
> boB
> --
> https://mail.python.org/mailman/listinfo/python-list
--
Joel Goldstick
http://joelgoldstick.com/blog
http://cc-baseballstats.info/stats/birthdays
--
https://mail.python.org/mailman/listinfo/python-list
? As a beginner, I find this
> confusing. How do you do it?
>
> Thank you!
> --
> https://mail.python.org/mailman/listinfo/python-list
Learn about help. Go to python command line and type help(L) it will show that
this method reverses in place. Type help(name) and it will sho
? As a beginner, I find this
> confusing. How do you do it?
>
> Thank you!
> --
> https://mail.python.org/mailman/listinfo/python-list
Learn about help. Go to python command line and type help(L) it will
show that this method reverses in place. Type help(name) and it will
show
er the numbers separated by space and press ENTER :5 90 63 82 59 24
> > 5
> > 5
> > 5
> > 5
> > 5
> > 24
> > Lowest : 24
> >
> > Regards
> > Mohan C
> >
>
>
> Compare,
>
> >>> min(5, 90, 63, 82, 59, 24)
Wulfraed Dennis Lee Bieber AF6VN
> wlfr...@ix.netcom.comHTTP://wlfraed.home.netcom.com/
>
> --
> https://mail.python.org/mailman/listinfo/python-list
although i don't offer advice too often here, as i am kind of
retired., this is extremel
On Sun, Aug 19, 2018 at 12:16 PM Richard Lucassen
wrote:
>
> On Sun, 19 Aug 2018 10:11:08 -0400
> Joel Goldstick wrote:
>
> > > Well, apparently there were quite a lot of things that makes the
> > > code more readable I'd say. And even better. But it was in
data objects
>
> --
> richard lucassen
> http://contact.xaq.nl/
> --
> https://mail.python.org/mailman/listinfo/python-list
--
Joel Goldstick
http://joelgoldstick.com/blog
http://cc-baseballstats.info/stats/birthdays
--
https://mail.python.org/mailman/listinfo/python-list
bers, and you can subtract that sequence from the sequence
of positive integers
--
Joel Goldstick
http://joelgoldstick.com/blog
http://cc-baseballstats.info/stats/birthdays
--
https://mail.python.org/mailman/listinfo/python-list
#x27; issue that I can see.
>
> Abdur-Rahmaan Janhangeer
> https://github.com/Abdur-rahmaanJ
>
> * Create as many functions as you can
> --
> https://mail.python.org/mailman/listinfo/python-list
--
Joel Goldstick
http://joelgoldstick.com/blog
http://cc-baseb
ttps://mail.python.org/mailman/listinfo/python-list
Others can probably give a more complete explanation, but small
numbers, and apparently letters are cached since they are so common.
--
Joel Goldstick
http://joelgoldstick.com/blog
http://cc-baseballstats.info/stats/birthdays
--
https://mail.python.org/mailman/listinfo/python-list
171.13
> week52Low 139.13
> ytdChange -0.0485148849103
>
> You would do multiple symbols in a loop which you enter with an open urllib
> object, rather than opening a new one for each symbol inside the loop.
>
> Frederic
>
> --
> https://mail.python.org/mailman/listinfo/python-list
Many people find the library called Requests a better alternative to
urllib. It is more intuitive
--
Joel Goldstick
http://joelgoldstick.com/blog
http://cc-baseballstats.info/stats/birthdays
--
https://mail.python.org/mailman/listinfo/python-list
quot;, line 132
> if(PY3K): ID = ID.decode("utf-8")
> ^
> TabError: inconsistent use of tabs and spaces in indentation
> --
> https://mail.python.org/mailman/listinfo/python-list
Check to see if you have a tab after the colon in the last line. You
must u
//mail.python.org/mailman/listinfo/python-list
sqlite is a small, in memory db that comes standard with python (i'm
pretty sure). Great place to start
--
Joel Goldstick
http://joelgoldstick.com/blog
http://cc-baseballstats.info/stats/birthdays
--
https://mail.python.org/mailman/listinfo/python-list
On Wed, Jan 31, 2018 at 10:55 AM, wrote:
> from where we learn python for free of cost. i am begineer in python.plzz
> help me
> --
> https://mail.python.org/mailman/listinfo/python-list
>
Start with python.org tutorial pages
--
Joel Goldstick
http://joelgoldstick.com
f the line, since 'in' would still be
true no matter where the desired string is placed. It would be useful to see
some sample data of the old data, and the new data
--
Joel Goldstick
http://joelgoldstick.com/blog
http://cc-baseballstats.info/stats/birthdays
--
https://mail.python.org/mailman/listinfo/python-list
y will help you figure out
what you don't understand
--
Joel Goldstick
http://joelgoldstick.com/blog
http://cc-baseballstats.info/stats/birthdays
--
https://mail.python.org/mailman/listinfo/python-list
indows 10
> >
> > --
> > https://mail.python.org/mailman/listinfo/python-list
> --
> https://mail.python.org/mailman/listinfo/python-list
>
--
Joel Goldstick
http://joelgoldstick.com/blog
http://cc-baseballstats.info/stats/birthdays
--
https://mail.python.org/mailman/listinfo/python-list
f the line, since 'in' would
still be true no matter where the desired string is placed. It would be
useful to see some sample data of the old data, and the new data
--
Joel Goldstick
http://joelgoldstick.com/blog
http://cc-baseballstats.info/stats/birthdays
--
https://mail.python.org/mailman/listinfo/python-list
als to 3 right ?
> which
> > >equals the right hand side , hence first term is True
> >
> > But the test is for "!=", not "==". So False.
> >
> > Cheers,
> > Cameron Simpson (formerly c...@zip.com.au)
>
> Right ... I didn't see the ' =! '
> --
>
You didn't see the '!='
--
Joel Goldstick
http://joelgoldstick.com/blog
http://cc-baseballstats.info/stats/birthdays
--
https://mail.python.org/mailman/listinfo/python-list
ef f(i): print(i); return i;
>
> f(4)**f(1)**f(2)
>
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>
That's a nice problem for order evaluation. I guessed wrong.
--
Joel Goldstick
http://joelgoldstick.com/blog
http://cc-baseballstats.info/stats/birthdays
--
https://mail.python.org/mailman/listinfo/python-list
rn more. It displays information like help does in a python
environment, but you can also redirect it to a file
--
Joel Goldstick
http://joelgoldstick.com/blog
http://cc-baseballstats.info/stats/birthdays
--
https://mail.python.org/mailman/listinfo/python-list
s://mail.python.org/mailman/listinfo/python-list
>
You haven't asked a question. It is doubtful someone here would write code
for you. In any case your problem isn't well stated. Why don't you show
the code you have written, and explain where it fails?
--
Joel Golds
pposite, for instance, some parameters or outputs from the second function
>> are called in the first one even thou they are not global, any hints ?
>>
> Maybe if you post some specific code it will be easier to see what
Functions are run in the order in which they are called
webpage before answering:
>
> http://sscce.org/
>
> It is written for Java programmers, but it applies to Python too.
>
> Thank you.
>
>
>
> --
> Steve
> Emoji: a small, fuzzy, indistinct picture used to replace a clear and
> perfectly comprehensible word.
te the traceback -- most people (all?) won't
see the image you added here
--
Joel Goldstick
http://joelgoldstick.com/blog
http://cc-baseballstats.info/stats/birthdays
--
https://mail.python.org/mailman/listinfo/python-list
y on topic.
>
> Isn't this list content moderated by anyone?
>
> -Jim
>
Plus 1 to Jim. Come on gang! Back to python! Spaces vs. tabs anyone?
--
Joel Goldstick
http://joelgoldstick.com/blog
http://cc-baseballstats.info/stats/birthdays
--
https://mail.python.org/mailman/listinfo/python-list
e')
>> 17 updatedb('postgres')
>> 18
>> 19 if __name__ == "__main__":
>> 20 main()
>> -
>>
>>
>
> --
> https://mail.python.org/mailman/listinfo/python-list
You may have an indentation problem that isn't apparent in your code
pasted here. Are you sure that dbconnect always returns something?
--
Joel Goldstick
http://joelgoldstick.com/blog
http://cc-baseballstats.info/stats/birthdays
--
https://mail.python.org/mailman/listinfo/python-list
ng at all and it still
> produces
> ProgrammingError(1064, "You have an error in your SQL syntax; check the
> manual that corresponds to your MariaDB server version for the right syntax
> to use near '(pagesID, host, ref, location, useros, browser, visits) VALUES
> (1, 'cyta.gr', '' at line 1")
>
> I think that Ian Kelly is right and it has soemthign to do with the databse
> wrapper not substituting properly the actual string contain in the LIKE
> clause between the double quotes.
>
> Perhaps i need to change pymysql with some other database interface or there
> is something other than that?
> --
> https://mail.python.org/mailman/listinfo/python-list
--
Joel Goldstick
http://joelgoldstick.com/blog
http://cc-baseballstats.info/stats/birthdays
--
https://mail.python.org/mailman/listinfo/python-list
worth the name, makes it a non issue (since it can
> convert between one and the other, Eclipse/LiClipse comes to mind). Get
> real, and think before you post/send!
>
> --
> Gilmeh
> --
> https://mail.python.org/mailman/listinfo/python-list
+1
--
Joel Goldstick
http://
first to post that this topic would go nowhere. 77 posts
later, for some reason the word 'spaceist' bothers me. Why do people
debate spaces versus tabs? I don't think it has to do with spaces or
tabs, but something more sociological or psychological.
--
Joel Goldstick
http://joelgoldstick.com/blog
http://cc-baseballstats.info/stats/birthdays
--
https://mail.python.org/mailman/listinfo/python-list
ndentation,
> did such attemps take place?
> --
> https://mail.python.org/mailman/listinfo/python-list
This is not a useful conversation. It has been had over and over in
the past. Some people like tabs, some like spaces. In python you can
use either, but you must stick to one
t that price? ")
> while price or how_many != "done":
> total_price = int(total_price) + int(price)
> total_items = int(total_items) + int(how_many)
> item_num = item_num + 1
> price = input("What is the price of item number " + str(item_num) + &
ough you pressed on
> with certain lines of comment, especially when it was pointed out that
> your question came from the wrong premise and idea of what the "console"
> is. I don't believe that someone pointing out flaws in your
> understanding is inherently rude, th
ython.org/mailman/listinfo/python-list
I was confused whether the OP wanted to retain the list order. The
spec seemed unclear. If not, this is a nice approach. Of course this
also removes duplicate values.
--
Joel Goldstick
http://joelgoldstick.com/blog
http://cc-baseballstats.info/stats/birthdays
--
https://mail.python.org/mailman/listinfo/python-list
while, einstein, you will see that the group will
wander off into (sometimes) interesting asides when the original
question seems to have been played out. Its a form a creative
ignoring.
--
Joel Goldstick
http://joelgoldstick.com/blog
http://cc-baseballstats.info/stats/birthdays
--
https://mai
tten
backwards so that it appears normal in a rear view mirror. Do they do
that in other countries?
> --
> Wulfraed Dennis Lee Bieber AF6VN
> wlfr...@ix.netcom.com HTTP://wlfraed.home.netcom.com/
>
> --
> https://mail.python.org/mailman/listinfo/p
ed:
>>[(1, 2), (3, 4)]
>
> You can try [(x,z) for x,z in data].
> In your situation a takes the values (1,2) or (3,4) in the one that I put x
> and z take the tupple values (x first one z second one).
>
>>>> [(x,z) for x,z in data]
> [(1, 2), (3, 4)]
I like yours bett
:
> [(1, 2), (3, 4)]
> --
> https://mail.python.org/mailman/listinfo/python-list
Thy this:
>>> [(a[0], a[1]) for a in data]
[(1, 2), (3, 4)]
--
Joel Goldstick
http://joelgoldstick.com/blog
http://cc-baseballstats.info/stats/birthdays
--
https://mail.python.org/mailman/listinfo/python-list
things could be worse.” So I cheered up, and sure
> enough, things got worse.
>
> --
> https://mail.python.org/mailman/listinfo/python-list
--
Joel Goldstick
http://joelgoldstick.com/blog
http://cc-baseballstats.info/stats/birthdays
--
https://mail.python.org/mailman/listinfo/python-list
; is not defined
>
> How to solve this error ?
> --
> https://mail.python.org/mailman/listinfo/python-list
have you imported pygame?
--
Joel Goldstick
http://joelgoldstick.com/blog
http://cc-baseballstats.info/stats/birthdays
--
https://mail.python.org/mailman/listinfo/python-list
t python.
Can you be a bit more forthcoming about your issue?
--
Joel Goldstick
http://joelgoldstick.com/blog
http://cc-baseballstats.info/stats/birthdays
--
https://mail.python.org/mailman/listinfo/python-list
=open('mutation_result.csv','w')
> if INPUT['equi_steps'] == 0: #direct mutation
> output.writelines('MutNodes,MutStates,%s\n'%(','.join(INPUT['observe_list'])))
> for mute_pair in mut_list:
> nodes=[]
> states=[]
> for node,state in mute_pair:
> nodes.append(node)
> states.append(str(state))
> output.writelines('%s,%s,%s\n'%('/'.join(nodes),'/'.join(states),','.join(mut_result[mute_pair])))
> elif INPUT['equi_steps'] > 0: #mutation with pre-equilibration steps
> out_list=[]
> for node in INPUT['observe_list']:
> out_list.append(node)
> out_list.append(node+'(mut)')
> output.writelines('MutNodes,MutStates,%s\n'%(','.join(out_list)))
> for mute_pair in mut_list:
> nodes=[]
> states=[]
> for node,state in mute_pair:
> nodes.append(node)
> states.append(str(state))
> result_list=[each_result for each_pair in mut_result[mute_pair] for
> each_result in each_pair] # collapse results
> output.writelines('%s,%s,%s\n'%('/'.join(nodes),'/'.join(states),','.join(result_list)))
> output.close()
>
> def GenerateCombinations(INPUT):
> StrBool={'True':True,'False':False}
> NodeState=[]
> Combine=[]
> for node_list in INPUT['mutation_list']:
> for node in open(node_list):
> NodeState.append((node.strip(),StrBool[INPUT['keep_state'][INPUT['mutation_list'].index(node_list)]]))
> if INPUT['mutation_mode']=='single':
> for mute_state in NodeState:
> Combine.append((mute_state,))
> return Combine
> elif INPUT['mutation_mode']=='double':
> for i in range(len(NodeState)):
> for j in range(i+1,len(NodeState)):
> if NodeState[i][0] != NodeState[j][0]:
> Combine.append((NodeState[i],NodeState[j]))
> print 'Total %s combinations.'%(len(Combine))
> return Combine
> if __name__ == '__main__':
> try:
> para=ParaParser(sys.argv[1])
> except:
> para=ParaParser('mutation.in')
> simu_mutation(para)
>
>
> After running this file, I got the following
> error:/home/JPJ/Priya_Ph.D/simple_bool/simplebool/SimpleBool-master/BoolMutation.py
> in ()
> 383 para=ParaParser(sys.argv[1])
> 384 except:
> --> 385 para=ParaParser('mutation.in')
> 386 simu_mutation(para)
>
> /home/JPJ/Priya_Ph.D/simple_bool/simplebool/SimpleBool-master/BoolMutation.py
> in ParaParser(ParaFile)
> 254 } # define parameters
> 255
> --> 256 for each_line in open(ParaFile).readlines():
> 257 para_name = each_line.split('=')[0].strip()
> 258 para_value = each_line.split('=')[1].strip()
>
> IOError: [Errno 2] No such file or directory: 'mutation.in'
>
>
> I can't understand, the problem here. Should I specify anything in the
> Boolmutation.py file. Any help would be appreciated
> Thank you
> Regards
> Priya
> --
> https://mail.python.org/mailman/listinfo/python-list
--
Joel Goldstick
http://joelgoldstick.com/blog
http://cc-baseballstats.info/stats/birthdays
--
https://mail.python.org/mailman/listinfo/python-list
r
> sounding or acting), and can still suffer socially for such reasons, this it
> not funny to me. We should stick with ducks.
>
> --
> Terry Jan Reedy
>
> --
> https://mail.python.org/mailman/listinfo/python-list
which ducks?
--
Joel Goldstick
http://joelgoldstick.com/blog
http://cc-baseballstats.info/stats/birthdays
--
https://mail.python.org/mailman/listinfo/python-list
hon 3.x. print is a function. Use print("this line
will be printed")
--
Joel Goldstick
http://joelgoldstick.com/blog
http://cc-baseballstats.info/stats/birthdays
--
https://mail.python.org/mailman/listinfo/python-list
cks that
>> don't now use 'end' would look odd. I think it would either have to be
>> all or nothing. I guess nothing.
>
>
>
>
> --
> Steven
> “Cheer up,” they said, “things could be worse.” So I cheered up, and sure
> enough, things got worse.
>
This thread is beginning to feel like a dog whistle for people who
like braces. I've been python coding since 2009 I think, and I think
I have used pass less than a handful of times. ... and except for sets
and dicts, I can't remember using a {
--
Joel Goldstick
http://joelgoldstick.com/blog
http://cc-baseballstats.info/stats/birthdays
--
https://mail.python.org/mailman/listinfo/python-list
", it then renames it to
> "win.txt", so "win_new.txt" shouldn't exist.
>
> Of course, if there's already a file called "win_old.txt", then the first
> rename will raise an exception, and you'll have "win_new.txt" and the
> original "win.txt".
>
> --
> https://mail.python.org/mailman/listinfo/python-list
Why don't you comment out the renames, and see what happens?
--
Joel Goldstick
http://joelgoldstick.com/blog
http://cc-baseballstats.info/stats/birthdays
--
https://mail.python.org/mailman/listinfo/python-list
On Tue, Jul 5, 2016 at 6:29 PM, Seymore4Head
wrote:
> On Tue, 5 Jul 2016 18:27:25 -0400, Joel Goldstick
> wrote:
>
>>On Tue, Jul 5, 2016 at 6:05 PM, Seymore4Head
>> wrote:
>>> import os
>>>
>>> f_in = open('win.txt', 'r'
1 - 100 of 741 matches
Mail list logo