Comments on: Les imports en Python http://sametmax.com/les-imports-en-python/ Du code, du cul Fri, 06 Sep 2019 09:34:15 +0000 hourly 1 https://wordpress.org/?v=4.9.7 By: Sam http://sametmax.com/les-imports-en-python/#comment-195077 Tue, 15 May 2018 10:47:34 +0000 http://sametmax.com/?p=6127#comment-195077 Non, manage.py c’est le fichier typique d’une application django. Le point important n’est pas le fichier, mais le fait de toujours lancer Python depuis la racine du projet.

]]>
By: Florian http://sametmax.com/les-imports-en-python/#comment-195065 Tue, 15 May 2018 07:27:33 +0000 http://sametmax.com/?p=6127#comment-195065 Salut !

Tu parles d’une solution avec manage.py, qui sert de script et permet qu’une entrée unique pour le programme.

J’ai essayé de faire cette solution mais tu mets quoi dans ce fichier manage.py ?

PS : J’avais essayé en y important les packages (de mon projet)

]]>
By: StarNab http://sametmax.com/les-imports-en-python/#comment-187565 Sun, 04 Jun 2017 09:31:47 +0000 http://sametmax.com/?p=6127#comment-187565 Mdr cette phrase m’a tué déjà

“Vous avez donc décidé de vous remettre à PHP, au moins le include utilise les chemins de fichiers, et ça, c’est facile.”

]]>
By: Sam http://sametmax.com/les-imports-en-python/#comment-181740 Tue, 11 Oct 2016 08:34:50 +0000 http://sametmax.com/?p=6127#comment-181740 :)

]]>
By: lilix50 http://sametmax.com/les-imports-en-python/#comment-181723 Mon, 10 Oct 2016 15:35:31 +0000 http://sametmax.com/?p=6127#comment-181723 Bonjour

j aime tes articles j apprends et je me marre bien :)

]]>
By: Sam http://sametmax.com/les-imports-en-python/#comment-181510 Sat, 01 Oct 2016 08:59:01 +0000 http://sametmax.com/?p=6127#comment-181510 Poste ta question sur indexerror.net, ça sera plus facile de t’aider là bas.

]]>
By: Armand Benoit http://sametmax.com/les-imports-en-python/#comment-181465 Thu, 29 Sep 2016 08:23:05 +0000 http://sametmax.com/?p=6127#comment-181465 Bonjour !

Petite question sur les import (je suis sur info s’en étape s’pas) : si je bosse à un endroit -mettons G:\racinedemonscript- et que je veux importer un module depuis autre part que mon script ou le répertoire site-package de python -mettons D:\Mes Documents-, est-ce possible ?

J’ai essayé plusieurs trucs de type sys.path.append(“D:\Mes Documents”)

Import mon module

ou encore

Sys.path.append(“D:\Mes Documents”)

From package import monModule (en créant un package bien sûr)

Mais ça ne fonctionne pas :(

Merci de votre aide, le site est super !

]]>
By: Sam http://sametmax.com/les-imports-en-python/#comment-178801 Mon, 13 Jun 2016 08:42:35 +0000 http://sametmax.com/?p=6127#comment-178801 Bonjour, veuillez posez votre question sur indexerror.net

]]>
By: landry http://sametmax.com/les-imports-en-python/#comment-178751 Fri, 10 Jun 2016 18:42:57 +0000 http://sametmax.com/?p=6127#comment-178751 bonjour,

voila j’ai un souci avec un fichier python et gnuradio qui je pense doit venir d’un problème de destination de block je ne sais pas comment remédier a se problème voici l’erreur

<<< Welcome to GNU Radio Companion 3.7.9.2 >>>

Preferences file: /home/landry/.gnuradio/grc.conf

Block paths:

/home/landry/.grc_gnuradio

/usr/local/share/gnuradio/grc/blocks

Loading: “/home/landry/Bureau/transmit/……._tx.grc”

Done

Showing: “/home/landry/Bureau/transmit/……_tx.grc”

Generating: ‘/home/landry/Bureau/transmit/……_tx.py’

Executing: /usr/bin/python2 -u /home/landry/Bureau/transmit/……_tx.py

linux; GNU C++ version 4.8.4; Boost_105400; UHD_003.010.git-216-gb1c2d4bb

gr-osmosdr v0.1.4-72-g164a09fc (0.1.5git) gnuradio 3.7.9.2

built-in sink types: uhd hackrf bladerf redpitaya file

FATAL: No supported devices found to pick from.

Trying to fill up 1 missing channel(s) with null sink(s).

This is being done to prevent the application from crashing

due to gnuradio bug #528.

No such file or directory

Traceback (most recent call last):

File “/home/landry/Bureau/transmit/…….._tx.py”, line 182, in

main()

File “/home/landry/Bureau/transmit/…….._tx.py”, line 176, in main

tb = top_block_cls(args=options.args, freq=options.freq, freq_offs=options.freq_offs, in_file=options.in_file, out_file=options.out_file, oversample=options.oversample, ppm=options.ppm)

File “/home/landry/Bureau/transmit/……._tx.py”, line 71, in init

self.blocks_file_source_0 = blocks.file_source(gr.sizeof_char*1, in_file, False)

File “/usr/local/lib/python2.7/dist-packages/gnuradio/blocks/blocks_swig0.py”, line 996, in make

return _blocks_swig0.file_source_make(*args, **kwargs)

RuntimeError: can’t open file

Done (return code 1)

cordialement,

landry

]]>
By: Sam http://sametmax.com/les-imports-en-python/#comment-178033 Wed, 04 May 2016 14:22:24 +0000 http://sametmax.com/?p=6127#comment-178033 Excuter ?

]]>